ac-upload
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -98,2 +98,3 @@ 'use strict'; | ||
title: _propTypes2.default.string, | ||
uploadTip: _propTypes2.default.string, | ||
multiple: _propTypes2.default.bool, | ||
@@ -110,2 +111,15 @@ action: _propTypes2.default.string, | ||
var defaultProps = { | ||
title: "文件上传", | ||
multiple: false, | ||
action: "/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload", | ||
showUploadList: true, | ||
accept: "", | ||
name: "files[]", | ||
data: {}, | ||
maxSize: 10240000000, | ||
defaultFileList: [], | ||
isView: false | ||
}; | ||
var AcUpload = function (_Component) { | ||
@@ -251,3 +265,3 @@ _inherits(AcUpload, _Component); | ||
{ className: 'upload-tips' }, | ||
_react2.default.createElement(_reactIntl.FormattedMessage, { id: 'intl.msg.upload' }) | ||
this.props.uploadTip || _react2.default.createElement(_reactIntl.FormattedMessage, { id: 'intl.msg.upload' }) | ||
) | ||
@@ -278,15 +292,4 @@ ) | ||
AcUpload.propTypes = propTypes; | ||
AcUpload.defaultProps = { | ||
title: "文件上传", | ||
multiple: false, | ||
action: "/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload", | ||
showUploadList: true, | ||
accept: "", | ||
name: "files[]", | ||
data: {}, | ||
maxSize: 10240000000, | ||
defaultFileList: [], | ||
isView: false | ||
}; | ||
AcUpload.defaultProps = defaultProps; | ||
exports.default = AcUpload; |
{ | ||
"name": "ac-upload", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "tinper-bee ac upload components", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -1,21 +0,17 @@ | ||
## AC-Upload | ||
# 上传 AcUpload | ||
[![npm version](https://img.shields.io/npm/v/ac-upload.svg)](https://www.npmjs.com/package/ac-upload) | ||
[![NPM downloads](http://img.shields.io/npm/dt/ac-upload.svg?style=flat)](https://npmjs.org/package/ac-upload) | ||
基于tinper-bee组件库封装开发 | ||
手动上传组件,可以帮助你打开一个模态框选择文件进行上传、也包括拖拽式的上传方式,支持单个文件以及多个文件一起上传使用,上传完毕后,组件会显示查看附件信息 | ||
## 何时使用 | ||
### 1. 简介 | ||
代替原生上传组件 | ||
> 基于tinper-bee组件库封装开发 | ||
## 如何使用 | ||
手动上传组件,可以帮助你打开一个模态框选择文件进行上传、也包括拖拽式的上传方式,支持单个文件以及多个文件一起上传使用,上传完毕后,组件会显示查看附件信息 | ||
### 2. 安装 | ||
- 通过npm下载使用 | ||
`npm install ac-upload -S` | ||
### 3. 使用 | ||
@@ -45,5 +41,6 @@ 通过ES6的方式进行加载使用 | ||
</AcUpload> | ||
``` | ||
### 4. API | ||
## API | ||
@@ -65,2 +62,9 @@ | ||
12|onDelete|function|删除的时候触发的回调参数为file对象 | ||
13|beforeUpload|function|在上传之前执行的函数,当Promise返回false或者被拒绝,函数被中指。不兼容老ie | ||
13|beforeUpload|function|在上传之前执行的函数,当Promise返回false或者被拒绝,函数被中指。不兼容老ie | ||
## 注意事项 | ||
暂无 | ||
## 更新日志 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
569070
3053
68