card-title.vue
799 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
<template>
<div class="total-container" :class="type === 1 ? 'right-bg' : 'left-bg'">
<span class="total-icon-view">
<slot name="icon"></slot>
</span>
<span class="total-value-view">
<slot/>
</span>
</div>
</template>
<script setup lang="ts">
const props = defineProps({
type: {
type: Number,
default: 0
}
})
</script>
<style lang="less" scoped>
.left-bg {
background: url("@/assets/bi/technology/statistics-bg.png")
}
.right-bg {
background: url("@/assets/bi/technology/emission-bg.png")
}
.total-container {
background-size: 100% 100%;
width: 100%;
height: 30px;
font-size: 14px;
display: flex;
align-items: center;
.total-icon-view {
margin: 4px 8px 0 5px;
}
.total-value-view {
white-space: nowrap;
}
}
</style>