diff --git a/pages/CSS/overflow/overflow-visible-event.uvue b/pages/CSS/overflow/overflow-visible-event.uvue index 8308826ad9a16d43e315970c2b8d1929134907dd..0a6334b5d74ffeffeaa78f6177dcd24f469e9fcc 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) }