GrowCard.vue
2.33 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
<template>
<div class="md:flex justify-between">
<template v-for="(item, index) in growCardList" :key="item.title">
<div
class="growCardItem md:w-1/3 w-full !md:mt-0 !mt-4"
:class="index === 0 ? '!md:ml-0' : '!md:ml-4'"
>
<div class="growCardItem-top">
<img :src="item.imgUrl" style="width: 90px; height: 90px" />
<div class="growCardItem-right">
<div class="flex justify-between ml-3">
<div style="font-size: 26px; color: #333">{{ item.value }}</div>
<img src="../../../../assets/images/tip.png" style="width: 20px; height: 20px" />
</div>
<div class="ml-3">{{ item.title }}</div>
<div class="ml-1.5 mt-3 flex flex-nowrap" style="width: 240px" v-if="item.offLine">
<div class="count">
<img
src="../../../../assets/images/online.png"
style="width: 10px; height: 10px; margin-right: 4px"
/>
在线 {{ item.onLine }}
</div>
<div class="count">
<img
src="../../../../assets/images/offline.png"
style="width: 10px; height: 10px; margin-right: 4px"
/>
离线 {{ item.offLine }}
</div>
<div class="count">
<img
src="../../../../assets/images/inactive.png"
style="width: 10px; height: 10px; margin-right: 4px"
/>
未激活 {{ item.inactive }}
</div>
</div>
</div>
</div>
<div class="growCardItem-bottom"> 今日新增 {{ item.newDay }}</div>
</div>
</template>
</div>
</template>
<script lang="ts" setup>
import { growCardList } from '../data';
</script>
<style scoped lang="less">
.growCardItem {
height: 179px;
background-color: #fff;
color: #666;
.growCardItem-top {
display: flex;
margin: 20px;
border-bottom: 1px solid #f2f2f5;
padding-bottom: 10px;
.growCardItem-right {
width: 300px;
.count {
display: flex;
font-size: 12px;
align-items: center;
margin-left: 8px;
}
}
}
.growCardItem-bottom {
margin-left: 20px;
}
}
</style>