|
@@ -43,12 +43,21 @@ function getFirstMenu(routes) {
|
|
|
routes.forEach(item => {
|
|
|
if(!firstMenu && item.children?.length > 0) {
|
|
|
item.children.forEach(child => {
|
|
|
- if(!firstMenu && !child.hidden) {
|
|
|
- firstMenu = item.path + '/' + child.path
|
|
|
+ if(!firstMenu && child.children?.length > 0) {
|
|
|
+ child.children.forEach(sChild => {
|
|
|
+ if(!firstMenu && !sChild.hidden) {
|
|
|
+ firstMenu = child.path + '/' + sChild.path
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if(!firstMenu && !child.hidden) {
|
|
|
+ firstMenu = item.path + '/' + child.path
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ console.log(firstMenu)
|
|
|
return firstMenu
|
|
|
}
|
|
|
|