Skip to content

Sortable List ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

Studio priorities
  1. Collect referencesFind the right direction
    01
  2. Explore the visual systemType, color, and composition
    02
  3. Build the first prototypeMake the interaction tangible
    03
  4. Ship something usefulPolish the details and release
    04

用法 ​

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 的数组。拖动手柄调整顺序,或按空格提起、方向键移动、空格放下。支持撤销。

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。