提交 5a20df45 编写于 作者: 无木

feat(tree): add `insertNodesByKey` method

上级 d52b0de8
...@@ -97,8 +97,7 @@ ...@@ -97,8 +97,7 @@
}, },
onRightClick: handleRightClick, onRightClick: handleRightClick,
}; };
propsData = omit(propsData, 'treeData', 'class'); return omit(propsData, 'treeData', 'class');
return propsData;
}); });
const getTreeData = computed((): TreeItem[] => const getTreeData = computed((): TreeItem[] =>
...@@ -109,8 +108,14 @@ ...@@ -109,8 +108,14 @@
return searchState.startSearch && searchState.searchData?.length === 0; return searchState.startSearch && searchState.searchData?.length === 0;
}); });
const { deleteNodeByKey, insertNodeByKey, filterByLevel, updateNodeByKey, getAllKeys } = const {
useTree(treeDataRef, getReplaceFields); deleteNodeByKey,
insertNodeByKey,
insertNodesByKey,
filterByLevel,
updateNodeByKey,
getAllKeys,
} = useTree(treeDataRef, getReplaceFields);
function getIcon(params: Recordable, icon?: string) { function getIcon(params: Recordable, icon?: string) {
if (!icon) { if (!icon) {
...@@ -267,6 +272,7 @@ ...@@ -267,6 +272,7 @@
setCheckedKeys, setCheckedKeys,
getCheckedKeys, getCheckedKeys,
insertNodeByKey, insertNodeByKey,
insertNodesByKey,
deleteNodeByKey, deleteNodeByKey,
updateNodeByKey, updateNodeByKey,
checkAll, checkAll,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册