Sortable List
Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码
预览
Studio priorities
- Collect referencesFind the right direction01
- Explore the visual systemType, color, and composition02
- Build the first prototypeMake the interaction tangible03
- Ship something usefulPolish the details and release04
用法
vue
<script setup lang="ts">
import { ref } from 'vue'
import { SortableStack } from 'beui-vue'
const tasks = ref([
{id:'research',title:'Collect references',detail:'Find the right direction'},
{id:'design',title:'Explore the visual system',detail:'Type, color, and composition'},
{id:'build',title:'Build the first prototype',detail:'Make the interaction tangible'},
{id:'ship',title:'Ship something useful',detail:'Polish the details and release'},
])
</script>
<template><div class="tasks"><strong>Studio priorities</strong><SortableStack v-model="tasks" label="Studio priorities" /></div></template>
<style scoped>.tasks { width:min(27rem,100%); } strong { display:block; margin-bottom:.8rem; }</style>API
v-model 绑定带有 id、title 的数组。拖动手柄调整顺序,或按空格提起、方向键移动、空格放下。支持撤销。