<div class="anchor-pic" v-for="(incom,idx) in item.ranking_income" :key="incom.usersid">
<i class="anchor-level-icon" :class="[{'level-1':idx == 0},{'level-2':idx == 1},{'level-3':idx == 2},]"></i>
<div class="anchor-pic-box" @click="goAccess(incom.usersid)" style="">
<img :src="incom.avatar" alt="">
</div>
<div class="gold-box" style="width: 100%;height: auto;position: absolute;left: 50%;transform: translateX(-50%);top: 1.5rem;">
<div class="sum_goldcoin" style="display: flex;align-items: center;width: 2.1rem;transform: scale(0.5);background: #E351EA;height: 0.8rem;border-radius: 0.7rem;">
<img src="img/sign-gold.png" style="width: 0.6rem;height:0.6rem;margin-left: 0.1rem;">
<span style="font-size: 0.48rem;color: #fff;flex-grow: 1;display: flex;justify-content: center;">{{incom.sum_goldcoin|formatDate}}</span>
</div>
</div>
</div>
逻辑部分
el: '#app',
data: {
StatusBarHeight: 0,
liveType:0,//2
liveUserID:0,//291
option: [],
token:'',
},
filters:{
formatDate:function(value){
value = Math.floor(value)
if(value<10000){
return value
}else if(value>=10000){
value= (value/10000).toFixed(1) + 'w'
return value
}
}
},