Skip to content

a-upload component before-upload returns false and does not prevent the insertion of fileList #6136

@primeplayer

Description

@primeplayer
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.14

Environment

window 10,edge 107.0.1418.62 ,vue 3.2.36

Reproduction link

https://github.com/vueComponent/ant-design-vue/releases/tag/3.2.14

Steps to reproduce

步骤1:以官方antdesignvue3版本的实例为例子
https://codesandbox.io/s/yong-hu-tou-xiang-ant-design-vue-3-2-14-forked-b49b2v

步骤2:将show-upload-list置为true 并上传超出2M限制的图片
有如下报错 但fileList中仍有此次超出限制的图片
不应该是不允许此次file进入fileList吗
image

What is expected?

期望当before-upload返回false时或reject()时 此次file不进入fileList

What is actually happening?

当before-upload返回false或reject()时 此次file进入了fileList


疑问1:
说到替代方案 尝试在获取到错误时 清空fileList也无效
疑问2:
before-upload中不能更改fileList吗
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions