lcgyh / myDocs

0 stars 0 forks source link

经过Antd的Form包裹的组件设置ref #27

Open DreFalPoetry opened 7 years ago

DreFalPoetry commented 7 years ago

https://github.com/react-component/form#option-object 详情链接

const EnhancedForm = createForm()(Form); //定义的组件 <EnhancedForm wrappedComponentRef={(inst) => this.formRef = inst} /> 通过该方式为组件添加标识 this.formRef //直接通过this.formRef获取到该组件