Browse Source

update 优化首页打开topNav不展开菜单问题

LiuHao 1 year ago
parent
commit
41f3d37db1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/components/TopNav/index.vue

+ 4 - 1
src/components/TopNav/index.vue

@@ -84,7 +84,10 @@ const childrenMenus = computed(() => {
 
 // 默认激活的菜单
 const activeMenu = computed(() => {
-  const path = route.path;
+  let path = route.path;
+  if (path === '/index') {
+    path = '/system/user';
+  }
   let activePath = path;
   if (path !== undefined && path.lastIndexOf('/') > 0 && hideList.indexOf(path) === -1) {
     const tmpPath = path.substring(1, path.length);