#public asset
10 messages · Page 1 of 1 (latest)
How to prevent that ?
I use <script setup> with :
const userForm = ref({
username: "",
password: "",
});
Most likely because you’re invoking login() rather than passing it by assignment. So every time the input changes, the form re-renders and the function is invoked. Try @submit.prevent="login" or @submit.prevent="() => login()"
I tried with @submit.prevent="login" or @submit.prevent="() => login()"
But same result not sure to understand