ElemeFE / ElemeFE/element

[Feature Request] upload无法根据返回内容自定义成功还是失败,无法自定义成功之后的fileList

Open
#19,495 4 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name
upload

### Description
我们是希望在上传请求之后,能根据返回的json串内的code等自定义方式判断,来确定图片是否上传成功,失败则从列表内删除原来的图片,或者显示上传失败。而成功的话,那么能根据我们后台返回的图像识别串,将其对应的url更新到fileList内,并要求upload的fileList按这个list展示。

而现在的情况是:200即自动成功,无视返回内容,并自动将blob文件放入到fileList,手动更新fileList完全无效。并且如果使用clearFiles和重置fileList的方式强制刷新展示,还会因为有动画的缘故,导致整个list的效果是一会儿变长一会儿变短,很奇怪。

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.