tabs+吸顶

tabs使用

<scroll-view scroll-x class="bg-white nav scrollxclass">
  <view class="flex text-center">
    <view class="cu-item {{0==TabCur?'text-green cur':''}} flex-sub" bindtap="tabSelect" data-id="0">
      <text class="cuIcon-locationfill"></text> 待签到
    </view>
    <view class="cu-item {{1==TabCur?'text-green cur':''}} flex-sub" bindtap="tabSelect" data-id="1">
      <text class="cuIcon-squarecheckfill"></text> 已签到
    </view>
  </view>
</scroll-view>

<view wx:if="{{TabCur==0}}">
	<view>块1</view>
</view>
<view wx:if="{{TabCur==1}}">
 	<view>块2</view>
</view>

<scroll-view>这里是colorui的样式,我们可以利用wx:if配合tab使用,点击那个就显示出那个

linui和colorui的配合使用,实现tab吸顶

<l-sticky scrollTop="{{scrollTop}}" mode="css">
 <l-sticky-item top="60" l-header-sticky-class="l-header-sticky-class">
    <scroll-view scroll-x class="bg-white nav scrollxclass" slot="header">
      <view class="flex text-center">
        <view class="cu-item {{0==TabCur?'text-green cur':''}} flex-sub" bindtap="tabSelect" data-id="0">
          <text class="cuIcon-locationfill"></text> 待签到
        </view>
        <view class="cu-item {{1==TabCur?'text-green cur':''}} flex-sub" bindtap="tabSelect" data-id="1">
          <text class="cuIcon-squarecheckfill"></text> 已签到
        </view>
      </view>
    </scroll-view>
    <view style="margin-top:30rpx" slot="body">
      <view wx:if="{{TabCur==0}}">
        <block wx:for="{{unsignlist}}" wx:for-item='item'>
          <view class="unsignitem">
            <view class="unsigncontent">
              <text class="cuIcon-btn text-green"></text>
              <text class="text-grey">{{item.title}}</text>
            </view>
            <view class="action">
              <button style="width:18vw" class="cu-btn round bg-gradual-blue" data-lid="{{item.lid}}"
                data-locax="{{item.location_x}}" data-locay="{{item.location_y}}" data-range="{{item.rangement}}"
                bindtap="gotonowpoint">去签到</button>
            </view>
          </view>
        </block>
      </view>
      <view wx:if="{{TabCur==1}}">
        <block wx:if="{{launch_len == 0}}">
          <view class='hasNoData'>
            <image class='noDataIcon ' src='../../images/nomessage.png'></image>
            <view class='noDataInfo text-grey'>今日未发起签到</view>
          </view>
        </block>
        <block wx:elif="{{launch_len != 0}}">
          <l-sticky bind:linunsticky="linunsticky" bind:linsticky="linsticky" scrollTop="{{scrollTop}}" mode="js">
            <l-sticky-item l-header-sticky-class="l-header-sticky-class">
              <view slot="body" class="dynamic-card-body">
                <block wx:for="{{recordList}}" wx:for-item='item'>
                  <l-card plaintext l-class="card" style="width:100vw; margin-top:10rpx;" data-lid="{{item.lid}}"
                    data-title="{{item.title}}" bindtap="showDetail">
                    <view class="cu-item shadow">
                      <view class="flex solid-bottom justify-between" style="align-items:center;">
                        <view class="text-black text-bold text-xl">{{item.title}}</view>
                        <view class="cu-tag bg-{{item.linktype==1?'red':'green'}} light sm round">
                          {{item.linktype==1?'上课签到':'下课签到'}}</view>
                      </view>
                      <view class="desc text-grey">
                        <view class="content margin-top text-sm">发起人:<view class=" text-black">{{item.name}}
                          </view>
                        </view>
                        <view class="content margin-top-sm"> 签到时间:<view class=" text-black">{{item.signintime}}
                          </view>
                        </view>
                        <view class="content margin-top-sm"> 签到说明:<view class=" text-black">
                            {{item.caption==''?'暂无说明':item.caption}}
                          </view>
                        </view>
                      </view>
                    </view>
                  </l-card>
                </block>
              </view>
            </l-sticky-item>
          </l-sticky>
        </block>
      </view>
    </view>
  </l-sticky-item>
</l-sticky>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_42955958

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值