admin12zyx
admin12zyx
2019-09-23 14:55

element-ui 表单验证怎么验证两个input输入框(最大值和最小值)最大值不小于最小值?

  • vue.js

这是有问题的dai'ma

        let speed1 = (rule, value, callback)=>{
            let minSpeed =this.speedSetting.minSpeed;
            let maxSpeed =this.speedSetting.maxSpeed;
            console.log(minSpeed,maxSpeed);
            if(maxSpeed<=minSpeed){
                callback(new Error(this.$t('Rules.speed1')))
            }else{
                callback()
            }
        };
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐