0👍
The following should work as you expect
<template>
number: {{ number }}
<input :value="number" @input="updateNumber" type="number">
</template>
<script>
export default {
data() {
return {
number: 12
}
},
methods: {
updateNumber(e) {
this.number = e.target.value
}
}
}
</script>
Here is a playground.
- [Vuejs]-Problem while passing data to child component using props in Vue
- [Vuejs]-Using $contains in a Nuxt Content API query
Source:stackexchange.com