zan-upload
Advanced tools
Comparing version 4.5.3 to 5.0.0
@@ -13,6 +13,2 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _classnames = require('classnames'); | ||
@@ -77,3 +73,3 @@ | ||
if (!localOnly || maxAmount !== 1) { | ||
if (!_this.isUnmount && (!localOnly || maxAmount !== 1)) { | ||
// 直接打开本地文件 | ||
@@ -298,4 +294,4 @@ _this.setState({ | ||
categoryListUrl: '//materials.youzan.com/category/categoryList.json', | ||
// fetchUrl: '//materials.youzan.com/dock/fetch.json', | ||
// tokenUrl: '//materials.youzan.com/dock/token.json', | ||
fetchUrl: '', | ||
tokenUrl: '', | ||
uploadUrl: '//upload.qbox.me', | ||
@@ -314,8 +310,3 @@ filterFiles: noop, | ||
Upload.propTypes = { | ||
fetchUrl: _propTypes2['default'].string.isRequired, | ||
tokenUrl: _propTypes2['default'].string.isRequired | ||
}; | ||
exports['default'] = Upload; | ||
module.exports = exports['default']; |
{ | ||
"name": "zan-upload", | ||
"version": "4.5.3", | ||
"version": "5.0.0", | ||
"description": "这是一个React组件", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -255,5 +255,5 @@ ## zan-upload | ||
| categoryListUrl | 自定义素材银行分组列表url [GET] | string | `'//materials.youzan.com/category/categoryList.json'` | 否 | | ||
| fetchUrl | 自定义提取网络图片url [POST] | string | `''` | 是 | | ||
| fetchUrl | 自定义提取网络图片url [POST] | string | `''` | 否 | | ||
| onFetchUrl | 自定义提取图片的处理函数,需要返回一个promise | func | undefined | 否 | | ||
| tokenUrl | 自定义上传图片token的url [POST] | string | `''` | 是 | | ||
| tokenUrl | 自定义上传图片token的url [POST] | string | `''` | 否 | | ||
| uploadUrl | 自定义上传图片url [POST] | string | `'//upload.qbox.me'` | 否 | | ||
@@ -281,1 +281,5 @@ | triggerClassName | 重写trigger样式 | string | `'rc-upload-trigger'` | 否 | | ||
- 修复无法检测文件类型导致文件上传不了的问题 | ||
#### 5.0.0 (2017-11-16) | ||
- 将 tokenUrl 和 fetchUrl 两个属性的默认值设置为'',非必填 |
Sorry, the diff of this file is too big to display
284
814450
22683