mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-25 11:28:13 +08:00
fix(theme): base 导致的 链接跳转错误 #63
This commit is contained in:
parent
4fd0bda3c8
commit
9a9489031c
@ -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) {
|
||||
|
||||
@ -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] : []
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user