提交 6d8ab7b2 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

修复 touch-events.uvue 示例 Android 端编译报错的问题

(cherry picked from commit e0abfa7a)
上级 369b7e9c
...@@ -34,12 +34,13 @@ ...@@ -34,12 +34,13 @@
icon: null as UniElement | null, icon: null as UniElement | null,
touchTargets: "", touchTargets: "",
touchTargetsCount: 0, touchTargetsCount: 0,
iconRect : null as domRect | null iconRect : null as DOMRect | null
} }
}, },
onReady() { onReady() {
this.icon = uni.getElementById("icon") this.icon = uni.getElementById("icon")
this.iconRect = this.icon.getBoundingClientRect() this.iconRect = this.icon.getBoundingClientRect()
// 加上导航栏及状态栏高度 // 加上导航栏及状态栏高度
this.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44 this.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册