在我的@vue/cli 4.0.5 / vuedraggable 2.24.1中,我制作了两个面板,其中的元素可以从一个面板拖到另一个面板,但不能在一个面板中排序。
阅读这里的文档https://github.com/SortableJS/Vue.Draggable我看到了示例:
<draggable
v-model="list"
handle=".handle"
:group="{ name: 'people', pull: 'clone', put: false }"
ghost-class="ghost"
:sort="false"
@change="log"
>
<!-- -->
</draggable>我期望定义:对属性和with进行排序
dragOptions() {
return {
animation: 0,
group: "description",
disabled: !this.enable_tasks_dragging,
ghostClass: "ghost"
}
},这并不是我所期望的结果:项目可以从一个面板拖到另一个面板,并在一个面板内排序。如何让1个面板内的项目不排序?
谢谢!
发布于 2020-10-15 14:39:03
在Github页面上有一个所有可排序选项https://github.com/SortableJS/Vue.Draggable#all-sortable-options的链接。然后你就会得到这个
导入到项目中:
// Default SortableJS
import Sortable from "sortablejs";
import { Sortable, MultiDrag, Swap, OnSpill, AutoScroll } from "sortablejs";所以我认为你只需要手动选择你想要的选项( import{...}
https://stackoverflow.com/questions/64365703
复制相似问题