|
@@ -1,15 +1,26 @@
|
|
|
-<scroll-view scroll-x enable-flex class="scroll" style="height: {{showIcon?'120':'90'}}rpx;" scroll-left='{{scrollLeft}}' scroll-with-animation enable-passive>
|
|
|
|
|
- <view class="item {{active==index?'active':''}}" style="border-color:{{item.color || '#3874F6'}};" id="{{active==index?'active'+index:''}}" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bindtap="tabsChenge">
|
|
|
|
|
- <block wx:if="{{showIcon}}">
|
|
|
|
|
- {{item.color}}
|
|
|
|
|
- <view class="icon" wx:if="{{item.icon}}">
|
|
|
|
|
- <text class="iconfont {{item.icon}}" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view wx:else class="num line-1">{{item.num}}</view>
|
|
|
|
|
- </block>
|
|
|
|
|
- <view class="label line-1 {{item.icon?'':'overstriking'}}" style="color: {{active == index ? item.color || '#999' : '#999'}};">{{language[item.label]||item.label}}</view>
|
|
|
|
|
|
|
+<!-- 滚动模式 -->
|
|
|
|
|
+<block wx:if="{{mode=='scroll'}}">
|
|
|
|
|
+ <scroll-view scroll-x enable-flex class="scroll" style="height: {{showIcon?'120':'90'}}rpx;" scroll-left='{{scrollLeft}}' scroll-with-animation enable-passive>
|
|
|
|
|
+ <view class="item {{active==index?'active':''}}" style="border-color:{{item.color || '#3874F6'}};" id="{{active==index?'active'+index:''}}" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bindtap="tabsChenge">
|
|
|
|
|
+ <block wx:if="{{showIcon}}">
|
|
|
|
|
+ {{item.color}}
|
|
|
|
|
+ <view class="icon" wx:if="{{item.icon}}">
|
|
|
|
|
+ <text class="iconfont {{item.icon}}" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view wx:else class="num line-1">{{item.num}}</view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <view class="label line-1 {{item.icon?'':'overstriking'}}" style="color: {{active == index ? item.color || '#999' : '#999'}};">{{language[item.label]||item.label}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+</block>
|
|
|
|
|
+<!-- 平铺模式 -->
|
|
|
|
|
+<block wx:if="{{mode=='flat'}}">
|
|
|
|
|
+ <view class="flat-container">
|
|
|
|
|
+ <view class="item1 {{active==index?'active':''}}" style="{{active==index ? 'background-color:'+(item.color||'#FAE5E5')+';border-color:'+(item.color||'#FAE5E5') : ''}}" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bindtap="tabsChenge">
|
|
|
|
|
+ <view class="label1">{{language[item.label]||item.label}}</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
-</scroll-view>
|
|
|
|
|
|
|
+</block>
|
|
|
<view class="slot-box" bindtouchstart="myTouchStart" bindtouchmove="myTouchMove">
|
|
<view class="slot-box" bindtouchstart="myTouchStart" bindtouchmove="myTouchMove">
|
|
|
<slot name='padtop' />
|
|
<slot name='padtop' />
|
|
|
<slot name='{{list[active].label}}' />
|
|
<slot name='{{list[active].label}}' />
|