赞
踩
1,创建a-form的form对象
this.formModal= this.$form.createForm(this)
2, 修改对象属性
this.formModal.setFieldsValue({'属性名':'属性值'})
3,获取对应属性值
this.formModal.getFieldValue('属性名')
4,重置form表单
- this.formModal.resetFields()
-
- //置空某个属性
- this.formModal.resetFields(['属性名'])
5,提交校验拦截
- this.formModal.validateFields().then(values => {
- //values为表单填写数据
- })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。