From b9b23184da15fd2489426d84330b4c140e88143c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 13 Nov 2025 10:10:28 +0800 Subject: [PATCH 1/4] perf: SearchForm dates --- src/components/SearchForm.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx index f9e0f52..cb62dad 100644 --- a/src/components/SearchForm.jsx +++ b/src/components/SearchForm.jsx @@ -259,7 +259,7 @@ function getFields(props) { item( "dates", //时间日期 99, - + <> From 6691ae60a00c1159cc31fbf045ecd3874c977d78 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 13 Nov 2025 10:10:54 +0800 Subject: [PATCH 2/4] =?UTF-8?q?perf:=20=E5=85=AC=E5=91=8A=E5=8F=91?= =?UTF-8?q?=E5=B8=83:=20=E9=BB=98=E8=AE=A4=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E4=B8=BA=E8=87=AA=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notifs/Edit.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/notifs/Edit.jsx b/src/views/notifs/Edit.jsx index 81f94c9..faa444a 100644 --- a/src/views/notifs/Edit.jsx +++ b/src/views/notifs/Edit.jsx @@ -23,7 +23,7 @@ const Edit = ({ ...props }) => { const clickedButton = useRef(''); const quillRef = useRef(); - const [showAgencySelector, setShowAgencySelector] = useState(0); + const [showAgencySelector, setShowAgencySelector] = useState(1); const [showAgencySeleted, setShowAgencySeleted] = useState(0); // const [noticeInfo, setNoticeInfo] = useState({}); @@ -131,7 +131,7 @@ const Edit = ({ ...props }) => { - + + options={options} + /> ); } diff --git a/src/components/VendorSelector.jsx b/src/components/VendorSelector.jsx index 2e7b643..dfb75f5 100644 --- a/src/components/VendorSelector.jsx +++ b/src/components/VendorSelector.jsx @@ -20,12 +20,13 @@ const VendorSelector = ({ ...props }) => { const { travelAgencyId: myAgencyId } = usingStorage(); const [{ travelAgencyName: myAgencyName }] = useAuthStore((state) => [state.currentUser]); const { t } = useTranslation(); - const [{ vendorList }, setCache] = useFormStore(state => [state.cache, state.setCache]); + const [{ vendorList }, setCache] = useFormStore(state => [state.cache, state.setCache]); return ( <> { const { t } = useTranslation(); const { message } = App.useApp(); @@ -22,6 +38,8 @@ const Edit = ({ ...props }) => { const [form] = Form.useForm(); const clickedButton = useRef(''); const quillRef = useRef(); + const setCache = useFormStore(state => state.setCache); + const [showAgencySelector, setShowAgencySelector] = useState(1); const [showAgencySeleted, setShowAgencySeleted] = useState(0); @@ -45,7 +63,10 @@ const Edit = ({ ...props }) => { form.setFieldsValue({ agency_list: _list, }); + setCache({ vendorList: _list }) }); + } else { + setCache({ vendorList: allOverseasAgency }) } }, []); From 36db9201e8db25672a037016f3cc89b934ff0d51 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 14 Nov 2025 15:41:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?perf:=20=E5=85=AC=E5=91=8A=E5=8F=91?= =?UTF-8?q?=E5=B8=83:=20=E5=AD=97=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.jsx | 16 +++++++++++++++- src/views/notifs/Edit.jsx | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/Editor/index.jsx b/src/components/Editor/index.jsx index 9351c3c..d65fe64 100644 --- a/src/components/Editor/index.jsx +++ b/src/components/Editor/index.jsx @@ -4,6 +4,19 @@ import 'quill/dist/quill.snow.css'; // import 'quill/dist/quill.bubble.css'; import './custom.snow.css'; + +function decodeEntities(str) { + const entities = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + ' ': ' ', + }; + return str.replace(/&|<|>|"|'| /g, (match) => entities[match]); +} + const toolbarOptions = [ [{ 'header': [1, 2, 3, 4, 5, 6, false] }], // [{ 'font': [] }], @@ -102,7 +115,8 @@ const Editor = forwardRef(({ readOnly, defaultValue, value, onChange, onTextChan // const text = quill.getText(); onTextChangeRef.current?.(...args); const html = quill.getSemanticHTML(); - onChangeRef.current?.(html); + const htmlText = decodeEntities(html); + onChangeRef.current?.(htmlText); }); quill.on(Quill.events.SELECTION_CHANGE, (...args) => { diff --git a/src/views/notifs/Edit.jsx b/src/views/notifs/Edit.jsx index 7168200..9af766d 100644 --- a/src/views/notifs/Edit.jsx +++ b/src/views/notifs/Edit.jsx @@ -200,7 +200,7 @@ const Edit = ({ ...props }) => { } - +