My uppercase
directive below works fine with <input>
:
<input
type="text"
v-model="foo"
v-uppercase
>
But for some reason, it doesn't work with <b-form-input>
:
<b-form-input
type="text"
v-model="foo"
v-uppercase
></b-form-input>
The uppercase
directive:
directives: {
uppercase: {
update: function (el) {
el.value = el.value.toUpperCase();
}
}
}
Is there something wrong in my code ? How should I fix it ?