fix:解决 Forget to pass form prop

perf/export-docx
Jimmy Liow 1 year ago
parent 7801719522
commit e3038e0a9d

@ -224,17 +224,15 @@ function Management() {
}} }}
title={t('account:detail')} title={t('account:detail')}
open={isAccountModalOpen} onOk={() => setAccountModalOpen(false)} onCancel={() => setAccountModalOpen(false)} open={isAccountModalOpen} onOk={() => setAccountModalOpen(false)} onCancel={() => setAccountModalOpen(false)}
destroyOnClose={true} destroyOnClose
clearOnDestroy={true} forceRender
modalRender={(dom) => ( modalRender={(dom) => (
<Form <Form
name='AccountForm' name='AccountForm'
form={accountForm} form={accountForm}
layout='vertical' layout='vertical'
size='large' size='large'
style={{ className='max-w-2xl'
maxWidth: 600,
}}
onFinish={onAccountFinish} onFinish={onAccountFinish}
onFinishFailed={onAccountFailed} onFinishFailed={onAccountFailed}
autoComplete='off' autoComplete='off'
@ -322,7 +320,7 @@ function Management() {
</Select> </Select>
</Form.Item> </Form.Item>
</Modal> </Modal>
<Space direction='vertical' style={{ width: '100%' }}> <Space direction='vertical' className='w-full'>
<Title level={3}>{t('account:accountList')}</Title> <Title level={3}>{t('account:accountList')}</Title>
<SearchForm <SearchForm
fieldsConfig={{ fieldsConfig={{
@ -331,7 +329,7 @@ function Management() {
username: { label: t('account:username') }, username: { label: t('account:username') },
realname: { label: t('account:realname') }, realname: { label: t('account:realname') },
}, },
sort: { username: 1, realname: 2, dates: 3}, sort: { username: 1, realname: 2},
}} }}
onSubmit={() => { onSubmit={() => {
handelAccountSearch() handelAccountSearch()

@ -161,8 +161,8 @@ function RoleList() {
}} }}
title={t('account:detail')} title={t('account:detail')}
open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)} open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)}
destroyOnClose={true} destroyOnClose
clearOnDestroy={true} forceRender
modalRender={(dom) => ( modalRender={(dom) => (
<Form <Form
name='RoleForm' name='RoleForm'

Loading…
Cancel
Save