mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 02:00:25 +08:00
feat(tree): add insertNodesByKey
method
This commit is contained in:
parent
d52b0de83e
commit
5a20df45ad
@ -97,8 +97,7 @@
|
||||
},
|
||||
onRightClick: handleRightClick,
|
||||
};
|
||||
propsData = omit(propsData, 'treeData', 'class');
|
||||
return propsData;
|
||||
return omit(propsData, 'treeData', 'class');
|
||||
});
|
||||
|
||||
const getTreeData = computed((): TreeItem[] =>
|
||||
@ -109,8 +108,14 @@
|
||||
return searchState.startSearch && searchState.searchData?.length === 0;
|
||||
});
|
||||
|
||||
const { deleteNodeByKey, insertNodeByKey, filterByLevel, updateNodeByKey, getAllKeys } =
|
||||
useTree(treeDataRef, getReplaceFields);
|
||||
const {
|
||||
deleteNodeByKey,
|
||||
insertNodeByKey,
|
||||
insertNodesByKey,
|
||||
filterByLevel,
|
||||
updateNodeByKey,
|
||||
getAllKeys,
|
||||
} = useTree(treeDataRef, getReplaceFields);
|
||||
|
||||
function getIcon(params: Recordable, icon?: string) {
|
||||
if (!icon) {
|
||||
@ -267,6 +272,7 @@
|
||||
setCheckedKeys,
|
||||
getCheckedKeys,
|
||||
insertNodeByKey,
|
||||
insertNodesByKey,
|
||||
deleteNodeByKey,
|
||||
updateNodeByKey,
|
||||
checkAll,
|
||||
|
Loading…
Reference in New Issue
Block a user