clear login error on submit
This commit is contained in:
parent
ed5c7771e8
commit
c63075a88d
|
|
@ -53,6 +53,7 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const submit = handleSubmit((values, { resetForm }) => {
|
const submit = handleSubmit((values, { resetForm }) => {
|
||||||
|
loginError.value = '';
|
||||||
store.dispatch('auth/login', {
|
store.dispatch('auth/login', {
|
||||||
email: values.email,
|
email: values.email,
|
||||||
password: values.password,
|
password: values.password,
|
||||||
|
|
@ -83,9 +84,9 @@ const onLogin = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeServer = () => {
|
// const changeServer = () => {
|
||||||
router.push({ path: '/setup'});
|
// router.push({ path: '/setup'});
|
||||||
}
|
// }
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -139,7 +140,7 @@ const changeServer = () => {
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-button expand="block" class="ion-margin-top" type="submit">Login</ion-button>
|
<ion-button expand="block" class="ion-margin-top" type="submit">Login</ion-button>
|
||||||
</form>
|
</form>
|
||||||
<p v-if="loginError" class="error-text">{{ loginError }}</p>
|
<p v-if="loginError" class="error-message">{{ loginError }}</p>
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue