Vue文件分离

一、

报错图例如下:
template or render function not defined vue 突然报错了,怎么解决

 什么错误呢,就是加载不出来,网上看了一通,是vue版本不对,是vue-compile 包安装的不对。
可自我感觉不是这个问题,为什么其他相同的组件就能加载出来。。

突然发现一个问题 cpu.js和cpu.vue,名字相同了

import cpu from './cpu' ; 这样是不是引入的时候,不知道哪个是组件了,好,就是这个问题。

然后改了cpu.js的名字,改为cpu_data.js  重新运行 完美解决。

原文地址:https://www.cnblogs.com/fger/p/12880496.html