处理模块之间跳转后,地址栏和二级路由选中的菜单不匹配的问题
This commit is contained in:
parent
8772c16c9b
commit
39c519b818
|
@ -41,7 +41,16 @@ export default {
|
|||
methods: {
|
||||
onMenuSelect({ key }) {
|
||||
const childPath = this.getChildrenPath(this.menuItems.find(menu => menu.name === key))
|
||||
this.$router.push(childPath)
|
||||
if (key == "abnormal-alarm" || key == "istatistics") {
|
||||
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
||||
if (selectedKeys) {
|
||||
this.$router.push(selectedKeys)
|
||||
} else {
|
||||
this.$router.push(childPath)
|
||||
}
|
||||
} else {
|
||||
this.$router.push(childPath)
|
||||
}
|
||||
},
|
||||
getChildrenPath(menuItem) {
|
||||
if (menuItem.children) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user