2
0

fix:动态菜单中英适配(刷新界面实现)

This commit is contained in:
zhongzm
2025-02-11 17:04:02 +08:00
parent e74db62c27
commit d94c35ed49
2 changed files with 11 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import { useRouteStore } from '../route';
import { useTabStore } from '../tab';
import { useThemeStore } from '../theme';
export const useAppStore = defineStore(SetupStoreId.App, () => {
const themeStore = useThemeStore();
const routeStore = useRouteStore();
@@ -58,9 +59,16 @@ export const useAppStore = defineStore(SetupStoreId.App, () => {
];
function changeLocale(lang: App.I18n.LangType) {
if (locale.value === lang) return;
locale.value = lang;
setLocale(lang);
localStg.set('lang', lang);
//routeStore.updateGlobalMenusByLocale();
setTimeout(() => {
window.location.reload();
}, 100);
}
/** Update document title by locale */