From 3788bf33013ec6ada46776faba72c6124c1aaed3 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 2 Mar 2022 17:28:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/App.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/jero-web/src/App.vue b/jero-web/src/App.vue index bf2d43e47..689513d83 100644 --- a/jero-web/src/App.vue +++ b/jero-web/src/App.vue @@ -41,9 +41,19 @@ that.$store.dispatch('setSidebar', true) } }) - + let langCn = localStorage.language // 默认中文 - localStorage.lang == undefined ? localStorage.setItem('language', 'zh-cn') : '' + if (!langCn) { + localStorage.setItem('language', 'zh-cn') + } else if (langCn == 'en-us') { + this.locale = enUS + moment.locale('en-us') + this.$i18n.locale = EN + } else if (langCn == 'zh-cn') { + this.locale = zhCN + moment.locale('zh-cn') + this.$i18n.locale = ZH + } // 自己配置多语言适配 this.$root.Bus.$on('switchLanguage', value => { let router_path = this.$route.path @@ -94,7 +104,11 @@ #app { height: 100%; } -.doc-detail{background: #fff} + + .doc-detail { + background: #fff + } + .ant-layout { background: transparent !important; }