nuke-dimensions
Version:
屏幕参数
41 lines (25 loc) • 1.14 kB
Markdown
not support height: 100%. When you need to get the `REM` value of the screen width, hegith and set the style, you may be use the Dimensions component.
catch the size of window or screen, default vertical.
```js
//catch width and height of the screen (rem)
let { height, width } = Dimensions.get('window');
```
When `isLandscape` is true, it returns the width of the screen.
**You need to open the current page under the container screen, otherwise the unpredictable value will appear.**
```js
// Catch width and height in horizontal screen mode
let { height, width } = Dimensions.getWindowInfo(true);
```
- Chat with <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨[yichen]</a> in Dingtalk desktop App <a href='https://tms.dingtalk.com/markets/dingtalk/download'>Download</a>
- DingTalk Group
<img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" />
- category: API
- chinese: 屏幕参数
- type: API
---
Because the weex container does