From d8c006046f5874aea5d193deef2b4e5c7866b737 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Sun, 12 May 2024 16:12:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BC=96=E8=BE=91=E9=A2=9D=E5=BA=A6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/User/EditUser.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/pages/User/EditUser.js b/web/src/pages/User/EditUser.js index 90bbc4b6..fa5f8907 100644 --- a/web/src/pages/User/EditUser.js +++ b/web/src/pages/User/EditUser.js @@ -19,7 +19,7 @@ const EditUser = (props) => { const userId = props.editingUser.id; const [loading, setLoading] = useState(true); const [addQuotaModalOpen, setIsModalOpen] = useState(false); - const [addQuotaLocal, setAddQuotaLocal] = useState(0); + const [addQuotaLocal, setAddQuotaLocal] = useState(''); const [inputs, setInputs] = useState({ username: '', display_name: '', @@ -111,12 +111,12 @@ const EditUser = (props) => { }; const addLocalQuota = () => { - let newQuota = parseInt(quota) + addQuotaLocal; + let newQuota = parseInt(quota) + parseInt(addQuotaLocal); setInputs((inputs) => ({ ...inputs, quota: newQuota })); }; const openAddQuotaModal = () => { - setAddQuotaLocal(0); + setAddQuotaLocal('0'); setIsModalOpen(true); }; @@ -272,12 +272,14 @@ const EditUser = (props) => { closable={null} >