路由
This commit is contained in:
@@ -116,13 +116,9 @@ export default {
|
||||
label: '示教',
|
||||
index: '5',
|
||||
router: '/teach'
|
||||
}, {
|
||||
label: '地图',
|
||||
index: '6',
|
||||
router: ''
|
||||
}, {
|
||||
label: '系统管理',
|
||||
index: '7',
|
||||
index: '6',
|
||||
router: '/user'
|
||||
}],
|
||||
dropdown: false,
|
||||
@@ -132,6 +128,16 @@ export default {
|
||||
unclick: false
|
||||
}
|
||||
},
|
||||
beforeRouteEnter (to, from, next) {
|
||||
next(vm => {
|
||||
vm.menus.map(el => {
|
||||
if (el.router === vm.$route.path) {
|
||||
vm.activeIndex = el.index
|
||||
vm.$store.dispatch('getDefaultActive', el.index)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
oldpassword (val) {
|
||||
if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') {
|
||||
|
||||
Reference in New Issue
Block a user