@@ -15,7 +15,7 @@ function computeVmIndex(vNodes, element) {
15
15
if ( index === - 1 ) {
16
16
throw new Error ( "node not found" , {
17
17
nodes : domElements ,
18
- element,
18
+ element
19
19
} ) ;
20
20
}
21
21
return index ;
@@ -322,7 +322,7 @@ const draggableComponent = defineComponent({
322
322
}
323
323
const list = component . realList ;
324
324
const context = { list, component } ;
325
- if ( to !== related && list && component . getUnderlyingVm ) {
325
+ if ( to !== related && list ) {
326
326
const destination = component . getUnderlyingVm ( related ) ;
327
327
if ( destination ) {
328
328
return Object . assign ( destination , context ) ;
@@ -400,20 +400,23 @@ const draggableComponent = defineComponent({
400
400
} ,
401
401
402
402
onDragMove ( evt , originalEvent ) {
403
- const onMove = this . move ;
404
- if ( ! onMove || ! this . realList ) {
403
+ const { move , realList } = this ;
404
+ if ( ! move || ! realList ) {
405
405
return true ;
406
406
}
407
407
408
408
const relatedContext = this . getRelatedContextFromMoveEvent ( evt ) ;
409
- const draggedContext = this . context ;
410
409
const futureIndex = this . computeFutureIndex ( relatedContext , evt ) ;
411
- Object . assign ( draggedContext , { futureIndex } ) ;
412
- const sendEvt = Object . assign ( { } , evt , {
413
- relatedContext,
414
- draggedContext
415
- } ) ;
416
- return onMove ( sendEvt , originalEvent ) ;
410
+ const draggedContext = {
411
+ ...this . context ,
412
+ futureIndex
413
+ } ;
414
+ const sendEvt = {
415
+ ...evt ,
416
+ ...{ relatedContext } ,
417
+ ...{ draggedContext }
418
+ } ;
419
+ return move ( sendEvt , originalEvent ) ;
417
420
} ,
418
421
419
422
onDragEnd ( ) {
0 commit comments