0👍
✅
inside the methods you need to reference the "this" object to have access to what’s returned in data or setup
but if you’re using vue 3 with the composition api, you can simply define the function inside setup and return it, your template will then have access to it
(also, I think you should keep your component html inside a template tag)
Source:stackexchange.com