From 742aa9e55f22583f11974302ab83ed4d9a5da5d9 Mon Sep 17 00:00:00 2001 From: taohebin Date: Mon, 21 Oct 2024 12:18:36 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=20overflow-visible-event.uvue?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E4=BE=8B?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BD=8D=E7=BD=AE=E7=9A=84=E8=BE=85=E5=8A=A9?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # pages/CSS/overflow/overflow-visible-event.uvue --- pages/CSS/overflow/overflow-visible-event.uvue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pages/CSS/overflow/overflow-visible-event.uvue b/pages/CSS/overflow/overflow-visible-event.uvue index 8308826a..0a6334b5 100644 --- a/pages/CSS/overflow/overflow-visible-event.uvue +++ b/pages/CSS/overflow/overflow-visible-event.uvue @@ -104,8 +104,10 @@ if (uni.getSystemInfoSync().platform == 'android'){ ratio = uni.getSystemInfoSync().devicePixelRatio } - this.jest_click_x = rect.x * ratio + 10 - this.jest_click_y = rect.bottom * ratio - 10 + const systemInfo = uni.getSystemInfoSync() + const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight + this.jest_click_x = rect.x * ratio + 30 + this.jest_click_y = rect.bottom * ratio - 30 } }, jest_getParentRect() { @@ -129,8 +131,8 @@ if (uni.getSystemInfoSync().platform == 'android'){ ratio = uni.getSystemInfoSync().devicePixelRatio } - this.jest_click_x = rect.x * ratio + 10 - this.jest_click_y = (rect.top + titleBarHeight + 10) * ratio + this.jest_click_x = rect.x * ratio + 30 + this.jest_click_y = (rect.top + titleBarHeight) * ratio + 30 } }, jest_scrollToDeepOverflow() { @@ -147,8 +149,8 @@ const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight const afterRect = uni.getElementById('deep-overflow')?.getBoundingClientRect() if (afterRect != null) { - this.jest_click_x = afterRect.x * ratio + 10 - this.jest_click_y = (afterRect.top + titleBarHeight + 10) * ratio + this.jest_click_x = afterRect.x * ratio + 30 + this.jest_click_y = (afterRect.top + titleBarHeight) * ratio + 30 } }, 200) } -- GitLab