From 9a9489031cb64feb968657b8d4ee1db0794e4ec2 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Mon, 15 Apr 2024 10:22:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(theme):=20`base`=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=20=E9=93=BE=E6=8E=A5=E8=B7=B3=E8=BD=AC=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20#63?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/src/client/components/AutoLink.vue | 2 +- theme/src/client/composables/sidebar.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/src/client/components/AutoLink.vue b/theme/src/client/components/AutoLink.vue index fc97729c..f62b823e 100644 --- a/theme/src/client/components/AutoLink.vue +++ b/theme/src/client/components/AutoLink.vue @@ -22,7 +22,7 @@ const link = computed(() => { return undefined if (isExternal.value) return props.href - return withBase(resolveRoutePath(props.href)) + return resolveRoutePath(props.href) }) function linkTo(e: Event) { diff --git a/theme/src/client/composables/sidebar.ts b/theme/src/client/composables/sidebar.ts index c6dcf26e..16e192cd 100644 --- a/theme/src/client/composables/sidebar.ts +++ b/theme/src/client/composables/sidebar.ts @@ -21,7 +21,7 @@ export function normalizePath(path: string) { export function getSidebarList(path: string, notesData: NotesData) { const link = Object.keys(notesData).find(link => - path.startsWith(normalizePath(withBase(link))), + path.startsWith(normalizePath(link)), ) return link ? notesData[link] : [] }