阻止小程序遮罩层下方图层滚动

技术图片

原因是因为:

  touchmove事件冒泡;
解决方案:

  阻止遮罩层冒泡,在小程序里面 利用catch+事件名就可以阻止冒泡,

  所以 在遮罩层填上事件 

    catchtouchmove="preventdefault"
  小程序1.5.0后可以写上
    capture-catch:touchmove="preventdefault"

完美 哈哈;

相关文章