longyvfengyun
2023-09-28 b6fd39998f67f7fea48ac8b3be169dc6de3985b5
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
<script setup>
import chartIcon from "./images/chart-icon.png";
const props = defineProps({
    title: {
        type: String,
        default: ""
    }
});
</script>
 
<template>
    <div class="chart-box-wrapper">
        <div class="chart-box-header">
            <div class="chart-box-icon">
                <img :src="chartIcon" alt="" />
            </div>
            <div class="chart-box-title">{{title}}</div>
        </div>
        <div class="chart-box-body">
            <slot></slot>
        </div>
    </div>
</template>
 
<style scoped lang="less">
.chart-box-wrapper {
    display: flex;
    height: 100%;
    flex-direction: column;
    .chart-box-body {
        flex: 1;
    }
}
.chart-box-header {
    .chart-box-icon {
        display: inline-block;
        height: 12px;
        img {
            width: auto;
            height: 100%;
        }
    }
    .chart-box-title {
        display: inline-block;
        font-size: 14px;
        color: #FFFFFF;
        margin-left: 4px;
    }
}
</style>