为form表单赋值
this.form.setFieldsValue({
hosName: this.hostData.hosName, //前面的值为表单中的值
hosCode: this.hostData.hosCode,
hosTypeName: this.hostData.hosType,
hosCategoryName: this.hostData.hosCategory,
})
获取表单中的值
this.form.validateFieldsAndScroll((err, values) => {
hosName:values.hosName
})
//指定form指向
beforeCreate() {
this.form = this.$form.createForm(this);
},
所有评论(0)