Skip to content

Commit 1f90f41

Browse files
committed
fix: 解决 vue 组件未兼容繁体的问题
1 parent 6e690cc commit 1f90f41

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

frontend/src/App.vue

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { reactive, computed, ref, nextTick, provide } from 'vue';
99
import { GlobalStore } from '@/store';
1010
import zhCn from 'element-plus/es/locale/lang/zh-cn';
11+
import zhTw from 'element-plus/es/locale/lang/zh-tw';
1112
import en from 'element-plus/es/locale/lang/en';
1213
import { useTheme } from '@/hooks/use-theme';
1314
useTheme();
@@ -19,6 +20,7 @@ const config = reactive({
1920
2021
const i18nLocale = computed(() => {
2122
if (globalStore.language === 'zh') return zhCn;
23+
if (globalStore.language === 'tw') return zhTw;
2224
if (globalStore.language === 'en') return en;
2325
return zhCn;
2426
});

frontend/src/lang/modules/tw.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn';
1+
import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-tw';
22
let xpackTwLocale = {};
33
const xpackModules = import.meta.glob('../../xpack/lang/tw.ts', { eager: true });
44
if (xpackModules['../../xpack/lang/tw.ts']) {

0 commit comments

Comments
 (0)