wpfw_ewei_wxapp/pages/diy/template/tpl_tabbar.wxml
2023-02-26 08:10:18 +08:00

29 lines
3.0 KiB
Plaintext

<view class="fui-tabbar style1" style="background: {{diyitem.style.bgd==1?'transparent':''}}" wx:if="{{diyitem.id=='tabbar'&&diyitem.style.showtype=='1'}}">
<block wx:for="{{diyitem.data}}" wx:for-item="items" wx:key="index">
<view bindtap="tabwidget" class="item" data-id="{{diyitemid}}" data-type="{{index}}" data-url="{{items.linkurl}}" style="background:{{diyitem.style.bgd==0||!diyitem.style.bgd?diyitem.style.background:'transparent'}};{{diyitem.data.length<=4?'flex: 1;':'flex-shrink:0;'}}{{index==0?'color:'+diyitem.style.activecolor+';background:'+diyitem.style.activebackground+';border-color:'+diyitem.style.activecolor:'color:'+diyitem.style.color+';'}}" wx:if="{{diyitem.status==undefined||diyitem.status==''||!diyitem.status}}">
{{items.text||'选项'}}
</view>
<view bindtap="tabwidget" class="item" data-id="{{diyitemid}}" data-type="{{index}}" data-url="{{items.linkurl}}" style="background:{{diyitem.style.bgd==0||!diyitem.style.bgd?diyitem.style.background:'transparent'}};{{diyitem.data.length<=4?'flex: 1;':'flex-shrink:0;'}}{{diyitem.status==index?'color:'+diyitem.style.activecolor+';background:'+diyitem.style.activebackground+';border-color:'+diyitem.style.activecolor:'color:'+diyitem.style.color+';'}}" wx:if="{{diyitem.status}}">
{{items.text||'选项'}}
</view>
</block>
</view>
<view class="fui-tabbar style2" style="background: {{diyitem.style.bgd==1?'transparent':''}}" wx:if="{{diyitem.id=='tabbar'&&diyitem.style.showtype=='2'}}">
<block wx:for="{{diyitem.data}}" wx:for-item="items" wx:key="index">
<view bindtap="tabwidget" class="item" data-id="{{diyitemid}}" data-type="{{index}}" data-url="{{items.linkurl}}" style="background:{{diyitem.style.bgd==0||!diyitem.style.bgd?diyitem.style.background:'transparent'}};{{diyitem.data.length<=4?'flex: 1;':'flex-shrink:0;'}}{{index==0?'color:'+diyitem.style.activecolor+';background:'+diyitem.style.activebackground+';border-color:'+diyitem.style.activecolor:'color:'+diyitem.style.color+';'}}" wx:if="{{diyitem.status==undefined||diyitem.status==''||!diyitem.status}}">
{{items.text||'选项'}}
</view>
<view bindtap="tabwidget" class="item" data-id="{{diyitemid}}" data-type="{{index}}" data-url="{{items.linkurl}}" style="background:{{diyitem.style.bgd==0||!diyitem.style.bgd?diyitem.style.background:'transparent'}};{{diyitem.data.length<=4?'flex: 1;':'flex-shrink:0;'}}{{diyitem.status==index?'color:'+diyitem.style.activecolor+';background:'+diyitem.style.activebackground+';border-color:'+diyitem.style.activecolor:'color:'+diyitem.style.color+';'}}" wx:if="{{diyitem.status}}">
{{items.text||'选项'}}
</view>
</block>
</view>
<block wx:for="{{diyitem.data}}" wx:for-item="items" wx:key="index">
<view wx:if="{{diyitem.status==''||diyitem.status==undefined}}">
<include src="/pages/diy/template/tpl_tabbarlist.wxml" wx:if="{{index==0}}"></include>
</view>
<view wx:else>
<include src="/pages/diy/template/tpl_tabbarlist.wxml" wx:if="{{diyitem.status==index}}"></include>
</view>
</block>