get-window-info.md 754 字节
Newer Older
D
DCloud_LXH 已提交
1 2 3 4
## uni.getWindowInfo() @getwindowinfo

<!-- UTSAPIJSON.getWindowInfo.description -->

D
DCloud_LXH 已提交
5 6
<!-- UTSAPIJSON.getWindowInfo.compatibility -->

D
DCloud_LXH 已提交
7 8
<!-- UTSAPIJSON.getWindowInfo.param -->

D
DCloud_LXH 已提交
9
<!-- UTSAPIJSON.getWindowInfo.returnValue -->
D
DCloud_LXH 已提交
10

11 12 13
::: warning 注意事项  
- Android端的`windowHeight`属性是有时机的考量的,如果在全局作用域获取`windowHeight`,有可能当前Activity还未加载,所以导航栏和Tabbar的高度是不会计算进去的,稳妥起见,建议在`onReady`或者`onPageShow`内获取`windowheight`
:::  
taohebin@dcloud.io's avatar
taohebin@dcloud.io 已提交
14

D
DCloud_LXH 已提交
15
<!-- UTSAPIJSON.getWindowInfo.example -->
D
DCloud_LXH 已提交
16 17 18 19 20 21 22

<!-- UTSAPIJSON.getWindowInfo.tutorial -->

<!-- UTSAPIJSON.get-window-info.example -->

<!-- UTSAPIJSON.general_type.name -->

D
DCloud_LXH 已提交
23
<!-- UTSAPIJSON.general_type.param -->