Include global functions in Vue.js

后端 未结 3 1016
抹茶落季
抹茶落季 2021-02-01 04:27

In my Vue.js application I want to have some global functions. For example a callApi() function which I can call every time I need access to my data.

What i

3条回答
  •  粉色の甜心
    2021-02-01 05:18

    Mixins can be registered globally​ too. https://vuejs.org/v2/guide/mixins.html#Global-Mixin

提交回复
热议问题