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,
|
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 @@
|
|||||||
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 @@
|
|||||||
setCheckedKeys,
|
setCheckedKeys,
|
||||||
getCheckedKeys,
|
getCheckedKeys,
|
||||||
insertNodeByKey,
|
insertNodeByKey,
|
||||||
|
insertNodesByKey,
|
||||||
deleteNodeByKey,
|
deleteNodeByKey,
|
||||||
updateNodeByKey,
|
updateNodeByKey,
|
||||||
checkAll,
|
checkAll,
|
||||||
|
Loading…
Reference in New Issue
Block a user