user.js
1.77 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/** 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.people',
icon: 'peoples',
roles: ['admin', 'assistant', 'runner', 'shoper'] // you can set roles in root nav
},
children: [{
path: 'assistant',
component: () => import('@/views/users/list'),
name: 'assistant',
query: {
test: 'ssssss'
},
meta: {
title: 'users.assistant',
roles: ['admin'] // or you can only set roles in sub nav
}
},
{
path: 'runner',
component: () => import('@/views/users/list'),
name: 'runner',
query: {
test: 'ssssss'
},
meta: {
title: 'users.runner',
roles: ['admin', 'assistant'] // or you can only set roles in sub nav
}
},
{
path: 'shoper',
component: () => import('@/views/users/list'),
name: 'shoper',
query: {
test: 'ssssss'
},
meta: {
title: 'users.shoper',
roles: ['admin', 'assistant'] // or you can only set roles in sub nav
}
},
{
path: 'users',
component: () => import('@/views/users/list'),
name: 'users',
query: {
test: 'ssssss'
},
meta: {
title: 'users.user',
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