Browse Source

upload disabled remove

pull/16786/head
veveue 6 years ago
parent
commit
59e2f072c2
  1. 4
      components/upload/Upload.tsx

4
components/upload/Upload.tsx

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

Loading…
Cancel
Save