feat: 修改 nav 高亮计算方式

This commit is contained in:
Huangzhe
2025-05-22 19:48:51 +08:00
parent 056b09c7c0
commit 47643fc50f

View File

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