方法一.<input οnkeyup="this.value=this.value.replace(/[^(\d||/.)]/g," " >
方法二.<input οninput="this.value=this.value.replace(/[^(\d||/.)]/g," " >
感觉方法二换一个事件兼容性比较好
如果是只能输入数字的话
<input v-model.number = "form.age " οninput="this.value=this.value.replace(/[^(\d||/.)]/g," " >