<view class="drawer-list-item" v-for="(item,index) in navList2" @click="selectTab(item.id)">
<view class="drawer-item">
<view>{{item.text}}</view>
<view class="add" :class="{red:chageRed==item.id}"></view>
</view>
</view>
//data数组
navList2: [{
id: 1,
text: '售后申请'
},
{
id: 2,
text: '处理中'
},
{
id: 3,
text: '申请记录'
}
],
chageRed: '',
//方法
selectTab: function(index) {
this.chageRed = index;
console.log(index);
},
//样式
.navList {
width: 100%;
display: flex;
position: fixed;
z-index: 20;
flex-direction: row;
justify-content: space-around;
height: 100rpx;
background: #FFFFFF;
}
.add {
width: 15px;
height: 15px;
margin-top: 15px;
background: url(../../../static/more/check_b_e.png);
background-size: 100%;
}
.red {
width: 15px;
height: 15px;
margin-top: 15px;
color: rgba(216, 71, 71, 1);
background: url(../../../static/more/check_red.png);
background-size: 100%;
}