<el-input v-model="scope.row.giveUpAmount" :disabled="scope.row.existCWH" oninput="value=value.replace(/^\.+|[^\d]+/g,'')" />
1. js文本框输入正整数和0的验证
oninput="value=value.replace(/^\.+|[^\d]+/g,'')"
最简单的html代码实现输入框只能输入正整数,输入同时禁止了以0开始的数字输入,防止被转化为其他进制的数值。
2.
 <el-input v-model="scope.row.supportAmount" :disabled="scope.row.existCWH" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"

相关文章:

  • 2022-12-23
  • 2022-01-27
  • 2022-03-05
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2021-06-24
  • 2021-07-18
  • 2022-12-23
  • 2021-05-24
相关资源
相似解决方案