From d637f03067bfb71c38a52b3fc243a41f279e6e82 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 11 四月 2022 11:58:44 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

---
 ruoyi-ui/src/components/TopNav/index.vue |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue
index cabb258..0cc24db 100644
--- a/ruoyi-ui/src/components/TopNav/index.vue
+++ b/ruoyi-ui/src/components/TopNav/index.vue
@@ -30,13 +30,14 @@
 <script>
 import { constantRoutes } from "@/router";
 
+// 闅愯棌渚ц竟鏍忚矾鐢�
+const hideList = ['/index', '/user/profile'];
+
 export default {
   data() {
     return {
       // 椤堕儴鏍忓垵濮嬫暟
       visibleNumber: 5,
-      // 鏄惁涓洪娆″姞杞�
-      isFrist: false,
       // 褰撳墠婵�娲昏彍鍗曠殑 index
       currentIndex: undefined
     };
@@ -88,17 +89,10 @@
     activeMenu() {
       const path = this.$route.path;
       let activePath = path;
-      if (path.lastIndexOf("/") > 0) {
+      if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) {
         const tmpPath = path.substring(1, path.length);
         activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
         this.$store.dispatch('app/toggleSideBarHide', false);
-      } else if ("/index" == path || "" == path) {
-        if (!this.isFrist) {
-          this.isFrist = true;
-        } else {
-          activePath = "index";
-        }
-        this.$store.dispatch('app/toggleSideBarHide', true);
       } else if(!this.$route.children) {
         activePath = path;
         this.$store.dispatch('app/toggleSideBarHide', true);

--
Gitblit v1.9.3