When attempting to submit the form by pressing "enter" on the keyboard, it only works when I click the "submit" button. I made sure to add @submit to the form event to ensure it triggers, but upon checking a log, I found that it only triggers when clicking the button.
<template>
<v-form @submit.prevent="submit">
<v-text-field
v-model.trim="email"
label="E-mail"
type="email"
required
outlined
></v-text-field>
<v-text-field
v-model="password"
label="Mot de passe"
required
type="password"
outlined
"></v-text-field>
<v-btn class="primary mr-4" @click="submit">Submit</v-btn>
</v-form>
</template>
<script>
export default {
name: 'SignInForm',
data: () => ({
email: '',
password: ''
}),
methods: {
submit() {
console.log('submitted')
}
}
}
</script>