fix(theme): base 导致的 链接跳转错误 #63

This commit is contained in:
pengzhanbo 2024-04-15 10:22:41 +08:00
parent 4fd0bda3c8
commit 9a9489031c
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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] : []
}