diff --git a/customappbar/interfaces/custom_app_bar.js b/customappbar/interfaces/custom_app_bar.js index fab0151d487b349e0bc1a5660c5786e552f05b69..5f05be1681d9ef7c567b50dea6f0f7fca5d74924 100644 --- a/customappbar/interfaces/custom_app_bar.js +++ b/customappbar/interfaces/custom_app_bar.js @@ -1482,7 +1482,7 @@ export class CustomAppBar extends ViewPU { // 透明模糊背板 Column.opacity(this.maskOpacity); // 透明模糊背板 - Column.foregroundBlurStyle(BlurStyle.BACKGROUND_REGULAR, { scale: this.maskBlurScale }); + Column.foregroundBlurStyle(BlurStyle.BACKGROUND_REGULAR, { colorMode: ThemeColorMode.LIGHT, scale: this.maskBlurScale }); // 透明模糊背板 Column.onClick(() => { this.closeContainerAnimation(); @@ -1504,6 +1504,7 @@ export class CustomAppBar extends ViewPU { Column.width('100%'); Column.justifyContent(FlexAlign.End); Column.hitTestBehavior(HitTestMode.Transparent); + Column.id('AtomicServiceStageLayoutId'); }, Column); this.observeComponentCreation2((elmtId, isInitialRender) => { Column.create(); @@ -1512,6 +1513,7 @@ export class CustomAppBar extends ViewPU { Column.aspectRatio(ObservedObject.GetRawObject(this.ratio)); Column.justifyContent(FlexAlign.End); Column.hitTestBehavior(HitTestMode.Transparent); + Column.id('AtomicServiceStageColumnId'); }, Column); this.observeComponentCreation2((elmtId, isInitialRender) => { If.create(); @@ -1543,8 +1545,10 @@ export class CustomAppBar extends ViewPU { }); Row.clip(true); Row.alignItems(VerticalAlign.Bottom); - Row.hitTestBehavior(HitTestMode.Transparent); Row.width('100%'); + Row.onClick(() => { + // 拦截到背板的点击事件 + }); Row.id('AtomicServiceStageId'); }, Row); Row.pop(); diff --git a/customappbar/source/custom_app_bar.ets b/customappbar/source/custom_app_bar.ets index 5b62f7e8ada237fdd5b71a509df01c707cf659a9..12d2ac6bd619c5c51e7626c388364732a08bdcbd 100644 --- a/customappbar/source/custom_app_bar.ets +++ b/customappbar/source/custom_app_bar.ets @@ -884,7 +884,7 @@ export struct CustomAppBar { .height('100%') .backgroundColor('#262626') .opacity(this.maskOpacity) - .foregroundBlurStyle(BlurStyle.BACKGROUND_REGULAR, { scale: this.maskBlurScale }) + .foregroundBlurStyle(BlurStyle.BACKGROUND_REGULAR, { colorMode: ThemeColorMode.LIGHT, scale: this.maskBlurScale }) .onClick(() => { this.closeContainerAnimation(); }) @@ -911,8 +911,10 @@ export struct CustomAppBar { }) .clip(true) .alignItems(VerticalAlign.Bottom) - .hitTestBehavior(HitTestMode.Transparent) .width('100%') + .onClick(() => { + // 拦截到背板的点击事件 + }); .id('AtomicServiceStageId') } .height(this.containerHeight) @@ -920,10 +922,12 @@ export struct CustomAppBar { .aspectRatio(this.ratio) .justifyContent(FlexAlign.End) .hitTestBehavior(HitTestMode.Transparent) + .id('AtomicServiceStageColumnId') }.height('100%') .width('100%') .justifyContent(FlexAlign.End) .hitTestBehavior(HitTestMode.Transparent) + .id('AtomicServiceStageLayoutId') if (this.isHalfScreen) { this.halfScreenMenuBar()