在HarmonyOS NEXT开发中windowClass.getWindowAvoidArea() 方法中导航区域高度是否准确?的?定值逻辑是什么?
const systemArea = windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR); console.log("systemArea>>>>>>", JSON.stringify(systemArea))
打印结果如下:
systemArea> {"visible":true,"leftRect":{"left":0,"top":0,"width":0,"height":0},"topRect":{"left":0,"top":0,"width":0,"height":0},"rightRect":{"left":0,"top":0,"width":0,"height":0},"bottomRect":{"left":409,"top":2629,"width":442,"height":91}}
目前获取到的91是px。 导航条本身高度为6vp,距离屏幕边缘是10vp。