fix: invalid active props when `base` option is added (#342)

pull/421/head
zhangwenjun 3 years ago committed by GitHub
parent efc5e1b256
commit 383d8ffbba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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