Skip to content

Commit

Permalink
bugfix:补充丢失的参数data maxSize
Browse files Browse the repository at this point in the history
  • Loading branch information
kvkens committed Oct 30, 2018
1 parent 9ec5b03 commit 8d510f3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ import 'ac-upload/build/ac-upload.css';//加载组件样式
6|data|JSON|随着上传的时候附加一些参数,接收JSON对象
7|name|string|上传设置的参数file名字默认`files[]`
8|onSuccess|function|上传成功后的回调,返回所有response
9|onError|function|上传失败后的回调,用于处理后续失败操作
9|onError|function|上传失败后的回调,用于处理后续失败操作
10|maxSize|number|附件限制大小
2 changes: 1 addition & 1 deletion build/ac-upload.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ac-upload.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var propTypes = {
accept: _propTypes2.default.string,
name: _propTypes2.default.string,
data: _propTypes2.default.object,
maxSize: _propTypes2.default.number,
isView: _propTypes2.default.bool
};

Expand Down Expand Up @@ -115,6 +116,8 @@ var AcUpload = function (_Component) {

var uploadProps = {
name: this.props.name,
data: this.props.data,
size: this.props.maxSize,
multiple: this.props.multiple,
showUploadList: this.props.showUploadList,
action: this.props.action,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ac-upload",
"version": "0.1.1",
"version": "0.1.2",
"description": "tinper-bee ac upload components",
"main": "./lib/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* 上传组件
* Ac上传组件
*/

import React, { Component } from 'react';
Expand All @@ -14,6 +14,7 @@ const propTypes = {
accept: PropTypes.string,
name: PropTypes.string,
data: PropTypes.object,
maxSize: PropTypes.number,
isView: PropTypes.bool
};

Expand Down Expand Up @@ -68,6 +69,8 @@ class AcUpload extends Component {
render() {
const uploadProps = {
name: this.props.name,
data: this.props.data,
size: this.props.maxSize,
multiple: this.props.multiple,
showUploadList: this.props.showUploadList,
action: this.props.action,
Expand Down

0 comments on commit 8d510f3

Please sign in to comment.