定义side-bar和side-bar-item两个component,根据传入的菜单树生成递归菜单
side-barprops: {menus: Array}
side-bar-item
props:{menu: Object}
{{menu.meta.title}}
{{menu.meta.title}}
使用
样例数据
menus: [
{
type: 1,
path: '/system',
meta: {icon: 'el-icon-home', title: '系统模块'},
children: [
{
type: 2,
path: '/system/user',
meta: {icon: 'el-icon-home', title: '用户'},
},
{
type: 2,
path: '/system/role',
meta: {icon: 'el-icon-home', title: '角色'},
}
]
},
{
type: 2,
path: '/ex',
meta: {icon: 'el-icon-home', title: 'ex'}
},
],
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)