修改语言切换重新登录之后出现的问题
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user