Commit 2db68526 by liimin

1

1 parent ef7a4e97
......@@ -22,11 +22,12 @@ export default {
}
},
watch: {
current: {
handler() {
this.onLoad()
}
}
// current: {
// handler() {
// this.onLoad()
// },
// immediate: true
// }
},
mounted() {
this.bus.$on('menu3Changed', this.onMenu3Changed)
......@@ -41,9 +42,14 @@ export default {
},
setActive(activeId = '', nav4 = []) {
this.nav4 = nav4
const sub = this.find(activeId)
if (sub) {
this.$nextTick(() => (this.activeName = sub.path))
if (nav4.length) {
const sub = nav4.find(({ id }) => id == activeId)
if (sub) {
this.$nextTick(() => {
this.activeName = sub.path
this.$router.push(sub.path)
})
}
}
},
onMenu3Changed(menus = []) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!