From 1e155369b2310a436a40fca48d707367c372ce2e Mon Sep 17 00:00:00 2001 From: Hooray Hu <304327508@qq.com> Date: Thu, 8 Aug 2024 16:12:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B8=A6=E5=8F=82?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=97=A0=E6=B3=95=E8=AE=B0=E5=BD=95=E5=88=B0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=A0=8F=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/tabbar.ts | 8 +------- src/types/global.d.ts | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/store/modules/tabbar.ts b/src/store/modules/tabbar.ts index 5c80986..98f07d6 100755 --- a/src/store/modules/tabbar.ts +++ b/src/store/modules/tabbar.ts @@ -24,19 +24,13 @@ const useTabbarStore = defineStore( if (route.name !== 'reload') { // 记录查找到的标签页 const findTab = list.value.find((item) => { - if (item.routeName) { - return item.routeName === route.name - } - else { - return item.tabId === tabId - } + return item.tabId === tabId }) // 新增标签页 if (!findTab) { const listItem = { tabId, fullPath: route.fullPath, - routeName: route.name, title: typeof meta?.title === 'function' ? meta.title() : meta?.title, icon: meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon, name: names, diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 15099bf..65e5ba9 100755 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -294,7 +294,6 @@ declare namespace Tabbar { interface recordRaw { tabId: string fullPath: string - routeName?: RouteRecordName | null title?: string | (() => string) icon?: string name: string[]