October 2019
Intermediate to advanced
108 pages
2h 24m
English
We have put in a lot of work to create our awesome custom BaseInput, so we definitely want to keep using it!
Follow these steps in order to modify BaseInput and to allow for input masking:
<BaseInput label="Telephone" type="text" v-model="form.telephone"/>
Let's go into BaseInput.vue now and create a new prop; we will call it mask, and it will default to an empty string. It is important that we default it to an empty string, or else the directive will try to match it, and we won't be able to type into the fields if they don't have a declared mask!
...,mask: {type: String,required: false}
Read now
Unlock full access