| 123456789101112131415161718192021 |
- <view class="cat-tabbar">
- <view class="cat-tabbar__wrapper" style="{{fixed ? 'position: fixed;' : ''}}">
- <block wx:for="{{ tabs }}" wx:for-index="index" wx:key="index" wx:for-item="item">
- <view class="cat-tabbar__item" bindtap="changeTab">
- <!--判断是否图片图标-->
- <block wx:if="{{ item.icon }}">
- <view class="cat-icon {{['cat-icon-' + item.name, active === index ? 'active' : '']}}">
- <image class="image" src="{{ item.aicon }}.png" wx:if="{{ active === index }}" />
- <image class="image" src="{{ item.icon }}.png" wx:else></image>
- <text class="text">{{ item.label }}</text>
- </view>
- </block>
- <block wx:else>
- <view class="cat-icon {{['cat-icon-' + item.name, active === index ? 'active' : '']}}">
- <text class="text">{{ item.label }}</text>
- </view>
- </block>
- </view>
- </block>
- </view>
- </view>
|