- screenWidth 屏幕宽度
- screenHeight 屏幕高度
- windowWidth 可使用窗口宽度
- windowHeight 可使用窗口高度
- windowTop 可使用窗口的顶部位置 App、H5
- windowBottom 可使用窗口的底部位置 App、H5
- statusBarHeight 状态栏的高
windowHeight举例子
<view :style="[uniHeight]"></view>
data() {
return {
uniHeight:{},
}
}
uni.getSystemInfo({
success: res => {
let height = res.windowHeight
this.uniHeight = {
height:height + 'px'
}
console.log("屏幕高度",res.windowHeight)
}
})