<template>
  <div  class="go-title-03">
    <img :width="w" :height="h" src="@/assets/images/chart/zhilan/zhilantitles.png" />
    <div class="span">{{text}}</div>
  </div>
</template>

<script setup lang="ts">
import { PropType, toRefs } from 'vue'
import { CreateComponentType } from '@/packages/index.d'

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

const { w, h } = toRefs(props.chartConfig.attr)
const {
  textColor,
  textSize,
  text
} = toRefs(props.chartConfig.option)
</script>

<style lang="scss" scoped>
@include go('title-03') {
  position: relative;
  display: flex;
  align-items: center; 

  .span{
    position: absolute;
    left: 12%;
    color: v-bind('textColor');
    font-size: v-bind('textSize+"px"');
  }
}
</style>
