jinhui.wang

菜单初始化逻辑修改

......@@ -209,14 +209,14 @@ function routeItemInfo(data) {
if (item.nodeType == '1') {
const isParent = item.parentId == 0 && item.children.length == 0;
const route = {
path: item.path,
path: item.path ? item.path : '/',
component: "Layout",
alwaysShow: true,
hidden: false,
meta: { title: item.name, icon: item.icon },
children: !isParent
? item.children.map((child) => ({
path: child.path,
path: child.path ? child.path : '/',
component: `${child.path}`,
hidden: child.nodeType == '1' ? false : true,
name: child.name,
......@@ -224,7 +224,7 @@ function routeItemInfo(data) {
}))
: [
{
path: item.path,
path: item.path ? item.path : '/',
component: `${item.path}`,
hidden: false,
name: item.name,
......