{
id: 'userManagement',
title: '用户管理',
icon: 'fa-users',
roles: ['admin', 'manager'],
submenu: [
{
id: 'userList',
title: '用户列表',
url: 'userList.html',
roles: ['admin', 'manager'],
permissions: { //实质是给元素添加id值=function *
function1: ['admin', 'manager'],
function2: ['admin'],
function3: ['admin']
}
},
{id: 'userRoles', title: '角色管理', url: 'userRoles.html', roles: ['admin']}
]
}
第二种授权办法,自定义标内元素:<div data-role="[admin,person]" />
菜单控权JS对象
于 2024-10-09 21:27:35 首次发布