首页 前端知识 [Vue warn]: Unknown custom element: <router-view> - did you register the component correctly?报错

[Vue warn]: Unknown custom element: <router-view> - did you register the component correctly?报错

2024-03-07 08:03:54 前端知识 前端哥 860 753 我要收藏

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

found in

—> at src/App.vue

浏览器报错
该报错有很大概率是VUE没有进行注册

解决方法:
可以先检查一下在router > index.js文件,如果缺少注册语句可以添加以下代码

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
转载请注明出处或者链接地址:https://www.qianduange.cn//article/3388.html
标签
评论
会员中心 联系我 留言建议 回顶部
复制成功!