router.tsx 903 Bytes
import {createHashRouter} from 'react-router-dom';
import ErrorPage from "./pages/errorPage";
import ProductionManagement from "./pages/production/management";
import ProductionList from "./pages/production/list";
import ProductionDetail from "./pages/production/detail";


const routers = [
    {
        path: '/', // 生产线管理
        element: <ProductionManagement />,
        errorElement: <ErrorPage />,
    },
    {
        path: '/production/management', // 生产线管理
        element: <ProductionManagement />,
        errorElement: <ErrorPage />,
    },
    {
        path: '/production/list', // 生产线明细
        element: <ProductionList />,
        errorElement: <ErrorPage />,
    },
    {
        path: '/production/detail', // 生产线详情
        element: <ProductionDetail />,
        errorElement: <ErrorPage />,
    },
];

export default createHashRouter(routers)