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