mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-24 11:05:17 +08:00
fix(tree): fix tree node don't update after push new node into parent (#1231)
Co-authored-by: bastarder <jie.qian@blockheaders.com>
This commit is contained in:
parent
513908a829
commit
1efee81cf3
@ -133,7 +133,10 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const childrenKey = tree.props['children'] || 'children'
|
||||
watch(() => props.node.data[childrenKey], () => {
|
||||
watch(() => {
|
||||
const children = props.node.data[childrenKey]
|
||||
return children && [...children]
|
||||
}, () => {
|
||||
props.node.updateChildren()
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user