mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-06 13:27:43 +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: {
|
commons: {
|
||||||
true: 'true',
|
true: 'true',
|
||||||
false: 'false',
|
false: 'false',
|
||||||
|
@ -1164,3 +1165,8 @@ export default {
|
||||||
cookieBlockList: 'Cookie Blacklist',
|
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: {
|
commons: {
|
||||||
true: '是',
|
true: '是',
|
||||||
false: '否',
|
false: '否',
|
||||||
|
@ -1167,3 +1168,7 @@ export default {
|
||||||
cookieBlockList: 'Cookie 黑名单',
|
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 ElementPlus from 'element-plus';
|
||||||
import Fit2CloudPlus from 'fit2cloud-ui-plus';
|
import Fit2CloudPlus from 'fit2cloud-ui-plus';
|
||||||
import * as Icons from '@element-plus/icons-vue';
|
import * as Icons from '@element-plus/icons-vue';
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
app.component('SvgIcon', SvgIcon);
|
app.component('SvgIcon', SvgIcon);
|
||||||
app.use(ElementPlus);
|
app.use(ElementPlus);
|
||||||
app.use(Fit2CloudPlus);
|
|
||||||
|
app.use(Fit2CloudPlus, { locale: I18n.global.messages.value[localStorage.getItem('lang') || 'zh'] });
|
||||||
|
|
||||||
Object.keys(Icons).forEach((key) => {
|
Object.keys(Icons).forEach((key) => {
|
||||||
app.component(key, Icons[key as keyof typeof Icons]);
|
app.component(key, Icons[key as keyof typeof Icons]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue