From 2a9112650755dc3c98e6806f8eec48bce7741c20 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 06 六月 2025 17:28:10 +0800
Subject: [PATCH] 1.样式根据页面宽度修改 2.系统标题修改

---
 src/components/TopNav/index.vue |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue
index 62028af..cbd8d13 100644
--- a/src/components/TopNav/index.vue
+++ b/src/components/TopNav/index.vue
@@ -66,7 +66,10 @@
       if (menu.path === '/' && menu.children) {
           topMenus.push(menu.children[0])
       } else {
-          topMenus.push(menu)
+        menu.children.forEach(item => {
+          topMenus.push(item)
+          
+        })
       }
     }
   })
@@ -102,13 +105,13 @@
     const tmpPath = path.substring(1, path.length)
     if (!route.meta.link) {
       activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"))
-      appStore.toggleSideBarHide(false)
+      // appStore.toggleSideBarHide(false)
     }
   } else if(!route.children) {
     activePath = path
-    appStore.toggleSideBarHide(true)
+    // appStore.toggleSideBarHide(true)
   }
-  activeRoutes(activePath)
+  // activeRoutes(activePath)
   return activePath
 })
 
@@ -132,11 +135,11 @@
     } else {
       router.push({ path: key })
     }
-    appStore.toggleSideBarHide(true)
+    // appStore.toggleSideBarHide(true)
   } else {
     // 鏄剧ず宸︿晶鑱斿姩鑿滃崟
-    activeRoutes(key)
-    appStore.toggleSideBarHide(false)
+    // activeRoutes(key)
+    // appStore.toggleSideBarHide(false)
   }
 }
 
@@ -152,7 +155,7 @@
   if(routes.length > 0) {
     permissionStore.setSidebarRouters(routes)
   } else {
-    appStore.toggleSideBarHide(true)
+    // appStore.toggleSideBarHide(true)
   }
   return routes
 }

--
Gitblit v1.9.3