From e7e22d72a63b60fa7a635079cb123aa512da875f Mon Sep 17 00:00:00 2001
From: zhenyuWang <13641039885@163.com>
Date: Wed, 30 Aug 2023 15:40:09 +0800
Subject: [PATCH] feat: touchcancel
---
.../general-event/general-event.uvue | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/pages/component/general-event/general-event.uvue b/pages/component/general-event/general-event.uvue
index 756a320d..de2c3650 100644
--- a/pages/component/general-event/general-event.uvue
+++ b/pages/component/general-event/general-event.uvue
@@ -8,6 +8,7 @@
+
+ touchCancel Event:
+ touches:
+
+ touch[{{ index }}]:
+ pageX: {{ touch.pageX }}, pageY: {{ touch.pageY }}
+ clientX: {{ touch.clientX }}, clientY: {{ touch.clientY }}
+ screenX: {{ touch.screenX }}, screenY: {{ touch.screenY }}
+
+ changedTouches:
+
+ touch[{{ index }}]:
+ pageX: {{ touch.pageX }}, pageY: {{ touch.pageY }}
+ clientX: {{ touch.clientX }}, clientY: {{ touch.clientY }}
+ screenX: {{ touch.screenX }}, screenY: {{ touch.screenY }}
+
+
touchMove Event:
touches:
@@ -161,6 +193,7 @@ export default {
title: 'general-event',
onTouchStartTime: 0,
touchStartEvent: null as TouchEvent | null,
+ touchCancelEvent: null as TouchEvent | null,
onTouchMoveTime: 0,
touchMoveEvent: null as TouchEvent | null,
onTouchEndTime: 0,
@@ -179,6 +212,10 @@ export default {
this.onTouchStartTime = Date.now()
console.log('onTouchStart')
},
+ onTouchCancel(e: TouchEvent){
+ this.touchCancelEvent = e
+ console.log('onTouchCancel')
+ },
onTouchMove(e: TouchEvent){
this.touchMoveEvent = e
this.onTouchMoveTime = Date.now()
--
GitLab