mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +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);
|
||||
},
|
||||
onSuccess(ret, file) {
|
||||
Message.success(file.name + '上传完成');
|
||||
let targetItem = getFileItem(file, this.state.downloadList);
|
||||
targetItem.status = 'done';
|
||||
this.setState({
|
||||
downloadList: this.state.downloadList
|
||||
});
|
||||
this.props.onSuccess(ret, file);
|
||||
var res = this.props.onSuccess(ret, file);
|
||||
if (res !== false) {
|
||||
Message.success(file.name + '上传完成');
|
||||
let targetItem = getFileItem(file, this.state.downloadList);
|
||||
targetItem.status = 'done';
|
||||
this.setState({
|
||||
downloadList: this.state.downloadList
|
||||
});
|
||||
}
|
||||
},
|
||||
onProgress(e, file) {
|
||||
this.props.onProgress(e, file);
|
||||
|
Loading…
Reference in New Issue
Block a user