Commit 447d37d1 authored by 华国豪's avatar 华国豪 🙄

语言切换刷新还原成中文,新增修改语言本地缓存

parent 2fc22c9b
......@@ -1313,6 +1313,14 @@ export default {
created() {
//页面刚进入时开启长连接
// this.initWebSocket()
let language = localStorage.language
if (!language) {
this.language = 'zh-CN';
this.$i18n.locale = 'zh-CN';
} else {
this.language = language
this.$i18n.locale = language;
}
//IM_body
let allWindowWidth = window.innerWidth;
this.allWindowWidth = allWindowWidth - 50 - 220 - 60;
......@@ -1328,6 +1336,7 @@ export default {
ChangeLan(str){
this.language=str;
this.$i18n.locale = str;
localStorage.language = str;
},
settingSys: function () {
this.MsgBus.$emit('settingOpen')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment