1.错误详情:
2.错误解析:
导入echarts时用:import echarts from ‘echarts’ 出现 “Cannot read property ‘init’ of undefined” 报错,
3.改正方法:
引入echarts时,将 import echarts from "echarts"; 改成 import * as echarts from ‘echarts’; 后解决。
<script>
//引入echarts
import * as echarts from "echarts";
</script>