From 98e437fc50d1b7c30d695f2cb64e1c3114907261 Mon Sep 17 00:00:00 2001 From: Theo <971366405@qq.com> Date: Wed, 28 May 2025 17:09:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=90=9C=E7=B4=A2=E6=97=B6=EF=BC=8C=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复菜单搜索时,地址不对的bug --- src/components/MenuSearch/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/MenuSearch/index.vue b/src/components/MenuSearch/index.vue index 85d45867..62b99f14 100644 --- a/src/components/MenuSearch/index.vue +++ b/src/components/MenuSearch/index.vue @@ -290,7 +290,9 @@ function navigateToRoute(item: SearchItem) { function loadRoutes(routes: RouteRecordRaw[], parentPath = "") { routes.forEach((route) => { - const path = route.path.startsWith("/") ? route.path : `${parentPath}/${route.path}`; + const path = route.path.startsWith("/") + ? route.path + : `${parentPath}${parentPath.endsWith("/") ? "" : "/"}${route.path}`; if (excludedRoutes.value.includes(route.path) || isExternal(route.path)) return; if (route.children) {