小程序上拉下拉共存时不可使用scroll-view的解决方法
来源:互联网 发布:淘宝开店审核要多久 编辑:程序博客网 时间:2024/05/16 13:55
使用bindscrolltolower
,必须搭配使用的scroll-view
会导致小程序"enablePullDownRefresh": true
下拉不能使用。
解决方法,就是当两者同时存在时,改scroll-view
为view
,改bindscrolltolower
为onReachBottom
函数。
这样在上拉加载,跟下拉刷新同时存在的时候,"enablePullDownRefresh": true
就可以生效了。
- wxml
<view class="scroll-view"> <view class="view-item"><text>text1</text></view> <view class="view-item"><text>text2</text></view> <view class="view-item"><text>text3</text></view> <view class="view-item"><text>text4</text></view> <view class="view-item"><text>text5</text></view> <view class="view-item"><text>text6</text></view> <view class="view-item"><text>text7</text></view> <view class="view-item"><text>text8</text></view> <view class="view-item"><text>text9</text></view></view>
- wxss
.scroll-view { height: 1300rpx; } .view-item { width: 33.333333%; height: 300rpx; float: left; color: #ffff; background: #888; }
- js
Page({ data: { }, onLoad: function(option) { wx.request({ }, success: function(res) { } }); }, // 加载数据函数 onReachBottom: function(event) { console.log("滚到底了"); }, })
0 0
- 小程序上拉下拉共存时不可使用scroll-view的解决方法
- 小程序 使用scroll-view实现上拉加载,下拉刷新
- 小程序中scroll-view的使用
- 微信小程序中使用scroll-view控件实现上拉加载更多遇到的坑
- xlistview的使用(上拉下拉)
- 小程序scroll-view上下滑的内部加左右滑,scroll-x生效的情况
- 微信小程序上拉刷新和下拉加载2种方法实现,onPullDownRefresh,scroll-view使用
- 小程序 scroll-view
- 微信小程序-scroll-view横向滚动和上拉加载
- iscroll.js的上拉下拉刷新时无法回弹的解决方法
- iscroll.js的上拉下拉刷新时无法回弹的解决方法
- 上拉下拉的原理
- ListView的上拉下拉
- 使用SwipeToLoadLayout解决RecyclerView的上拉下拉刷新
- 微信小程序 上拉下拉不会断
- 小程序scroll-view示例
- pullToRefresh使用(实现listview上拉下拉)
- pullToRefresh使用(实现listview上拉下拉)
- Oracle中查看所有表和字段(转载)
- 时间转换成毫秒
- magento缓存系列详解:clean cache
- 人眼特性
- SQL处理并发之乐观锁
- 小程序上拉下拉共存时不可使用scroll-view的解决方法
- 单例模式
- Linux虚拟机配置固定IP地址
- Android studio T-MVP模式
- php各个版本下载网址
- JAVA对象jackson序列化json属性名变成小写的解决方案
- java常量类的一种定义方式
- Ununtu12.04 安装openJdk1.7
- 关于ios 里的self