修改语言切换重新登录之后出现的问题

This commit is contained in:
qq787203167
2022-04-06 15:23:24 +08:00
parent da2ca66631
commit 1cc4f5803d
5 changed files with 55 additions and 42 deletions
@@ -21,12 +21,12 @@
Navigation: '文档管理',
subNavigation: null,
selectedKeys: [],
openKeys:[],
openKeys: []
}
},
watch: {
'$route': function(val) {
if (val.meta.title == '首页') {
if (val.meta.title == '首页' || val.meta.title === ' home page') {
this.Navigation = val.meta.title
this.subNavigation = null
} else {
@@ -35,7 +35,8 @@
}
},
mounted() {
if (this.$route.meta.title == '首页') {
console.log(this.$route.meta)
if (this.$route.meta.title === '首页' || this.$route.meta.title === ' home page') {
this.Navigation = this.$route.meta.title
this.subNavigation = null
} else {
@@ -56,7 +57,7 @@
routes.forEach(item => {
this.openKeys.push(item)
})
this.Navigation =this.openKeys[1].meta.title
this.Navigation = this.openKeys[1].meta.title
this.subNavigation = this.$route.meta.title
}
}