小程序 swiper和scroll-view的区别

小程序 swiper和scroll-view的区别,第1张

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

<!--软件著作权-->

<swiper-item class="slide-swiper">

<scroll-view scroll-y="{{true}}" style="height: {{clientHeightclientHeight+'px':'auto'}}">

<!--撑出top高度-->

<view class="kong"></view>

<view class="classname" wx:for="{{arr}}" wx:key="" catchtap="oncopydels" data-jc="{{itemFRJ_RJQC}}">

<view class="title">{{itemFRJ_RJQC}}</view>

<view class="smalltitle" hidden="{{show}}">

<view class="jc">软件简称:</view>

<view class="jc">{{itemFRJ_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">{{itemFRJ_DJH}}</view>

</view>

<view class="smalltitle">

<view class="jc">登记批准日期:</view>

<view class="jc">{{itemFRJ_IDT}}</view>

</view>

</view>

</scroll-view>

</swiper-item>

<!--/软件著作权-->

<!--作品著作权-->

<swiper-item class="slide-swiper">

<scroll-view scroll-y="{{true}}" style="height: {{clientHeightclientHeight+'px':'auto'}}">

<!--撑出top高度-->

<view class="kong"></view>

<view class="classname" wx:for="{{proCopyRight}}" wx:key="proItemFZD_ZPMC" wx:for-item="proItem" data-name="{{proItemFZD_ZPMC}}" catchtap="proCopyRightTap">

<view class="title">{{proItemFZD_ZPMC}}</view>

<view class="smalltitle">

<view class="jc">类型:</view>

<view class="jc">{{proItemFZD_ZPLB}}</view>

</view>

<view class="smalltitle">

<view class="jc">登记号:</view>

<view class="jc">{{proItemFZD_DJH}}</view>

</view>

<view class="smalltitle">

<view class="jc">登记日期:</view>

<view class="jc">{{proItemFZD_DJDATE}}</view>

</view>

<view class="smalltitle">

<view class="jc">完成日期:</view>

<view class="jc">{{proItemFZD_CZWCDATE}}</view>

</view>

<view class="smalltitle">

<view class="jc">首次发表日期:</view>

<view class="jc">{{proItemFZD_FBDATE}}</view>

</view>

</view>

</scroll-view>

</swiper-item>

<!--/作品著作权--></swiper>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566

js

wxgetSystemInfo({      success: function (res) {

thatsetData({

clientHeight: reswindowHeight

});      }

});1234567

说明: 

swiper组件包含scroll-view 

是这次的纠结点

在设计小程序页面的时候,想要设置滚动页面左右滚动,写了scroll-view的scroll-x,但是还是不能左右滚动。测试很多style样式,最后发现设置了min-width就可以实现滚动。

class样式:

效果如下:

以上就是关于小程序 swiper和scroll-view的区别全部的内容,包括:小程序 swiper和scroll-view的区别、小程序滚动页面不能滚动解决方案一、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/10624283.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-10
下一篇2023-05-10

发表评论

登录后才能评论

评论列表(0条)

    保存