fix
这个提交包含在:
父节点
d60fdcc816
当前提交
348174c4c8
@ -78,9 +78,12 @@ export class WindowHelper {
|
|||||||
WindowHelper._windowClass = value;
|
WindowHelper._windowClass = value;
|
||||||
if (WindowHelper._windowClass) {
|
if (WindowHelper._windowClass) {
|
||||||
let avoidArea = WindowHelper._windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR);
|
let avoidArea = WindowHelper._windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR);
|
||||||
WindowHelper._bottomRectHeight = avoidArea.bottomRect.height
|
WindowHelper._bottomRectHeight = px2vp(avoidArea.bottomRect.height)
|
||||||
let avoidArea2 = WindowHelper._windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_CUTOUT);
|
let avoidArea2 = WindowHelper._windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_CUTOUT);
|
||||||
WindowHelper._topRectHeight = avoidArea2.topRect.height
|
WindowHelper._topRectHeight = px2vp(avoidArea2.topRect.height)
|
||||||
|
let avoidArea3 = WindowHelper._windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM);
|
||||||
|
const a = px2vp(avoidArea3.topRect.height)
|
||||||
|
WindowHelper._topRectHeight = a > WindowHelper._topRectHeight ? a : WindowHelper._topRectHeight
|
||||||
// console.log('=====>', WindowHelper._topRectHeight)
|
// console.log('=====>', WindowHelper._topRectHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,7 +109,7 @@ export class WindowHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
public static get topRectHeight(): number {
|
public static get topRectHeight(): number {
|
||||||
return WindowHelper._isFullScreen?WindowHelper._topRectHeight:0
|
return WindowHelper._isFullScreen ? WindowHelper._topRectHeight : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
30
src/main/ets/view/SafeView.ets
普通文件
30
src/main/ets/view/SafeView.ets
普通文件
@ -0,0 +1,30 @@
|
|||||||
|
@Preview
|
||||||
|
@Component
|
||||||
|
export struct SafeView {
|
||||||
|
@Link isLoading: boolean
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
doNothingBuilder() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@BuilderParam customBuilderParam: () => void = this.doNothingBuilder
|
||||||
|
|
||||||
|
build() {
|
||||||
|
Stack() {
|
||||||
|
this.customBuilderParam()
|
||||||
|
Column() {
|
||||||
|
LoadingProgress()
|
||||||
|
.color(Color.White)
|
||||||
|
.width(80).height(80)
|
||||||
|
Text('努力加载中..')
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor(Color.White)
|
||||||
|
}
|
||||||
|
.visibility(this.isLoading ? Visibility.Visible : Visibility.None)
|
||||||
|
.width('100%')
|
||||||
|
.height('100%')
|
||||||
|
.backgroundColor('#40000000')
|
||||||
|
.justifyContent(FlexAlign.Center)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载...
在新工单中引用
屏蔽一个用户