From 792c9246354bd17da6f79df514c2ddcf474eb3a1 Mon Sep 17 00:00:00 2001 From: besscroft Date: Sat, 9 Sep 2023 15:02:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- heming-web/components/BreadCrumb.vue | 5 ++--- heming-web/nuxt.config.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/heming-web/components/BreadCrumb.vue b/heming-web/components/BreadCrumb.vue index 31c6a55..66b9d1a 100644 --- a/heming-web/components/BreadCrumb.vue +++ b/heming-web/components/BreadCrumb.vue @@ -11,6 +11,7 @@ const routes = ref>([ /** 路由变化 */ const handleRouterChange = async (uri: any) => { + console.log(router.currentRoute) routes.value = [] routes.value.push({ href: '/', @@ -51,9 +52,7 @@ const handleClick = async (path: string) => { watch(() => { return router.currentRoute.value.path }, async (path) => { - if (path.startsWith('/admin')) { - await handleRouterChange(path) - } + await handleRouterChange(path) }) onBeforeMount(async () => { diff --git a/heming-web/nuxt.config.ts b/heming-web/nuxt.config.ts index 0a03bfb..501d45a 100644 --- a/heming-web/nuxt.config.ts +++ b/heming-web/nuxt.config.ts @@ -68,7 +68,14 @@ export default defineNuxtConfig({ }, prerender: { crawlLinks: false, - routes: ['/'], + routes: [ + '/', + '/login', + '/admin/user', + '/admin/menu', + '/admin/menu/menu11', + '/admin/menu/menu12', + ], }, preset: 'vercel' },