fix(default-theme): navLink matches active but lacks withBase

pull/400/head
kt3721 4 years ago
parent 508e9eb912
commit ace0112a55

@ -9,7 +9,7 @@ export function useNavLink(item: Ref<DefaultTheme.NavItemWithLink>) {
const isExternal = isExternalCheck(item.value.link) const isExternal = isExternalCheck(item.value.link)
const props = computed(() => { const props = computed(() => {
const routePath = normalizePath(`/${route.data.relativePath}`) const routePath = normalizePath(withBase(`/${route.data.relativePath}`))
let active = false let active = false
if (item.value.activeMatch) { if (item.value.activeMatch) {

Loading…
Cancel
Save