我是靠谱客的博主 高贵樱桃,这篇文章主要介绍"[Vue warn]: Failed to mount component: template or render function not defined",现在分享给大家,希望可以做个参考。

新搭了个vue项目,谢了几个页面,当添加路由时,发现总是提示错误

"[Vue warn]: Failed to mount component: template or render function not defined"错误的解决

于是找到了两种解决方法

require 路径时 错误: component: require(’…/components/movie/movie.vue’)

1: component: (resolve) => require([’@/views/home/home.vue’], resolve),

2: component: require(’…/components/movie/movie.vue’).default

因为不知道什么原因,就先改了

最后

以上就是高贵樱桃最近收集整理的关于"[Vue warn]: Failed to mount component: template or render function not defined"的全部内容,更多相关"[Vue内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部