Vue合集

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")
上一篇 下一篇

猜你喜欢

热点阅读