Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #3766

Open
1 task
K1IRVING opened this issue Mar 8, 2021 · 6 comments
Assignees
Labels

Comments

@K1IRVING
Copy link

K1IRVING commented Mar 8, 2021

  • 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

@John60676
Copy link
Member

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

@John60676 John60676 added the 🤔 Need Reproduce We cannot reproduce your problem label Mar 9, 2021
@github-actions
Copy link

github-actions bot commented Mar 9, 2021

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 仓库。请确保选择准确的版本。

@K1IRVING
Copy link
Author

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

重现示例:

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

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

@John60676 John60676 added bug and removed 🤔 Need Reproduce We cannot reproduce your problem labels Mar 11, 2021
@John60676
Copy link
Member

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

@John60676 John60676 self-assigned this Mar 11, 2021
@machao7
Copy link

machao7 commented Mar 24, 2022

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

@FIVELONG
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants