0
I wanted to use a mask on some componentized inputs, but it doesn’t work, it follows the respective code snippets: in main.js we have:
import VueMask from 'v-mask'
Vue.use(VueMask);
in my component, I have:
<input class="form-control input floating-input"
@input="$emit('input',$event.target.value)"
:value="value"
v-bind="$attrs"
:type="tipo"
v-mask = mask
:placeholder="placeholder" />
and in the props:
mask: {
required: false,
type: String
}
and finally when I try to use that component with that mask:
<my-input tipo="text" placeholder=" " label="Telefone"
mask="(##) ####-####"
v-model="empresa.phone"
v-validate="'required'"
data-vv-name='tel'>
</my-input>
Strangely nothing happens, no errors in the console, the mask is just not applied.
It worked. Thank you.
– João