1.多级菜单
[{parentId: '0', // 第一级这里是 0path: '/path',component: Layout, // 有children时,第一级的component必须写Layoutredirect: '/test/first', // 有children时,第一级的redirect必须为children[0]的pathname: '标题1', // 同下面的titlemeta: {title: '标题1',icon: '图标'},children: [{path: '/path/path1-1',component: '/xxxxx',name: '标题1-1',meta: {title: '标题1-1',icon: '图标'},children: []},{path: '/path/path1-2',component: '/xxxx',name: '标题1-2,meta: {title: '标题1-2',icon: '图标'},children: []}]}
]
2.一级菜单
[{parentId: '0', // 第一级这里是 0path: '/path',component: '/xxx', // 无children时,第一级的component写/xxxx,正常写,不用写Layoutredirect: '/test/first', // 无children时,第一级的redirect为空name: '标题1', // 同下面的titlemeta: {title: '标题1',icon: '图标'},children: []}
]
3.所有用户默认有个人信息菜单(一级菜单)
[{parentId: '0',path: '/userinfo',component: '/userinfo/UserInfo',redirect: null,name: '个人信息',meta: {title: '个人信息',icon: ''},children: []}
]