|
|
@@ -1,12 +1,12 @@
|
|
|
<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">
|
|
|
+ <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}}">
|
|
|
+ <block wx:if="{{ item.icon }}">
|
|
|
<view class="cat-icon {{['cat-icon-' + item.name, active === index ? 'active' : '']}}">
|
|
|
- <image class="image" src="{{item.icon.active}}" wx:if="{{active === index}}"></image>
|
|
|
- <image class="image" src="{{item.icon.inactive}}" wx:else></image>
|
|
|
+ <image class="image" src="{{ item.icon.active }}" wx:if="{{ active === index }}"></image>
|
|
|
+ <image class="image" src="{{ item.icon.inactive }}" wx:else></image>
|
|
|
<text class="text">{{ item.label }}</text>
|
|
|
</view>
|
|
|
</block>
|