mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 19:41:37 +08:00
修复:混合导航模式下,菜单数据为空时导致的异常;🐛
fix: the exception caused by empty menuData in mix navigation mode;
This commit is contained in:
parent
10296fd022
commit
23b7dfe2a4
@ -39,11 +39,11 @@ export default {
|
|||||||
},
|
},
|
||||||
subMenu(state) {
|
subMenu(state) {
|
||||||
const {menuData, activatedFirst} = state
|
const {menuData, activatedFirst} = state
|
||||||
if (!menuData[0].fullPath) {
|
if (menuData.length > 0 && !menuData[0].fullPath) {
|
||||||
formatFullPath(menuData)
|
formatFullPath(menuData)
|
||||||
}
|
}
|
||||||
const current = menuData.find(menu => menu.fullPath === activatedFirst)
|
const current = menuData.find(menu => menu.fullPath === activatedFirst)
|
||||||
return current && current.children ? current.children : []
|
return current && current.children || []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user