当我延伸 Vue公司 </跨度> 通过
从’@ / js / api’导入apiVue.prototype。$ api = api
在我的api我可以访问 Vue公司 </跨度> 如果我默认导出函数,则通过此实例
//api.js进口 Vue公司 </跨度> 从’‘ VUE </跨度> ’
export default function(){ console.log(‘默认导出’,这个) // =&GT; Vue公司 </跨度> }
我必须通过Vue.prototype调用这个函数。$ api()
现在我想扩展我的api.js以包含多个
我发现这是不可能的。
该 this 背景 .then() 通过箭头功能设置。
this
.then()