From e1456f14d6f7d123c7a81f3e0b3cb9575eecd7e9 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 27 Mar 2026 18:21:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=BB=8E=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=E7=82=B9=E8=BF=94=E5=9B=9E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=9B=9E=E5=88=B0=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 16e9811..9208f49 100644 --- a/src/App.vue +++ b/src/App.vue @@ -43,6 +43,14 @@ const bottomNavValue = computed({ }, }) +function onBackClick() { + if (currentRoute.value === '/login') { + router.replace('/') + } else { + router.back() + } +} + async function refreshUserData() { if (!userStore.isLoggedIn) return await router.isReady() @@ -73,7 +81,7 @@ watch( variant="text" class="back-btn" :aria-label="t('common.back')" - @click="$router.back()" + @click="onBackClick" > mdi-arrow-left