第一次刺伤Vue2并且遇到路线。
基本上,当我向index.html添加<router-view></router-view>
时,我开始收到异常:
[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)
我希望我能更深入地了解这里发生的情况,但我感到很茫然。感谢任何愿意查看代码并指出正确方向的人:)
答案 0 :(得分:1)
按如下方式更改 while (((System.nanoTime() / 1000000000.0) - startTime) < 10)
:
src/routes.js
&#13;