Files
Smart-Farm/front/components/tab.wxml
2025-12-22 17:13:05 +08:00

1 line
974 B
Plaintext

<view><scroll-view class="tab-list" style="{{'background:'+(bgColor)+';'}}" scroll-x="{{true}}" scroll-into-view="{{'tab'+(activeIndex-1)}}" scroll-with-animation="{{true}}"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="tab-item text-bold rel" style="{{'width:'+(width)+';'+('height:'+(height)+';')+('line-height:'+(height)+';')+('color:'+(index==activeIndex?activeColor:color)+';')+('font-size:'+(fontSize)+';')}}" id="{{'tab'+index}}" data-event-opts="{{[['tap',[['handerTabChange',[index]]]]]}}" bindtap="__e">{{''+(item.title||item)+''}}<block wx:if="{{index==activeIndex&&haveLine}}"><view class="abs line" style="{{'background:'+(activeColor)+';'}}"></view></block><block wx:if="{{item.number}}"><view class="item-msg c-base f-icontext abs" style="{{'width:'+(item.number<10?'30rpx':'50rpx')+';'+('right:'+(msgRight)+';')}}">{{''+(item.number<100?item.number:'99+')+''}}</view></block></view></block></scroll-view></view>