diff --git a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets index f79414891f1ad2434e04bbfa4dfcce7726163fa8..ad48cb1a88e5c507c22de50244fa8947a8aecac3 100644 --- a/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/ActionSheetDialogView.ets @@ -85,8 +85,8 @@ export default struct ActionSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) - .fontColor($r('app.color.color_cancel')) - .fontWeight(FontWeight.Bold) + .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) + .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 00c9fb818d768fed7eb89d13507af0fe55e5adc6..2970734a7cacb4b076971ff31f089fa5288ae395 100644 --- a/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets +++ b/harmony_dialog/src/main/ets/component/BottomSheetDialogView.ets @@ -81,8 +81,8 @@ export default struct BottomSheetDialogView { Text(this.options.cancelValue) .fontSize(this.fontSize) - .fontColor($r('app.color.color_cancel')) - .fontWeight(FontWeight.Bold) + .fontColor(this.options.cancelFontColor ?? $r('app.color.color_cancel')) + .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 cf38f65787cc4a80a2126a18ff5cf3624f865398..1a6e0e82909a40106072c8902b17751a24e4096d 100644 --- a/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets +++ b/harmony_dialog/src/main/ets/model/BottomSheetOptions.ets @@ -34,6 +34,8 @@ export interface BottomSheetOptions extends BaseDialogOptions { title?: ResourceStr; //弹框标题 titleFontColor?: ResourceColor; //弹框标题的字体颜色。 cancelValue?: ResourceStr; //取消按钮 + cancelFontColor?: ResourceColor; //取消按钮的字体颜色。 + cancelFontWeight?: FontWeight; //取消按钮的字体粗细。 sheets: Array | Array; //BottomSheet弹出框操作区按钮。 onAction: ActionCallBack; //按钮的CallBack事件。