Refactor(Form): Optimize form input experience

Add placeholder. Optimize form validation. Hide ID input.
This commit is contained in:
2024-04-22 18:09:42 +08:00
parent 81b170d944
commit 5d28f7d8d7
22 changed files with 213 additions and 130 deletions

View File

@@ -56,7 +56,7 @@ const Tools = () => {
<AntdAvatar
src={
<AntdImage
preview={{ mask: <Icon component={IconOxygenEye}></Icon> }}
preview={{ mask: <Icon component={IconOxygenEye} /> }}
src={`data:image/svg+xml;base64,${value}`}
alt={'Avatar'}
/>
@@ -204,9 +204,9 @@ const Tools = () => {
return () => {
form.setFieldValue('pass', undefined)
void modal.confirm({
title: '审核',
centered: true,
maskClosable: true,
title: '审核',
footer: (_, { OkBtn, CancelBtn }) => (
<>
<OkBtn />
@@ -352,8 +352,9 @@ const Tools = () => {
return () => {
modal
.confirm({
title: '确定下架',
centered: true,
maskClosable: true,
title: '确定下架',
content: `确定下架工具 ${value.author.username}:${value.toolId}:${value.ver} 吗?`
})
.then(
@@ -387,8 +388,9 @@ const Tools = () => {
return () => {
modal
.confirm({
title: '确定删除',
centered: true,
maskClosable: true,
title: '确定删除',
content: `确定删除工具 ${value.author.username}:${value.toolId}:${value.platform.slice(0, 1)}${value.platform.slice(1).toLowerCase()}:${value.ver} 吗?`
})
.then(
@@ -552,6 +554,7 @@ const Tools = () => {
onChange={handleOnSearchValueChange}
onKeyDown={handleOnSearchValueKeyDown}
status={isRegexLegal ? undefined : 'error'}
placeholder={'请输入搜索内容'}
/>
</Card>
<Card style={{ overflow: 'inherit', flex: '0 0 auto' }}>