Element: [Bug Report] el-upload file-list cannot sync

Created on 4 Jun 2018  ·  3Comments  ·  Source: ElemeFE/element

Element UI version

2.4.0

OS/Browsers version

Chrome/Macos

Vue version

2.5.17-beta.0

Reproduction Link

https://jsfiddle.net/m4atout7/1/

Steps to reproduce

移除所有上传中的文件
加入新的文件
点击上传按钮
console里面的fileList依然是原有值

这样flist-list这个属性只能用于初始化

What is Expected?

file-list 能同步更新 文件列表

What is actually happening?

file-list不能同步更新

Most helpful comment

Currently, the way I found to hack it is to listen to the change event and assign the fileList every time

onChange(f:File,fl:File[]){
this.fileList = fl;
}

All 3 comments

Translation of this issue:

Element UI version
2.4.0

OS/Browsers version
Chrome/Macos

Vue version
2.5.17-beta.0

Reproduction Link
https://jsfiddle.net/m4atout7/1/

Steps to reproduce
Remove all uploaded files

Add a new document
Click the upload button

The fileList in console is still the original value
This property of flist-list can only be used for initialization

What is Expected?
File-list can update the file list synchronously

What is actually happening?
File-list cannot be updated synchronously

Currently, the way I found to hack it is to listen to the change event and assign the fileList every time

onChange(f:File,fl:File[]){
this.fileList = fl;
}

image

Was this page helpful?
0 / 5 - 0 ratings