echarts安装:
npm install echarts --save
在main.js中引用
// 引入Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
引入中国地图的js
require('echarts/map/js/china.js')
require('echarts/map/js/world.js')
可以去这里下载所需要的地图数据地理小工具
创建一个地图容器
<div id="china_map" class="ditu" style="width: 50vw; height: 30vw"></div>
js实现
mounted() {
this.getMapCha