vue 遮罩层阻止默认滚动事件

在写移动端页面的时候,弹出遮罩层后,我们仍然可以滚动页面。 
vue中提供 @touchmove.prevent 方法可以完美解决这个问题

<div class="dialog" @touchmove.prevent ></div>

或者给不需要滚动的部分加上overflow:hidden属性解决

相关文章:

  • 2022-12-23
  • 2022-02-11
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-20
  • 2021-12-25
猜你喜欢
  • 2021-12-19
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-04-12
相关资源
相似解决方案