fix: 调整语言的中英文变量

This commit is contained in:
刘洪洪
2023-11-01 12:10:54 +08:00
parent a0d2160b43
commit 3da4b4b20a
14 changed files with 65 additions and 52 deletions

View File

@@ -81,7 +81,7 @@
<script>
import { ref, computed, watch, reactive } from 'vue'
import { storageKey } from '@/utils/constants'
import { EN, storageKey, ZH } from '@/utils/constants'
import { getMillisecond, millTimestampDiffFromTz, timestampToList } from '@/utils/date-util'
import { useStore } from 'vuex'
import ElConfigProvider from 'element-plus'
@@ -299,9 +299,9 @@ export default {
})
}
}
const language = localStorage.getItem(storageKey.language) || 'en' // 初始未选择默认 en 英文
const language = localStorage.getItem(storageKey.language) || EN // 初始未选择默认 en 英文
let locale = en
if (language === 'cn') {
if (language === ZH) {
locale = cn
}