From 77a4d0182e4baa7c639c0e5a3c5ea2e0148014f6 Mon Sep 17 00:00:00 2001 From: YangYongAn Date: Fri, 6 Dec 2024 16:13:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update:BottomSheetOptions=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20cancelFontColor=20=E5=B1=9E=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets | 2 +- harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets | 2 +- harmony_dialog/src/main/ets/model/BottomSheetOptions.ets | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets index f794148..45a52af 100644 --- a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets @@ -85,7 +85,7 @@ export default struct ActionSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) - .fontColor($r('app.color.color_cancel')) + .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) .fontWeight(FontWeight.Bold) .align(Alignment.Center) .textAlign(TextAlign.Center) diff --git a/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets b/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets index 00c9fb8..3ae928b 100644 --- a/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets @@ -81,7 +81,7 @@ export default struct BottomSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) - .fontColor($r('app.color.color_cancel')) + .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) .fontWeight(FontWeight.Bold) .align(Alignment.Center) .textAlign(TextAlign.Center) diff --git a/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets b/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets index cf38f65..05e6d80 100644 --- a/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets +++ b/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets @@ -34,6 +34,7 @@ export interface BottomSheetOptions extends BaseDialogOptions { title?: ResourceStr; //弹框标题 titleFontColor?: ResourceColor; //弹框标题的字体颜色。 cancelValue?: ResourceStr; //取消按钮 + cancelFontColor?: ResourceColor; //取消按钮的字体颜色。 sheets: Array | Array; //BottomSheet弹出框操作区按钮。 onAction: ActionCallBack; //按钮的CallBack事件。 -- Gitee From a3b58d092753d6b7c85065bdf18f99b7d17a0e1f Mon Sep 17 00:00:00 2001 From: YangYongAn Date: Fri, 6 Dec 2024 16:27:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update:BottomSheetOptions=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20cancelFontWeight=20=E5=B1=9E=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E7=B2=97=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets | 2 +- harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets | 2 +- harmony_dialog/src/main/ets/model/BottomSheetOptions.ets | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets index 45a52af..ad48cb1 100644 --- a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets @@ -86,7 +86,7 @@ export default struct ActionSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) - .fontWeight(FontWeight.Bold) + .fontWeight(this.options.cancelFontWeight ?? FontWeight.Bold) .align(Alignment.Center) .textAlign(TextAlign.Center) .width('100%') diff --git a/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets b/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets index 3ae928b..2970734 100644 --- a/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets @@ -82,7 +82,7 @@ export default struct BottomSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) - .fontWeight(FontWeight.Bold) + .fontWeight(this.options.cancelFontWeight ?? FontWeight.Bold) .align(Alignment.Center) .textAlign(TextAlign.Center) .width('100%') diff --git a/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets b/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets index 05e6d80..1a6e0e8 100644 --- a/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets +++ b/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets @@ -35,6 +35,7 @@ export interface BottomSheetOptions extends BaseDialogOptions { titleFontColor?: ResourceColor; //弹框标题的字体颜色。 cancelValue?: ResourceStr; //取消按钮 cancelFontColor?: ResourceColor; //取消按钮的字体颜色。 + cancelFontWeight?: FontWeight; //取消按钮的字体粗细。 sheets: Array | Array; //BottomSheet弹出框操作区按钮。 onAction: ActionCallBack; //按钮的CallBack事件。 -- Gitee