Uncaught (in promise) TypeError: Cannot read property 'protocol' of undefined

问题代码,查看根目录main.js中引入axios的代码,是否如下所示:

Vue.use(axios)

正确写法:

Vue.prototype.axios = axios


转载:https://www.cnblogs.com/tudou1179006580/p/11224552.html
posted @ 2020-12-03 09:48  tcanhe  阅读(1042)  评论(0编辑  收藏  举报