longyvfengyun
2023-11-16 b537c7bccbcc20644902ad6f0e309bbe9a6eda24
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
52
53
54
55
56
57
58
<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 class="chart-box-footer">
            <slot name="footer"></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;
    }
    .chart-box-tools {
        display: inline-block;
    }
}
</style>