Unhandled error during execution of native event handler when submitting form #9578
Unanswered
samuelesantoni
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm a newbie with Vue 3.
I have a little issue with this form:
<form @submit.prevent="signIn()"> <div class="uk-margin"> <input type="email" class="uk-input" v-model="email" placeholder="e-mail"/> </div> <div class="uk-margin"> <input type="password" class="uk-input" v-model="password" placeholder="password"/> </div> <div class="uk-text-right"> <button class="uk-button uk-button-primary" type="submit">Salva</button> </div> </form>
and this function:
export default { data() { return { name: '', email: '', password: '', confirmpassword: '', success: '', error: '', }; }, methods: { async SignIn() { axios.post('https://api.mydomain.com/public/signin', { name: this.name, email: this.email, password: this.password, confirmpassword: this.confirmpassword }).then(response => { if(response.data.error) { UIkit.notification({ message: response.data.error, status: 'danger', pos: 'top-center', timeout: 5000 }); } else { UIkit.notification({ message: response.data.success, status: 'success', pos: 'top-center', timeout: 5000 }); } }).catch(error => { console.log(error); }); },},}
when i submit the form i have: [Vue warn]: Unhandled error during execution of native event handler and the form is not submitted.
Someone can help me please?
Beta Was this translation helpful? Give feedback.
All reactions