业务需求:

ruleForm.commodityType 为下拉框 
选择 commodityType 点击确定 会校验 校验为空 出现提示语 
再选择  commodityType 为新值 校验出现上一次 的 
所以要清空提示语
  watch:{
    'ruleForm.commodityType' (newValue) {
      if (newValue && newValue=== '1') {
        this.$refs['ruleForm'].clearValidate(['commodityName']);
      } else if (newValue && newValue=== '0') {
        this.$refs['ruleForm'].clearValidate(['commodityFictitiousId']);
      }
    }
  },

 

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2021-11-17
  • 2021-05-04
  • 2021-12-30
  • 2021-12-30
猜你喜欢
  • 2021-09-03
  • 2021-12-30
  • 2021-12-30
  • 2022-12-23
  • 2021-12-30
  • 2021-05-26
  • 2022-12-23
相关资源
相似解决方案