I have this line in my vue.js application
<input type="text" v-on:input="cssClass=$event.target.value">
I know that in javascript I can get event.target.value. I think that the above code is Vue.js specific code, but I'm not sure. Need confirmation.
v-on:input will consume the actual DOM event of the input initially, store against $event, a special variable, and then make it available to the function being called. In this case you access $event.target.value to get the newly input value from the event. Methods in Inline Handlers
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With