November 2017
Beginner to intermediate
398 pages
8h 42m
English
By default, v-model uses the value prop and the input event as we just saw, but we can customize that:
model: { prop: 'text', event: 'update', },
props: { // ... text: { required: true, }, },
<input ... :value="text" ... />
this.$emit('update', event.currentTarget.value)
The component should still work in the Login component, since we told v-model to use the text prop and update event!
Our input component is now ready! For this project, we have kept this component simple, but you can add more features into it if you want to, such ...
Read now
Unlock full access