Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -209,14 +209,14 @@ function routeItemInfo(data) { | ... | @@ -209,14 +209,14 @@ function routeItemInfo(data) { |
| 209 | if (item.nodeType == '1') { | 209 | if (item.nodeType == '1') { |
| 210 | const isParent = item.parentId == 0 && item.children.length == 0; | 210 | const isParent = item.parentId == 0 && item.children.length == 0; |
| 211 | const route = { | 211 | const route = { |
| 212 | - path: item.path, | 212 | + path: item.path ? item.path : '/', |
| 213 | component: "Layout", | 213 | component: "Layout", |
| 214 | alwaysShow: true, | 214 | alwaysShow: true, |
| 215 | hidden: false, | 215 | hidden: false, |
| 216 | meta: { title: item.name, icon: item.icon }, | 216 | meta: { title: item.name, icon: item.icon }, |
| 217 | children: !isParent | 217 | children: !isParent |
| 218 | ? item.children.map((child) => ({ | 218 | ? item.children.map((child) => ({ |
| 219 | - path: child.path, | 219 | + path: child.path ? child.path : '/', |
| 220 | component: `${child.path}`, | 220 | component: `${child.path}`, |
| 221 | hidden: child.nodeType == '1' ? false : true, | 221 | hidden: child.nodeType == '1' ? false : true, |
| 222 | name: child.name, | 222 | name: child.name, |
| ... | @@ -224,7 +224,7 @@ function routeItemInfo(data) { | ... | @@ -224,7 +224,7 @@ function routeItemInfo(data) { |
| 224 | })) | 224 | })) |
| 225 | : [ | 225 | : [ |
| 226 | { | 226 | { |
| 227 | - path: item.path, | 227 | + path: item.path ? item.path : '/', |
| 228 | component: `${item.path}`, | 228 | component: `${item.path}`, |
| 229 | hidden: false, | 229 | hidden: false, |
| 230 | name: item.name, | 230 | name: item.name, | ... | ... |
-
Please register or login to post a comment