欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 微信开发 > 微信小程序 swiper scroll-view height设置自适应

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

微信小程序 swiper scroll-view height设置自适应

发布时间:2020-11-24  

分享者: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  是这次的纠结点