pro-components
pro-components copied to clipboard
Umi4.0组件ProFormUploadButton在弹窗关闭的时候报错
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 |
上面的链接只是相同的错误,真实情况下是Umi的model中使用ProFormUploadButton组件,当model关闭的时候使用form.resetFields()的时候,页面会报错。 Uncaught TypeError: (fileList || []).forEach is not a function
默认主句给个数字,这个是js常见报错,自己debug就能解决