From e889f38bb158787b8dd49a69ecb6d0b651cde59c Mon Sep 17 00:00:00 2001 From: Hooray <304327508@qq.com> Date: Thu, 23 Feb 2023 22:32:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E6=A0=87=E9=A2=98=E6=9C=AA=E6=AD=A3=E5=B8=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 ++ src/router/index.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index dbe15ef0..c568fdf6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,6 +41,8 @@ watch([ else { document.title = import.meta.env.VITE_APP_TITLE } +}, { + immediate: true, }) onMounted(() => { diff --git a/src/router/index.ts b/src/router/index.ts index b64fc67c..441e620e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -120,7 +120,7 @@ router.afterEach((to, from) => { settingsStore.settings.app.enableProgress && (isLoading.value = false) // 设置页面 title if (settingsStore.settings.app.routeBaseOn !== 'filesystem') { - settingsStore.setTitle(to.meta.breadcrumbNeste?.at(-1)?.title) + settingsStore.setTitle(to.meta.breadcrumbNeste?.at(-1)?.title ?? to.meta.title) } else { settingsStore.setTitle(to.meta.title)