Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决 el-tree 鼠标拖放导致的数据不更新的问题 #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@
// 非布局组件 显式设置为 false 才是 false, 楼层模式
else return component.stack !== false
})())
// 没有子组件的组件,预先放置一个空数组,以解决 el-tree 鼠标拖放导致的数据不更新的问题
if (!that.info.child) {
that.$set(that.info, 'child', [])
}
// 子组件限额
that.$set(that.info, 'childLimit', typeof that.info.childLimit === 'number' ? that.info.childLimit : toSafeNumber(component.childLimit, 9999))
// 叶子节点
Expand Down