解决vue项目报错:Failed to mount component: template or render function not defined.

 

 页面这么写的:

解决vue项目报错:Failed to mount component: template or render function not defined.

 问题出在router里定义路由的时候这么写:

解决vue项目报错:Failed to mount component: template or render function not defined.

 

看似没有问题,但是我在@/pages/monitoring/目录下,既有monitoring.vue,又有monitoring.js,不补全文件后缀的话会找不对文件,所以就报错了

 

相关文章: