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) => (