Web禁止移动事件穿透

2018-04-20  本文已影响28人  Micro同学

今天使用mint-ui的时候发现picker弹起之后进行滑动,后面的页面也会滑动。
故解决方法如下

html
<div @touchmove.native="stopTouch"></div>
js(vue.js)
methods: {
    stopTouch (e) {
        e.stopPropagation()
        e.preventDefault()
    }
}
上一篇 下一篇

猜你喜欢

热点阅读