index.tsx
894 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
38
39
40
41
42
43
import { RouteComponentProps } from 'react-router-dom';
import SystemSetting from '../pages/SystemSetting';
import MenuManage from '../pages/MenuManage';
import ServiceSetting from '../pages/ServiceSetting';
export interface RouteListProp {
name: string
key: string
path: string
icon?: string
redirect?: string
children?: RouteListProp
component?:
| React.ComponentType<RouteComponentProps<any>>
| React.ComponentType<any>
meta?: {
role: string[]
}
}
const routes: RouteListProp[] = [
{
name: '系统设置',
key: 'SystemSetting',
path: '/system-setting',
component: SystemSetting
},
{
name: '菜单管理',
key: 'MenuManage',
path: '/menu-manage',
component: MenuManage
},
{
name: '应用设置',
key: 'ServiceSetting',
path: '/service-setting',
component: ServiceSetting
}
]
export default routes;