diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs index 5f3b597fd..41c18f528 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs @@ -424,5 +424,12 @@ public partial class Table AdvancedSortModalTitle ??= Localizer[nameof(AdvancedSortModalTitle)]; ColumnWidthTooltipPrefix ??= Localizer[nameof(ColumnWidthTooltipPrefix)]; + + AlignLeftText ??= Localizer[nameof(AlignLeftText)]; + AlignLeftTooltipText ??= Localizer[nameof(AlignLeftTooltipText)]; + AlignCenterText ??= Localizer[nameof(AlignCenterText)]; + AlignCenterTooltipText ??= Localizer[nameof(AlignCenterTooltipText)]; + AlignRightText ??= Localizer[nameof(AlignRightText)]; + AlignRightTooltipText ??= Localizer[nameof(AlignRightTooltipText)]; } } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index db5398fa2..d8aa97000 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -675,6 +675,48 @@ public partial class Table : ITable, IModelEqualityComparer where [Parameter] public string? ClientTableName { get; set; } + /// + /// 获得/设置 左对齐显示文本 + /// + [Parameter] + [NotNull] + public string? AlignLeftText { get; set; } + + /// + /// 获得/设置左对齐提示信息文本 + /// + [Parameter] + [NotNull] + public string? AlignLeftTooltipText { get; set; } + + /// + /// 获得/设置 居中对齐显示文本 + /// + [Parameter] + [NotNull] + public string? AlignCenterText { get; set; } + + /// + /// 获得/设置 居中对齐提示信息文本 + /// + [Parameter] + [NotNull] + public string? AlignCenterTooltipText { get; set; } + + /// + /// 获得/设置 右对齐显示文本 + /// + [Parameter] + [NotNull] + public string? AlignRightText { get; set; } + + /// + /// 获得/设置 右对齐提示信息文本 + /// + [Parameter] + [NotNull] + public string? AlignRightTooltipText { get; set; } + [CascadingParameter] private ContextMenuZone? ContextMenuZone { get; set; } @@ -941,22 +983,22 @@ public partial class Table : ITable, IModelEqualityComparer where { Key = "align-left", Icon = "fa-solid fa-align-left", - Text = Localizer["AlignLeft"].Value, - Tooltip = Localizer["AlignLeftTooltip"].Value + Text = Localizer["AlignLeftText"].Value, + Tooltip = Localizer["AlignLeftTooltipText"].Value }, new { Key = "align-center", Icon = "fa-solid fa-align-center", - Text = Localizer["AlignCenter"].Value, - Tooltip = Localizer["AlignCenterTooltip"].Value + Text = Localizer["AlignCenterText"].Value, + Tooltip = Localizer["AlignCenterTooltipText"].Value }, new { Key = "align-left", Icon = "fa-solid fa-align-right", - Text = Localizer["AlignRight"].Value, - Tooltip = Localizer["AlignRightTooltip"].Value + Text = Localizer["AlignRightText"].Value, + Tooltip = Localizer["AlignRightTooltipText"].Value } } }); diff --git a/src/BootstrapBlazor/Locales/en.json b/src/BootstrapBlazor/Locales/en.json index 7fb24e5a0..76d4c3278 100644 --- a/src/BootstrapBlazor/Locales/en.json +++ b/src/BootstrapBlazor/Locales/en.json @@ -240,9 +240,12 @@ "CopyColumnCopiedTooltipText": "Copied!", "ColumnWidthTooltipPrefix": "width: ", "ColumnToolboxTitle": "Tools", - "AlignLeft": "Left", - "AlignCenter": "Center", - "AlignRight": "Right" + "AlignLeftText": "Left", + "AlignLeftTooltipText": "Click to align text in this column to the left", + "AlignCenterText": "Center", + "AlignCenterTooltipText": "Click to align text in this column to the center", + "AlignRightText": "Right", + "AlignRightTooltipText": "Click to align text in this column to the right" }, "BootstrapBlazor.Components.EditDialog": { "CloseButtonText": "Close", diff --git a/src/BootstrapBlazor/Locales/zh.json b/src/BootstrapBlazor/Locales/zh.json index f39356a56..4a5e125ca 100644 --- a/src/BootstrapBlazor/Locales/zh.json +++ b/src/BootstrapBlazor/Locales/zh.json @@ -240,10 +240,12 @@ "CopyColumnCopiedTooltipText": "已拷贝", "ColumnWidthTooltipPrefix": "宽度:", "ColumnToolboxTitle": "操作", - "AlignLeft": "左对齐", - "AlignLeftTooltip": "点击后本列文本左对齐", - "AlignCenter": "居中", - "AlignRight": "右对齐" + "AlignLeftText": "左对齐", + "AlignLeftTooltipText": "点击后本列文本左对齐", + "AlignCenterText": "居中", + "AlignCenterTooltipText": "点击后本列文本居中对齐", + "AlignRightText": "右对齐", + "AlignRightTooltipText": "点击后本列文本右对齐" }, "BootstrapBlazor.Components.EditDialog": { "CloseButtonText": "关闭",