You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
470 B
25 lines
470 B
<template>
|
|
<div id="map" class="map"></div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { initOptions } from '@/utils/map';
|
|
import { onMounted } from 'vue';
|
|
import ShanXiMap from 'config/map/shanxi';
|
|
|
|
onMounted(() => {
|
|
const chartDom = document.getElementById('map');
|
|
const myChart = echarts.init(chartDom);
|
|
|
|
echarts.registerMap('shanxi', ShanXiMap);
|
|
//
|
|
myChart.setOption(initOptions());
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
.map {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
|