直接上代码吧
<el-input v-model="scope.row.uprightPoleNumber" class="inputBox" type="number" οninput="if(value.length>8){value=value.slice(0,8)} value = value.replace(/[^0-9]/g,'')" />
下面这种写法,只能输入正整数
οninput="this.value = this.value.replace(/[^0-9]/g, '');"