解决ant-ui 表单校验通过但是未清楚校验提示的bug 示例
- 参考文章:
https://blog.csdn.net/nana_4/article/details/139296509

// 检测指定表单项校验是否通过checkForm (key) {this.$refs.jobForm.validateField(key, (valid) => {if (!valid) {console.log('submit!!')} else {console.log('error submit!!')return false}})this.$forceUpdate()},// 确认操作okHandleOrg (val) {if (val) {this.form.pkCompany = val[0].organIdthis.form.companyName = val[0].organNameconsole.log(this.form.companyName)this.dataSource = valthis.$nextTick(() => {// this.checkForm('companyName')// 清除指定表单项校验提示this.$refs['jobForm'].clearValidate(['companyName'])})}
