diff --git a/src/BootstrapBlazor/Components/Print/PrintButton.razor b/src/BootstrapBlazor/Components/Print/PrintButton.razor index 205ef6b134d289095a4c0b2f0729991039de4adb..72004574e206b20e3cb2f3e29e0f5a2f30131b68 100644 --- a/src/BootstrapBlazor/Components/Print/PrintButton.razor +++ b/src/BootstrapBlazor/Components/Print/PrintButton.razor @@ -1,7 +1,7 @@ @namespace BootstrapBlazor.Components @inherits ButtonBase - + @if (!string.IsNullOrEmpty(ButtonIcon)) { diff --git a/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs b/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs index 4bb069e4a2ddfc6ecf2fee92ad30102254fe2588..718033b6860f6bda69ef8937274224e2563fc7cf 100644 --- a/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs +++ b/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs @@ -28,8 +28,8 @@ public partial class PrintButton /// protected override void OnInitialized() { - // 不需要走 base.OnInitialized 方法 - ButtonIcon = Icon; + base.OnInitialized(); + Text ??= Localizer[nameof(Text)]; }