<template>
<Input v-model="value" placeholder="Enter something..." style="width: 300px" @on-keyup="num(value)"/>
</template>
<script>
export default {
data () {
return {
value: ''
}
},
methods:{
num(){
if(this.value == 0){
this.value=""
}else{
this.value=this.value.replace(/\D/g,'')
}
}
}
}
</script>
11-19
10-31
7363
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)