card-three.vue
2.21 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
<a-card class="general-card" style="padding: 5px;overflow-y: scroll;">
<a-grid :cols='{ xs: 1, sm: 1, md: 1, lg: 1, xl: 2, xxl: 2 }' :colGap="10" :row-gap="10">
<a-grid-item>
<PowerGeneration pageValue="today-pv-power" :pageTitle="$t('pv.preview.today')" suffix="kWh" :card-style="{
background: isDark
? 'linear-gradient(180deg, #284991 0%, #122B62 100%)'
: 'linear-gradient(180deg, #f2f9fe 0%, #e6f4fe 100%)',
}" />
</a-grid-item>
<a-grid-item>
<PowerGeneration pageValue="month-pv-power" :pageTitle="$t('pv.preview.month')" suffix="MWh" :card-style="{
background: isDark
? ' linear-gradient(180deg, #3D492E 0%, #263827 100%)'
: 'linear-gradient(180deg, #F5FEF2 0%, #E6FEEE 100%)',
}" />
</a-grid-item>
<a-grid-item>
<PowerGeneration pageValue="year-pv-power" :pageTitle="$t('pv.preview.year')" suffix="MWh" :card-style="{
background: isDark
? 'linear-gradient(180deg, #294B94 0%, #0F275C 100%)'
: 'linear-gradient(180deg, #f2f9fe 0%, #e6f4fe 100%)',
}" />
</a-grid-item>
<a-grid-item>
<PowerGeneration pageValue="total-pv-power" :pageTitle="$t('pv.preview.total')" suffix="MWh" :card-style="{
background: isDark
? 'linear-gradient(180deg, #312565 0%, #201936 100%)'
: 'linear-gradient(180deg, #F7F7FF 0%, #ECECFF 100%)',
}" />
</a-grid-item>
</a-grid>
</a-card>
</template>
<script lang="ts" setup>
import { computed, reactive, ref } from 'vue';
import useThemes from '@/hooks/themes';
import PowerGeneration from './power-generation.vue'
const { isDark } = useThemes();
</script>
<style lang="less" scoped>
:deep(.arco-card) {
border-radius: 4px;
}
:deep(.arco-card-body) {
width: 100%;
// height: 134px;
padding: 5px;
}
.content-wrap {
width: 100%;
padding: 16px;
white-space: nowrap;
}
:deep(.content) {
float: left;
width: 108px;
// height: 102px;
}
:deep(.arco-statistic) {
.arco-statistic-title {
margin-bottom: 0px;
font-size: 12px;
font-weight: bold;
white-space: nowrap;
}
.arco-statistic-content {
margin-top: 0px;
}
}
</style>