StaticRank.vue
1.22 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
<template>
<div class='static-rank'>
<view-sub-title :title='title' />
<div class='rank-wrap flex' v-for='(item,index) in rankDataList' :key='index'>
<div class='rank-index'>{{ index + 1 }}</div>
<div class='rank-name'>
<span :title='item[name]'> {{ item[name] }}</span>
</div>
<div>{{ item[numName] }}</div>
</div>
</div>
</template>
<script>
import datas from 'utils/data'
export default {
props: {
title: {
type: String,
default: ''
},
rankDataList: {
type: Array,
default: []
},
name: {
type: String,
default: ''
},
numName: {
type: String,
default: ''
}
},
name: 'StaticRank'
}
</script>
<style lang='scss' scoped>
.static-rank {
margin: 0 3px;
.rank-wrap {
height: 8.9%;
display: grid;
grid-template-columns: 8% 77% 15%;
color: #FFFFFF;
background: #1D1C1C;
font-size: 10px;
line-height: 24px;
padding: 0 8px;
.rank-index {
color: #606266;
}
.rank-name{
cursor: default;
span{
display: block;
width: 93%;
text-overflow:ellipsis;
white-space:nowrap;
overflow:hidden;
}
}
}
}
</style>