index.tsx 894 Bytes
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;