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

uploader 组件选择'手动执行上传'即autoUpload 为false时, 图片预览不生效, 需要再次渲染组件才生效. #2412

Closed
zhourb123 opened this issue Jul 3, 2024 · 0 comments · Fixed by #2416
Assignees

Comments

@zhourb123
Copy link

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

2.6.6

平台

weapp

重现链接

nutui-react/src/packages/uploader/uploader.taro.tsx

重现步骤

上面链接中的代码fileList.push(fileItem)
setFileList(fileList)使得uploader手动上传时图片预览加载不出来,必须得页面重新渲染才能加载出来

期望的结果是什么?

修改为fileList.push(fileItem)
setFileList([...fileList])
或者
setFileList(fileList.concat(fileItem))

实际的结果是什么?

uploader手动上传时图片预览加载不出来,必须得页面重新渲染才能加载出来

环境信息

No response

其他补充信息

No response

@Alex-huxiyang Alex-huxiyang self-assigned this Jul 4, 2024
@Alex-huxiyang Alex-huxiyang linked a pull request Jul 4, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants