import Api from './api.js'

export default {

  install (Vue) {

    Vue.prototype.$Api = Api

   }

}

这种格式就可以在main.js中直接使用Vue.use()全局注册

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-07-19
  • 2021-11-24
猜你喜欢
  • 2022-12-23
  • 2022-01-23
  • 2021-06-01
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案