feat: 修改 nav 高亮计算方式
This commit is contained in:
@@ -39,10 +39,7 @@ const navigation = ref([
|
||||
// 当前的 nav
|
||||
const currentNav = computed(() => {
|
||||
// 第一种方式
|
||||
const nav = navigation.value.find((item) => item?.link?.path === route.fullPath);
|
||||
// 第二种方式
|
||||
// const nav = navigation.value.find((item) => item?.link?.path === window.location.pathname);
|
||||
|
||||
const nav = navigation.value.find((item) => item?.link?.path === route.path);
|
||||
return nav;
|
||||
});
|
||||
const activeTab = ref(currentNav.value?.title);
|
||||
|
||||
Reference in New Issue
Block a user