引入中国地图如下:
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210421013846146.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzUwMDkzNzg1,size_16,color_FFFFFF,t_70#pic_center)
实现很简单:
1.正常引入echarts,下载一个china.js的中国地图js文件(可以在网上找一个即可)并导入。
import echarts from 'echarts'
import "echarts/map/js/china.js"
Vue.prototype.$echarts = echarts
2.给将要展示地图的div设置固定的宽高。
<div class="B2" id="B2"></div>
.B2{
/* width: 100%; */
width: 845px;
height:430px;
/* height: 60%; */
margin-top: 10px;
background-color: bl