From 3db75e0ff242a1a72deede1ac597f340460eff95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com>
Date: Sun, 10 Nov 2024 15:59:08 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=E5=89=8D=E5=8F=B0=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E7=9A=84=E8=B7=AF=E7=94=B1=E8=B7=AF=E5=BE=84=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=20query?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/layouts/frontend/components/aside.vue | 2 +-
web/src/layouts/frontend/components/menu.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/src/layouts/frontend/components/aside.vue b/web/src/layouts/frontend/components/aside.vue
index 0b3ba8cf..b3a2f98f 100644
--- a/web/src/layouts/frontend/components/aside.vue
+++ b/web/src/layouts/frontend/components/aside.vue
@@ -38,7 +38,7 @@
:key="index"
@click="routerPush('', menu)"
class="user-menu-item"
- :class="route.name == menu.name ? 'active' : ''"
+ :class="route.fullPath == menu.path ? 'active' : ''"
>
{{ menu.meta?.title }}
diff --git a/web/src/layouts/frontend/components/menu.vue b/web/src/layouts/frontend/components/menu.vue
index 9631cbe0..b9706119 100644
--- a/web/src/layouts/frontend/components/menu.vue
+++ b/web/src/layouts/frontend/components/menu.vue
@@ -165,7 +165,7 @@ const isExternalLink = (menus: RouteRecordRaw[], index: string): boolean => {
const searchMenuIndex = (menus: RouteRecordRaw[], route: RouteLocationNormalizedLoaded): number | false => {
let find: boolean | number = false
for (const key in menus) {
- if (menus[key].meta?.id && (menus[key].path == route.fullPath || menus[key].name == route.name)) {
+ if (menus[key].meta?.id && menus[key].path == route.fullPath) {
return menus[key].meta.id as number
}
if (menus[key].children && menus[key].children?.length) {