canyin-project/yb_wm/unpackage/dist/dev/mp-weixin/components/v-tabs/v-tabs.wxml
2024-11-01 16:07:54 +08:00

1 line
1.4 KiB
Plaintext

<view class="v-tabs data-v-552d3ab8" style="{{'background:'+(bgColor)+';'+('padding:'+(padding)+';')}}" id="{{elId}}"><scroll-view scroll-x="{{scroll}}" scroll-left="{{scroll?scrollLeft:0}}" scroll-with-animation="{{scroll}}" class="data-v-552d3ab8"><view class="v-tabs__container data-v-552d3ab8" style="{{'display:'+(scroll?'inline-flex':'flex')+';'+('white-space:'+(scroll?'nowrap':'normal')+';')+('height:'+(height)+';')}}"><block wx:for="{{tabs}}" wx:for-item="v" wx:for-index="i" wx:key="i"><view data-event-opts="{{[['tap',[['change',[i]]]]]}}" class="v-tabs__container-item data-v-552d3ab8" style="{{'color:'+(current==i?activeColor:color)+';'+('font-size:'+(current==i?fontSize:fontSize)+';')+('font-weight:'+(bold&&current==i?'bold':'')+';')+('justify-content:'+(!scroll?'center':'')+';')}}" bindtap="__e">{{''+(field?v[field]:v)+''}}</view></block><block wx:if="{{!pills}}"><view class="v-tabs__container-line data-v-552d3ab8" style="{{'background:'+(lineColor)+';'+('width:'+(lineWidth+'px')+';')+('height:'+(lineHeight)+';')+('border-radius:'+(lineRadius)+';')+('left:'+(lineLeft+'px')+';')+('transform:'+('translateX(-'+lineWidth/2+'px)')+';')}}"></view></block><block wx:else><view class="v-tabs__container-pills data-v-552d3ab8" style="{{'background:'+(pillsColor)+';'+('border-radius:'+(pillsBorderRadius)+';')+('left:'+(pillsLeft+'px')+';')+('width:'+(currentWidth+'px')+';')+('height:'+(height)+';')}}"></view></block></view></scroll-view></view>