zhangxiao
2024-08-20 e47b788ff5f5c699c682999c95da17eb284ca21d
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
<template>
    <div class="icon-card"></div>
</template>
<script lang="ts" setup name="TheChartCard">
const props = withDefaults(
    defineProps<{
        chartConfig?: ChartType;
        title?: string;
    }>(),
    {
        chartConfig: undefined,
        title: ""
    }
);
const dateType = ref("hour");
 
const emits = defineEmits<{
    (e: "init", value: echarts.ECharts): void;
}>();
 
function initChart(v: any) {
    emits("init", v);
}
</script>
<style lang="scss" scoped>
.icon-card {
    background-color: $bg2;
    width: 100%;
    padding: 24px;
    margin-top: 20px;
    .top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 20px;
        .left {
            font-size: 18px;
            font-weight: 700;
            position: relative;
            padding-left: 18px;
            &::before {
                position: absolute;
                top: 50%;
                left: 0;
                width: 8px;
                height: 8px;
                background-color: #315efb;
                border: 1px solid #b4c0da;
                transform: translateY(-50%);
                content: " ";
            }
        }
    }
}
</style>