import { lazy } from 'react'; import AppLayout from '@/layouts/AppLayout'; import EmptyLayout from '@/layouts/EmptyLayout'; import CompanyList from '@/pages/Company/List'; import ErrorPage from '@/pages/Error'; import Index from '@/pages/Index'; import Login from '@/pages/Record/Login'; import Sys from '@/pages/Record/Sys'; import Dep from '@/pages/Staff/Dep'; import Grp from '@/pages/Staff/Grp'; import StaffList from '@/pages/Staff/List'; import UserList from '@/pages/User/List'; import type { IRouteItem } from '@/router/types'; export const routes: IRouteItem[] = [ { path: '/home', Layout: AppLayout, children: [ { path: '/index', Component: Index }, // { path: '/index', Component: lazy(() => import('@/pages/Index')) }, // { path: '/home', Component: Index, }, ], }, { path: '/user', Layout: AppLayout, children: [ { path: '/list', Component: UserList }, // { path: '/group', Component: lazy(() => import('@/pages/Staff/group')) }, ], }, { path: '/company', Layout: AppLayout, children: [ { path: '/list', Component: CompanyList }, // { path: '/group', Component: lazy(() => import('@/pages/Staff/group')) }, ], }, { path: '/staff', Layout: AppLayout, children: [ { path: '/list', Component: StaffList }, { path: '/dep', Component: Dep }, { path: '/group', Component: Grp }, { path: '/login', Component: Login }, { path: '/sys', Component: Sys }, ], }, { path: '/login', Layout: EmptyLayout, children: [ { path: '/index', Component: lazy(() => import('@/pages/Login')) }, // ], }, { path: '*', Layout: ErrorPage, children: [] }, ];