Advertisement

Vue 3 集成 echarts 离线地图组件

阅读量:
在这里插入图片描述

taiyuan.json文件的获取路径为:这里

复制代码
    <template>
      <div ref="chinaMap" style="height: 700px; width: 100%; background: #fff"> 地图1 </div>
    </template>
    <script lang="ts" setup>
    import * as echarts from 'echarts'
    import chinaJSON from './taiyuan.json'
    import { onMounted, ref } from 'vue'
    const chinaMap = ref()
    onMounted(() => {
      drawChina()
    })

全部评论 (0)

还没有任何评论哟~