0👍
It is an object, submitForm:
, which contains an anonymous function () => {...}
, but still, it is an object.
Go for submitForm() { ... }
as the shorthand. That expands into submitForm: function () {}
whereas what you have remains an anon function inside an object, thus giving you the error.
- [Vuejs]-Nuxt: Is there a way to persist $auth.user?
- [Vuejs]-How to prevent android keyboard from pushing html layout up like ios in vue?
Source:stackexchange.com