提交 f6bb4dc0 编写于 作者: 张磊

修改MouseEvent为PointerEvent

上级 848dc9e1
...@@ -130,9 +130,9 @@ ...@@ -130,9 +130,9 @@
longPressEvent: null as TouchEvent | null, longPressEvent: null as TouchEvent | null,
touchEndEvent: null as TouchEvent | null, touchEndEvent: null as TouchEvent | null,
onTapTime: 0, onTapTime: 0,
tapEvent: null as MouseEvent | null, tapEvent: null as PointerEvent | null,
onClickTime: 0, onClickTime: 0,
clickEvent: null as MouseEvent | null, clickEvent: null as PointerEvent | null,
onLongPressTime: 0, onLongPressTime: 0,
} }
}, },
...@@ -161,12 +161,12 @@ ...@@ -161,12 +161,12 @@
this.onTouchEndTime = Date.now() this.onTouchEndTime = Date.now()
console.log('onTouchEnd') console.log('onTouchEnd')
}, },
onTap(e : MouseEvent) { onTap(e : PointerEvent) {
this.tapEvent = e this.tapEvent = e
this.onTapTime = Date.now() this.onTapTime = Date.now()
console.log('onTap') console.log('onTap')
}, },
onClick(e : MouseEvent) { onClick(e : PointerEvent) {
this.clickEvent = e this.clickEvent = e
this.onClickTime = Date.now() this.onClickTime = Date.now()
console.log('onClick') console.log('onClick')
......
...@@ -537,7 +537,7 @@ ...@@ -537,7 +537,7 @@
hidePop: function () { hidePop: function () {
(this.$refs["pop"] as Element).style.setProperty("display", "none") (this.$refs["pop"] as Element).style.setProperty("display", "none")
}, },
stopClickPop: function (e : MouseEvent) { stopClickPop: function (e : PointerEvent) {
e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件 e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件
} }
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册