fix: invalid active props when `base` option is added

pull/341/head
zhangwentong 4 years ago
parent cfbba80a0a
commit 3e40c6e07d

@ -15,7 +15,7 @@ export function useNavLink(item: Ref<DefaultTheme.NavItemWithLink>) {
if (item.value.activeMatch) {
active = new RegExp(item.value.activeMatch).test(routePath)
} else {
const itemPath = normalizePath(withBase(item.value.link))
const itemPath = normalizePath(item.value.link)
active =
itemPath === '/'
? itemPath === routePath

Loading…
Cancel
Save