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
import Layout from '@/views/layout/Layout'
const GroupRouter = {
path: '/user',
component: Layout,
redirect: '/user/list',
name: 'User',
meta: {
title: '用户管理',
icon: 'component',
roles: ['staff', 'anonymous']
},
children: [
{
path: 'list',
component: () => import('@/views/user/list'),
name: 'UserList',
meta: {title: '用户列表', icon: 'list'}
},
{
path: 'create',
component: () => import('@/views/user/create'),
name: 'CreateUser',
meta: {title: '创建用户', icon: 'edit'}
},
{
path: 'edit/:id(\\d+)',
component: () => import('@/views/user/edit'),
name: 'EditUser',
meta: {title: '编辑用户', noCache: true},
hidden: true
}
]
}
export default GroupRouter