新项目, antd6, react19
This commit is contained in:
46
src/configs/routes.ts
Normal file
46
src/configs/routes.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { lazy } from 'react';
|
||||
import AppLayout from '@/layouts/AppLayout';
|
||||
import EmptyLayout from '@/layouts/EmptyLayout';
|
||||
import ErrorPage from '@/pages/Error';
|
||||
import Index from '@/pages/Index';
|
||||
import Dep from '@/pages/Staff/dep';
|
||||
import Group from '@/pages/Staff/group';
|
||||
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: '/staff',
|
||||
Layout: AppLayout,
|
||||
children: [
|
||||
{ path: '/dep', Component: Dep },
|
||||
{ path: '/group', Component: Group },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
Layout: EmptyLayout,
|
||||
children: [
|
||||
{ path: '/index', Component: lazy(() => import('@/pages/Login')) },
|
||||
//
|
||||
],
|
||||
},
|
||||
{ path: '*', Layout: ErrorPage, children: [] },
|
||||
];
|
||||
Reference in New Issue
Block a user