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

vue浏览器报错,如下

vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-Link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <App> at src/App.vue
<Root>

 

原因:

没有注册插件router

//注册插件
Vue.use(VueRouter)

 

 

posted @ 2019-08-17 14:59  韦邦杠  阅读(35227)  评论(0编辑  收藏  举报