1.只能输入正整数:

<el-input v-model="form.residualQuantity"  @keyup.native="onlyNumber"></el-input>
//只能输入正整数
        onlyNumber(){
          if(this.form.residualQuantity){
            this.form.residualQuantity = this.form.residualQuantity.replace(/[^\.\d]/g,'');
            this.form.residualQuantity = this.form.residualQuantity.replace('.','');
          }

        },

 

相关文章:

  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
相关资源
相似解决方案