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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
| <template>
| <div class="box">
| <div class="title-box">
| <div class="logo-title">
| <img :src="imgUrl" alt />
| <div class="title">{{title}}</div>
| </div>
|
| <div class="num-unit">
| <div class="num">{{currentNum}}</div>
| <div class="unit rise" v-if="upDown == 'up'">
| <span>↑</span>
| </div>
| <div class="unit decline" v-if="upDown == 'down'">
| <span>↓</span>
| </div>
| </div>
| </div>
| <div class="content-box">
| <div class="sub-title">{{subTitle}}</div>
| <div class="num">{{contrast}}</div>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: 'TimeBox',
| props: [
| 'imgUrl',
| 'title',
| 'currentNum',
| 'subTitle',
| 'contrast',
| 'upDown'
| ]
| }
| </script>
|
| <style scoped lang="scss">
| .box {
| width: 100%;
| display: flex;
| flex-direction: column;
| flex: 1;
| justify-content: space-between;
| border-bottom: 1px solid #999999;
|
| & > div {
| width: 100%;
| }
|
| .title-box {
| margin-top: 20px;
| display: flex;
| color: #66dde9;
| justify-content: space-between;
|
| .logo-title {
| display: flex;
| align-items: center;
|
| .title {
| margin-left: 8px;
| font-size: 20px;
| font-weight: bold;
| }
| }
|
| .num-unit {
| display: flex;
| align-items: center;
|
| .num {
| font-size: 20px;
| font-weight: bold;
| }
|
| .unit {
| display: flex;
| align-items: center;
| font-size: 20px;
| margin-left: 8px;
| }
|
| .unit.rise {
| color: #27d1ec;
| }
|
| .unit.decline {
| color: #ec7127;
| }
| }
| }
|
| .content-box {
| margin-bottom: 20px;
| display: flex;
| justify-content: space-between;
| color: #a9d1d7;
|
| .sub-title {
| margin-left: 50px;
| }
|
| .num {
| margin-right: 24px;
| }
| }
| }
| </style>
|
|