如果有选项联动,选择其中一个选项,清除联动项的值并初始化选项的值,会触发form表单的blur事件和校验规则。
kindId: [ { required: true, message: '请选择设备小类', trigger: 'change' } ],
可以在 $nextTick 用单独清除表单验证项来清理弹出的错误提示:
this.$nextTick(()=>{ this.$refs.reportForm.clearValidate(['name']) })
clearValidate() 参数接收数组