fix(功能用例): 用例评审-根节点取消关联后回到上一级模块

This commit is contained in:
teukkk 2024-07-10 10:58:11 +08:00 committed by 刘瑞斌
parent 07eec731e1
commit 8fd9a26a6a
1 changed files with 8 additions and 7 deletions

View File

@ -128,17 +128,18 @@
* @param tree 原来的模块树
*/
function selectParentNode(tree: ModuleTreeNode[]) {
if (tree[0].parentId) {
mapTree(tree || [], (e) => {
if (e.id === selectedKeys.value[0]) {
mapTree(tree || [], (e) => {
if (e.id === selectedKeys.value[0]) {
if (e.parentId) {
selectedKeys.value = [e.parentId];
folderNodeSelect([e.parentId], e.parent);
} else {
setActiveFolder('all');
}
return e;
});
} else {
setActiveFolder('all');
}
}
return e;
});
}
onBeforeMount(() => {