From 34a307b7d0d5f9ccd36e8d0db128d1c7f005600f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Wed, 15 Oct 2025 21:00:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=9F=8E=E5=B8=82=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Picker/CityPicker.tsx | 5 ----- src/container/listCustomNavbar/index.tsx | 24 +++++++++--------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/components/Picker/CityPicker.tsx b/src/components/Picker/CityPicker.tsx index d4bbaa6..3fc6e51 100644 --- a/src/components/Picker/CityPicker.tsx +++ b/src/components/Picker/CityPicker.tsx @@ -11,9 +11,6 @@ interface PickerProps { setvisible: (visible: boolean) => void; options?: PickerOption[][] | PickerOption[]; value?: (string | number)[]; - type?: "month" | "day" | "hour" | "ntrp" | null; - img?: string; - onConfirm?: (options: PickerOption[], values: (string | number)[]) => void; onChange?: (value: (string | number)[]) => void; style?: React.CSSProperties; } @@ -22,7 +19,6 @@ const PopupPicker = ({ visible, setvisible, value = [], - onConfirm, onChange, options = [], style, @@ -33,7 +29,6 @@ const PopupPicker = ({ }; const handleConfirm = () => { - console.log(defaultValue, "defaultValue"); onChange?.(defaultValue); setvisible(false); }; diff --git a/src/container/listCustomNavbar/index.tsx b/src/container/listCustomNavbar/index.tsx index a57f39a..5bb8b17 100644 --- a/src/container/listCustomNavbar/index.tsx +++ b/src/container/listCustomNavbar/index.tsx @@ -23,15 +23,8 @@ interface IProps { function CityPicker(props) { const { visible, setVisible, cities, area, setArea } = props; console.log(cities, "cities"); - const [index, setIndex] = useState(0); const [value, setValue] = useState(area); - useEffect(() => { - if (visible) { - setIndex(index + 1); - } - }, [visible]); - function onChange(value: any) { console.log(value, "value"); setValue(value); @@ -40,7 +33,6 @@ function CityPicker(props) { return ( visible && ( { - + {cityPopupVisible && ( + + )} ); };