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:
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<VCharts v-if="renderChart" :option="option" :autoresize="autoResize" :style="{ width, height }" ref="chart" />
|
||||
<VCharts ref="chart" :option="option" :autoresize="autoResize" :style="{ width, height }" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { registerMap } from 'echarts/core';
|
||||
import { nextTick, ref } from 'vue'
|
||||
import { registerMap } from 'echarts/core'
|
||||
import { ref } from 'vue'
|
||||
import VCharts from 'vue-echarts'
|
||||
import worldMap from './world.json'
|
||||
import chinaMap from './china.json'
|
||||
|
||||
defineProps({
|
||||
option: {
|
||||
type: Object,
|
||||
@@ -28,16 +29,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
|
||||
chart,
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user