fix: tree data deep reactive, close #5480
parent
6f8c75cd6d
commit
278478b5b0
|
@ -63,7 +63,7 @@ export default function useTreeData(
|
||||||
rootPId: null,
|
rootPId: null,
|
||||||
...(simpleModeValue !== true ? simpleModeValue : {}),
|
...(simpleModeValue !== true ? simpleModeValue : {}),
|
||||||
})
|
})
|
||||||
: toRaw(treeData.value);
|
: toRaw(treeData.value).slice();
|
||||||
} else {
|
} else {
|
||||||
mergedTreeData.value = convertChildrenToData(toRaw(children.value));
|
mergedTreeData.value = convertChildrenToData(toRaw(children.value));
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ export default defineComponent({
|
||||||
() => {
|
() => {
|
||||||
treeData.value =
|
treeData.value =
|
||||||
props.treeData !== undefined
|
props.treeData !== undefined
|
||||||
? toRaw(props.treeData)
|
? toRaw(props.treeData).slice()
|
||||||
: convertTreeToData(toRaw(props.children));
|
: convertTreeToData(toRaw(props.children));
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true },
|
{ immediate: true, deep: true },
|
||||||
|
|
Loading…
Reference in New Issue