<view wx:for="{{navList}}"
wx:key='id' class="scroll-view-item_H {{index===activeIndex?'active-item':''}}"
bindtap='handleClickItem'
data-index="{{index}}"
>
{{item.text}}
</view>
handleClickItem(e){
let {index} = e.currentTarget.dataset;
this.setData({
activeIndex:index
})
},
网友评论