mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 18:37:43 +08:00
Fix:修复点击概要会触发data_change_detail事件的问题
This commit is contained in:
parent
513a1c342c
commit
2b8d4ae225
@ -157,8 +157,15 @@ export const copyRenderTree = (tree, root, removeActiveState = false) => {
|
||||
tree.data = simpleDeepClone(root.data)
|
||||
if (removeActiveState) {
|
||||
tree.data.isActive = false
|
||||
if (tree.data.generalization) {
|
||||
tree.data.generalization.isActive = false
|
||||
const generalization = tree.data.generalization
|
||||
if (generalization) {
|
||||
if (Array.isArray(generalization)) {
|
||||
generalization.forEach(item => {
|
||||
item.isActive = false
|
||||
})
|
||||
} else {
|
||||
generalization.isActive = false
|
||||
}
|
||||
}
|
||||
}
|
||||
tree.children = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user