小程序中弹框遮罩滑动穿透解决方案

1、在 遮罩层 设置 catchtouchmove 函数

<view class='{{cover}}' data-id='first' catchtouchmove="preventD"></view>

    在 js 页面设置该函数

preventD: function() {
    return
},

2、在 弹框 的最外层 view 设置如下

<view class="changeCon {{changeConIn}}" id="overlay" catchtouchmove="false">
</view>

即可。

猜你喜欢

转载自blog.csdn.net/BetterGG/article/details/81358565
今日推荐