微信小程序 swiper scroll-view height设置自适应 tab选项卡

滑动tab选项卡 高度不能自适应问题

wxml

<swiper id="swiper1" bindchange="intervalChange" current="{{mycurrent}}" style="height: {{clientHeight?clientHeight+'px':'auto'}}">

  
  <swiper-item class="slide-swiper">
    <scroll-view scroll-y="{{true}}" style="height: {{clientHeight?clientHeight+'px':'auto'}}">

      
      <view class="kong">view>
      <view class="classname" wx:for="{{arr}}" wx:key="" catchtap="oncopydels" data-jc="{{item.FRJ_RJQC}}">
        <view class="title">{{item.FRJ_RJQC}}view>
        <view class="smalltitle" hidden="{{show}}">
          <view class="jc">软件简称:view>
          <view class="jc">{{item.FRJ_RJJC}}view>
        view>
        <view class="smalltitle" hidden="{{shows}}">
          <view class="jc">软件简称:view>
          <view class="jc">暂无信息view>
        view>
        <view class="smalltitle">
          <view class="jc">登记号:view>
          <view class="jc">{{item.FRJ_DJH}}view>
        view>
        <view class="smalltitle">
          <view class="jc">登记批准日期:view>
          <view class="jc">{{item.FRJ_IDT}}view>
        view>
      view>
    scroll-view>
  swiper-item>

  

  
  <swiper-item class="slide-swiper">
    <scroll-view scroll-y="{{true}}" style="height: {{clientHeight?clientHeight+'px':'auto'}}">

      
      <view class="kong">view>
      <view class="classname" wx:for="{{proCopyRight}}" wx:key="proItem.FZD_ZPMC" wx:for-item="proItem" data-name="{{proItem.FZD_ZPMC}}" catchtap="proCopyRightTap">
        <view class="title">{{proItem.FZD_ZPMC}}view>
        <view class="smalltitle">
          <view class="jc">类型:view>
          <view class="jc">{{proItem.FZD_ZPLB}}view>
        view>
        <view class="smalltitle">
          <view class="jc">登记号:view>
          <view class="jc">{{proItem.FZD_DJH}}view>
        view>
        <view class="smalltitle">
          <view class="jc">登记日期:view>
          <view class="jc">{{proItem.FZD_DJDATE}}view>
        view>
        <view class="smalltitle">
          <view class="jc">完成日期:view>
          <view class="jc">{{proItem.FZD_CZWCDATE}}view>
        view>
        <view class="smalltitle">
          <view class="jc">首次发表日期:view>
          <view class="jc">{{proItem.FZD_FBDATE}}view>
        view>
      view>
    scroll-view>
  swiper-item>

  
swiper>

js

 wx.getSystemInfo({
      success: function (res) {
        that.setData({
          clientHeight: res.windowHeight
        });
      }
    });

说明:
swiper组件包含scroll-view
是这次的纠结点

如果你认为我做的这些对你来说是有价值的,并鼓励我进行更多开源,那你可以资助我,就算是一杯咖啡…

微信小程序 swiper scroll-view height设置自适应 tab选项卡_第1张图片

你可能感兴趣的:(微信小程序)