Vue2.0 axios报错: Cannot read property 'protocol' of undefined
来源:互联网 发布:高一英语听力软件 编辑:程序博客网 时间:2024/06/06 05:16
错误代码如下:(但是项目还是可以run)
Uncaught (in promise) TypeError: **Cannot read property 'protocol' of undefined**
解决方法:注释掉Vue.use(axios)
import axios from 'axios'//Vue.use(axios)Vue.prototype.$http = axios
对比一下 vue-resource
import VueRes from 'vue-resource';Vue.use(VueRes);
阅读全文
2 0
- Vue2.0 axios报错: Cannot read property 'protocol' of undefined
- Vue2.0 之 vue Cannot read property '__ob__' of undefined 异常(back报错)
- Vue2-Cannot read property 'component' of undefined
- 【vue2.0】Cannot read property 'matched' of undefined
- sencha touch报错 Cannot read property 'apply' of undefined
- 解决jquery报错cannot read property 'length' of undefined
- vue报错 vue Cannot read property ‘ob’ of undefined
- 解决dataTable 报错:cannot read property "style" of undefined
- Angularjs报错:TypeError: Cannot read property 'slice' of undefined
- react native 报错:cannot read property 'length' of undefined
- easyui reload方法报Cannot read property 'options' of undefined
- Webpack+react-router 报 Cannot read property 'toUpperCase' of undefined
- "TypeError: Cannot read property 'undefined' of undefined"
- jquery file upload 报错:Cannot read property 'nodeName' of undefined
- jquery file upload 报错:Cannot read property 'fileupload' of undefined
- jquery file upload报错:Cannot read property 'parseMetaData' of undefined
- easyui防止重复提交及进度条报错解决: Cannot read property 'onClose' of undefined
- easyui列表查询报错:Cannot read property 'length' of undefined
- sessionid如何产生?由谁产生?保存在哪里?
- 为什么说软件外包公司没前途
- Flume案例:模拟两个agent之间传递消息的场景
- Samsung ARTIK 530 Wi-Fi Access Point (AP) and Wi-Fi Direct (P2P)
- KinectFittingRoom2 研究
- Vue2.0 axios报错: Cannot read property 'protocol' of undefined
- HTML页面跳转的5种方法
- jquery中prepend操作插入元素示例
- 【解决】Ubuntu安装NVIDIA驱动后桌面循环登录问题
- Java循环打印ABC…
- Fragment流程图
- unity 开发中遇到的各种问题,及其解决问题的出处
- Python: 文件操作与数据读取
- 2017上半年阅读心得