Optimize code

This commit is contained in:
2024-03-01 15:34:01 +08:00
parent 935a1a223a
commit fb94ae6a52
7 changed files with 56 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ const Base = () => {
return (
<>
<SettingsCard
icon={IconOxygenEmail}
icon={IconOxygenBase}
title={'基础'}
loading={loading}
onReset={handleOnReset}

View File

@@ -17,6 +17,8 @@ const Mail = () => {
const handleOnTest = () => {
void modal.confirm({
title: '发送测试邮件',
getContainer: false,
centered: true,
maskClosable: true,
content: (
<>
@@ -27,7 +29,11 @@ const Mail = () => {
style={{ marginTop: 10 }}
rules={[{ required: true, type: 'email' }]}
>
<AntdInput />
<AntdInput
ref={(input) => {
input?.focus()
}}
/>
</AntdForm.Item>
</AntdForm>
<AntdTag style={{ whiteSpace: 'normal' }}>
@@ -56,7 +62,7 @@ const Mail = () => {
},
() => {
return new Promise((_, reject) => {
reject('输入接收者')
reject('输入有误')
})
}
)