0👍
Replace mounted()
by created()
mounted()
is called after DOM has been mounted so you can access the reactive component, templates, and DOM elements and manipulate them.
If you need to know more about vue Lifecycle Hooks.
Source:stackexchange.com