0๐
@mouseover
and @mouseleave
will do the job.
<input v-bind:value="2" @mouseover="reservationBy"/>
or
<input v-bind:value="2" @mouseleave="reservationBy"/>
- [Vuejs]-Sort a precedently renderized and matched list with a v-for with a dropdown menu
- [Vuejs]-Connexion refused and CrashLoopBackOff Running Loop for Container with Docker GraphQl
0๐
If using v-model is not an option (that would be the easiest way), and you want to execute the function when component is rendered, you can use ref
and access value in mounted hook:
<input ref="myInputRef" :value="2" />
Script:
mounted: function() {
console.log(this.$refs.myInputRef.value);
}
Source:stackexchange.com