当前位置 博文首页 > q1424966670的博客:vue-cli4.0+Echarts 3D
转载请标明出处,全网最新解决办法,谢谢。
先描述问题
//1.依赖包:
npm install echarts -S
npm install echarts-gl -S
//2main.js:
import echarts from ‘echarts’
import ‘echarts-gl’
Vue.prototype.$echarts = echarts
按照这个步骤安装之后,发现node_modules下只有echarts-gl文件夹
然后页面报错Component series.map3D not exists. Load it first
1、安装echarts echarts-gl
npm install echarts echarts-gl
2,在main.js引入
import echarts from 'echarts';
// import 'echarts-gl';
import echartsGL from 'echarts-gl'
Vue.prototype.$echarts = echarts;
Vue.prototype.$echartsGL = echartsGL;
重新启动项目之后,发现平面图和3D图都可以出来,完美解决
cs