接上文如何搭建TS的React项目
router6的时候反而不适用了于是用下文
7.配置路由: 在 src/routers/index.tsx 中配置路由:
import {
lazy } from "react";
const Home = lazy(() => import("../pages/home"));
const About = lazy(() => import("../pages/about"));
export type RouterType = {
path: string;
component: React.LazyExoticComponent<any>;
root: string[];
notExect?: boolean