Get the App
SLTechnology News&Howtos  ›  Development  › 

WeChat Mini Programs drop-down refresh how to do

Shulou Source: shulou.com Published: 2022-06-01 06:36:08 10月25日 Update

This article mainly introduces the relevant knowledge of how to do pull-down refresh of Weixin Mini Programs (Mini). The content is detailed and easy to understand. The operation is simple and fast. It has certain reference value. I believe everyone will gain something after reading this article on how to do pull-down refresh of Weixin Mini Programs. Let's take a look at it together.

onPullDownRefresh

Define onPullDownRefresh processing function in Page to listen for user pull-down refresh events of this page.

You need to enable PullDownRefresh in the window option of config.

wx.stopPullDownRefresh stops the pull-down refresh of the current page when the refresh process is complete.

wx.startPullDownRefresh(OBJECT)

Basic library 1.5.0 is supported, and lower versions need to be compatible

Start pull-down refresh, trigger pull-down refresh animation after calling, the effect is consistent with user manual pull-down refresh

Object Parameter Description:

Parameter type Required Description successFunction No Interface call successful callback function failFunction No Interface call failed callback function completeFunction No Interface call ended callback function (successful or failed call will be executed)

success Return parameter description:

Parameter Name Type Description errMsgString Interface Call Result

Example code:

wx.startPullDownRefresh()wx.stopPullDownRefresh()

Stop the current page pulldown refresh.

Example code:

Page({ onPullDownRefresh: function(){ wx.stopPullDownRefresh() }}) About "How to do Weixin Mini Programs (Mini) pull-down Refresh" The content of this article is introduced here. Thank you for reading! I believe everyone has a certain understanding of "how to do Weixin Mini Programs (Mini) pull-down refresh." If you still want to learn more knowledge, please pay attention to the industry information channel.

Tags: Drop-down programs functions parameters interfaces knowledge pages processing success code content users examples articles types consistency events value animation basics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Microsoft Redmi vpn macOS