Vue 清除校验

表单



method

cleanValidate(formName){
        // 清除表单校验的提示
        if (this.$refs[formName]) {
          // 延时执行
          this.$nextTick(function () {
            this.$refs[formName].clearValidate();
          })
        };
      },

调用

this.cleanValidate("xxx")

你可能感兴趣的:(Vue 清除校验)