微信小程序前端Tab切换内容代码
微信小程序常用的小交互效果,简单的tab切换,点击菜单选项,切换到对应指数的内容模块。 wxml代码 <view class="tabBtn"> <block wx:for="{{tabBtn}}" wx:key="index"> <view class="item{{curTab == index ? ' active' : ''}}" bindtap="clickTab" data-idx="{{index}}">{{item}}</view> </block> </view> <...