anish2690 / vue-draggable-next

Vue 3 drag-and-drop component
https://vue-draggable-next.vercel.app
MIT License
505 stars 44 forks source link

How to use sortablejs plugins #33

Open arkfancy opened 2 years ago

arkfancy commented 2 years ago

I want to use swap plugin like this https://github.com/SortableJS/Sortable/tree/master/plugins/Swap but I don't know how or where to write the mount method

now my code is like this

<vue-draggable-next group="drapGroup" v-model="row.dropList" @change="dropChange($event, row, false)">
<div class="can-drop" v-for="item in row.dropList" :key="item.id">
    <div>{{item.name}}</div>
</div>
</vue-draggable-next>

<script setup>
import { VueDraggableNext } from 'vue-draggable-next'
...
</script>

what can i do next

lzdml commented 11 months ago

I want to use swap plugin like this https://github.com/SortableJS/Sortable/tree/master/plugins/Swap but I don't know how or where to write the mount method

now my code is like this

<vue-draggable-next group="drapGroup" v-model="row.dropList" @change="dropChange($event, row, false)">
<div class="can-drop" v-for="item in row.dropList" :key="item.id">
  <div>{{item.name}}</div>
</div>
</vue-draggable-next>

<script setup>
import { VueDraggableNext } from 'vue-draggable-next'
...
</script>

what can i do next

Is there a solution please?