实现图片颜色切换
2021-08-24 本文已影响0人
程序媛_
![](https://img.haomeiwen.com/i17207411/c10652718eb91934.png)
<view class="djbox" :class="[currentindex===index?'djbox':'djbox2']" v-for="(i,index) in toplist" :key="index" @click="dj(index)">
<view>
<image style="height: 60rpx;width: 60rpx;" :src="currentindex===index?i.pic:i.pic2" mode=""></image>
</view>
<view style="margin-left: 10rpx;">{{i.title}}</view>
</view>
![](https://img.haomeiwen.com/i17207411/5548d2a4bedfe4a9.png)
![](https://img.haomeiwen.com/i17207411/065afbcc08f4e90a.png)
![](https://img.haomeiwen.com/i17207411/5e4533f270cb8715.png)