Vue.js搭建路由报错 router.map is not a function
来源:互联网 发布:伦敦公共交通网络 编辑:程序博客网 时间:2024/06/05 20:29
错误:
出现问题原因:2.0已经没有map这个方法了,只有1.0兼容该方法。
解决方法:
(1)方法1:使用命令npm install vue-router@0.7.13兼容1.0版本vue。
在代码中的使用方法:
(2)解决方法2:基于vue2.0,写对应的方法。
具体用法如下图:
注:1.0和2.0在一些用法上有比较大的差别,用的时候需要注意。
阅读全文
0 0
- Vue.js搭建路由报错 router.map is not a function
- Vue.js搭建路由报错 router.map is not a function
- Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined
- js 报错 $ is not a function
- js报错:****is not a function 的解决方法
- js报错$('#form1').ajaxSubmit is not a function...
- js报错$('#form1').ajaxSubmit is not a function...
- js报错:TypeError: document.GetElementById is not a function
- js报错 :TypeError: yanzhengma is not a function
- js报错:TypeError: document.GetElementById is not a function
- js 报错(intermediate value)(...) is not a function
- three.js报错renderer.setClearColorHex is not a function
- js运行报错:(intermediate value) is not a function
- num.toFixed is not a function(js报错)
- 表单js提交报错 submit is not a function
- 关于js报$ is not a function 的问题
- js报$ is not a function 的问题的解决方法
- jquery.js里面报错Uncaught TypeError: a.indexOf is not a function
- Oracle 游标Cursor 的基本用法
- 《深入浅出统计学》之统计学知识小结
- Android Studio常用Gradle操作
- Android界面实现 整合了刷新、加载更多、滑动删除功能的XListview
- 磁盘IOPS和吞吐量基本含义
- Vue.js搭建路由报错 router.map is not a function
- 数据类型转换——QQ号码验证
- quartz
- Flume架构以及应用介绍
- 【Android graphics】(一) Android SVG使用之AnimatedVectorDrawable
- 打击罪犯
- Android之View的诞生之谜
- 华为ENSP 模拟器 filezilla client 相互传文件 系统升级
- 大数据量下高并发同步的讲解(不看,保证你后悔)