Answer the question
In order to leave comments, you need to log in
vuejs. How to implement event handling on input?
Code snippet that works in the browser but doesn't work in browsers on mobile devices:
<div id="example">
<input type="text" v-model="addressModel" v-on:keyup="getData()" placeholder="">
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
var example = new Vue({
el: '#example',
data: {
addressModel: ''
},
methods: {
getData() {
console.log(this.addressModel);
//send request to api
}
}
})
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question