在遮罩层添加 (前提使用vue)@touchmove.prevent
HTML:
<!--plan A--> <div class="overlayer" @touchmove.prevent > <div class="popup"> 如果在这个div中滑动,触发的事件会经过overlayer,可以屏蔽滑动 </div> </div> <!--plan B--> <div class="overlayer" @touchmove.prevent > </div> <div class="popup" @touchmove.prevent> 如果在这个div中滑动,触发的事件也会被禁用默认行为, 也可以屏蔽滑动 </div>