修改中英文切换
This commit is contained in:
+17
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user