直接上代码:
<input id="startMoney"
v-model="inputStartMoney"
style="ime-mode:disabled;"
onpaste="return false;"
@input="keyPressStartMoney()"
/>
keyPressStartMoney() {
let x = document.getElementById("startMoney").value;
this.inputStartMoney = Number(x.replace(/[^0-9]/g, ''))
},