fix(admin): 优化管理后台英文菜单多语言文案杜绝截断并修复各业务页面与API错误
这个提交包含在:
@@ -1,9 +1,21 @@
|
||||
function changeTheme(theme) {
|
||||
import { getCssVariables } from '@/style/tokens';
|
||||
|
||||
function applyOmniTokens(theme: 'light' | 'dark'): void {
|
||||
const vars = getCssVariables(theme);
|
||||
const root = document.documentElement;
|
||||
Object.entries(vars).forEach(([key, value]) => {
|
||||
root.style.setProperty(key, value);
|
||||
});
|
||||
}
|
||||
|
||||
function changeTheme(theme: string): void {
|
||||
if (theme === 'dark') {
|
||||
document.body.setAttribute('arco-theme', 'dark');
|
||||
} else {
|
||||
document.body.removeAttribute('arco-theme');
|
||||
applyOmniTokens('dark');
|
||||
return;
|
||||
}
|
||||
document.body.removeAttribute('arco-theme');
|
||||
applyOmniTokens('light');
|
||||
}
|
||||
|
||||
export default changeTheme;
|
||||
|
||||
在新工单中引用
屏蔽一个用户