diff --git a/src/App.vue b/src/App.vue
index 9c88408..57c9e01 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,7 @@
Home |
About
-->
-
+
@@ -20,7 +20,7 @@ import zhCN from 'ant-design-vue/es/locale/zh_CN';
export default defineComponent({
setup(){
console.log(i18ninit)
- provideI18n(i18ninit);
+ const len = provideI18n(i18ninit);
if(getValue('token')){
store.commit("login", true)
store.dispatch("setUserInfo");
@@ -29,8 +29,12 @@ export default defineComponent({
store.dispatch("getip");
router.push("/")
}
+ const zh = zhCN
+ const en = enUS
return{
- locale: zhCN
+ zh,
+ en,
+ len
}
}
})
diff --git a/src/utils/i18n.ts b/src/utils/i18n.ts
index 88b9011..c03d8b7 100644
--- a/src/utils/i18n.ts
+++ b/src/utils/i18n.ts
@@ -26,6 +26,7 @@ const i18nSymbol = Symbol();
export function provideI18n(i18nConfig: Config) {
const i18n = createI18n(i18nConfig);
provide(i18nSymbol, i18n);
+ return i18n;
}
export function useI18n() {
diff --git a/src/views/login/About.vue b/src/views/login/About.vue
index 9b14cc5..1c20c7b 100644
--- a/src/views/login/About.vue
+++ b/src/views/login/About.vue
@@ -7,21 +7,22 @@
Beelink
-
立即登录
-
立即注册
+
{{lan.$t('lijidenglu')}}
+
{{lan.$t('lijizhuce')}}
-
- e.preventDefault()">
+
+ e.preventDefault()">
-
{{userinfo.language}}
-
+
{{userinfo.language}}
+
-
+
-
{{i.name}}
+
{{i.name}}
+