Browse Source

chore: Upload add deadline (#29686)

pull/29694/head
二货机器人 4 years ago
committed by GitHub
parent
commit
6169ecdf86
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/upload/UploadList/ListItem.tsx
  2. 1
      components/upload/UploadList/index.tsx

6
components/upload/UploadList/ListItem.tsx

@ -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 =

1
components/upload/UploadList/index.tsx

@ -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,

Loading…
Cancel
Save