WeChat applet sliding penetration problem using catchtouchmove

Problem recurring:
Insert picture description here

The top category can be slid to the scroll-view for another category. The part in the circle in the figure is just a small area that slides horizontally, and there is no need to slide to the end to switch categories.

Solution:

<scroll-view class="fdlist" scroll-x="true" catchtouchmove='catchTouchMove'>
Add the catchtouchmove event to scroll-view
and add this function to js

	catchTouchMove: function() {
	    return false;
	  },

Guess you like

Origin blog.csdn.net/qq_45432996/article/details/107845366