多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## useSortable 可进行排序 ``` <script setup lang="ts"> import { useSortable } from '@vueuse/integrations/useSortable' import { ref } from 'vue' const el = ref<HTMLElement | null>(null) const list = ref([{ id: 1, name: 'a' }, { id: 2, name: 'b' }, { id: 3, name: 'c' }]) useSortable(el, list) </script> <template> <div ref="el"> <div v-for="item in list" :key="item.id"> {{ item.name }} </div> </div> </template> ```