fix: tabView title internationalization switchover problem (#4652)

当tabView被固定或取消固定后,切换国际化,该tabView的title国际化切换失败
pull/48/MERGE
菠萝吹雪 2024-10-16 21:06:37 +08:00 committed by GitHub
parent 850a6af1e0
commit 7c45aeb868
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -306,7 +306,9 @@ export const useTabbarStore = defineStore('core-tabbar', {
(item) => getTabPath(item) === getTabPath(tab),
);
if (index !== -1) {
const oldTab = this.tabs[index];
tab.meta.affixTab = true;
tab.meta.title = oldTab?.meta?.title as string;
// this.addTab(tab);
this.tabs.splice(index, 1, tab);
}
@ -411,7 +413,9 @@ export const useTabbarStore = defineStore('core-tabbar', {
);
if (index !== -1) {
const oldTab = this.tabs[index];
tab.meta.affixTab = false;
tab.meta.title = oldTab?.meta?.title as string;
// this.addTab(tab);
this.tabs.splice(index, 1, tab);
}