nuke-dimensions
v2.3.12
Published
屏幕参数
Downloads
113
Readme
Dimensions
- category: API
- chinese: 屏幕参数
- type: API
Usage
Because the weex container does 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.
API
Dimensions.get('window/screen')
catch the size of window or screen, default vertical.
//catch width and height of the screen (rem)
let { height, width } = Dimensions.get('window');
Dimensions.getWindowInfo(isLandscape)
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.
// Catch width and height in horizontal screen mode
let { height, width } = Dimensions.getWindowInfo(true);
The Other
- Chat with @翊晨[yichen] in Dingtalk desktop App Download
- DingTalk Group