update upload demo

This commit is contained in:
afc163 2017-03-08 14:42:34 +08:00
parent ff2e793fc7
commit 35642ec2a9

View File

@ -17,10 +17,7 @@ If uploade file is picture, a thumbnail can be shown. `IE8/9` do not support loc
````jsx
import { Upload, Button, Icon } from 'antd';
const props = {
action: '//jsonplaceholder.typicode.com/posts/',
listType: 'picture',
defaultFileList: [{
const fileList = [{
uid: -1,
name: 'xxx.png',
status: 'done',
@ -32,7 +29,19 @@ const props = {
status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}],
}];
const props = {
action: '//jsonplaceholder.typicode.com/posts/',
listType: 'picture',
defaultFileList: [...fileList],
};
const props2 = {
action: '//jsonplaceholder.typicode.com/posts/',
listType: 'picture',
defaultFileList: [...fileList],
className: 'upload-list-inline',
};
ReactDOM.render(
@ -44,7 +53,7 @@ ReactDOM.render(
</Upload>
<br />
<br />
<Upload {...props} className="upload-list-inline">
<Upload {...props2}>
<Button>
<Icon type="upload" /> upload
</Button>