1、1 ~ 正无穷 <el-input v-model="num" style="width:120px;" onkeyup="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')" onafterpaste="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')" ></el-input>标签:input,无穷,数字,输入,只能 From: https://www.cnblogs.com/lyt520/p/16900416.html