美文网首页Vue合集
Vue 清除校验

Vue 清除校验

作者: 3anLouYouGu1 | 来源:发表于2020-08-06 11:23 被阅读0次

表单

<el-form ref="xxx">
</el-form>

method

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

调用

this.cleanValidate("xxx")

相关文章

网友评论

    本文标题:Vue 清除校验

    本文链接:https://www.haomeiwen.com/subject/frjzrktx.html