Skip to content

Commit 83ed976

Browse files
committed
style(Table): add InverseSelectedButtonText i18n cfg
1 parent 5d38ff7 commit 83ed976

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/BootstrapBlazor/Components/Table/Table.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
</Checkbox>
128128
<BootstrapInput Value="@_visibleColumnsSearchKey" IsClearable="true"
129129
OnValueChanged="@SearchVisibleColumns" UseInputEvent="true"/>
130-
<Button Icon="fa-solid fa-arrows-rotate" TooltipText="反选当前列显示"
130+
<Button Icon="fa-solid fa-arrows-rotate" TooltipText="@InverseSelectedButtonText"
131131
TooltipTrigger="hover" Color="Color.Secondary"
132132
OnClick="@InverseSelected"></Button>
133133
</BootstrapInputGroup>

src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace BootstrapBlazor.Components;
99

1010
/// <summary>
11-
///
11+
///
1212
/// </summary>
1313
/// <typeparam name="TItem"></typeparam>
1414
public partial class Table<TItem>
@@ -365,14 +365,21 @@ public partial class Table<TItem>
365365
public string? AdvancedSortModalTitle { get; set; }
366366

367367
/// <summary>
368-
/// 获得/设置 编辑按钮 Toast 提示 Title 文字
368+
/// 获得/设置 反选按钮文字信息
369+
/// </summary>
370+
[Parameter]
371+
[NotNull]
372+
public string? InverseSelectedButtonText { get; set; }
373+
374+
/// <summary>
375+
/// 获得/设置 列选择增强警告标题
369376
/// </summary>
370377
[Parameter]
371378
[NotNull]
372379
public string? ColumnGroupSelectButtonWarnToastTitle { get; set; }
373380

374381
/// <summary>
375-
/// 获得/设置 编辑按钮 Toast 未选择时提示 Content 文字
382+
/// 获得/设置 列选择增强警告内容
376383
/// </summary>
377384
[Parameter]
378385
[NotNull]
@@ -452,6 +459,7 @@ private void OnInitLocalization()
452459
AlignCenterTooltipText ??= Localizer[nameof(AlignCenterTooltipText)];
453460
AlignRightText ??= Localizer[nameof(AlignRightText)];
454461
AlignRightTooltipText ??= Localizer[nameof(AlignRightTooltipText)];
462+
InverseSelectedButtonText ??= Localizer[nameof(InverseSelectedButtonText)];
455463
ColumnGroupSelectButtonWarnToastTitle ??= Localizer[nameof(ColumnGroupSelectButtonWarnToastTitle)];
456464
ColumnGroupSelectButtonWarnToastContent ??= Localizer[nameof(ColumnGroupSelectButtonWarnToastContent)];
457465
}

src/BootstrapBlazor/Locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@
255255
"AlignCenterTooltipText": "Click to align text in this column to the center",
256256
"AlignRightText": "Right",
257257
"AlignRightTooltipText": "Click to align text in this column to the right",
258+
"InverseSelectedButtonText": "Toggle the visibility of the current column.",
258259
"ColumnGroupSelectButtonWarnToastTitle": "Warning",
259260
"ColumnGroupSelectButtonWarnToastContent": "Table must have at least one column displayed. When none are selected, the first column will remain visible by default."
260261
},

src/BootstrapBlazor/Locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@
255255
"AlignCenterTooltipText": "点击后本列文本居中对齐",
256256
"AlignRightText": "右对齐",
257257
"AlignRightTooltipText": "点击后本列文本右对齐",
258+
"InverseSelectedButtonText": "反选当前列显示",
258259
"ColumnGroupSelectButtonWarnToastTitle": "提示",
259260
"ColumnGroupSelectButtonWarnToastContent": "表格需要至少有一列显示,全不选时默认第一列维持显示状态"
260261
},

0 commit comments

Comments
 (0)