From 2e49c01dac0be6ab83883221f752d8069e05d57a Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 11 Jul 2024 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=A6=E5=8F=B7=E3=80=81=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=BF=9D=E5=AD=98=E5=87=BA=E9=94=99=E4=B8=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/Management.jsx | 3 ++- src/views/account/RoleList.jsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/account/Management.jsx b/src/views/account/Management.jsx index 7081be3..f495de5 100644 --- a/src/views/account/Management.jsx +++ b/src/views/account/Management.jsx @@ -128,6 +128,7 @@ function Management() { const onAccountFinish = (values) => { saveOrUpdateAccount(values) .then(() => { + setAccountModalOpen(false) handelAccountSearch() }) .catch(ex => { @@ -224,7 +225,7 @@ function Management() { htmlType: 'submit', }} title={t('account:detail')} - open={isAccountModalOpen} onOk={() => setAccountModalOpen(false)} onCancel={() => setAccountModalOpen(false)} + open={isAccountModalOpen} onCancel={() => setAccountModalOpen(false)} destroyOnClose forceRender modalRender={(dom) => ( diff --git a/src/views/account/RoleList.jsx b/src/views/account/RoleList.jsx index 796aafe..5143081 100644 --- a/src/views/account/RoleList.jsx +++ b/src/views/account/RoleList.jsx @@ -132,6 +132,7 @@ function RoleList() { const onRoleFinish = (values) => { saveOrUpdateRole(values) .then(() => { + setRoleModalOpen(false) fetchRoleList() .then(r => { setRoleAllList(r) @@ -148,6 +149,7 @@ function RoleList() { } const onRoleFailed = (error) => { + console.log('Failed:', error) // form.resetFields() } @@ -160,7 +162,7 @@ function RoleList() { htmlType: 'submit', }} title={t('account:detail')} - open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)} + open={isRoleModalOpen} onCancel={() => setRoleModalOpen(false)} destroyOnClose forceRender modalRender={(dom) => (