From 0fca81b35008a62615427c1715dd6ddde902fe6c Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 17 三月 2023 14:31:27 +0800
Subject: [PATCH] 关闭页签后存在其他页签时不应该跳转首页

---
 src/components/TopNav/index.vue |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue
index 4b8f206..c2d1a74 100644
--- a/src/components/TopNav/index.vue
+++ b/src/components/TopNav/index.vue
@@ -97,7 +97,9 @@
   if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) {
     const tmpPath = path.substring(1, path.length);
     activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
-    appStore.toggleSideBarHide(false);
+    if (!route.meta.link) {
+        appStore.toggleSideBarHide(false);
+    }
   } else if(!route.children) {
     activePath = path;
     appStore.toggleSideBarHide(true);
@@ -139,6 +141,8 @@
   }
   if(routes.length > 0) {
     permissionStore.setSidebarRouters(routes);
+  } else {
+    appStore.toggleSideBarHide(true);
   }
   return routes;
 }

--
Gitblit v1.9.3