关于input框只能输入纯数字问题
1 <el-form-item label="支付商户号" class="pay_number"> 2 <el-input @input="inputChange" v-model="form.name" type="number" ></el-input> 3 </el-form-item>
1 inputChange(e) { 2 let timer = setTimeout(() => { 3 this.form.name = parseInt(e) 4 clearTimeout(timer) 5 }, 100) 6 },
环境:vue ,elemnt ui