vue报错Failed to mount component: template or render function not defined. found in
[successbox title=”康康什么意思”]
Failed to mount component: template or render function not defined. found in..
大意:无法安装组件:未定义模板或渲染函数。在发现..
[/successbox]
方法一.先引入组件后使用
imoprt index from '..../aaa';
//...
component: index
方法二.使用require
component: require('@/pages/index').default
这里要注意一定要加default
,否则还是会报错。
如果你是基于vue-cli创建的项目,那么你的vue-loader版本应该是13以上,这是造成这个报错的主要原因;因为在新版本中route引入组件需要require('@/pages/index').default
可以动动小手点击广告吗? 💡
Electron-vue-Electron Security Warning (Insecure Content-Security-Policy) 告警解决array_walk()与array_map()
快捷登陆