Skip to content

Commit 2b9af5f

Browse files
committed
doc: 文档更改为英文注释
1 parent c8746fa commit 2b9af5f

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,84 +8,83 @@
88
namespace BootstrapBlazor.Components;
99

1010
/// <summary>
11-
/// AutoFill 组件
11+
/// AutoFill component
1212
/// </summary>
13+
/// <typeparam name="TValue">The type of the value.</typeparam>
1314
public partial class AutoFill<TValue>
1415
{
1516
/// <summary>
16-
/// 获得 组件样式
17+
/// Gets the component style.
1718
/// </summary>
1819
private string? ClassString => CssBuilder.Default("auto-complete auto-fill")
1920
.AddClassFromAttributes(AdditionalAttributes)
2021
.Build();
2122

22-
private List<TValue>? _filterItems;
23-
2423
/// <summary>
25-
/// 获得/设置 组件数据集合
24+
/// Gets or sets the collection of items for the component.
2625
/// </summary>
2726
[Parameter]
2827
[NotNull]
2928
public IEnumerable<TValue>? Items { get; set; }
3029

3130
/// <summary>
32-
/// 获得/设置 匹配数据时显示的数量 默认 null 未设置
31+
/// Gets or sets the number of items to display when matching data. Default is null.
3332
/// </summary>
3433
[Parameter]
3534
[NotNull]
3635
public int? DisplayCount { get; set; }
3736

3837
/// <summary>
39-
/// 获得/设置 是否开启模糊查询,默认为 false
38+
/// Gets or sets whether to enable fuzzy search. Default is false.
4039
/// </summary>
4140
[Parameter]
4241
public bool IsLikeMatch { get; set; }
4342

4443
/// <summary>
45-
/// 获得/设置 匹配时是否忽略大小写,默认为 true
44+
/// Gets or sets whether to ignore case when matching. Default is true.
4645
/// </summary>
4746
[Parameter]
4847
public bool IgnoreCase { get; set; } = true;
4948

5049
/// <summary>
51-
/// 获得/设置 获得焦点时是否展开下拉候选菜单 默认 true
50+
/// Gets or sets whether to expand the dropdown candidate menu when focused. Default is true.
5251
/// </summary>
5352
[Parameter]
5453
public bool ShowDropdownListOnFocus { get; set; } = true;
5554

5655
/// <summary>
57-
/// 获得/设置 通过模型获得显示文本方法 默认使用 ToString 重载方法
56+
/// Gets or sets the method to get the display text from the model. Default is to use the ToString override method.
5857
/// </summary>
5958
[Parameter]
6059
[NotNull]
6160
public Func<TValue?, string?>? OnGetDisplayText { get; set; }
6261

6362
/// <summary>
64-
/// 图标
63+
/// Gets or sets the icon.
6564
/// </summary>
6665
[Parameter]
6766
public string? Icon { get; set; }
6867

6968
/// <summary>
70-
/// 获得/设置 加载图标
69+
/// Gets or sets the loading icon.
7170
/// </summary>
7271
[Parameter]
7372
public string? LoadingIcon { get; set; }
7473

7574
/// <summary>
76-
/// 获得/设置 自定义集合过滤规则
75+
/// Gets or sets the custom collection filtering rules.
7776
/// </summary>
7877
[Parameter]
7978
public Func<string, Task<IEnumerable<TValue>>>? OnCustomFilter { get; set; }
8079

8180
/// <summary>
82-
/// 获得/设置 是否显示无匹配数据选项 默认 true 显示
81+
/// Gets or sets whether to show the no matching data option. Default is true.
8382
/// </summary>
8483
[Parameter]
8584
public bool ShowNoDataTip { get; set; } = true;
8685

8786
/// <summary>
88-
/// 获得/设置 候选项模板 默认 null
87+
/// Gets or sets the candidate item template. Default is null.
8988
/// </summary>
9089
[Parameter]
9190
[Obsolete("已弃用,请使用 ItemTemplate 代替;Deprecated please use ItemTemplate parameter")]
@@ -96,13 +95,12 @@ public partial class AutoFill<TValue>
9695
[NotNull]
9796
private IStringLocalizer<AutoComplete>? Localizer { get; set; }
9897

99-
/// <summary>
100-
/// 获得 获得焦点自动显示下拉框设置字符串
101-
/// </summary>
10298
private string? ShowDropdownListOnFocusString => ShowDropdownListOnFocus ? "true" : null;
10399

104100
private string? _displayText;
105101

102+
private List<TValue>? _filterItems;
103+
106104
/// <summary>
107105
/// <inheritdoc/>
108106
/// </summary>
@@ -120,8 +118,9 @@ protected override void OnParametersSet()
120118
}
121119

122120
/// <summary>
123-
/// 鼠标点击候选项时回调此方法
121+
/// Callback method when a candidate item is clicked.
124122
/// </summary>
123+
/// <param name="val">The value of the clicked item.</param>
125124
private async Task OnClickItem(TValue val)
126125
{
127126
CurrentValue = val;
@@ -138,9 +137,9 @@ private async Task OnClickItem(TValue val)
138137
private List<TValue> Rows => _filterItems ?? [.. Items];
139138

140139
/// <summary>
141-
/// TriggerFilter 方法
140+
/// Triggers the filter method.
142141
/// </summary>
143-
/// <param name="val"></param>
142+
/// <param name="val">The value to filter by.</param>
144143
[JSInvokable]
145144
public override async Task TriggerFilter(string val)
146145
{
@@ -170,9 +169,9 @@ public override async Task TriggerFilter(string val)
170169
}
171170

172171
/// <summary>
173-
/// TriggerOnChange 方法
172+
/// Triggers the change method.
174173
/// </summary>
175-
/// <param name="val"></param>
174+
/// <param name="val">The value to change to.</param>
176175
[JSInvokable]
177176
public override Task TriggerChange(string val)
178177
{

0 commit comments

Comments
 (0)