Browse Source

style uploadList to showUploadList

pull/459/head
xiaosheng.lj 9 years ago
parent
commit
851da67f48
  1. 2
      components/upload/demo/drag-simple.md
  2. 2
      components/upload/demo/drag.md
  3. 4
      components/upload/index.jsx
  4. 2
      components/upload/index.md

2
components/upload/demo/drag-simple.md

@ -12,7 +12,7 @@ const Dragger = Upload.Dragger;
const props = {
name: 'file',
uploadList: false,
showUploadList: false,
action: '/upload.do'
};

2
components/upload/demo/drag.md

@ -12,7 +12,7 @@ const Dragger = Upload.Dragger;
const props = {
name: 'file',
uploadList: false,
showUploadList: false,
action: '/upload.do'
};

4
components/upload/index.jsx

@ -168,7 +168,7 @@ const AntUpload = React.createClass({
data: {},
accept: '',
onChange: noop,
uploadList: true
showUploadList: true
};
},
componentWillReceiveProps(nextProps) {
@ -190,7 +190,7 @@ const AntUpload = React.createClass({
onSuccess: this.onSuccess,
});
let uploadList;
if (this.props.uploadList) {
if (this.props.showUploadList) {
uploadList = <UploadList items={this.state.fileList} onRemove={this.handleManualRemove} />;
}
if (type === 'drag') {

2
components/upload/index.md

@ -23,7 +23,7 @@
| name | 可选参数, 上传的文件 | String | file |
| action | 必选参数, 上传的地址 | String | 无 |
| data | 可选参数, 上传所需参数 | Object | 无 |
| uploadList | 可选参数, 是否开启uploadList, 默认开启 | Boolean | true |
|showUploadList | 可选参数, 是否展示 uploadList, 默认开启 | Boolean | true |
| multiple | 可选参数, 是否支持多选文件,支持 `ie10+` | Boolean | false |
| accept | 可选参数, 接受上传的文件类型, 详见 input accept Attribute | String | 无 |
| onChange | 可选参数, 上传文件改变时的状态,详见 onChange | Function | 无 |

Loading…
Cancel
Save