From a48bd04b2616e7fc2d95062ece5c840edb1d59c4 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 29 五月 2022 10:28:00 +0800 Subject: [PATCH] 升级unplugin-auto-import到最新版本0.8.5 --- src/components/TopNav/index.vue | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 344f658..e3e5c97 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -33,10 +33,10 @@ // 椤堕儴鏍忓垵濮嬫暟 const visibleNumber = ref(null); -// 鏄惁涓洪娆″姞杞� -const isFrist = ref(null); // 褰撳墠婵�娲昏彍鍗曠殑 index const currentIndex = ref(null); +// 闅愯棌渚ц竟鏍忚矾鐢� +const hideList = ['/index', '/user/profile']; const store = useStore(); const route = useRoute(); @@ -88,17 +88,10 @@ const activeMenu = computed(() => { const path = route.path; let activePath = path; - if (path !== undefined && 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("/")); store.dispatch('app/toggleSideBarHide', false); - } else if ("/index" == path || "" == path) { - if (!isFrist.value) { - isFrist.value = true; - } else { - activePath = "index"; - } - store.dispatch('app/toggleSideBarHide', true); } else if(!route.children) { activePath = path; store.dispatch('app/toggleSideBarHide', true); @@ -172,7 +165,7 @@ } /* sub-menu item */ -.topmenu-container.el-menu--horizontal > .el-sub-menu .el-submenu__title { +.topmenu-container.el-menu--horizontal > .el-sub-menu .el-sub-menu__title { float: left; height: 50px !important; line-height: 50px !important; -- Gitblit v1.9.3