upload disabled remove

This commit is contained in:
veveue 2019-05-25 16:34:38 +08:00
parent 53ae3e887c
commit 59e2f072c2

View File

@ -238,7 +238,7 @@ class Upload extends React.Component<UploadProps, UploadState> {
};
renderUploadList = (locale: UploadLocale) => {
const { showUploadList, listType, onPreview, previewFile } = this.props;
const { showUploadList, listType, onPreview, previewFile, disabled } = this.props;
const { showRemoveIcon, showPreviewIcon } = showUploadList as any;
return (
<UploadList
@ -247,7 +247,7 @@ class Upload extends React.Component<UploadProps, UploadState> {
previewFile={previewFile}
onPreview={onPreview}
onRemove={this.handleManualRemove}
showRemoveIcon={showRemoveIcon}
showRemoveIcon={!disabled && showRemoveIcon}
showPreviewIcon={showPreviewIcon}
locale={{ ...locale, ...this.props.locale }}
/>