<template>
  <div class="ZhiGan_GeneralHead">
    <Title :dataset="option.dataset" :w="w" :h="h" :dataStyle="option.dataStyle" />
  </div>
</template>

<script setup lang="ts">
  import { computed, PropType, toRefs, watch, reactive, ref } from 'vue';
  import { CreateComponentType } from '@/packages/index.d';
  import { icon } from '@/plugins';
  import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
  import { useChartDataFetch } from '@/hooks';
  import Title from './svg/title.vue';

  const props = defineProps({
    chartConfig: {
      type: Object as PropType<CreateComponentType>,
      required: true,
    },
  });

  const { w, h } = toRefs(props.chartConfig.attr);

  const option = reactive({
    dataset: props.chartConfig.option.dataset,
    dataStyle: props.chartConfig.option.dataStyle,
  });
</script>

<style lang="scss" scoped>
  .ZhiGan_GeneralHead {
    width: v-bind('`${w}px`');
    height: v-bind('`${h}px`');
  }
</style>
