Skip to content

Commit 7c6e1e7

Browse files
committed
fix(draggable plugin): fix change event
1 parent a9919e3 commit 7c6e1e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/plugins/draggable/Draggable.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export default {
8989
},
9090
// override
9191
getPathByBranchEl(branchEl) {
92+
const store = this.treesStore.store
9293
const getAttrPath = (el) => {
9394
const pathStr = el.getAttribute('data-tree-node-path')
9495
if (pathStr) {
@@ -114,6 +115,9 @@ export default {
114115
let index = 0
115116
for (const {value: el, index: index2} of hp.iterateAll(branchEl.parentElement.children)) {
116117
if (hp.hasClass(el, 'tree-branch') || hp.hasClass(el, 'tree-placeholder')) {
118+
if (el === store.dragBranchEl) {
119+
continue
120+
}
117121
if (el === branchEl) {
118122
break
119123
}

0 commit comments

Comments
 (0)