From 13f6cd8ef43f0f7e356133de02fe0508fd6dbcf0 Mon Sep 17 00:00:00 2001 From: Soybean Date: Tue, 27 Jun 2023 22:48:04 +0800 Subject: [PATCH] fix(projects): fix set tab title (fixed #256) --- src/store/modules/tab/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/store/modules/tab/index.ts b/src/store/modules/tab/index.ts index c39d9fd3c..2114c2cc7 100644 --- a/src/store/modules/tab/index.ts +++ b/src/store/modules/tab/index.ts @@ -68,7 +68,11 @@ export const useTabStore = defineStore('tab-store', { setActiveTabTitle(title: string) { const item = this.tabs.find(tab => tab.fullPath === this.activeTab); if (item) { - item.meta.title = title; + if (item.meta.i18nTitle) { + item.meta.i18nTitle = title; + } else { + item.meta.title = title; + } } }, /**