fix: 修复递归判断单个子路由错误问题

This commit is contained in:
张传龙 2022-04-25 09:56:23 +08:00
parent 321e19a3a5
commit 7c8a17bbb2

View File

@ -68,7 +68,7 @@ function getMenuItem(route, basePath = '') {
if (visibleItems.length === 1) { if (visibleItems.length === 1) {
menuItem = getMenuItem(visibleItems[0], menuItem.path) menuItem = getMenuItem(visibleItems[0], menuItem.path)
} else { } else if (visibleItems.length > 1) {
menuItem.children = visibleItems.map((item) => getMenuItem(item, menuItem.path)) menuItem.children = visibleItems.map((item) => getMenuItem(item, menuItem.path))
} }
} else { } else {