Vue-router cannot read property _c of undefined
来源:互联网 发布:nginx加tomcat 编辑:程序博客网 时间:2024/06/15 13:36
Vue-router Exception
当点击“商品”标签的时候,consolse(控制台)跳出
cannot read property _c of undefined的异常
此时观察你的main.js中routes添加组件的时候:
和path相对应的一定是component,不是components,正确答案如下
const routes = [ {path: '/goods', component: goods}, {path: '/ratings', component: ratings}, {path: '/sellers', component: sellers}];
而不是
const routes = [ {path: '/goods', components: goods}, {path: '/ratings', components: ratings}, {path: '/sellers', components: sellers}];
希望能帮到你
阅读全文
0 0
- Vue-router cannot read property _c of undefined
- Cannot read property 'component' of undefined 即vue-router 0.x转化为2.x
- Webpack+react-router 报 Cannot read property 'toUpperCase' of undefined
- vue报错 vue Cannot read property ‘ob’ of undefined
- Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined
- vue.js中报错: TypeError: Cannot read property 'indexOf' of undefined
- Vue components Cannot read property '__ob__' of undefined
- "TypeError: Cannot read property 'undefined' of undefined"
- Cannot read property 'autoCreated' of undefined
- TypeError: Cannot read property 'parentNode' of undefined
- Cannot read property 'nodeType' of undefined
- Cannot read property 'xxx' of undefined
- TypeError: Cannot read property 'left' of undefined
- Vue2-Cannot read property 'component' of undefined
- [Jquery]Cannot read property 'msie' of undefined
- Cannot read property ‘msie’ of undefined
- Cannot read property ‘msie’ of undefined
- Cannot read property 'rownumbers' of undefined
- 工厂方法模式
- 5.29模拟赛
- 图像传感器的市场状况和主要厂商
- 游戏服务端防御式开发
- IntentService执行耗时任务及源码解析
- Vue-router cannot read property _c of undefined
- idea某些模块启动失败(spring cloud )
- ShareSDK Android 微信分享 绕过审核与不绕过审核
- java----抽象类和数据类型转换
- 光棍节的快乐
- 浅析MySql二进制日志的应用
- Github菜鸟教程/简明教程
- python中的chr()函数
- Javascript对象