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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| export interface IRoute { [x: string]: any path: string name?: string icon?: string, redirect?: string component?: string menuRender?: boolean hideInMenu?: boolean routes?: IRoute[] } const routes = [ { path: '/', redirect: '/home', }, { path: '/pro', redirect: '/pro/list', }, { path: '/banner', redirect: '/banner/list', }, { path: '/login', component: './Login/Index', menuRender: false, wrappers: [ '@/wrappers/loginAuth.tsx', ], }, { name: '系统首页', path: '/home', component: './Home', wrappers: [ '@/wrappers/auth.tsx', ], access: 'canReadHome' }, { name: '轮播图管理', path: '/banner', routes: [ { name: '轮播图列表', path: '/banner/list', component: './Banner/List', wrappers: [ '@/wrappers/auth.tsx', ], access: 'canReadBannerList' }, { name: '添加轮播图', path: '/banner/add', component: './Banner/Add', hideInMenu: true, wrappers: [ '@/wrappers/auth.tsx', ], access: 'canReadBannerAdd' } ] }, { name: '产品管理', path: '/pro', routes: [ { name: '产品列表', path: '/pro/list', component: './Pro/List', wrappers: [ '@/wrappers/auth.tsx', ], access: 'canReadProList' }, { name: '筛选列表', path: '/pro/search', component: './Pro/Search', wrappers: [ '@/wrappers/auth.tsx', ], access: 'canReadProSearch' } ] } ]
export default routes
|