onReachBottom Notes

onReachBottomPrecautions can be defined in the bottom of the page pages.json in particular trigger distance onReachBottomDistance when, for example, is set to 50, then scroll to the distance from the bottom 50px, it will trigger onReachBottom event.

Such as using scroll-view does not cause the page to scroll, then bottomed out event will not be triggered. Scroll scroll-view event in the end section of the scroll-view please refer to the documentation

onPageScroll (Listen scroll, scroll listening, scroll event) Parameters:

Attributes Types of Explanation
scrollTop Number Page has been scrolled vertically distance (px)

note

  • onPageScrollDo not write in complex interaction js, for example, frequently modify the page. Because the life cycle is triggered in the rendering layer, a non-terminal h5, js is performed at the logical level, the communication between the two is lossy. If during scrolling, frequent trigger data exchange between the two may cause Caton.
  • If you want to achieve transparent gradient title bar when scrolling in App and H5, configurable type under titleNView is transparent, in pages.json of reference .
  • If you need to scroll ceiling fixed some of the elements recommended viscosity css layout, refer to plug-in market . Plug-market also has other plug-ceiling js achieve, but poor performance, self-searching when needed.
  • In the App, small micro-channel program, H5 may also be used to scroll wxs monitor, the reference ; in app-nvue may be used to listen bindingx scroll reference .
  • onPageScroll: function (E) { // nvue monitor does not support scrolling, can be used instead of bindingx 
        console.log ( "scrolling distance is:" + e.scrollTop); 
    },

     

Guess you like

Origin www.cnblogs.com/lst619247/p/11939894.html