react ant Design手动设置表单的值操作

weixin_97587 27 0 PDF 2021-02-01 06:02:40

1.设置表单的值 this.props.form.setFieldsValue({ name:”张三”, }); 2.清空表单的值 this.props.form.resetFields(); 3.获取某一输入框的值 this.props.form.getFieldValue(‘newPassword’); 4.获取整个表单的值 this.props.form.getFieldsValue(); 多看官方文档就知道这些东西了 补充知识:react使用antd表单赋值,用于修改弹框 1、使用getFieldDecorator的initialValue 2、在state里定义一个

用户评论
请输入评论内容
评分:
暂无评论