feat: 仪表盘地图板块(未完成)

This commit is contained in:
秋帆
2024-11-03 16:37:02 +08:00
parent c6daf41a2e
commit abb6d59783
6 changed files with 215098 additions and 12 deletions

103310
src/components/Chart/china.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,13 @@
<template>
<VCharts
v-if="renderChart"
:option="option"
:autoresize="autoResize"
:style="{ width, height }"
/>
<VCharts v-if="renderChart" :option="option" :autoresize="autoResize" :style="{ width, height }" ref="chart" />
</template>
<script lang="ts" setup>
import { registerMap } from 'echarts/core';
import { nextTick, ref } from 'vue'
import VCharts from 'vue-echarts'
import worldMap from './world.json'
import chinaMap from './china.json'
defineProps({
option: {
type: Object,
@@ -31,7 +28,13 @@ defineProps({
default: '100%'
}
})
registerMap('world', worldMap)
registerMap('china', chinaMap)
const renderChart = ref(false)
const chart = ref(null)
defineExpose({
chart
})
// wait container expand
nextTick(() => {
renderChart.value = true

111599
src/components/Chart/world.json Normal file

File diff suppressed because it is too large Load Diff