对象为多级对象,不修改数组元素
this.state = {
exportData: {
exportCondition: {
selfDefine: {
checked: false,
value: ''
}
}
}
};
修改checked属性值方法:
this.setState({
exportData: {
...this.state.exportData,
exportCondition: {
...this.state.exportData.exportCondition,
selfDefine: {
...this.state.exportData.exportCondition.selfDefine,
checked: value
}
}
}
});
对象稳日多级对象,修改数组元素
待解决......