第一个报错:
Component series.map3D not exists. Load it first
这个问题是由于没有安装echarts-gl,安装一下,再引入即可:
1 | npm install echarts-gl |
1 | import echartsGL from ‘echarts-gl’ // 引入echarts |
2 | Vue.prototype.$echartsGL = echartsGL // 引入组件(将echarts注册为全局) |
Cannot read property ‘features’ of null
原因是没有引入world.js
1 | import world from ‘echarts/map/js/world.js’ |