-
执行 uploadRef.current.upload(); 文件已经成功上传,但是没有触发onSuccess或者afterUpload |
Beta Was this translation helpful? Give feedback.
Answered by
pointhalo
Mar 19, 2025
Replies: 1 comment 1 reply
-
受控使用fileList的情况,你确认一下你在 onChange中是否有正确更新 props.fileList,不然状态是没法扭转的。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
acccccccb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
受控使用fileList的情况,你确认一下你在 onChange中是否有正确更新 props.fileList,不然状态是没法扭转的。
受控高于一切,如果你在接收到onChange后,不对props.fileList 数据进行更新,组件是不知道你到底想不想更新的(例如某些场景就是会有用户使用受控fileList阻止某些文件的上传),组件给你展示的永远都是开始上传那一刻而已,是走不到 success的。