1 getSystemInfoSync().windowHeight // 窗口的高度 2 createSelectorQuery() .select('css选择器') .boundingClientRect() .exec(rect => {console.log(rect, 可以得到某个元素的高度)})