[Vuejs]-Vue 3 with Quasar – functions with parameters – TypeError: Cannot read properties of undefined

1πŸ‘

βœ…

I figured it out after typing all this up, as is tradition.

in the call to submit, you need to have the parentheses on the function name for it to work correctly. I don’t know why, just that it needs to be there.

working:

<q-form
   class="q-gutter-md text-body2"
   autofocus
   @submit="onSubmit()"
>
πŸ‘€dr b

2πŸ‘

In Vue 3 composition API there is no this.

If you remove this inside the setup method everything should work fine.

πŸ‘€Roland

Leave a comment