class Add extends Component{.....
handleSubmit(e){
e.preventDefault();
let formData = this.props.form.getFieldsValue();
console.log(this.props);
if(this.props.dataForm){
this.props.dispatch(editUserSub(formData));
}else{
this.props.dispatch(addUser(formData));
this.props.form.setFieldsValue(this.props.data);
}
}
.......}
Add = connect()(Add)
export default Add
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号