Unknown custom element router-view did you register the component correctly 错误解决办法
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element

·
今天在编写一个项目(项目使用vue-cli脚手架搭建)时,有一个页面跳转的问题,笔者就用了vue-router,但是一直遇到“Unknown custom element: <router-view> - did you register the component correctly?”.......这个问题,愣是纠结了半天,难道<router-view />不能用?于是乎,开始了循规蹈矩的上网查找资料的过程!!!
好在功夫不负有心人,其实特别特别简单!!!
之前不知道什么原因,我把main.js中的import Vue from 'vue'改成了import Vue from'vue/dist/vue.min.js'了,其实在webpack-dev开发模式下,不能使用后者,这样会造成不安全,但是在production模式下没问题,所以,改回来后问题解决。噗。。。。




A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:10 个月前 )
c345bb45
1 年前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 1 年前
更多推荐
所有评论(0)