From 80282cc4b0090863f8dc84bf7b22e7d532875f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9E=E6=BC=AA?= Date: Tue, 15 Jul 2025 14:23:19 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=83=8C=E6=9D=BF=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E9=A2=9C=E8=89=B2=E4=B8=8D=E8=B7=9F=E9=9A=8F=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=BE=E7=BD=AE&=E6=96=B0=E5=A2=9Eid&=E6=83=AB?= =?UTF-8?q?=E6=87=92=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 连漪 --- customappbar/interfaces/custom_app_bar.js | 8 ++++++-- customappbar/source/custom_app_bar.ets | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/customappbar/interfaces/custom_app_bar.js b/customappbar/interfaces/custom_app_bar.js index fab0151..5f05be1 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 5b62f7e..12d2ac6 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() -- Gitee