修复线上环境下首次路由匹配时报错
Former-commit-id: 6cd47843403d682ecbe90c3cc595b78d4e0d2cb1 [formerly 05072dca58e9347869ce723360001aeaef1c51b4] [formerly 6cd47843403d682ecbe90c3cc595b78d4e0d2cb1 [formerly 05072dca58e9347869ce723360001aeaef1c51b4] [formerly 6cd47843403d682ecbe90c3cc595b78d4e0d2cb1 [formerly 05072dca58e9347869ce723360001aeaef1c51b4] [formerly 05072dca58e9347869ce723360001aeaef1c51b4 [formerly ccb5421c057dcf18f2f28f0b0c6b6e453b7de760 [formerly b14b6676d82b06798ba3e17b0879c04762b04405]]]]] Former-commit-id: 8bfc351ff38f563b0a2e502d94765d802a5f9c59 Former-commit-id: 8ff9e0aeaf6ab0c1aedfb5c2517b0c1b79cfecd5 Former-commit-id: c61d53ea29db97a08be17856bd0875e53a435a91 [formerly ebca0b46c1081cd989f7f1719514e738c35d0b46] Former-commit-id: 04d55550e3bc1f5c644764707ee0cb13794d44a5 Former-commit-id: 3d458cc8f5690a5a133073057b45acb2161c31ca Former-commit-id: bc93dce4925a2fbd21b20fc9c7eef5a558a59bda Former-commit-id: 35371f80812c7a3e63805ed4073938f9850202ae Former-commit-id: a242189e76f4f8fd886f77f2b687bb6eb69b5843
This commit is contained in:
@@ -76,9 +76,11 @@ new Vue({
|
||||
watch: {
|
||||
// 检测路由变化切换侧边栏内容
|
||||
'$route.matched': {
|
||||
handler (value) {
|
||||
const _side = menuAside.filter(menu => menu.path === value[0].path)
|
||||
this.$store.commit('d2admin/menu/asideSet', _side.length > 0 ? _side[0].children : [])
|
||||
handler (matched) {
|
||||
if (matched.length > 0) {
|
||||
const _side = menuAside.filter(menu => menu.path === matched[0].path)
|
||||
this.$store.commit('d2admin/menu/asideSet', _side.length > 0 ? _side[0].children : [])
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user