category.vue 935 Bytes

<template>
  <div class="category-box">
    <div class="title title-icon">
      <span class="icon"></span>
      <span>品类业务</span>
    </div>
    <div class="category-container flex">
      <pie-chart ref="pieChart" :id="chart.id" :list="categoryData" height="8.29vh"></pie-chart>
      <Legend class="category-legend" :list="categoryData"></Legend>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Category',
  data() {
    return {
      chart: {
        id: 'category'
      }
    }
  },
  props: {
    categoryData: {
      type: Array,
      default: () => []
    }
  },
  methods: {}
}
</script>
<style lang="scss" scoped>
.category-box {
    overflow: hidden;
  height: 13.9vh;
  background: #0b0e31;
  .title {
    font-size: 10px;
  }
  .category-container {
    height: 11.34vh;
    // margin: 1.59vh 1.67vw 1.46vh 1.11vw;
    .category-legend{
        width:4.2vw;
        
    }
  }
}
</style>