elenemt给单独的一个值不做校验

1、在触发this.$refs["form"].validate 之前的事件上去做判断
2、能用this.$nextTick就用this.$nextTick因有可能拿不到值报错
3、在使用clearValidate方法前先要 this.rules.dataValue = [];要不然会报错而且也不会生效
4、最后this.$refs.form.clearValidate("dataValue");
if (this.form.id == "188XXXXXXXXXXXXXXXXXXXX") {
          this.$nextTick(() => {
            this.rules.dataValue = [];
            this.$refs.form.clearValidate("dataValue");
          });
posted @ 2022-05-13 15:13  QinHaoRan  阅读(38)  评论(0)    收藏  举报