<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode || event.which))) || event.which === 8" v-model="form.courseDuration" placeholder="请输入时间" clearable />
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode || event.which))) || event.which === 8"
标签:el,正整数,String,onKeypress,keyCode,return,input,event From: https://www.cnblogs.com/ZYSZBD/p/17101635.html