the whole of Vue application? a best practice way please.
save it to window window.myFoo = ... and use anywhere window.myFoo() or even just myFoo()
do a quick google search
Just import it everywhere you need it
If the function is related to VueJS or something similar import axios from "axios" Vue.prototype.$http = axios
Обсуждают сегодня