el-input 正则限制输入为非负整数

<el-input v-model="yourModelName" :min="0" :onkeyup="(yourModelName = yourModelName.replace(/\D|^-/g,''))" type="number" />
posted @ 2020-02-28 11:06  张馨  阅读(1536)  评论(0编辑  收藏  举报