From efcfa576d52a7eab644f3b4c65af153442887fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=87=95=E5=8D=9A=E6=96=87?= <349952469@qq.com> Date: Tue, 14 Jun 2022 16:09:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20=E8=AE=BE=E7=BD=AEtab=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=AF=BC=E8=87=B4meta=E5=B1=9E=E6=80=A7=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/tab/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/modules/tab/index.ts b/src/store/modules/tab/index.ts index 2c9b8bbca..d0be48e59 100644 --- a/src/store/modules/tab/index.ts +++ b/src/store/modules/tab/index.ts @@ -1,5 +1,3 @@ -import { unref } from 'vue'; -import type { Ref } from 'vue'; import type { Router, RouteLocationNormalizedLoaded } from 'vue-router'; import { defineStore } from 'pinia'; import { useRouterPush } from '@/composables'; @@ -56,10 +54,10 @@ export const useTabStore = defineStore('tab-store', { * 设置当前路由对应的页签title * @param title - tab名称 */ - setActiveTabTitle(title: string | Ref) { + setActiveTabTitle(title: string) { const item = this.tabs.find(tab => tab.fullPath === this.activeTab); if (item) { - Object.assign(item, { meta: { title: unref(title) } }); + item.meta.title = title; } }, /**