Ranking.vue
1.41 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
<template>
<div>
<div v-for="(item, index) in rankingsList" :key="index" class="ranking-box-item">
<div class="ranking-box-item-left">
<div class="circle" :style="{ 'background-image': index < 3 ? RankColor[index] : '' }">{{ index + 1 }}</div>
<div class="text">{{ item.name }}</div>
</div>
<div class="ranking-box-item-right">{{ item.value }}</div>
</div>
</div>
</template>
<script>
import datas from '@/utils/data'
export default {
name: 'Ranking',
props: {
rankingsList: {
type: Array,
default: () => []
}
},
data() {
return {
RankColor: datas.RankColor
}
},
mounted() {
},
methods: {}
}
</script>
<style lang="scss" scoped>
.ranking-box-item {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 4px;
&-left {
display: flex;
.circle {
width: 20px;
height: 20px;
border-radius: 20px;
font-size: 14px;
color: #ffffff;
text-align: center;
background: #1e3372;
}
.text {
font-weight: 400;
font-size: 14px;
color: #ffffff;
margin-left: 1.11vw;
cursor: default;
}
.text:hover {
padding-bottom: 1px;
border-bottom: 1px solid #fff;
}
}
&-right {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #95acd9;
text-align: right;
}
}
</style>