From e799d1cc496838af9e23f51eb3299be9087cd456 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 9 May 2024 15:44:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=80=89=E9=A1=B9=E6=97=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=A6=82=E8=A7=88=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#4939)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/index.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index b7cc88be3..625ba4062 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -41,11 +41,6 @@ const { switchDark } = useTheme(); let timer: NodeJS.Timer | null = null; -onMounted(() => { - if (!tabsStore.activeTabPath) { - handleMenuClick('/'); - } -}); const classObj = computed(() => { return { fullScreen: globalStore.isFullScreen, @@ -163,6 +158,10 @@ onBeforeUnmount(() => { timer = null; }); onMounted(() => { + if (globalStore.openMenuTabs && !tabsStore.activeTabPath) { + handleMenuClick('/'); + } + loadStatus(); initFavicon(); loadDataFromDB();