企业网站内容如何更新,网站建设自己能做吗,免费开店的外贸平台,google谷歌使用 touchmove.stop.preventtoMoveHandle 事件修饰符
若需要禁止蒙版下的页面滚动#xff0c;可使用 touchmove.stop.preventmoveHandle#xff0c;moveHandle 可以用来处理 touchmove 的事件#xff0c;也可以是一个空函数。将这个方法直接丢到弹…使用 touchmove.stop.preventtoMoveHandle 事件修饰符
若需要禁止蒙版下的页面滚动可使用 touchmove.stop.preventmoveHandlemoveHandle 可以用来处理 touchmove 的事件也可以是一个空函数。将这个方法直接丢到弹窗的最外层 view 就好了虽然在编译器上的滚轮依旧可以滚动但真机环境下的手指滑动无法再触发。
为兼容各端事件需使用 的方式绑定请勿使用小程序端的 bind 和 catch 进行事件绑定也不能在 JS 中使用 event.preventDefault() 和 event.stopPropagation() 方法。
注意如果使用 uview 之类的 ui 框架touchmove.stop.prevent 必须放在底层的 view 上面。由于大部分的 ui 框架结构复杂很容易不生效建议自己写一个遮罩层再加上这个事件这样的话就能正常生效了。
!-- 弹窗 --
view classpop-box touchmove.stop.preventtoMoveHandle/view
toMoveHandle() {},
更多可参考介绍 | uni-app官网