mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-05 21:14:40 +08:00
fix: 修复国际化问题
This commit is contained in:
parent
c9edaf0d1d
commit
79f266bbda
3 changed files with 16 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
export default {
|
||||
import fit2cloudEnLocale from 'fit2cloud-ui-plus/src/locale/lang/en';
|
||||
const message = {
|
||||
commons: {
|
||||
true: 'true',
|
||||
false: 'false',
|
||||
|
@ -1164,3 +1165,8 @@ export default {
|
|||
cookieBlockList: 'Cookie Blacklist',
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
...fit2cloudEnLocale,
|
||||
...message,
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export default {
|
||||
import fit2cloudZhLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn';
|
||||
const message = {
|
||||
commons: {
|
||||
true: '是',
|
||||
false: '否',
|
||||
|
@ -1167,3 +1168,7 @@ export default {
|
|||
cookieBlockList: 'Cookie 黑名单',
|
||||
},
|
||||
};
|
||||
export default {
|
||||
...fit2cloudZhLocale,
|
||||
...message,
|
||||
};
|
||||
|
|
|
@ -15,11 +15,12 @@ import SvgIcon from './components/svg-icon/svg-icon.vue';
|
|||
import ElementPlus from 'element-plus';
|
||||
import Fit2CloudPlus from 'fit2cloud-ui-plus';
|
||||
import * as Icons from '@element-plus/icons-vue';
|
||||
|
||||
const app = createApp(App);
|
||||
app.component('SvgIcon', SvgIcon);
|
||||
app.use(ElementPlus);
|
||||
app.use(Fit2CloudPlus);
|
||||
|
||||
app.use(Fit2CloudPlus, { locale: I18n.global.messages.value[localStorage.getItem('lang') || 'zh'] });
|
||||
|
||||
Object.keys(Icons).forEach((key) => {
|
||||
app.component(key, Icons[key as keyof typeof Icons]);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue