From f6bb4dc04bd18288b7de3000eb8d4224f75e2a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A3=8A?= <1633537611@qq.com> Date: Tue, 16 Jan 2024 18:13:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9MouseEvent=E4=B8=BAPointerEve?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/general-event/general-event.uvue | 8 ++++---- pages/tabBar/API.uvue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/component/general-event/general-event.uvue b/pages/component/general-event/general-event.uvue index 333f8d25..7e8cefd1 100644 --- a/pages/component/general-event/general-event.uvue +++ b/pages/component/general-event/general-event.uvue @@ -130,9 +130,9 @@ longPressEvent: null as TouchEvent | null, touchEndEvent: null as TouchEvent | null, onTapTime: 0, - tapEvent: null as MouseEvent | null, + tapEvent: null as PointerEvent | null, onClickTime: 0, - clickEvent: null as MouseEvent | null, + clickEvent: null as PointerEvent | null, onLongPressTime: 0, } }, @@ -161,12 +161,12 @@ this.onTouchEndTime = Date.now() console.log('onTouchEnd') }, - onTap(e : MouseEvent) { + onTap(e : PointerEvent) { this.tapEvent = e this.onTapTime = Date.now() console.log('onTap') }, - onClick(e : MouseEvent) { + onClick(e : PointerEvent) { this.clickEvent = e this.onClickTime = Date.now() console.log('onClick') diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index 1aaa6177..26c6f9d6 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -537,7 +537,7 @@ hidePop: function () { (this.$refs["pop"] as Element).style.setProperty("display", "none") }, - stopClickPop: function (e : MouseEvent) { + stopClickPop: function (e : PointerEvent) { e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件 } }, -- GitLab