Compare commits

..

No commits in common. "a7aeb252ffbc6dc71f20cbd9f5fcfbd7dbfe5a18" and "30f677d11954ce10a4e56312ca9e17158905903f" have entirely different histories.

3 changed files with 2 additions and 6 deletions

View File

@ -11,7 +11,6 @@
<script> <script>
import colorTool from "@/utils/color"; import colorTool from "@/utils/color";
import i18n from '@/locales'
export default { export default {
name: "App", name: "App",
data() { data() {
@ -27,8 +26,7 @@ export default {
}, },
computed: { computed: {
locale() { locale() {
const lang = i18n.global.locale.value return this.$i18n.messages[this.$i18n.locale].el;
return i18n.global.messages.value?.[lang]?.el
}, },
}, },
created() { created() {

View File

@ -21,9 +21,8 @@ const messages = {
const i18n = createI18n({ const i18n = createI18n({
locale: tool.data.get("APP_LANG") || sysConfig.LANG, locale: tool.data.get("APP_LANG") || sysConfig.LANG,
fallbackLocale: 'zh-cn', fallbackLocale: 'zh-cn',
globalInjection: false, globalInjection: true,
messages, messages,
legacy: false
}) })
export default i18n; export default i18n;

View File

@ -33,7 +33,6 @@ app.use(DataVVue3);
//挂载app //挂载app
app.mount("#app"); app.mount("#app");
app.config.globalProperties.$t = i18n.global.t
const debounce = (fn, delay) => { const debounce = (fn, delay) => {
let timer = null; let timer = null;