防止穿透滚动在非内容区域加一个方法 catchtouchmove="preventD" ,双引号中是方法名称,可以自定义 具体代码如下
wxml
<view wx:if="{{showPost}}" class="poster-wrap" catchtouchmove="preventD">
<view class="poster-content-wrap">
<view class="poster-content" catchtouchmove="preventD">
<view>弹窗内容</view>
</view>
</view>
</view>
JS
preventD(){
return
}