Callback event dragged by vuedraggable to the target area


item1AB
B
jquery-ui B drop


vuedraggabledrop

Mar.07,2021

preventDefault (), must be executed in ondragover or the ondrop event will not be triggered, assuming that the target element is target

<div class="target"  @dragover='onDragover' @drop='onDrop'></div>
onDragover(e) {
    e.preventDefault()
}
onDrop() {
    // 
}

triggers sort and add events. Use add.

@add="addDrag(event)"
// eventeventvuedraggable

have you solved the problem? landlord, I have encountered the same problem as you.


have you solved the problem? can you share the solution?


@drop


A:@dragstart="dragstart($event)" @dragend="dragend($event)"


B:@dragleave="dragleave($event)" @dragover="dragover($event)" @drop='drop($event)'

vuedraggable is an encapsulation of Sortable.js
event list see document


buddy, can I have a copy of the demo on the picture?

Menu