import createBaseForm from './createBaseForm'; export const mixin = { getForm() { return { getFieldsValue: this.getFieldsValue, getFieldValue: this.getFieldValue, getFieldInstance: this.getFieldInstance, setFieldsValue: this.setFieldsValue, setFields: this.setFields, setFieldsInitialValue: this.setFieldsInitialValue, getFieldDecorator: this.getFieldDecorator, getFieldProps: this.getFieldProps, getFieldsError: this.getFieldsError, getFieldError: this.getFieldError, isFieldValidating: this.isFieldValidating, isFieldsValidating: this.isFieldsValidating, isFieldsTouched: this.isFieldsTouched, isFieldTouched: this.isFieldTouched, isSubmitting: this.isSubmitting, submit: this.submit, validateFields: this.validateFields, resetFields: this.resetFields, }; }, }; function createForm(options) { return createBaseForm(options, [mixin]); } export default createForm;