| | |
| | | <template> |
| | | <div ref="chartRef" :style="{ height, width }"></div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent, PropType, ref, Ref, onMounted } from 'vue'; |
| | | |
| | | import { useECharts } from '/@/hooks/web/useECharts'; |
| | | <script lang="ts" setup> |
| | | import { PropType, ref, Ref, onMounted } from 'vue'; |
| | | import { useECharts } from '@/hooks/web/useECharts'; |
| | | import { mapData } from './data'; |
| | | import { registerMap } from 'echarts'; |
| | | |
| | | export default defineComponent({ |
| | | props: { |
| | | defineProps({ |
| | | width: { |
| | | type: String as PropType<string>, |
| | | default: '100%', |
| | |
| | | type: String as PropType<string>, |
| | | default: 'calc(100vh - 78px)', |
| | | }, |
| | | }, |
| | | setup() { |
| | | }); |
| | | |
| | | const chartRef = ref<HTMLDivElement | null>(null); |
| | | const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>); |
| | | |
| | |
| | | }, |
| | | ], |
| | | }); |
| | | }); |
| | | return { chartRef }; |
| | | }, |
| | | }); |
| | | </script> |