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({
123123 manage : event => manage . call ( this , event )
124124 }
125125 } ) ;
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 ;
128129 } ,
129130
130131 updated ( ) {
@@ -204,7 +205,10 @@ const draggableComponent = defineComponent({
204205 } ,
205206
206207 getVmIndexFromDomIndex ( domIndex ) {
207- return this . componentStructure . getVmIndexFromDomIndex ( domIndex , this . $el ) ;
208+ return this . componentStructure . getVmIndexFromDomIndex (
209+ domIndex ,
210+ this . _sortable . el
211+ ) ;
208212 } ,
209213
210214 onDragStart ( evt ) {
You can’t perform that action at this time.
0 commit comments