|
|
|
@ -112,6 +112,7 @@ import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
|
|
|
|
|
import { SysAuthApi, SysNoticeApi } from '/@/api-services/api';
|
|
|
|
|
import Push from 'push.js';
|
|
|
|
|
import { signalR } from '/@/views/system/onlineUser/signalR';
|
|
|
|
|
import { initBackEndControlRoutes } from '/@/router/backEnd';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 引入组件
|
|
|
|
@ -213,13 +214,15 @@ const onComponentSizeChange = (size: string) => {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
};
|
|
|
|
|
// 语言切换
|
|
|
|
|
const onLanguageChange = (lang: string) => {
|
|
|
|
|
const onLanguageChange =async (lang: string) => {
|
|
|
|
|
Local.remove('themeConfig');
|
|
|
|
|
themeConfig.value.globalI18n = lang;
|
|
|
|
|
Local.set('themeConfig', themeConfig.value);
|
|
|
|
|
locale.value = lang;
|
|
|
|
|
other.useTitle();
|
|
|
|
|
initI18nOrSize('globalI18n', 'disabledI18n');
|
|
|
|
|
await initBackEndControlRoutes();//切换时,更新
|
|
|
|
|
// console.log('xxx')
|
|
|
|
|
};
|
|
|
|
|
// 初始化组件大小/i18n
|
|
|
|
|
const initI18nOrSize = (value: string, attr: string) => {
|
|
|
|
|