File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,9 @@ const draggableComponent = defineComponent({
123
123
manage : event => manage . call ( this , event )
124
124
}
125
125
} ) ;
126
- this . _sortable = new Sortable ( $el , sortableOptions ) ;
127
- $el . __draggable_component__ = this ;
126
+ const targetDomElement = $el . nodeType === 1 ? $el : $el . parentElement ;
127
+ this . _sortable = new Sortable ( targetDomElement , sortableOptions ) ;
128
+ targetDomElement . __draggable_component__ = this ;
128
129
} ,
129
130
130
131
updated ( ) {
@@ -204,7 +205,10 @@ const draggableComponent = defineComponent({
204
205
} ,
205
206
206
207
getVmIndexFromDomIndex ( domIndex ) {
207
- return this . componentStructure . getVmIndexFromDomIndex ( domIndex , this . $el ) ;
208
+ return this . componentStructure . getVmIndexFromDomIndex (
209
+ domIndex ,
210
+ this . _sortable . el
211
+ ) ;
208
212
} ,
209
213
210
214
onDragStart ( evt ) {
You can’t perform that action at this time.
0 commit comments