一、方法
//获取屏幕可视区域高度
onReady() {
uni.getSystemInfo({
success: function (res) {
console.log(res.windowHeight)
}
})
},
二、res中的数据

本文介绍了一种使用uni.getSystemInfo()方法获取屏幕可视区域高度的简单方法,通过在onReady()函数中调用此API,可以轻松地在控制台打印出窗口的高度。
一、方法
//获取屏幕可视区域高度
onReady() {
uni.getSystemInfo({
success: function (res) {
console.log(res.windowHeight)
}
})
},
二、res中的数据

6380
1328
3135
3479
2936
737

被折叠的 条评论
为什么被折叠?