forked from Astray-git/vue-dragula
-
Notifications
You must be signed in to change notification settings - Fork 34
Examples and recipes
Kristian Mandrup edited this page Nov 1, 2017
·
1 revision
- single bag
Not that the name of the service and drake should match with the created service, and the structure of the created service has to be correct.
<div id="drag-container" v-dragula="items" service="itemsService" drake="items">
<div v-for="(item, index) in item" :key="item.id" class="row">
<div class="col drag-handle">
<div class="drag-icon"></div>
</div>
... item contents here ...
</div>
</div> created () {
this.$dragula.createService({
name: 'itemsService',
drakes: {
items: {
moves: function (el, source, handle, sibling) {
return handle.classList.contains('drag-handle')
}
}
},
options: {}
})
},