Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
src/views/demo/charts/Map.vue
@@ -1,15 +1,13 @@
<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%',
@@ -18,8 +16,8 @@
        type: String as PropType<string>,
        default: 'calc(100vh - 78px)',
      },
    },
    setup() {
  });
      const chartRef = ref<HTMLDivElement | null>(null);
      const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
@@ -68,8 +66,5 @@
            },
          ],
        });
      });
      return { chartRef };
    },
  });
</script>