去除form表单默认校验的这两个值
this.$nextTick( ()=> {
this.$refs['form'].clearValidate(['firstParty']);
this.$refs['form'].clearValidate(['secondParty']);
})
拓展:
- 移除所有表单项的校验: this.$refs[‘form’].clearValidate();
- resetFields() 和 .clearValidate() 区别
this.$refs.form.resetFields(); //移除校验结果并重置字段值
this.$refs.form.clearValidate(); //移除校验结果