I have a form:
<form @submit.prevent="login">
<input
type="email"
v-model="email"
class="form-control"
name="email"
placeholder="email"
/>
<input
type="password"
class="form-control"
name="password"
v-model="password"
placeholder="password"
/>
<button type="submit">Login</button>
</form>
This works perfecly on the desktop browsers, but when trying to use the Login button on mobile devices, nothing seems to happen.
Here is the method login:
login() {
this.$store
.dispatch("login", {
email: this.email,
password: this.password
})
.then(() => {
this.$router.push("/dashboard");
})
.catch(err => {
console.log(err);
});
}
If anyone can please help me with this.
Aucun commentaire:
Enregistrer un commentaire