Complete main UI #37

Merged
FatttSnake merged 192 commits from FatttSnake into dev 2024-02-23 16:31:17 +08:00
Showing only changes of commit 926ae6bef8 - Show all commits

View File

@@ -595,14 +595,17 @@ const User: React.FC = () => {
> >
<AntdInput allowClear /> <AntdInput allowClear />
</AntdForm.Item> </AntdForm.Item>
{!isDrawerEdit ? (
<>
<AntdForm.Item <AntdForm.Item
hidden={isDrawerEdit}
name={'password'} name={'password'}
label={'密码'} label={'密码'}
rules={[{ whitespace: false }]} rules={[{ required: true, whitespace: false }]}
> >
<AntdInput.Password allowClear /> <AntdInput.Password allowClear />
</AntdForm.Item> </AntdForm.Item>
</>
) : undefined}
<AntdForm.Item name={'nickname'} label={'昵称'} rules={[{ whitespace: false }]}> <AntdForm.Item name={'nickname'} label={'昵称'} rules={[{ whitespace: false }]}>
<AntdInput allowClear /> <AntdInput allowClear />
</AntdForm.Item> </AntdForm.Item>
@@ -613,6 +616,8 @@ const User: React.FC = () => {
> >
<AntdInput type={'email'} allowClear /> <AntdInput type={'email'} allowClear />
</AntdForm.Item> </AntdForm.Item>
{formValues?.id !== '0' ? (
<>
<AntdForm.Item name={'roleIds'} label={'角色'}> <AntdForm.Item name={'roleIds'} label={'角色'}>
<AntdSelect <AntdSelect
mode={'multiple'} mode={'multiple'}
@@ -653,7 +658,12 @@ const User: React.FC = () => {
date ? dayjsToUtc(date) : undefined date ? dayjsToUtc(date) : undefined
} }
> >
<AntdDatePicker showTime allowClear changeOnBlur style={{ width: '100%' }} /> <AntdDatePicker
showTime
allowClear
changeOnBlur
style={{ width: '100%' }}
/>
</AntdForm.Item> </AntdForm.Item>
<AntdForm.Item <AntdForm.Item
name={'credentialsExpiration'} name={'credentialsExpiration'}
@@ -663,7 +673,12 @@ const User: React.FC = () => {
date ? dayjsToUtc(date) : undefined date ? dayjsToUtc(date) : undefined
} }
> >
<AntdDatePicker showTime allowClear changeOnBlur style={{ width: '100%' }} /> <AntdDatePicker
showTime
allowClear
changeOnBlur
style={{ width: '100%' }}
/>
</AntdForm.Item> </AntdForm.Item>
<AntdForm.Item <AntdForm.Item
valuePropName={'checked'} valuePropName={'checked'}
@@ -673,6 +688,8 @@ const User: React.FC = () => {
> >
<AntdSwitch /> <AntdSwitch />
</AntdForm.Item> </AntdForm.Item>
</>
) : undefined}
</AntdForm> </AntdForm>
) )