swan.stopPullDownRefresh

解释: 停止当前页面下拉刷新。

方法参数

示例

在开发者工具中预览效果

扫码体验

swan.stopPullDownRefresh - 图1请使用百度APP扫码

代码示例

  1. <view class="card-area">
  2. <view class="page-info">下拉页面/点击按钮即可刷新</view>
  3. <button bind:tap="startPullDownRefresh" disabled="{{disabled}}" hover-stop-propagation="true" type='primary'>开始刷新</button>
  4. <button bind:tap="stopPullDownRefresh" hover-stop-propagation="true" type='primary'>停止刷新</button>
  5. </view>
  1. Page({
  2. startPullDownRefresh() {
  3. swan.startPullDownRefresh();
  4. },
  5. stopPullDownRefresh() {
  6. swan.stopPullDownRefresh({
  7. success: res => {
  8. console.log('stopPullDownRefresh success');
  9. },
  10. fail: err => {
  11. console.log('stopPullDownRefresh fail', err);
  12. }
  13. });
  14. }
  15. });

错误码

Android

错误码说明
1001执行失败

iOS

错误码说明
201解析失败,请检查调起协议是否合法