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

原因是因为:

  touchmove事件冒泡;
解决方案:

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

  所以 在遮罩层填上事件 

    catchtouchmove="preventdefault"
  小程序1.5.0后可以写上
    capture-catch:touchmove="preventdefault"
完美 哈哈;
posted @ 2019-08-24 18:09  仙乄  阅读(673)  评论(0编辑  收藏  举报