From 2c8873402f94d26f6fffc43cfee9d254a27cc2df Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期五, 16 八月 2024 13:01:54 +0800
Subject: [PATCH] update 优化 使用匹配模式简化预编译配置

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

diff --git a/src/lang/index.ts b/src/lang/index.ts
index 071599e..e4e1d25 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,8 @@
 };
 
 const i18n = createI18n({
+  globalInjection: true,
+  allowComposition: true,
   legacy: false,
   locale: getLanguage(),
   messages

--
Gitblit v1.9.3