在使用vue-router遇到的问题以及解决办法

来源:互联网 发布:如何提高淘宝试用 编辑:程序博客网 时间:2024/05/21 10:58
1、ERROR in ./src/view/BootPage.vue
template syntax error Component template should contain exactly one root element:
<nav class="boot-nav">..................
解决方法:在vue-router2.0中,事件template的根节点只能有一个。
2、 [Vue warn]: Failed to resolve directive: link
(found in anonymous component - use the "name" option for better debugging messages.)
解决方法:在vue-router1.0和vue-router2.0中有些指令和语法已经发生了变化。
0 1
原创粉丝点击