分享者:kingrome2017,来自原文地址
滑动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'}}">
<!--撑出top高度-->
<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'}}">
<!--撑出top高度-->
<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 是这次的纠结点