提交 635ecbac 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

update:overflow-visible-event 去除警告

上级 d86304bb
...@@ -101,9 +101,9 @@ ...@@ -101,9 +101,9 @@
const rect = uni.getElementById('child')?.getBoundingClientRect() const rect = uni.getElementById('child')?.getBoundingClientRect()
if (rect != null) { if (rect != null) {
let ratio = 1 let ratio = 1
// #ifdef APP-ANDROID if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio ratio = uni.getSystemInfoSync().devicePixelRatio
// #endif }
this.jest_click_x = rect.x * ratio + 10 this.jest_click_x = rect.x * ratio + 10
this.jest_click_y = rect.bottom * ratio - 10 this.jest_click_y = rect.bottom * ratio - 10
} }
...@@ -114,9 +114,9 @@ ...@@ -114,9 +114,9 @@
let value = transform as string let value = transform as string
value = value.split(",")[1].slice(0, -3) value = value.split(",")[1].slice(0, -3)
let ratio = 1 let ratio = 1
// #ifdef APP-ANDROID if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio ratio = uni.getSystemInfoSync().devicePixelRatio
// #endif }
this.jest_parent_top = Math.round((parseFloat(value) * ratio)) this.jest_parent_top = Math.round((parseFloat(value) * ratio))
} }
}, },
...@@ -126,9 +126,9 @@ ...@@ -126,9 +126,9 @@
const systemInfo = uni.getSystemInfoSync() const systemInfo = uni.getSystemInfoSync()
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
let ratio = 1 let ratio = 1
// #ifdef APP-ANDROID if (uni.getSystemInfoSync().platform == 'android'){
ratio = systemInfo.devicePixelRatio ratio = uni.getSystemInfoSync().devicePixelRatio
// #endif }
this.jest_click_x = rect.x * ratio + 10 this.jest_click_x = rect.x * ratio + 10
this.jest_click_y = (rect.top + titleBarHeight + 10) * ratio this.jest_click_y = (rect.top + titleBarHeight + 10) * ratio
} }
...@@ -141,9 +141,9 @@ ...@@ -141,9 +141,9 @@
setTimeout(() => { setTimeout(() => {
const systemInfo = uni.getSystemInfoSync() const systemInfo = uni.getSystemInfoSync()
let ratio = 1 let ratio = 1
// #ifdef APP-ANDROID if (uni.getSystemInfoSync().platform == 'android'){
ratio = systemInfo.devicePixelRatio ratio = uni.getSystemInfoSync().devicePixelRatio
// #endif }
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
const afterRect = uni.getElementById('deep-overflow')?.getBoundingClientRect() const afterRect = uni.getElementById('deep-overflow')?.getBoundingClientRect()
if (afterRect != null) { if (afterRect != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册