From d5d9984ae53f1601e3d26d5a3653cf4e566e050f Mon Sep 17 00:00:00 2001 From: Zhoujiahui <539943419@qq.com> Date: Wed, 28 Aug 2024 11:52:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/miaoContextMenu.vue | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/miaoContextMenu.vue b/src/components/miaoContextMenu.vue index ce9434b..73f2466 100644 --- a/src/components/miaoContextMenu.vue +++ b/src/components/miaoContextMenu.vue @@ -27,7 +27,7 @@ const x = ref(0) const y = ref(0) const showContextMenu = ref(0) // 长按计时器 -let timer_touch: string | number | NodeJS.Timeout | undefined +// let timer_touch: string | number | NodeJS.Timeout | undefined const onClickoutside = async () => { showContextMenu.value = 0 @@ -57,25 +57,25 @@ const handleContextMenu = (e: MouseEvent) => { }) } -const handleTouchStart = (e: TouchEvent) => { - if(props.touchTimeOut === undefined) { - return - } - timer_touch ?? clearTimeout(timer_touch) - timer_touch = setTimeout(() => { - showContextMenu.value = 1 - x.value = e.targetTouches[0].clientX - y.value = e.targetTouches[0].clientY - }, props.touchTimeOut) -} +// const handleTouchStart = (e: TouchEvent) => { +// if(props.touchTimeOut === undefined) { +// return +// } +// timer_touch ?? clearTimeout(timer_touch) +// timer_touch = setTimeout(() => { +// showContextMenu.value = 1 +// x.value = e.targetTouches[0].clientX +// y.value = e.targetTouches[0].clientY +// }, props.touchTimeOut) +// } -const handleTouchEnd = () => { - if(timer_touch) { - clearTimeout(timer_touch) - timer_touch = undefined - } +// const handleTouchEnd = () => { +// if(timer_touch) { +// clearTimeout(timer_touch) +// timer_touch = undefined +// } -} +// }