Vue 清除校验
2020-08-06 本文已影响0人
3anLouYouGu1
表单
<el-form ref="xxx">
</el-form>
method
cleanValidate(formName){
// 清除表单校验的提示
if (this.$refs[formName]) {
// 延时执行
this.$nextTick(function () {
this.$refs[formName].clearValidate();
})
};
},
调用
this.cleanValidate("xxx")