chore: Upload add deadline (#29686)

This commit is contained in:
二货机器人 2021-03-09 23:14:52 +08:00 committed by GitHub
parent f465589bd6
commit 6169ecdf86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -238,7 +238,11 @@ const ListItem = React.forwardRef(
<div className={`${prefixCls}-list-item-info`}>{iconAndPreview}</div>
{actions}
{showProgress && (
<CSSMotion motionName={`${rootPrefixCls}-fade`} visible={file.status === 'uploading'}>
<CSSMotion
motionName={`${rootPrefixCls}-fade`}
visible={file.status === 'uploading'}
motionDeadline={2000}
>
{({ className: motionClassName }) => {
// show loading icon if upload progress listener is disabled
const loadingProgress =

View File

@ -178,6 +178,7 @@ const InternalUploadList: React.ForwardRefRenderFunction<unknown, UploadListProp
// const transitionName = list.length === 0 ? '' : `${prefixCls}-${animationDirection}`;
let motionConfig: Omit<CSSMotionListProps, 'onVisibleChanged'> = {
motionDeadline: 2000,
motionName: `${prefixCls}-${animationDirection}`,
keys: motionKeyList,
motionAppear,