猿问

同一个js中写了多张form表单,数据如何传出,也就是getFieldProps怎么绑定

 const { getFieldProps } = this.props.form;
 const { getFieldProps2 } = this.props.form2;return(
<Form inline form={this.props.form} onSubmit={this.handleActivitySearch}>
...
 <Input style={{}} type="text" placeholder="" {...getFieldProps('userID', {initialValue: '' })} />
</Form>
<Form inline form={this.props.form2} onSubmit={this.handleActivitySearch}>
 <Input style={{}} type="text" placeholder="" {...getFieldProps2('userID', {initialValue: '' })} />
...
</Form>
);
这里怎么获取这两个表单的数据?上面的做法是被报错的,会提示getFieldProps2 未定义


喵喵时光机
浏览 1126回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答