diff --git a/src/components/Navigation/Index.vue b/src/components/Navigation/Index.vue index 4ffc1b0..20fc934 100644 --- a/src/components/Navigation/Index.vue +++ b/src/components/Navigation/Index.vue @@ -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);