user.js
960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/** When your routing table is too long, you can split it into small modules**/
import Layout from '@/layout'
const chartsRouter = {
path: '/users',
component: Layout,
redirect: '/users/page',
alwaysShow: true, // will always show the root menu
name: 'Users',
meta: {
title: 'users',
icon: 'peoples',
roles: ['admin', 'assistant'] // you can set roles in root nav
},
children: [{
path: 'page',
component: () => import('@/views/users/list'),
name: 'UserList',
meta: {
title: 'UserList',
roles: ['admin', 'assistant', 'shoper', 'runner'] // or you can only set roles in sub nav
}
}
// ,{
// path: '/icons',
// component: () => import('@/views/icons/index'),
// name: 'icons',
// meta: {
// title: 'icons',
// roles: ['admin', 'assistant', 'shoper', 'runner'] // or you can only set roles in sub nav
// }
// }
]
}
export default chartsRouter