From 7c0b6d24743d3eb12956b70635559169171b9e03 Mon Sep 17 00:00:00 2001 From: 1708-huayu <57060237+1708-huayu@users.noreply.github.com> Date: Mon, 30 Dec 2024 19:24:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=90=9C=E7=B4=A2=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 83 +++++++++++++---- src/App.js | 5 +- src/components/DataPickerItem/index.jsx | 6 +- src/components/DetailForm/index.js | 8 +- src/components/DetailNavBar/index.js | 7 +- src/components/DetailSearchBar/index.css | 39 ++++++++ src/components/DetailSearchBar/index.js | 37 ++++++++ src/pages/Bottom/index.js | 9 -- src/pages/DetailSearchContext/index.js | 110 +++++++++++++++++++++++ src/pages/Home/index.js | 19 ++-- src/pages/ToDoList/index.js | 5 +- src/pages/ToDoTree/index.js | 1 + 12 files changed, 284 insertions(+), 45 deletions(-) create mode 100644 src/components/DetailSearchBar/index.css create mode 100644 src/components/DetailSearchBar/index.js create mode 100644 src/pages/DetailSearchContext/index.js create mode 100644 src/pages/ToDoTree/index.js diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9e33e74..5c9c9ec 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,28 +4,19 @@ + + + + + + + + + + + file://$PROJECT_DIR$/src/components/ParentTask/index.js + 84 + + + + \ No newline at end of file diff --git a/src/App.js b/src/App.js index 7e7e0d8..3f5f77f 100644 --- a/src/App.js +++ b/src/App.js @@ -4,11 +4,12 @@ import Map from './pages/Map'; import Index from './pages/Index' import './pages/Bottom/index.css' import CityList from './pages/CityList'; -import {Todo, Message, PersonalCenter} from './pages/Bottom' +import { PersonalCenter} from './pages/Bottom' import ToDoList from "./pages/ToDoList"; import DetailForm from "./components/DetailForm"; import {NavBar} from "antd-mobile"; import DetailNavBar from "./components/DetailNavBar"; +import DetailSearchContext from "./pages/DetailSearchContext"; function App() { return ( @@ -24,11 +25,11 @@ function App() { }> }/> }> - }> }> }> }> + }> {/* }> diff --git a/src/components/DataPickerItem/index.jsx b/src/components/DataPickerItem/index.jsx index 477f601..4c920e3 100644 --- a/src/components/DataPickerItem/index.jsx +++ b/src/components/DataPickerItem/index.jsx @@ -49,11 +49,7 @@ const DatePickerItem = (props) => { onClick={e => { e.stopPropagation() setFieldsValue({fieldName: null}) - }} - /> - ) : ( - true - ) + }}/>) : true } onClick={() => { setPickerVisible(true) diff --git a/src/components/DetailForm/index.js b/src/components/DetailForm/index.js index 7ff01bd..6e294cf 100644 --- a/src/components/DetailForm/index.js +++ b/src/components/DetailForm/index.js @@ -12,7 +12,10 @@ import ParentTask from "../ParentTask"; import DatePickerItem from "../DataPickerItem" import "./index.css" import {addTask} from "../../utils"; +import {useNavigate, useOutletContext} from "react-router-dom"; export default () => { + const {setTitle} = useOutletContext(); + setTitle("添加任务") const [form] = Form.useForm(); const onFinish = (values) => { // Dialog.alert({ @@ -51,7 +54,7 @@ export default () => { > - +