Comparing version 0.9.0-beta6 to 0.9.0-beta7
@@ -54,2 +54,2 @@ require('./index.css'); | ||
antd.version = '0.9.0-beta6'; | ||
antd.version = '0.9.0-beta7'; |
@@ -44,6 +44,15 @@ 'use strict'; | ||
onStart: function onStart(file) { | ||
file.status = 'uploading'; | ||
var nextFileList = this.state.fileList.concat(); | ||
if (file.length > 0) { | ||
file.forEach(function (f) { | ||
f.status = 'uploading'; | ||
}); | ||
nextFileList = nextFileList.concat(file); | ||
} else { | ||
file.status = 'uploading'; | ||
nextFileList.push(file); | ||
} | ||
this.onChange({ | ||
file: file, | ||
add: true | ||
fileList: nextFileList | ||
}); | ||
@@ -104,21 +113,7 @@ }, | ||
if (!('fileList' in this.props) && !info.event) { | ||
// 新增文件时,使用 multiple 属性会造成同时 setState | ||
if (info.add) { | ||
this.setState(function (prevState) { | ||
return { | ||
fileList: prevState.fileList.concat(info.file) | ||
}; | ||
}, function () { | ||
info.fileList = this.state.fileList; | ||
this.props.onChange(info); | ||
}); | ||
} else { | ||
this.setState({ | ||
fileList: info.fileList | ||
}, function () { | ||
info.fileList = this.state.fileList; | ||
this.props.onChange(info); | ||
}); | ||
} | ||
this.setState({ | ||
fileList: info.fileList | ||
}); | ||
} | ||
this.props.onChange(info); | ||
}, | ||
@@ -125,0 +120,0 @@ getDefaultProps: function getDefaultProps() { |
{ | ||
"name": "antd", | ||
"version": "0.9.0-beta6", | ||
"version": "0.9.0-beta7", | ||
"stableVersion": "0.8.0", | ||
@@ -61,3 +61,3 @@ "title": "Ant Design", | ||
"rc-tree": "~0.15.4", | ||
"rc-upload": "~1.3.1", | ||
"rc-upload": "~1.4.0", | ||
"rc-util": "~2.0.3", | ||
@@ -64,0 +64,0 @@ "react-slick": "~0.7.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
353396
12496
+ Addedasync@1.5.2(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcomponent-emitter@1.2.1(transitive)
+ Addedcookiejar@2.0.6(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedextend@3.0.0(transitive)
+ Addedform-data@1.0.0-rc3(transitive)
+ Addedformidable@1.0.17(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedrc-upload@1.4.4(transitive)
+ Addedsuperagent@1.8.5(transitive)
- Removedasync@0.9.2(transitive)
- Removedcombined-stream@0.0.7(transitive)
- Removedcomponent-emitter@1.1.2(transitive)
- Removedcookiejar@2.0.1(transitive)
- Removeddelayed-stream@0.0.5(transitive)
- Removedextend@1.2.1(transitive)
- Removedform-data@0.2.0(transitive)
- Removedformidable@1.0.14(transitive)
- Removedmethods@1.0.1(transitive)
- Removedmime-db@1.12.0(transitive)
- Removedmime-types@2.0.14(transitive)
- Removedrc-upload@1.3.7(transitive)
- Removedsuperagent@1.2.0(transitive)
- Removeduuid@2.0.3(transitive)
Updatedrc-upload@~1.4.0