feat(upload): error 回调函数增加返回值参数 (#1988)

* feat(upload): error回调函数增加返回值参数

* docs(upload): error返回值文档

---------

Co-authored-by: huangzepeng <huangzepeng@excellence.com.cn>
This commit is contained in:
Pencil-hzp
2024-06-11 14:02:11 +08:00
committed by GitHub
parent 8ff041b36a
commit 1f9bdffc59
2 changed files with 51 additions and 15 deletions

View File

@@ -512,12 +512,17 @@ allDone: function(obj){
<td>error</td>
<td colspan="3">
执行上传请求出现异常的回调一般为网络异常、URL 404等。返回个参数如下:
执行上传请求出现异常的回调一般为网络异常、URL 404等。返回个参数如下:
- `index` 当前文件的索引
- `upload` 重新上传的方法
- `res` 返回值(纯文本)<sup>2.9.12+</sup>
```
error: function(index, upload){
error: function(index, upload, res){
console.log(index); // 当前文件的索引
// upload(); 重新上传的方法
console.log(res); // 返回值(纯文本)
console.log(JSON.parse(res)); // 返回值json
}
```