From 55dafabdf36efeea194cd72665507e2195a5e1d0 Mon Sep 17 00:00:00 2001 From: xingyuv Date: Thu, 23 Mar 2023 09:24:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=A2=E5=8C=85=E5=B1=91:1.=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BD=BF=E7=94=A8=E5=8A=A8=E6=80=81=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=97=A0=E6=B3=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Breadcrumb/src/Breadcrumb.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/Breadcrumb/src/Breadcrumb.vue b/src/layout/components/Breadcrumb/src/Breadcrumb.vue index 19be7400..de036654 100644 --- a/src/layout/components/Breadcrumb/src/Breadcrumb.vue +++ b/src/layout/components/Breadcrumb/src/Breadcrumb.vue @@ -37,7 +37,7 @@ export default defineComponent({ }) const getBreadcrumb = () => { - const currentPath = currentRoute.value.path + const currentPath = currentRoute.value.matched.slice(-1)[0].path levelList.value = filter(unref(menuRouters), (node: AppRouteRecordRaw) => { return node.path === currentPath @@ -47,7 +47,7 @@ export default defineComponent({ const renderBreadcrumb = () => { const breadcrumbList = treeToList(unref(levelList)) return breadcrumbList.map((v) => { - const disabled = v.redirect === 'noredirect' + const disabled = !v.redirect || v.redirect === 'noredirect' const meta = v.meta as RouteMeta return (