|
@@ -143,23 +143,29 @@ export default {
|
|
if (item.children) {
|
|
if (item.children) {
|
|
//有二级菜单
|
|
//有二级菜单
|
|
item.children.forEach((item2) => {
|
|
item.children.forEach((item2) => {
|
|
|
|
+ console.log(item2)
|
|
if (item2.children) {
|
|
if (item2.children) {
|
|
item2.children.forEach((item3) => {
|
|
item2.children.forEach((item3) => {
|
|
item3.path = item.path + '/' + item2.path + '/' + item3.path
|
|
item3.path = item.path + '/' + item2.path + '/' + item3.path
|
|
})
|
|
})
|
|
if (!routes && item2.children.length) {
|
|
if (!routes && item2.children.length) {
|
|
|
|
+ console.log(22222222222222)
|
|
|
|
+ console.log(item2.children)
|
|
//一级菜单下面第一个有3个菜单的二级菜单
|
|
//一级菜单下面第一个有3个菜单的二级菜单
|
|
routes = item2.children
|
|
routes = item2.children
|
|
routesTo = item2.children
|
|
routesTo = item2.children
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- routes = []
|
|
|
|
|
|
+ if (!routes) {
|
|
|
|
+ routes = []
|
|
|
|
+ }
|
|
routesTo = item.children
|
|
routesTo = item.children
|
|
}
|
|
}
|
|
item2.path = item.path + '/' + item2.path
|
|
item2.path = item.path + '/' + item2.path
|
|
item2.level = 2
|
|
item2.level = 2
|
|
second.push(item2)
|
|
second.push(item2)
|
|
})
|
|
})
|
|
|
|
+ console.log(routes)
|
|
// let fal = false
|
|
// let fal = false
|
|
//选中第一个
|
|
//选中第一个
|
|
auth.setActiveMenu(second[0].path)
|
|
auth.setActiveMenu(second[0].path)
|