收藏
回答

怎么做一个动态选项卡?

   <scroll-view class="scroll-wrapper" scroll-x scroll-with-animation="true" scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}">

      <view class="navigate-item" id="item{{index}}" wx:for="{{tabList}}" wx:key="index" data-index="{{index}}" bindtap="handleClick" data-id="{{item.categoryId}}">

        <view class="names {{currentTab === index ? 'active' : ''}}">{{item.categoryName}}</view>

        <view class="currtline {{currentTab === index ? 'active' : ''}}"></view>

      </view>

    </scroll-view>

    <swiper class="xxklist" indicator-dots="{{false}}" bindchange="handleSwiper" currenta="{{currentTab}}" >

<block wx:for="{{tabList}}" wx:key="idx" >

<swiper-item style="overflow: scroll;">

<scroll-view >

<view class="swiper-item" wx:for="{{tabList_b}}">{{item.title}}</view>

<view class="swiper-item" style="color: brown;">点击更多</view>

</scroll-view>

</swiper-item>

</block>

</swiper>

</scroll-view>

像这样的选项卡如何做呢?最新动态、就业动态 是一级目录类型,后台输出。

默认第一页为最新动态,点击就业动态,切换到就业动态选项卡,左右滑动出现相应的选项卡,列表的新闻是对应一级目录类型的ID的,

然后比如在就业动态列表点击更多按钮,就加载就业动态的列表更多出来。


回答关注问题邀请回答
收藏
登录 后发表内容