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' },