Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

react ant design 清除绑定的对象中的一个属性

数据结构 如下

let formData = {

childList:[
    {
        attachMsg  :{
                image
            }   
    }
]

}

我想清楚除掉form表单上绑定的attachMsg或者image,但始终清除不掉
我是这样绑定的
image.png
试着这样子清除全都无效
image.png
点击 表单的提交方法 验证还是会通过,打印value还是存在
image.png

求问怎么清除


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

setFieldsValue({formData:{...formData}})


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...