From a1543bccf6b616d2db9d44b762826d58887172a6 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期二, 10 六月 2025 18:57:57 +0800 Subject: [PATCH] refactor(zhitan-system):优化获取节点ID列表的逻辑- 移除了过滤条件中的 parentNode 节点 ID 比较逻辑 - 现在只根据父节点 ID 是否非空来筛选 modelNodeList --- zhitan-vue/src/components/TopNav/index.vue | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/zhitan-vue/src/components/TopNav/index.vue b/zhitan-vue/src/components/TopNav/index.vue index 85bc9e8..774132d 100644 --- a/zhitan-vue/src/components/TopNav/index.vue +++ b/zhitan-vue/src/components/TopNav/index.vue @@ -167,12 +167,7 @@ return; } - if (key === '/index' || key === '/') { - // 棣栭〉鏃舵樉绀烘姌鍙犵殑渚ц竟鏍忥紝鑰屼笉鏄殣钘� - router.push({ path: key }); - appStore.showCollapsedSidebar(); - return; - } + // 妫�鏌ユ槸鍚︽湁瀛愯矾鐢� if (route && route.children && route.children.length > 0) { @@ -258,11 +253,7 @@ function activeRoutes(key) { let routes = []; - if (key === '/index' || key === '/') { - // 棣栭〉鏃舵樉绀烘姌鍙犵殑渚ц竟鏍忥紝鑰屼笉鏄殣钘� - appStore.showCollapsedSidebar(); - return []; - } + // 鏌ユ壘鍖归厤鐨勮矾鐢� if (childrenMenus.value && childrenMenus.value.length > 0) { -- Gitblit v1.9.3