HistoryStatisticsCard.vue
1.55 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
<template>
<v-card id="HistoryStatisticsCard" flat height="11rem">
<v-card-title id="TotalBlock" >
<div class="titleBlock">{{ type === 'borrow' ? '借入总额(元)' : '借出总额(元)'}}</div>
<div class="numberBlock">{{data.total}}</div>
</v-card-title>
<v-card-title id="interestBlock" >
<div class="halfBlock">
<div class="titleBlock">总利息</div>
<div class="numberBlock">{{data.interest}}</div>
</div>
<div class="halfBlock">
<div class="titleBlock">{{ type === 'borrow' ? '借入次数' : '借出次数'}}</div>
<div class="numberBlock">{{data.times}}</div>
</div>
</v-card-title>
</v-card>
</template>
<script>
export default {
data:() => ({
}),
props: ['type', 'data']
}
</script>
<style lang="scss" scoped>
#HistoryStatisticsCard {
width: 100vw;
background-image: linear-gradient(0deg, #3A424A 0%, #3A424A 100%);
border-radius: 2px;
.titleBlock {
font-size: 0.9rem;
height: 1.1rem;
text-align: center;
font-weight: bold;
}
.numberBlock {
font-size: 1rem;
height: 1.1rem;
text-align: center;
margin-top: 0.5rem;
color: $gold;
}
#TotalBlock {
text-align: center;
padding-top: 2.2rem;
div {
width: 100%;
}
}
#interestBlock {
padding-top: 1.4rem;
padding-bottom: 0.7rem;
.halfBlock {
width: 50%;
}
}
}
</style>