From ad81a60d5576f650e7eaa818a49f1f8e9cd7b19a Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Sat, 14 Sep 2024 14:36:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E9=A1=B6=E9=83=A8=E6=8C=89=E9=92=AE=20fix:=20?= =?UTF-8?q?=E5=90=88=E5=90=8C=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=AF=B9=E8=AF=9D=E6=A1=86=20perf:=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20main.jsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 10 +++++----- src/views/App.jsx | 10 +++++++++- src/views/products/Detail/ContractRemarksModal.jsx | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main.jsx b/src/main.jsx index 25a7270..f9961a1 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,5 +1,4 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' +import { createRoot } from 'react-dom/client' import { createBrowserRouter, RouterProvider, @@ -42,8 +41,6 @@ import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, import './i18n' -const { createRoot } = ReactDOM - const initRouter = async () => { return createBrowserRouter([ { @@ -100,8 +97,11 @@ const initAppliction = async () => { } const router = await initRouter() + const root = document.getElementById('root') + + if (!root) throw new Error('No root element found') - createRoot(document.getElementById('root')).render( + createRoot(root).render( // - } onClick={() => uploadLog()} /> + + } onClick={() => uploadLog()} /> + + {contextHolder} diff --git a/src/views/products/Detail/ContractRemarksModal.jsx b/src/views/products/Detail/ContractRemarksModal.jsx index 65178ab..165b97f 100644 --- a/src/views/products/Detail/ContractRemarksModal.jsx +++ b/src/views/products/Detail/ContractRemarksModal.jsx @@ -22,6 +22,7 @@ export const ContractRemarksModal = () => { const remarkList = remarksForm.getFieldsValue().remarkList saveOrUpdateRemark(remarkList) .then(() => { + setRemarksModalOpen(false) notification.info({ message: 'Notification', description: '合同备注保存成功', From c88adc4b5ee7fb38e271d88b0e5b7b5c96f5cfc5 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 18 Sep 2024 09:55:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?perf:=20=E5=A2=9E=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=B0=8F=E7=89=88=E6=9C=AC=E6=89=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch-version.bat | 1 + 1 file changed, 1 insertion(+) create mode 100644 patch-version.bat diff --git a/patch-version.bat b/patch-version.bat new file mode 100644 index 0000000..0675b9b --- /dev/null +++ b/patch-version.bat @@ -0,0 +1 @@ +npm version patch \ No newline at end of file From eb410adeb5b32a16e28c5daab45519fd5a9a8504 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 18 Sep 2024 09:56:40 +0800 Subject: [PATCH 3/3] 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87dce53..6848b2c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "2.0.0-rc.9", + "version": "2.0.0", "type": "module", "scripts": { "dev": "vite",