it's my first time trying Ionic + Vue App and in ionic-input the v-model is not working ... any help please?
data() {
return {
model: {
email: '',
password: '',
}
<ion-input alternative
class="mb-3"
name="password"
:rules="{required: true, min: 6}"
prepend-icon="ni ni-lock-circle-open"
type="password"
v-model="model.password">
</ion-input>
In my case, I was missing the IonInput import:
import {
IonInput,
} from '@ionic/vue';
We have the same issue. I've fixed it with :value and @ionInput.
<ion-input alternative
class="mb-3"
name="password"
:rules="{required: true, min: 6}"
prepend-icon="ni ni-lock-circle-open"
type="password"
:value="model.password"
@ionInput="model.password = $event.target.value;">
</ion-input>
Found it here: https://github.com/ionic-team/ionic-framework/issues/15532#issuecomment-420031134
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