Skip to content

Commit 3ca59ea

Browse files
committed
fix(draggable plugin): fix logic
1 parent 843510e commit 3ca59ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plugins/draggable/Draggable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,11 @@ export default {
200200
return false
201201
}
202202
const {startTree, dragBranchEl, startPath} = store
203-
const path = startTree.getPathByBranchEl(dragBranchEl)
204-
store.dragNode = startTree.getNodeByPath(path)
203+
store.dragNode = startTree.getNodeByPath(startPath)
205204
if (this.cloneWhenDrag) {
206205
store.dragNode = ut.cloneTreeData(store.dragNode)
207206
}
208-
if (!startTree.isNodeDraggable(store.dragNode, path)) {
207+
if (!startTree.isNodeDraggable(store.dragNode, startPath)) {
209208
return false
210209
}
211210
if (startTree.hasHook('ondragstart') && startTree.executeHook('ondragstart', [startTree, store]) === false) {
@@ -312,6 +311,7 @@ export default {
312311
'unfoldWhenDragover',
313312
'unfoldWhenDragoverDelay',
314313
'draggingNodePositionMode',
314+
'cloneWhenDrag',
315315
'edgeScroll', 'edgeScrollTriggerMargin', 'edgeScrollSpeed', 'edgeScrollTriggerMode',
316316
'rtl'
317317
].forEach(name => {

0 commit comments

Comments
 (0)