💬 fixing upload component typos and capitalization consistency for en-US

pull/11473/merge
Ilan Hasanov 7 years ago committed by 偏右
parent 7d46cabb17
commit 6cecc9a0ea

@ -45,7 +45,7 @@ class MyUpload extends React.Component {
// Only to show two recent uploaded files, and old ones will be replaced by the new // Only to show two recent uploaded files, and old ones will be replaced by the new
fileList = fileList.slice(-2); fileList = fileList.slice(-2);
// 2. read from response and show file link // 2. Read from response and show file link
fileList = fileList.map((file) => { fileList = fileList.map((file) => {
if (file.response) { if (file.response) {
// Component will show file.url as link // Component will show file.url as link
@ -54,7 +54,7 @@ class MyUpload extends React.Component {
return file; return file;
}); });
// 3. filter successfully uploaded files according to response from server // 3. Filter successfully uploaded files according to response from server
fileList = fileList.filter((file) => { fileList = fileList.filter((file) => {
if (file.response) { if (file.response) {
return file.response.status === 'success'; return file.response.status === 'success';
@ -74,7 +74,7 @@ class MyUpload extends React.Component {
return ( return (
<Upload {...props} fileList={this.state.fileList}> <Upload {...props} fileList={this.state.fileList}>
<Button> <Button>
<Icon type="upload" /> upload <Icon type="upload" /> Upload
</Button> </Button>
</Upload> </Upload>
); );

@ -13,7 +13,6 @@ title:
If uploaded file is a picture, the thumbnail can be shown. `IE8/9` do not support local thumbnail show. Please use `thumbUrl` instead. If uploaded file is a picture, the thumbnail can be shown. `IE8/9` do not support local thumbnail show. Please use `thumbUrl` instead.
````jsx ````jsx
import { Upload, Button, Icon } from 'antd'; import { Upload, Button, Icon } from 'antd';
@ -48,14 +47,14 @@ ReactDOM.render(
<div> <div>
<Upload {...props}> <Upload {...props}>
<Button> <Button>
<Icon type="upload" /> upload <Icon type="upload" /> Upload
</Button> </Button>
</Upload> </Upload>
<br /> <br />
<br /> <br />
<Upload {...props2}> <Upload {...props2}>
<Button> <Button>
<Icon type="upload" /> upload <Icon type="upload" /> Upload
</Button> </Button>
</Upload> </Upload>
</div>, </div>,

Loading…
Cancel
Save