"[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’)...
·
新搭了个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
因为不知道什么原因,就先改了
更多推荐
已为社区贡献7条内容
所有评论(0)