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