mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
add res for upload
This commit is contained in:
parent
3cc4a374db
commit
97ac458507
@ -31,13 +31,15 @@ const AntUpload = React.createClass({
|
|||||||
this.props.onStart(file);
|
this.props.onStart(file);
|
||||||
},
|
},
|
||||||
onSuccess(ret, file) {
|
onSuccess(ret, file) {
|
||||||
|
var res = this.props.onSuccess(ret, file);
|
||||||
|
if (res !== false) {
|
||||||
Message.success(file.name + '上传完成');
|
Message.success(file.name + '上传完成');
|
||||||
let targetItem = getFileItem(file, this.state.downloadList);
|
let targetItem = getFileItem(file, this.state.downloadList);
|
||||||
targetItem.status = 'done';
|
targetItem.status = 'done';
|
||||||
this.setState({
|
this.setState({
|
||||||
downloadList: this.state.downloadList
|
downloadList: this.state.downloadList
|
||||||
});
|
});
|
||||||
this.props.onSuccess(ret, file);
|
}
|
||||||
},
|
},
|
||||||
onProgress(e, file) {
|
onProgress(e, file) {
|
||||||
this.props.onProgress(e, file);
|
this.props.onProgress(e, file);
|
||||||
|
Loading…
Reference in New Issue
Block a user