未验证 提交 cfbd5e98 编写于 作者: Z zhenbintuo 提交者: GitHub

修复insertNodesByKey方法批量添加异常问题 (#2695)

当批量添加节点parentKey为空时,未赋值treeDataRef导致添加异常
上级 122db78e
......@@ -141,6 +141,8 @@ export function useTree(treeDataRef: Ref<TreeDataItem[]>, getFieldNames: Compute
for (let i = 0; i < list.length; i++) {
treeData[push](list[i]);
}
treeDataRef.value = treeData;
return;
} else {
const { key: keyField, children: childrenField } = unref(getFieldNames);
if (!childrenField || !keyField) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册