小程序tab导航切换样式

时间:2018-11-09 18:09:47   收藏:0   阅读:210

技术分享图片

 

 

<view id="green" class="scroll-view-item {{ current == index ? ‘active‘ :‘‘ }} " bindtap="yearselect" wx:for="{{year}}" wx:key="{{index}}" data-year="{{item}}" data-index="{{index}}">{{item}}</view>

yearselect(e){
this.setData({
yearselect:e.currentTarget.dataset.year,
current:e.currentTarget.dataset.index
})
},

.active{
background: #62B0F2;
color: #fff;
}

 

原文:https://www.cnblogs.com/wjhaaa/p/9936492.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!