zan-upload
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -14,8 +14,2 @@ 'use strict'; | ||
var _toArray = require('lodash/toArray'); | ||
var _toArray2 = _interopRequireDefault(_toArray); | ||
var _utils = require('../utils'); | ||
var _UploadLocal = require('./UploadLocal'); | ||
@@ -53,12 +47,6 @@ | ||
var files = (0, _toArray2['default'])(evt.target.files); | ||
if (onChange) { | ||
onChange.call(_this, evt); | ||
} else { | ||
(0, _UploadLocal2['default'])(_this.props, { | ||
localFiles: files.map(function (f) { | ||
return { file: f, src: (0, _utils.createObjectURL)(f) }; | ||
}) | ||
}); | ||
(0, _UploadLocal2['default'])(_this.props, evt); | ||
} | ||
@@ -65,0 +53,0 @@ |
@@ -125,3 +125,3 @@ 'use strict'; | ||
if (typeof options.onProgress === 'function') { | ||
options.onProgress(progress, idx); | ||
options.onProgress(progress, idx, (0, _utils.createObjectURL)(files[idx].file)); | ||
} | ||
@@ -128,0 +128,0 @@ }; |
{ | ||
"name": "zan-upload", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "这是一个React组件", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -288,1 +288,6 @@ ## zan-upload | ||
- 修复无法上传同一张图片的bug | ||
#### 5.0.2 (2017-11-21) | ||
- 修复 FileInput 可能引发的报错 | ||
- 为 onProgress 增加上传过程中的预览图片 |
Sorry, the diff of this file is too big to display
293
822265
22759