Small micro-channel pull-down analog scroll-view program and the refresh LAC upload

scroll-view can not pull down to refresh and on ECLAC carrier.

<scroll-view class="content"  scroll-y="true" scroll-with-animation="true" @touchstart="handleScrollStart"  @touchend="handleScrollEnd"></scroll-view>

handleScrollStart:function(e){
      let _this = this;
      let moveStartY = e.changedTouches[0].pageY;
      _this.moveStartY = moveStartY;
},
 handleScrollEnd:function(e){
       let _this = this;
       let moveEndY =  e.changedTouches[0].pageY;
       
       //下滑
      if(moveEndY - _this.moveStartY > 200){
            uni.startPullDownRefresh();
           ...
      }

   	 //上划
      if( _this.moveStartY - moveEndY > 200 ){
            ...
     }
}

However, this method will lead to the user's normal paddling page can also trigger events, less desirable.

Published 258 original articles · won praise 21 · views 50000 +

Guess you like

Origin blog.csdn.net/wsln_123456/article/details/104613243