mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
feat: 仪表盘地图板块(未完成)
This commit is contained in:
103310
src/components/Chart/china.json
Normal file
103310
src/components/Chart/china.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
111599
src/components/Chart/world.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user