new Vue({ el: '#app', data: { count: '' }, watch: { count(val) { this.count = isNaN(parseInt(val)) ? '' : parseInt(val) } } })
<div id="app"> <input type="text" v-model="count"/> </div>