From 024783588e577a68c7e285dd83d1cae9bf9c0862 Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail.com>
Date: 星期四, 11 一月 2024 14:27:46 +0800
Subject: [PATCH] update 升级@intlify/unplugin-vue-i18n版本依赖 update i18n使用方法。 add 新增i18n vite插件。

---
 src/lang/index.ts |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/lang/index.ts b/src/lang/index.ts
index 071599e..2b4c027 100644
--- a/src/lang/index.ts
+++ b/src/lang/index.ts
@@ -1,19 +1,8 @@
 // 鑷畾涔夊浗闄呭寲閰嶇疆
 import { createI18n } from 'vue-i18n';
 
-// 鏈湴璇█鍖�
-import enUSLocale from './en_US';
-import zhCNLocale from './zh_CN';
 import { LanguageEnum } from '@/enums/LanguageEnum';
-
-const messages = {
-  zh_CN: {
-    ...zhCNLocale
-  },
-  en_US: {
-    ...enUSLocale
-  }
-};
+import messages from '@intlify/unplugin-vue-i18n/messages';
 
 /**
  * 鑾峰彇褰撳墠璇█
@@ -28,6 +17,7 @@
 };
 
 const i18n = createI18n({
+  globalInjection: true,
   legacy: false,
   locale: getLanguage(),
   messages

--
Gitblit v1.9.3