feat: 增加任务模板的增删改查
This commit is contained in:
@@ -2,13 +2,15 @@ import {createRoot} from 'react-dom/client'
|
||||
import {createHashRouter, Navigate, type RouteObject, RouterProvider} from 'react-router'
|
||||
import './index.scss'
|
||||
import './components/amis/Registry.ts'
|
||||
import Overview from "./pages/Overview.tsx";
|
||||
import Root from "./pages/Root.tsx";
|
||||
import Test from "./pages/Test.tsx";
|
||||
import StockList from "./pages/stock/StockList.tsx";
|
||||
import StockDetail from './pages/stock/StockDetail.tsx';
|
||||
import TaskList from "./pages/task/TaskList.tsx";
|
||||
import TaskAdd from './pages/task/TaskAdd.tsx';
|
||||
import Overview from './pages/Overview.tsx'
|
||||
import Root from './pages/Root.tsx'
|
||||
import Test from './pages/Test.tsx'
|
||||
import StockList from './pages/stock/StockList.tsx'
|
||||
import StockDetail from './pages/stock/StockDetail.tsx'
|
||||
import TaskList from './pages/task/TaskList.tsx'
|
||||
import TaskAdd from './pages/task/TaskAdd.tsx'
|
||||
import TaskTemplateList from './pages/task/TaskTemplateList.tsx'
|
||||
import TaskTemplateSave from './pages/task/TaskTemplateSave.tsx'
|
||||
|
||||
const routes: RouteObject[] = [
|
||||
{
|
||||
@@ -37,16 +39,12 @@ const routes: RouteObject[] = [
|
||||
{
|
||||
path: 'detail/:id',
|
||||
Component: StockDetail,
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'task',
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <Navigate to="/task/list" replace/>,
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
Component: TaskList,
|
||||
@@ -55,12 +53,25 @@ const routes: RouteObject[] = [
|
||||
path: 'add',
|
||||
Component: TaskAdd,
|
||||
},
|
||||
]
|
||||
{
|
||||
path: 'template',
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
Component: TaskTemplateList,
|
||||
},
|
||||
{
|
||||
path: 'save/:id',
|
||||
Component: TaskTemplateSave,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'test',
|
||||
Component: Test,
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user