|
@ -168,6 +168,7 @@ const AntUpload = React.createClass({ |
|
|
data: {}, |
|
|
data: {}, |
|
|
accept: '', |
|
|
accept: '', |
|
|
onChange: noop, |
|
|
onChange: noop, |
|
|
|
|
|
uploadList: true |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
componentWillReceiveProps(nextProps) { |
|
|
componentWillReceiveProps(nextProps) { |
|
@ -188,6 +189,10 @@ const AntUpload = React.createClass({ |
|
|
onProgress: this.onProgress, |
|
|
onProgress: this.onProgress, |
|
|
onSuccess: this.onSuccess, |
|
|
onSuccess: this.onSuccess, |
|
|
}); |
|
|
}); |
|
|
|
|
|
let uploadList; |
|
|
|
|
|
if (this.props.uploadList) { |
|
|
|
|
|
uploadList = <UploadList items={this.state.fileList} onRemove={this.handleManualRemove} />; |
|
|
|
|
|
} |
|
|
if (type === 'drag') { |
|
|
if (type === 'drag') { |
|
|
let dragUploadingClass = ''; |
|
|
let dragUploadingClass = ''; |
|
|
let fileList = this.state.fileList; |
|
|
let fileList = this.state.fileList; |
|
@ -206,8 +211,7 @@ const AntUpload = React.createClass({ |
|
|
</div> |
|
|
</div> |
|
|
</Upload> |
|
|
</Upload> |
|
|
</div> |
|
|
</div> |
|
|
<UploadList items={this.state.fileList} |
|
|
{ uploadList } |
|
|
onRemove={this.handleManualRemove} /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
); |
|
|
); |
|
|
} else if (type === 'select') { |
|
|
} else if (type === 'select') { |
|
@ -218,8 +222,7 @@ const AntUpload = React.createClass({ |
|
|
{this.props.children} |
|
|
{this.props.children} |
|
|
</Upload> |
|
|
</Upload> |
|
|
</div> |
|
|
</div> |
|
|
<UploadList items={this.state.fileList} |
|
|
{ uploadList } |
|
|
onRemove={this.handleManualRemove} /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|