InfoCard.vue
2.13 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
<v-card id="InfoCard" flat height="11rem">
<v-card-actions>
<v-btn class="refresh-btn" small flat :loading="loading" round @click.native="$emit('refresh')">
<i class="material-icons icon iconfont icon-shuaxin"></i>
</v-btn>
</v-card-actions>
<v-card-title id="walletBalanceBlock" >
<div class="titleBlock">钱包余额</div>
<div class="numberBlock">{{info.balance || '0.00'}}</div>
</v-card-title>
<v-card-title id="waitingBalanceBlock" >
<div class="halfBlock">
<div class="titleBlock">待还借款</div>
<div class="numberBlock">{{info.toBePaid || '0.00'}}</div>
</div>
<div class="halfBlock">
<div class="titleBlock">待收金额</div>
<div class="numberBlock">{{info.toBeReceived || '0.00'}}</div>
</div>
</v-card-title>
</v-card>
</template>
<script>
export default {
data: () => ({
}),
props:{
info: {
type: Object,
default: () => ({})
},
loading: {
type: Boolean,
default:() => (true)
}
}
}
</script>
<style lang="scss" scoped>
#InfoCard {
width: 92vw;
margin: 0.8rem auto 0 auto;
background-image: linear-gradient(0deg, #282A2D 0%, #3A424A 100%);
border-radius: 2px;
.card__actions {
position: relative;
padding: 0;
.refresh-btn {
color: $gold;
min-width: 1.7rem;
height: 1.7rem;
width: 2.5rem;
font-size: 1.6rem;
position: absolute;
right: 0.4rem;
top: 0.6rem;
}
}
.titleBlock {
font-size: 1.2rem;
height: 1.2rem;
text-align: center;
font-weight: bold;
}
.numberBlock {
font-size: 1.3rem;
height: 1.3rem;
text-align: center;
font-weight: bold;
margin-top: 0.5rem;
color: $gold;
}
#walletBalanceBlock {
text-align: center;
padding: 0;
padding-top: 2.2rem;
div {
width: 100%;
}
}
#waitingBalanceBlock {
padding-top: 1.4rem;
padding-bottom: 0.7rem;
.halfBlock {
width: 50%;
}
}
}
</style>