A summary of the experience of the ivx monitor applet sliding to the top and bottom

The monitor applet slides to the top and bottom. In the case, it is mainly used for the pull-up loading and pull-down refresh of the applet page.

Pull-up loading means that the finger keeps sliding upwards. When the content is about to be displayed at the bottom of the screen, the page will continuously load new content until all the data is loaded. It is a paging method commonly used on mobile phones to obtain data. Usually It will be implemented with a "page number" parameter. The specific method has been described in detail in the previous page to obtain data. You can review it.

The drop-down refresh is like swiping Weibo or friends circle. When the user wants to see the latest content, the page will slide back to the top and then continue to pull down, the page will display the latest content at the top of the page.

In the small program case, we add an event to the page component and you can see the event options of pull-up bottom-up and pull-down refresh.
A summary of the experience of the ivx monitor applet sliding to the top and bottom
After selecting the event, add the corresponding action. Here is only a demonstration effect. We will pop up a bottom popup prompt when pulling up and bottom, and a top popup prompt when pulling down to refresh. The effect is as shown below.
A summary of the experience of the ivx monitor applet sliding to the top and bottom
A summary of the experience of the ivx monitor applet sliding to the top and bottom
This function itself is not complicated, it is just a monitoring event for user operation, and it is usually in conjunction with other actions to achieve specific logical functions. It should be noted that the direction of the finger operation is opposite to the response position of the page, and sliding up corresponds to the page Touching the bottom, and sliding your finger down corresponds to the top of the page.

Guess you like

Origin blog.51cto.com/14556317/2486026