From 5412e350599475cd904218af4a65fe5ba986c1cd Mon Sep 17 00:00:00 2001 From: Hooray <304327508@qq.com> Date: Thu, 1 May 2025 20:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=85=88?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=87=B3=E5=89=8D=E4=B8=80=E4=B8=AA=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/composables/useTabbar.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/composables/useTabbar.ts b/src/utils/composables/useTabbar.ts index f21cc00d..be41f3d9 100755 --- a/src/utils/composables/useTabbar.ts +++ b/src/utils/composables/useTabbar.ts @@ -25,11 +25,11 @@ export default function useTabbar() { // 如果关闭的标签正好是当前路由 if (tabId === activedTabId) { const index = tabbarStore.list.findIndex(item => item.tabId === tabId) - if (index < tabbarStore.list.length - 1) { - close(tabbarStore.list[index + 1].fullPath) + if (index > 0) { + close(tabbarStore.list[index - 1].fullPath) } else { - close(tabbarStore.list[index - 1].fullPath) + close(tabbarStore.list[index + 1].fullPath) } } else {