鸿蒙应用获取系统底部高度
AppStorage.setOrCreate('bottomHeight',px2vp(bottomHeight))//存储状态栏高度给页面使用。//获取屏幕底部高度。
·
const stateHeight=windowInformation.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM)
//获取屏幕底部高度
const bottomHeight=stateHeight.bottomRect.height
AppStorage.setOrCreate('bottomHeight',px2vp(bottomHeight))//存储状态栏高度给页面使用更多推荐



所有评论(0)