ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

When i use Upload Component multiple is true, there is only one upload file, if i remove v-model:file-list="fileList", multiple is work.

Open K1IRVING opened this issue 3 years ago • 6 comments

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

Version

2.0.1

Environment

vue:3.0.2,ant design vue:2.0.1

Reproduction link

Edit on CodeSandbox

Steps to reproduce

When i use Upload Component multiple is true, there is only one upload file, if i remove v-model:file-list="fileList", multiple is work.

What is expected?

Realize multi file upload

What is actually happening?

use v-model:file-list="fileList", multiple is not work

K1IRVING avatar Mar 08 '21 10:03 K1IRVING

提供一个可重现的仓库或者示例

John60676 avatar Mar 09 '21 03:03 John60676

Hello @K1IRVING. Please provide a online reproduction by forking this link for vue2link for vue3 or a minimal GitHub repository. Make sure to choose the correct version.

你好 @K1IRVING, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 for vue2此处 for vue3 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

github-actions[bot] avatar Mar 09 '21 03:03 github-actions[bot]

提供一个可重现的仓库或者示例

重现示例:

https://codesandbox.io/s/elegant-austin-vo6mx?fontsize=14&hidenavigation=1&theme=dark

beforeUpload 返回promise时就会复现,fileList只有最后一个文件。

K1IRVING avatar Mar 10 '21 11:03 K1IRVING

上传已经触发了的,只是 fileList 的更新有点问题。 临时方案:自己使用 onChange 来更新 fileList

John60676 avatar Mar 11 '21 03:03 John60676

监听onChange事件也是错误的,于事无补。

machao7 avatar Mar 24 '22 10:03 machao7

不用filelist,在onchange可以监听到,都一年了还没解决

FIVELONG avatar Jun 10 '22 09:06 FIVELONG