alibaba / formily

📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3
https://formilyjs.org/
MIT License
11.48k stars 1.49k forks source link

[Bug Report] @formily/element-plus@1.0.0-beta.6中,Upload组件重置后未被清空 #3384

Closed africa1207 closed 2 years ago

africa1207 commented 2 years ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

官网代码,vue3+element-plus,替换自己上传url,上传成功后点击Reset按钮重置,界面上Upload图片还在。查看vue-devtool发现form的值已经被重置清空, 但ElUploadList 组件中files值并没有被删除,

What is expected?

重置后upload组件filelist也被清空,页面上不再显示图片

What is actually happening?

上传成功后点击Reset按钮重置,界面上Upload图片还在

Package

@formily/element-plus@1.0.0-beta.6


africa1207 commented 2 years ago

image

解决办法,注释掉源码中props的fileList属性即可,因为element-plus中upload组件file-list属性本身支持v-model