How to declare a global function in vue js to access from any where?

4.6k views Asked by At

When working with Vue.js, the biggest problem I have faced is declaring a global function that can be used anywhere in the Vue application without any import.

I have tried Vue plugin. Custom Vue plugin's function can only be used in templates. It seems that it's not possible to use in the setup script tag.

How to declare a global function that can be used anywhere in the application without import?

0

There are 0 answers