antd使用upload时onChange只执行一次

描述:

react类式组件使用antd的upload时,onChange只执行一次

原因:

没有重新设置fileList的值

解决方法:

handlerChange=({file,fileList})=>{
    this.setState({
        imgList:[...fileList]
    })
}

猜你喜欢

转载自blog.csdn.net/weixin_49662044/article/details/132408703
今日推荐