使用vue路由时报错

在使用vue路由时,发现页面无法显示,报错内容如下

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

解决:
我是通过引入使用路由的,发现引入时vue-router.js在vue.js前面

    <script src="vue-router.js"></script>
    <script src="vue.js"></script>

改为在后面引入即可

    <script src="vue.js"></script>
    <script src="vue-router.js"></script>
posted @ 2020-02-14 13:14  启林O_o  阅读(177)  评论(0)    收藏  举报