revert: 面包屑导航回滚回 computed 模式

This commit is contained in:
Hooray
2025-03-05 10:30:06 +08:00
parent b533c5a040
commit 2b08e82c5e
@@ -8,10 +8,11 @@ const route = useRoute()
const settingsStore = useSettingsStore()
const breadcrumbList = ref<{ path: string, title: string }[]>([])
watch(() => route.matched, () => {
// 面包屑备份
let breadcrumbListBackup: any = []
const breadcrumbList = computed(() => {
if (route.name === 'reload') {
return
return breadcrumbListBackup
}
const list = []
if (settingsStore.settings.home.enable) {
@@ -28,9 +29,8 @@ watch(() => route.matched, () => {
})
}
})
breadcrumbList.value = list
}, {
immediate: true,
breadcrumbListBackup = list
return list
})
function pathCompile(path: string) {