category.vue
935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<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>