From 4c382abfd393d210947c9ec52bc53b97f9b9c682 Mon Sep 17 00:00:00 2001 From: XHY Date: Wed, 4 Sep 2024 17:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20touch-event.uvue=20?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=20=E6=B7=BB=E5=8A=A0=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=81=BF=E5=85=8D=E5=9C=A8Android=20?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/global-events/touch-events.uvue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/component/global-events/touch-events.uvue b/pages/component/global-events/touch-events.uvue index 15b675a2..87fef376 100644 --- a/pages/component/global-events/touch-events.uvue +++ b/pages/component/global-events/touch-events.uvue @@ -39,10 +39,11 @@ }, onReady() { this.icon = uni.getElementById("icon") - this.iconRect = this.icon.getBoundingClientRect() - + // #ifdef APP-IOS + this.iconRect = this.icon?.getBoundingClientRect() // 加上导航栏及状态栏高度 - this.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44 + this.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44 + // #endif }, methods: { onViewTouchStart(e : TouchEvent) { -- GitLab