Open hrynevychroman opened 1 year ago
Interested in this too!
Very interested in this feature as well.
How can i implement multidrag plugin? https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag如何实现多拖插件?https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag I try to add something like this, but it don't work, also i see that it is calling on Sortable.mount(), how can i make it with VueDraggable?我尝试添加这样的东西,但它不起作用,我也看到它正在调用 Sortable.mount(),我如何使用 VueDraggable 制作它?
i want to ask this problem is sloved?
anyone?
Ok, finally got it.
To make it work with Draggable
vue 3 component i came up with this: (maybe not a super clean solution, but it works 😄 )
onMounted(() => {
// get the element. ref won't work
const clauseList = document.getElementById("clause_list")
if (!clauseList)
return
Sortable.mount(new MultiDrag())
sortable.value = Sortable.create(clauseList, {
animation: 300,
multiDrag: true, // Enable the plugin
selectedClass: "selected", // Class name for selected item
avoidImplicitDeselect: false, // true - if you don't want to deselect items on outside click
})
})
in the template
<Draggable id="clause_list">
...all other stuff
</Draggable>```
hope this helps
Ok, finally got it. To make it work with
Draggable
vue 3 component i came up with this: (maybe not a super clean solution, but it works 😄 )onMounted(() => { // get the element. ref won't work const clauseList = document.getElementById("clause_list") if (!clauseList) return Sortable.mount(new MultiDrag()) sortable.value = Sortable.create(clauseList, { animation: 300, multiDrag: true, // Enable the plugin selectedClass: "selected", // Class name for selected item avoidImplicitDeselect: false, // true - if you don't want to deselect items on outside click }) })
in the template
<Draggable id="clause_list"> ...all other stuff </Draggable>``` hope this helps
thank you very much, It's a pity that this library is no longer maintained.
How can i implement multidrag plugin? https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag I try to add something like this, but it don't work, also i see that it is calling on Sortable.mount(), how can i make it with VueDraggable?