1.手动校验数字为整数 Number.isInteger

<el-input
    class="radioInput"
    v-model.number="ruleForm.rate"
    @keyup.native="handleVerifyRate"
 ></el-input>

  

// 验证比例,只能输入整数
    handleVerifyRate(){
        if(!Number.isInteger(this.ruleForm.rate)){
            this.$message.error("出库比例填写整数!");
        }
    },

  

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
猜你喜欢
  • 2021-08-14
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
相关资源
相似解决方案