<!--packageE/tabcontrol/tabcontrol.wxml-->
<view class="component-wrapper">

  <!--选项卡静态-->
  <view>
    <view class="tab">
      <view class="ul tab_list" style="min-height: {{datas.is_tab_high ? '' :'100vh'}}">
        <van-tabs active="{{active}}"
                  swipeable sticky="{{btnFlag}}"
                  bind:change="onClick"
                  color="{{datas.tab_active_color}}"
                  tab-class="tag"
                  swipe-threshold="4">
          <van-tab title="{{item.text}}" wx:for="{{datas.list}}"  name="{{index}}" wx:key="index" title-style="padding: 0;overflow: visible;white-space: nowrap;text-overflow: clip;background: {{datas.tab_bg_color}};color:{{active==index?datas.tab_active_color:datas.tab_color}};">
            <block wx:if="{{show_page}}">
              <view class="tab-item">
                <cpslist datas="{{goodsData}}" ratio_data="{{ratio_data}}"></cpslist>
              </view>
            </block>

            <block wx:if="{{!show_page}}">
              <view style="padding: 100px 15px;text-align: center;background-color: {{datas.tab_bg_color}}">
                {{show_text}}
              </view>
            </block>
          </van-tab>
        </van-tabs>
      </view>

      <view wx:if="{{datas.list.length <= 1 && datas.list[0] && !datas.list[0].text}}"
           style="padding: 100px 15px;text-align: center;background-color: {{datas.tab_bg_color}}" >
        暂无设置商品数据
      </view>

    </view>

    <view wx:if="{{!isLast}}">
      <view class="loadMore" wx:if="{{isLoadMore}}" catchtap="getMoreData">
       加载更多
      </view>
      <view class="loadMore" wx:if="{{bottomShowBolIndex == index && !isLoadMore}}">
        没有更多了
      </view>
    </view>
  </view>
</view>
