import { routes } from '../public/config.json' import { PathnameEnum } from '../src/enum' export interface Routes { path: string component?: string | (() => any) title: string redirect?: string // 隐藏自己和子菜单 hideInMenu?: boolean // 隐藏子菜单 hideChildrenInMenu?: boolean routes?: Routes[] } const _routes = [ { path: '/', title: '__LAYOUT__', component: '@/layouts/index', routes: [ { title: '首页', path: PathnameEnum.Home, redirect: routes[0].path, }, ...routes, { title: '访问被拒绝', path: PathnameEnum.NotAuthorized, component: 'not-authorized', }, { title: '页面不存在', component: 'not-found' }, ], }, ] export { routes } export default _routes