Open Loloao opened 4 years ago
checkbox 和 switch 使用 Form.Item 时不能直接通过 getFieldsValue 或 getFieldValue 获取,此时需要获取 checked 的值
<FormItem label="初始化模板"> {getFieldDecorator('use_template', { rules: [ { required: true } ], valuePropName: 'checked' })(<Switch />)} </FormItem>
checkbox 和 switch 使用 Form.Item 时不能直接通过 getFieldsValue 或 getFieldValue 获取,此时需要获取 checked 的值