diff --git a/src/components/list/ListProjAgent.tsx b/src/components/list/ListProjAgent.tsx
new file mode 100644
index 0000000..a602fa1
--- /dev/null
+++ b/src/components/list/ListProjAgent.tsx
@@ -0,0 +1,40 @@
+import './list-proj-agent.css';
+import CardProjAgent from "../card/CardProjAgent.tsx";
+import {useRef, MutableRefObject} from "react";
+import {Input, Pagination} from 'antd';
+import type {SearchProps} from 'antd/es/input/Search';
+
+const {Search} = Input;
+
+const onSearch: SearchProps['onSearch'] = (value, _e, info) => {
+ console.log(info?.source, value)
+};
+
+export default function ListProjAgent() {
+
+ const listProjRef: MutableRefObject
= useRef(null);
+ const listRef: MutableRefObject = useRef(null);
+
+ const domHeight = window.innerHeight - 301;
+
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/list/list-proj-agent.css b/src/components/list/list-proj-agent.css
new file mode 100644
index 0000000..981abfc
--- /dev/null
+++ b/src/components/list/list-proj-agent.css
@@ -0,0 +1,35 @@
+.list-proj-agent {
+ width: 100%;
+ padding: 15px 0;
+}
+
+.list-proj-agent .top {
+ padding: 0 15px 15px 15px;
+ display: flex;
+ justify-content: right;
+ border-bottom: 1px solid var(--color-border);
+}
+
+.list-proj-agent .body {
+ width: unset;
+ margin: 0;
+}
+
+.list-proj-agent .list {
+ padding: 15px;
+ overflow: auto;
+}
+
+.list-proj-agent .body .card-proj-agent {
+ margin-bottom: 10px;
+}
+.list-proj-agent .body .card-proj-agent:last-child {
+ margin-bottom: 0;
+}
+
+.list-proj-agent .body .page {
+ border-top: 1px solid var(--color-border);
+ padding-top: 15px;
+ display: flex;
+ justify-content: right;
+}
\ No newline at end of file
diff --git a/src/context/Context.ts b/src/context/Context.ts
deleted file mode 100644
index 20f4168..0000000
--- a/src/context/Context.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import {createContext} from "react";
-import axios from 'axios';
-
-axios.defaults.baseURL = 'https://localhost:8080';
-
-export const Axios = createContext(axios)
\ No newline at end of file
diff --git a/src/context/Context.tsx b/src/context/Context.tsx
new file mode 100644
index 0000000..af3703e
--- /dev/null
+++ b/src/context/Context.tsx
@@ -0,0 +1,11 @@
+import {Context, createContext} from "react";
+import axios from 'axios';
+import {BreadcrumbItemType, BreadcrumbSeparatorType} from "antd/es/breadcrumb/Breadcrumb";
+
+axios.defaults.baseURL = 'https://localhost:8080';
+
+export const Axios = createContext(axios)
+
+export const Navs:Context = createContext([{
+ title: 首页
+}])
\ No newline at end of file
diff --git a/src/layout/body/Body.tsx b/src/layout/body/Body.tsx
index 16b15e5..4c20161 100644
--- a/src/layout/body/Body.tsx
+++ b/src/layout/body/Body.tsx
@@ -1,11 +1,16 @@
import './body.css'
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
import Index from '../../route/index';
+import ProjType from "../../route/proj/ProjType.tsx";
const router = createBrowserRouter([
{
path: '/',
element:
+ },
+ {
+ path: '/proj-type',
+ element:
}
])
diff --git a/src/layout/nav/Nav.tsx b/src/layout/nav/Nav.tsx
index 8907d6d..f77dd06 100644
--- a/src/layout/nav/Nav.tsx
+++ b/src/layout/nav/Nav.tsx
@@ -1,19 +1,16 @@
import './nav.css';
+import {Breadcrumb } from 'antd';
+import {useContext} from "react";
+import {Navs} from '../../context/Context.tsx';
export default function Nav() {
+
+ const [navs, _setNavs] = useContext(Navs)
+ console.log(navs)
+
return (
-
- -
- 首页
-
- -
- 首页
-
- -
- 首页
-
-
+
)
}
\ No newline at end of file
diff --git a/src/route/index/index.tsx b/src/route/index/index.tsx
index 67c1fb2..f7115ea 100644
--- a/src/route/index/index.tsx
+++ b/src/route/index/index.tsx
@@ -1,49 +1,58 @@
import './index.css';
-import {MouseEvent} from "react";
+import {MouseEvent, useState} from "react";
+import {useNavigate} from "react-router-dom";
import {IMenuListItem, IMenuWithTopButton} from "../../interfaces/menu/IMenuWithTopButton.ts";
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
import ListProj from "../../components/list/ListProj.tsx";
-
-const projMenu: IMenuWithTopButton = {
- button: {
- name: '创建项目',
- handle(e: MouseEvent) {
- console.log(e)
- }
- },
- list: [
- {id: 'proj1', icon: './vite.svg', name: '全部项目'},
- {id: 'proj2', icon: './vite.svg', name: '进行中的'},
- {id: 'proj3', icon: './vite.svg', name: '已完成的'}
- ],
- handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
- console.log(e);
- console.log(index);
- console.log(item)
- }
-}
-
-const agentMenu: IMenuWithTopButton = {
- button: {
- name: '代理服务',
- handle(e: MouseEvent) {
- console.log(e)
- }
- },
- list: [
- {id: 'agent1', icon: './vite.svg', name: '全部项目'},
- {id: 'agent2', icon: './vite.svg', name: '进行中的'},
- {id: 'agent3', icon: './vite.svg', name: '已完成的'},
- ],
- handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
- console.log(e);
- console.log(index);
- console.log(item)
- }
-}
+import ListProjAgent from "../../components/list/ListProjAgent.tsx";
export default function Index() {
+
+ const navigate = useNavigate();
+ const [listType, setListType] = useState('proj');
+
+ const projMenu: IMenuWithTopButton = {
+ button: {
+ name: '创建项目',
+ handle(e: MouseEvent) {
+ console.log(e)
+ navigate('/proj-type')
+ }
+ },
+ list: [
+ {id: 'proj1', icon: './vite.svg', name: '全部项目'},
+ {id: 'proj2', icon: './vite.svg', name: '进行中的'},
+ {id: 'proj3', icon: './vite.svg', name: '已完成的'}
+ ],
+ handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
+ console.log(e);
+ console.log(index);
+ console.log(item)
+ setListType('proj');
+ }
+ }
+
+ const agentMenu: IMenuWithTopButton = {
+ button: {
+ name: '代理服务',
+ handle(e: MouseEvent) {
+ console.log(e)
+ }
+ },
+ list: [
+ {id: 'agent1', icon: './vite.svg', name: '全部项目'},
+ {id: 'agent2', icon: './vite.svg', name: '进行中的'},
+ {id: 'agent3', icon: './vite.svg', name: '已完成的'},
+ ],
+ handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
+ console.log(e);
+ console.log(index);
+ console.log(item)
+ setListType('projAgent');
+ }
+ }
+
return (
@@ -59,9 +68,7 @@ export default function Index() {
handleListItem={agentMenu.handleListItem}
/>
-
-
-
+
{listType === 'proj' ? : }
)
}
\ No newline at end of file
diff --git a/src/route/proj/ProjType.tsx b/src/route/proj/ProjType.tsx
new file mode 100644
index 0000000..bf5d9da
--- /dev/null
+++ b/src/route/proj/ProjType.tsx
@@ -0,0 +1,9 @@
+import './proj-type.css'
+
+export default function ProjType() {
+ return (
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/route/proj/proj-type.css b/src/route/proj/proj-type.css
new file mode 100644
index 0000000..e69de29