From ebf42aeb8435dbd58bf4cf4c59b289c7e807723b Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Thu, 19 Sep 2024 19:23:53 +0800 Subject: [PATCH] add inputdialog gap Signed-off-by: dengxiaoyu --- display/AppScope/app.json | 6 ++---- display/entry/src/main/ets/pages/InputPinDialog.ets | 10 +++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/display/AppScope/app.json b/display/AppScope/app.json index 8b8059ce6..606cb31cd 100644 --- a/display/AppScope/app.json +++ b/display/AppScope/app.json @@ -1,11 +1,9 @@ - - { "app": { "bundleName": "com.ohos.devicemanagerui", "vendor": "example", - "versionCode": 1000020, - "versionName": "1.0.20", + "versionCode": 1000022, + "versionName": "1.0.22", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 10, diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index d261d732a..eac0b5416 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -316,7 +316,10 @@ struct InputCustomDialog { .constraintSize({ maxHeight: `${this.heightNum}`}) .borderRadius($r('sys.float.ohos_id_corner_radius_dialog')) .backgroundBlurStyle(BlurStyle.COMPONENT_ULTRA_THICK) - .margin({ left: $r('sys.float.ohos_id_dialog_margin_start'), right: $r('sys.float.ohos_id_dialog_margin_end') }) + .margin({ + left: $r('sys.float.ohos_id_dialog_margin_bottom'), + right: $r('sys.float.ohos_id_dialog_margin_bottom') + }) } }.margin({top: 8, bottom: 20}) } @@ -325,17 +328,18 @@ struct InputCustomDialog { @Entry @Component struct dialogPlusPage { + @State isPC: boolean = Constant.isPC(); dialogController: CustomDialogController = new CustomDialogController({ builder: InputCustomDialog(), autoCancel: false, - alignment: DialogAlignment.Center, + alignment: this.isPC ? DialogAlignment.Center : DialogAlignment.Bottom, offset: { dx: 0, dy: 0 }, customStyle: true, maskColor: $r('sys.color.ohos_id_color_mask_thin') }); aboutToAppear() { - console.log(TAG + 'aboutToAppear aboutToAppear') + console.log(TAG + 'aboutToAppear : this.isPC: ' + this.isPC); } aboutToDisappear() { -- Gitee