1、方法中赋值
getUsableCredit = (value) => { const { dispatch, form, } = this.props; const paramse={ size:1, current:10 } dispatch(URL( { payload: paramse, callback: (response) => { const a = response.data form.setFieldsValue({usableAmt:a}) //对应input赋值 } } )); }
2、initialValue 赋值
<Col span={14}> <FormItem {...formItemLayout} label="日期"> {getFieldDecorator('Date', { rules: [ { required: true, message: '请选择日期', }, ], initialValue: value; //initialValue 赋值 } )(<DatePicker onBlur={this.dateChange} placeholder="日期" />)} </FormItem> </Col>