vue echarts使用map地图 引入china.js报错Cannot read property ‘echarts’ of undefined

  • 下载china.js导入项目中引入,会报错Cannot read property ‘echarts’ of undefined
import Echarts from "echarts";
// 引入中国地图数据
import "./china.js";
  • 在项目里安装4.9.0版本echarts,可直接导入china.js。(node_modules里面的包)
import Echarts from "echarts";
// 引入中国地图数据
import "echarts/map/js/china.js";
  • 存在问题:使用5.0.2版本的echarts不能使用import导入,有无大佬知道5.0+版本的echarts怎么使用中国地图呢?

猜你喜欢

转载自blog.csdn.net/ka_xingl/article/details/118901595
今日推荐