From 2d0dd4f12d0f58c45e8c1de919b689bd97b88b08 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期一, 25 十一月 2024 20:40:28 +0800 Subject: [PATCH] 项目计划记录展示 --- src/components/TopNav/index.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index f214245..37937d6 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -33,7 +33,6 @@ <script> import { constantRoutes } from "@/router"; -import { isHttp } from "@/utils/validate"; // 闅愯棌渚ц竟鏍忚矾鐢� const hideList = ['/index', '/user/profile']; @@ -79,7 +78,7 @@ if(router.path === "/") { router.children[item].path = "/" + router.children[item].path; } else { - if(!isHttp(router.children[item].path)) { + if(!this.ishttp(router.children[item].path)) { router.children[item].path = router.path + "/" + router.children[item].path; } } @@ -125,9 +124,10 @@ }, // 鑿滃崟閫夋嫨浜嬩欢 handleSelect(key, keyPath) { + debugger; this.currentIndex = key; const route = this.routers.find(item => item.path === key); - if (isHttp(key)) { + if (this.ishttp(key)) { // http(s):// 璺緞鏂扮獥鍙f墦寮� window.open(key, "_blank"); } else if (!route || !route.children) { @@ -161,6 +161,9 @@ } else { this.$store.dispatch('app/toggleSideBarHide', true); } + }, + ishttp(url) { + return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 } }, }; @@ -178,7 +181,7 @@ .topmenu-container.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title { border-bottom: 2px solid #{'var(--theme)'} !important; - color: #303133; + color: #000000; } /* submenu item */ -- Gitblit v1.8.0