fix(client): fix upload progress style (#4698)

This commit is contained in:
Junyi 2024-06-18 23:40:56 +08:00 committed by GitHub
parent 6e0074fb66
commit ed89dd04c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -134,14 +134,14 @@ function AttachmentListItem(props) {
{!readPretty && file.id && (
<Button size={'small'} type={'text'} icon={<DownloadOutlined />} onClick={onDownload} />
)}
{!readPretty && !disabled && (
{!readPretty && !disabled && file.status !== 'uploading' && (
<Button size={'small'} type={'text'} icon={<DeleteOutlined />} onClick={onDelete} />
)}
</Space>
</span>
{file.status === 'uploading' && (
<div className={`${prefixCls}-list-item-progress`}>
<Progress size={2} type={'line'} showInfo={false} percent={file.percent} />
<Progress strokeWidth={4} type={'line'} showInfo={false} percent={Number(file.percent)} />
</div>
)}
</div>

View File

@ -77,6 +77,7 @@ export const useStyles = genStyleHook('upload', (token) => {
},
[`${componentCls}-list-picture-card ${componentCls}-list-item-progress`]: {
bottom: 'calc(50% - 11px)',
left: `${token.margin / 2}px`,
pointerEvents: 'none',
},
[`${antCls}-btn`]: {