在遮罩层添加 (前提使用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>

 

相关文章:

  • 2021-09-02
  • 2021-12-19
  • 2021-12-19
  • 2022-12-23
  • 2022-02-10
  • 2021-08-31
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案