1 line
3.1 KiB
Plaintext
1 line
3.1 KiB
Plaintext
![]() |
<block wx:if="{{type==1}}"><view class="{{['navTabBox',cname]}}" style="{{$root.s0}}"><block wx:if="{{tabs.length<=5&&!isscroll}}"><view class="shortTab"><view class="navTab" style="{{'height:'+(height+'rpx')+';'}}"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['navClick',[index]]]]]}}" class="{{['navTabItem',icname]}}" style="{{item.s1}}" bindtap="__e"><block wx:if="{{item.$orig.icon}}"><text class="{{['iconfont mr15 f36',item.$orig.icon]}}" style="{{'color:'+(index==tabClick?item.$orig.color||color:'')+';'}}"></text></block><view class="p-r">{{''+item.$orig.name+''}}<block wx:if="{{item.$orig.num}}"><text class="p-a f24 onum">{{item.$orig.num}}</text></block><block wx:if="{{item.$orig.dot>0}}"><view class="dot p-a r0 f20 cf nowei f-c bsf">{{item.$orig.dot}}</view></block></view></view></block></view><block wx:if="{{isWidth>0}}"><view class="underlineBox" style="{{'transform:'+('translateX('+isLeft+'px)')+';'+('width:'+(isWidth+'px')+';')+('height:'+(uh+'rpx')+';')}}"><view class="underline" style="{{'background:'+(xhxjb||color||tColor)+';'+('width:'+(uw+'rpx')+';')+('height:'+(uh+'rpx')+';')}}"></view></view></block></view></block><block wx:if="{{tabs.length>5||isscroll}}"><view class="longTab"><scroll-view style="white-space:nowrap;display:flex;" scroll-x="true" scroll-with-animation="{{true}}" scroll-into-view="{{toView}}"><block wx:for="{{$root.l1}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['longItem',icname]}}" style="{{item.s2}}" data-index="{{index}}" id="{{'id'+index}}" data-event-opts="{{[['tap',[['longClick',[index]]]]]}}" bindtap="__e"><view class="f-c wh"><view>{{item.$orig.name}}</view><block wx:if="{{item.$orig.num}}"><view class="f24">{{item.$orig.num}}</view></block></view></view></block><view class="underlineBox" style="{{'transform:'+(isscroll?'translateX('+100*tabClick+'%)':'translateX('+isLeft+'px)')+';'+('width:'+(itw)+';')}}"><view class="underline" style="{{'background:'+(xhxjb||color||tColor)+';'+('width:'+(uw+'rpx')+';')+('height:'+(uh+'rpx')+';')}}"></view></view></scroll-view></view></block></view></block><block wx:else><view class="{{['navTabBox',cname]}}"><scroll-view class="ws-n p20 longTab" scroll-x="true" scroll-with-animation="{{true}}" scroll-into-view="{{toView}}"><block wx:for="{{tabs}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['p-r longItem longItem2',icname]}}" style="{{'color:'+(index==tabClick?color||tColor:ncolor)+';'+('width:'+(itw)+';')}}" id="{{'id'+index}}" data-event-opts="{{[['tap',[['longClick',[index]]]]]}}" bindtap="__e"><view class="f-c mt10"><view class="typeimg bf6 bsf"><mg-img vue-id="{{'1a90c7a5-1-'+index}}" src="{{item.icon}}" bind:__l="__l"></mg-img></view></view><view style="{{'height:'+(height+'rpx')+';'+('line-height:'+(height+'rpx')+';')}}">{{item.name}}</view><view class="p-a underlineBox b0" style="{{'width:'+('100%')+';'}}"><view class="underline" style="{{'background:'+(index==tabClick?color||tColor:'')+';'+('width:'+(uw+'rpx')+';')}}"></view></view></view></block></scroll-view></view></block>
|