提交 15fd2049 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(hover): 处理 touch mouse 同时触发问题

上级 8ef4bab1
...@@ -33,7 +33,10 @@ export default { ...@@ -33,7 +33,10 @@ export default {
}, },
_hoverMousedown (evt) { _hoverMousedown (evt) {
evt.preventDefault() if (this._hoverTouch) {
return
}
this._handleHoverStart(evt) this._handleHoverStart(evt)
window.addEventListener('mouseup', this._hoverMouseup) window.addEventListener('mouseup', this._hoverMouseup)
}, },
...@@ -59,6 +62,10 @@ export default { ...@@ -59,6 +62,10 @@ export default {
}, },
_hoverMouseup () { _hoverMouseup () {
if (!this._hoverTouch) {
return
}
this._handleHoverEnd() this._handleHoverEnd()
window.removeEventListener('mouseup', this._hoverMouseup) window.removeEventListener('mouseup', this._hoverMouseup)
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册