mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 02:35:18 +08:00
fix: tabView title internationalization switchover problem (#4652)
当tabView被固定或取消固定后,切换国际化,该tabView的title国际化切换失败
This commit is contained in:
@@ -306,7 +306,9 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
|||||||
(item) => getTabPath(item) === getTabPath(tab),
|
(item) => getTabPath(item) === getTabPath(tab),
|
||||||
);
|
);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
|
const oldTab = this.tabs[index];
|
||||||
tab.meta.affixTab = true;
|
tab.meta.affixTab = true;
|
||||||
|
tab.meta.title = oldTab?.meta?.title as string;
|
||||||
// this.addTab(tab);
|
// this.addTab(tab);
|
||||||
this.tabs.splice(index, 1, tab);
|
this.tabs.splice(index, 1, tab);
|
||||||
}
|
}
|
||||||
@@ -411,7 +413,9 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
|
const oldTab = this.tabs[index];
|
||||||
tab.meta.affixTab = false;
|
tab.meta.affixTab = false;
|
||||||
|
tab.meta.title = oldTab?.meta?.title as string;
|
||||||
// this.addTab(tab);
|
// this.addTab(tab);
|
||||||
this.tabs.splice(index, 1, tab);
|
this.tabs.splice(index, 1, tab);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user