【发布时间】:2017-08-31 07:17:49
【问题描述】:
我第一次尝试 Vue2 并被路线卡住了。
基本上,当我将<router-view></router-view> 添加到 index.html 时,我开始收到异常:
[Vue warn]: Failed to mount component: template or render function not
defined.
found in
---> <Anonymous>
<Root>
GitHub代码链接:https://github.com/kernelcurry/httpverbs-site/tree/c56ba0a45445f7d28c31cb6928471da3619a3327
我什至查找了有关此主题的视频教程,他们似乎没有问题,但我有。 (视频链接:https://laracasts.com/series/learn-vue-2-step-by-step/episodes/26)
澄清一下,直到我将<router-view></router-view> 添加到index.html 之后才出现错误(线路链接:https://github.com/kernelcurry/httpverbs-site/blob/c56ba0a45445f7d28c31cb6928471da3619a3327/index.html#L10)
我希望我能更深入地了解这里发生的情况,但我不知所措。感谢任何愿意查看代码并为我指明正确方向的人:)
【问题讨论】:
标签: javascript html webpack vuejs2 vue-router