pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

Umi4.0组件ProFormUploadButton在弹窗关闭的时候报错

Open Connor-lipalater opened this issue 3 years ago • 1 comments

Reproduction link

https://blog.csdn.net/miaomiao_1024/article/details/125276262

Steps to reproduce

ProFormUploadButton 在弹窗关闭的时候会报错: Uncaught TypeError: (fileList || []).forEach is not a function

What is expected?

正常清空ProFormUploadButton的数据

What is actually happening?

Uncaught TypeError: (fileList || []).forEach is not a function

Environment Info
antd 4.20.4
React 18.6
System windows10
Browser Version 104.0.5112.102

Connor-lipalater avatar Nov 08 '22 11:11 Connor-lipalater

上面的链接只是相同的错误,真实情况下是Umi的model中使用ProFormUploadButton组件,当model关闭的时候使用form.resetFields()的时候,页面会报错。 Uncaught TypeError: (fileList || []).forEach is not a function

Connor-lipalater avatar Nov 08 '22 11:11 Connor-lipalater

默认主句给个数字,这个是js常见报错,自己debug就能解决

chenshuai2144 avatar Jan 03 '23 08:01 chenshuai2144