From 64a6a53b42d2565b0427c9c2d956155f37c488aa Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期二, 01 四月 2025 10:33:41 +0800
Subject: [PATCH] 路由菜单渲染逻辑修改,缓存和tag持久化

---
 src/layouts/components/ElMenu/index.vue |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/layouts/components/ElMenu/index.vue b/src/layouts/components/ElMenu/index.vue
index 5243b65..a703c65 100644
--- a/src/layouts/components/ElMenu/index.vue
+++ b/src/layouts/components/ElMenu/index.vue
@@ -28,9 +28,9 @@
     };
   },
   mounted() {
-    
     // 获取所有定义的一级菜单和多级菜单
-    this.routersList = routers.options.routes[0].children;
+    // 过滤掉登录路由,只获取主布局下的路由
+    this.routersList = routers.options.routes.find(route => route.path === '/').children;
   },
 };
 </script>

--
Gitblit v1.7.1