请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

vue cli 3.0问题

vue cli 3.0问题
我的router 里面的index.js只有这么写才不报错
new Vue({
el: ‘#app’,
router,
render: h => h(App)
})

像老师一样这么写就报错,报错为:You are using the runtime-only build of Vue where the template compiler is not available.
,为什么?
new Vue({
el: ‘#app’,
router,
component: {App},
template: ‘’
})

正在回答

1回答

因为3.0对于发的处理做了升级,这个无所谓,你升级到3.0推荐的写法就可以了

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号