fix: 修复递归判断单个子路由错误问题
This commit is contained in:
parent
321e19a3a5
commit
7c8a17bbb2
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user