Skip to content

Commit 65a44f0

Browse files
authored
doc(AttributeTable): update component xml comment (#7576)
* doc: 代码格式化 * doc: 移除不使用注释信息 * refactor: 更新注释 * doc: 更新注释 * doc: 更新注释信息 * doc: 更新单元测试 * refactor: 更新注释文档 * chore: 增加 ResourcePreloader 组件
1 parent 04e06f2 commit 65a44f0

172 files changed

Lines changed: 1300 additions & 1347 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/BootstrapBlazor.Server/Components/App.razor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@inject IWebHostEnvironment Env
1+
@inject IWebHostEnvironment Env
22
@inject IStringLocalizer<BaseLayout> Localizer
33
@inject IOptions<WebsiteOptions> WebsiteOption
44

@@ -20,6 +20,8 @@
2020
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
2121
<link rel="apple-touch-icon" href="favicon.png">
2222

23+
<ResourcePreloader />
24+
2325
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css"]" />
2426
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.MaterialDesign/css/md.min.css"]" />
2527
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css"]" />

src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,76 +12,76 @@ namespace BootstrapBlazor.Components;
1212
public abstract class AutoGenerateBaseAttribute : Attribute
1313
{
1414
/// <summary>
15-
/// <para lang="zh">获得/设置 当前列是否可编辑。默认为 true。当设置为 false 时,自动编辑 UI 不会生成此列</para>
16-
/// <para lang="en">Gets or sets whether the current column is editable. Default is true. When set to false, the auto-generated edit UI will not generate this column.</para>
15+
/// <para lang="zh">获得/设置 当前列是否可编辑。默认为 true。当设置为 false 时,自动编辑 UI 不会生成此列</para>
16+
/// <para lang="en">Gets or sets whether the current column is editable. Default is true. When set to false, the auto-generated edit UI will not generate this column</para>
1717
/// </summary>
1818
[Obsolete("Deprecated. If it is editable, use the Readonly parameter. If it is visible, use the Ignore parameter.")]
1919
[ExcludeFromCodeCoverage]
2020
public bool Editable { get; set; } = true;
2121

2222
/// <summary>
23-
/// <para lang="zh">获得/设置 当前列是否渲染。默认为 false。当设置为 true 时,UI 不会生成此列</para>
24-
/// <para lang="en">Gets or sets whether the current column is rendered. Default is false. When set to true, the UI will not generate this column.</para>
23+
/// <para lang="zh">获得/设置 当前列是否渲染。默认为 false。当设置为 true 时,UI 不会生成此列</para>
24+
/// <para lang="en">Gets or sets whether the current column is rendered. Default is false. When set to true, the UI will not generate this column</para>
2525
/// </summary>
2626
public bool Ignore { get; set; }
2727

2828
/// <summary>
29-
/// <para lang="zh">获得/设置 当前编辑项是否只读。默认为 false</para>
30-
/// <para lang="en">Gets or sets whether the current edit item is read-only. Default is false.</para>
29+
/// <para lang="zh">获得/设置 当前编辑项是否只读。默认为 false</para>
30+
/// <para lang="en">Gets or sets whether the current edit item is read-only. Default is false</para>
3131
/// </summary>
3232
public bool Readonly { get; set; }
3333

3434
/// <summary>
35-
/// <para lang="zh">获得/设置 当前编辑项是否可见。默认为 true</para>
36-
/// <para lang="en">Gets or sets whether the current edit item is visible. Default is true.</para>
35+
/// <para lang="zh">获得/设置 当前编辑项是否可见。默认为 true</para>
36+
/// <para lang="en">Gets or sets whether the current edit item is visible. Default is true</para>
3737
/// </summary>
3838
public bool Visible { get; set; } = true;
3939

4040
/// <summary>
41-
/// <para lang="zh">获得/设置 是否允许排序。默认为 false</para>
42-
/// <para lang="en">Gets or sets whether sorting is allowed. Default is false.</para>
41+
/// <para lang="zh">获得/设置 是否允许排序。默认为 false</para>
42+
/// <para lang="en">Gets or sets whether sorting is allowed. Default is false</para>
4343
/// </summary>
4444
public bool Sortable { get; set; }
4545

4646
/// <summary>
47-
/// <para lang="zh">获得/设置 是否允许数据筛选。默认为 false</para>
48-
/// <para lang="en">Gets or sets whether data filtering is allowed. Default is false.</para>
47+
/// <para lang="zh">获得/设置 是否允许数据筛选。默认为 false</para>
48+
/// <para lang="en">Gets or sets whether data filtering is allowed. Default is false</para>
4949
/// </summary>
5050
public bool Filterable { get; set; }
5151

5252
/// <summary>
53-
/// <para lang="zh">获得/设置 此列是否参与搜索。默认为 false</para>
54-
/// <para lang="en">Gets or sets whether the column participates in search. Default is false.</para>
53+
/// <para lang="zh">获得/设置 此列是否参与搜索。默认为 false</para>
54+
/// <para lang="en">Gets or sets whether the column participates in search. Default is false</para>
5555
/// </summary>
5656
public bool Searchable { get; set; }
5757

5858
/// <summary>
59-
/// <para lang="zh">获得/设置 此列是否允许文本换行。默认为 false</para>
60-
/// <para lang="en">Gets or sets whether text wrapping is allowed in this column. Default is false.</para>
59+
/// <para lang="zh">获得/设置 此列是否允许文本换行。默认为 false</para>
60+
/// <para lang="en">Gets or sets whether text wrapping is allowed in this column. Default is false</para>
6161
/// </summary>
6262
public bool TextWrap { get; set; }
6363

6464
/// <summary>
65-
/// <para lang="zh">获得/设置 此列文本溢出时是否显示省略号。默认为 false</para>
66-
/// <para lang="en">Gets or sets whether text overflow is ellipsis in this column. Default is false.</para>
65+
/// <para lang="zh">获得/设置 此列文本溢出时是否显示省略号。默认为 false</para>
66+
/// <para lang="en">Gets or sets whether text overflow is ellipsis in this column. Default is false</para>
6767
/// </summary>
6868
public bool TextEllipsis { get; set; }
6969

7070
/// <summary>
71-
/// <para lang="zh">获得/设置 文本对齐方式。默认为 Alignment.None</para>
72-
/// <para lang="en">Gets or sets the text alignment. Default is Alignment.None.</para>
71+
/// <para lang="zh">获得/设置 文本对齐方式。默认为 Alignment.None</para>
72+
/// <para lang="en">Gets or sets the text alignment. Default is Alignment.None</para>
7373
/// </summary>
7474
public Alignment Align { get; set; }
7575

7676
/// <summary>
77-
/// <para lang="zh">获得/设置 鼠标悬停时是否显示提示信息。默认为 false</para>
78-
/// <para lang="en">Gets or sets whether to show tooltips on mouse hover. Default is false.</para>
77+
/// <para lang="zh">获得/设置 鼠标悬停时是否显示提示信息。默认为 false</para>
78+
/// <para lang="en">Gets or sets whether to show tooltips on mouse hover. Default is false</para>
7979
/// </summary>
8080
public bool ShowTips { get; set; }
8181

8282
/// <summary>
83-
/// <para lang="zh">获得/设置 列是否可以被复制。默认为 false</para>
84-
/// <para lang="en">Gets or sets whether the column can be copied. Default is false.</para>
83+
/// <para lang="zh">获得/设置 列是否可以被复制。默认为 false</para>
84+
/// <para lang="en">Gets or sets whether the column can be copied. Default is false</para>
8585
/// </summary>
8686
public bool ShowCopyColumn { get; set; }
8787
}

src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
3535
public bool SkipValidate { get; set; }
3636

3737
/// <summary>
38-
/// <para lang="zh">获得/设置 新建时此列是否只读。默认值为 null,使用 <see cref="IEditorItem.Readonly"/> 值</para>
39-
/// <para lang="en">Gets or sets whether the column is read-only when adding a new item. Default is null, using the <see cref="IEditorItem.Readonly"/> value.</para>
38+
/// <para lang="zh">获得/设置 新建时此列是否只读。默认值为 null,使用 <see cref="IEditorItem.Readonly"/> 值</para>
39+
/// <para lang="en">Gets or sets whether the column is read-only when adding a new item. Default is null, using the <see cref="IEditorItem.Readonly"/> value</para>
4040
/// </summary>
4141
public bool IsReadonlyWhenAdd { get; set; }
4242

@@ -47,8 +47,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
4747
}
4848

4949
/// <summary>
50-
/// <para lang="zh">获得/设置 编辑时此列是否只读。默认值为 null,使用 <see cref="IEditorItem.Readonly"/> 值</para>
51-
/// <para lang="en">Gets or sets whether the column is read-only when editing an item. Default is null, using the <see cref="IEditorItem.Readonly"/> value.</para>
50+
/// <para lang="zh">获得/设置 编辑时此列是否只读。默认值为 null,使用 <see cref="IEditorItem.Readonly"/> 值</para>
51+
/// <para lang="en">Gets or sets whether the column is read-only when editing an item. Default is null, using the <see cref="IEditorItem.Readonly"/> value</para>
5252
/// </summary>
5353
public bool IsReadonlyWhenEdit { get; set; }
5454

@@ -59,8 +59,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
5959
}
6060

6161
/// <summary>
62-
/// <para lang="zh">获得/设置 新建时此列是否可见。默认值为 null,使用 <see cref="AutoGenerateBaseAttribute.Visible"/> 值</para>
63-
/// <para lang="en">Gets or sets whether the column is visible when adding a new item. Default is null, using the <see cref="AutoGenerateBaseAttribute.Visible"/> value.</para>
62+
/// <para lang="zh">获得/设置 新建时此列是否可见。默认值为 null,使用 <see cref="AutoGenerateBaseAttribute.Visible"/> 值</para>
63+
/// <para lang="en">Gets or sets whether the column is visible when adding a new item. Default is null, using the <see cref="AutoGenerateBaseAttribute.Visible"/> value</para>
6464
/// </summary>
6565
public bool IsVisibleWhenAdd { get; set; } = true;
6666

@@ -71,8 +71,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
7171
}
7272

7373
/// <summary>
74-
/// <para lang="zh">获得/设置 编辑时此列是否可见。默认值为 null,使用 <see cref="AutoGenerateBaseAttribute.Visible"/> 值</para>
75-
/// <para lang="en">Gets or sets whether the column is visible when editing an item. Default is null, using the <see cref="AutoGenerateBaseAttribute.Visible"/> value.</para>
74+
/// <para lang="zh">获得/设置 编辑时此列是否可见。默认值为 null,使用 <see cref="AutoGenerateBaseAttribute.Visible"/> 值</para>
75+
/// <para lang="en">Gets or sets whether the column is visible when editing an item. Default is null, using the <see cref="AutoGenerateBaseAttribute.Visible"/> value</para>
7676
/// </summary>
7777
public bool IsVisibleWhenEdit { get; set; } = true;
7878

@@ -96,8 +96,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
9696
public string? RequiredErrorMessage { get; set; }
9797

9898
/// <summary>
99-
/// <para lang="zh">获得/设置 是否显示标签工具提示。通常用于标签文本过长被截断时。默认为 false</para>
100-
/// <para lang="en">Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is false.</para>
99+
/// <para lang="zh">获得/设置 是否显示标签工具提示。通常用于标签文本过长被截断时。默认为 false</para>
100+
/// <para lang="en">Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is false</para>
101101
/// </summary>
102102
public bool ShowLabelTooltip { get; set; }
103103

@@ -108,16 +108,16 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
108108
}
109109

110110
/// <summary>
111-
/// <para lang="zh">获得/设置 默认排序顺序。默认为 SortOrder.Unset</para>
112-
/// <para lang="en">Gets or sets the default sort order. Default is SortOrder.Unset.</para>
111+
/// <para lang="zh">获得/设置 默认排序顺序。默认为 SortOrder.Unset</para>
112+
/// <para lang="en">Gets or sets the default sort order. Default is SortOrder.Unset</para>
113113
/// </summary>
114114
public SortOrder DefaultSortOrder { get; set; }
115115

116116
IEnumerable<SelectedItem>? IEditorItem.Items { get; set; }
117117

118118
/// <summary>
119-
/// <para lang="zh">获得/设置 列宽</para>
120-
/// <para lang="en">Gets or sets the column width.</para>
119+
/// <para lang="zh">获得/设置 列宽</para>
120+
/// <para lang="en">Gets or sets the column width</para>
121121
/// </summary>
122122
public int Width { get; set; }
123123

src/BootstrapBlazor/Attributes/BootstrapModuleAutoLoaderAttribute.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace BootstrapBlazor.Components;
1313
class BootstrapModuleAutoLoaderAttribute(string? path = null) : JSModuleAutoLoaderAttribute(path)
1414
{
1515
/// <summary>
16-
/// <para lang="zh">获得/设置 模块名称。自动使用 modules 文件夹中的脚本</para>
17-
/// <para lang="en">Gets or sets the module name. Automatically uses scripts from the modules folder.</para>
16+
/// <para lang="zh">获得/设置 模块名称。自动使用 modules 文件夹中的脚本</para>
17+
/// <para lang="en">Gets or sets the module name. Automatically uses scripts from the modules folder</para>
1818
/// </summary>
1919
public string? ModuleName { get; set; }
2020
}

src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ public class JSModuleAutoLoaderAttribute(string? path = null) : Attribute
2020
public string? Path { get; } = path;
2121

2222
/// <summary>
23-
/// <para lang="zh">表示对 JavaScript 对象的引用。默认值为 false</para>
24-
/// <para lang="en">Represents a reference to a JavaScript object. Default value is false.</para>
23+
/// <para lang="zh">表示对 JavaScript 对象的引用。默认值为 false</para>
24+
/// <para lang="en">Represents a reference to a JavaScript object. Default value is false</para>
2525
/// </summary>
2626
public bool JSObjectReference { get; set; }
2727

2828
/// <summary>
29-
/// <para lang="zh">获得/设置 是否自动调用 init。默认值为 true</para>
30-
/// <para lang="en">Gets or sets whether to automatically invoke init. Default is true.</para>
29+
/// <para lang="zh">获得/设置 是否自动调用 init。默认值为 true</para>
30+
/// <para lang="en">Gets or sets whether to automatically invoke init. Default is true</para>
3131
/// </summary>
3232
public bool AutoInvokeInit { get; set; } = true;
3333

3434
/// <summary>
35-
/// <para lang="zh">获得/设置 是否自动调用 dispose。默认值为 true</para>
36-
/// <para lang="en">Gets or sets whether to automatically invoke dispose. Default is true.</para>
35+
/// <para lang="zh">获得/设置 是否自动调用 dispose。默认值为 true</para>
36+
/// <para lang="en">Gets or sets whether to automatically invoke dispose. Default is true</para>
3737
/// </summary>
3838
public bool AutoInvokeDispose { get; set; } = true;
3939
}

src/BootstrapBlazor/Attributes/PlaceHolderAttribute.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
namespace BootstrapBlazor.Components;
77

88
/// <summary>
9-
/// <para lang="zh">PlaceHolderAttribute 类,用于定义属性的占位符</para>
10-
/// <para lang="en">PlaceHolderAttribute class used to define a placeholder for a property.</para>
9+
/// <para lang="zh">PlaceHolderAttribute 类,用于定义属性的占位符</para>
10+
/// <para lang="en">PlaceHolderAttribute class used to define a placeholder for a property</para>
1111
/// </summary>
12-
/// <param name="placeholder"><para lang="zh">占位符文本</para><para lang="en">The placeholder text.</para></param>
12+
/// <param name="placeholder"><para lang="zh">占位符文本</para><para lang="en">The placeholder text</para></param>
1313
[AttributeUsage(AttributeTargets.Property)]
1414
public class PlaceHolderAttribute(string placeholder) : Attribute
1515
{
1616
/// <summary>
1717
/// <para lang="zh">获得 占位符文本</para>
18-
/// <para lang="en">Gets the placeholder text.</para>
18+
/// <para lang="en">Gets the placeholder text</para>
1919
/// </summary>
2020
public string Text => placeholder;
2121
}

src/BootstrapBlazor/Attributes/TabItemOptionAttribute.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ public class TabItemOptionAttribute : Attribute
1414
{
1515
/// <summary>
1616
/// <para lang="zh">获得/设置 TabItem 文本</para>
17-
/// <para lang="en">Gets or sets the text of the tab item.</para>
17+
/// <para lang="en">Gets or sets the text of the tab item</para>
1818
/// </summary>
1919
public string? Text { get; set; }
2020

2121
/// <summary>
22-
/// <para lang="zh">获得/设置 当前 TabItem 是否可关闭。默认值为 true</para>
23-
/// <para lang="en">Gets or sets whether the current TabItem is closable. Default is true.</para>
22+
/// <para lang="zh">获得/设置 当前 TabItem 是否可关闭。默认值为 true</para>
23+
/// <para lang="en">Gets or sets whether the current TabItem is closable. Default is true</para>
2424
/// </summary>
2525
public bool Closable { get; set; } = true;
2626

2727
/// <summary>
2828
/// <para lang="zh">获得/设置 图标字符串</para>
29-
/// <para lang="en">Gets or sets the icon string.</para>
29+
/// <para lang="en">Gets or sets the icon string</para>
3030
/// </summary>
3131
public string? Icon { get; set; }
3232
}

src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ namespace BootstrapBlazor.Components;
77

88
/// <summary>
99
/// <para lang="zh">定义目标数据类型的 UI 生成元数据组</para>
10-
/// <para lang="zh">通常模型类型位于与 Blazor 组件 UI 层不同的层</para>
11-
/// <para lang="zh">在这种情况下,使用 <see cref="TableMetadataForAttribute"/> 为 Table 组件定义元数据类型</para>
10+
/// <para lang="zh">通常模型类型位于与 Blazor 组件 UI 层不同的层</para>
11+
/// <para lang="zh">在这种情况下,使用 <see cref="TableMetadataForAttribute"/> 为 Table 组件定义元数据类型</para>
1212
/// <para lang="zh">然后使用 <seealso cref="TableMetadataTypeService"/> 注册元数据类型</para>
1313
/// <para lang="en">Define a group of UI generation metadata for target data type</para>
14-
/// <para lang="en">Usually model types are at different layer to the blazor component UI layer.</para>
15-
/// <para lang="en">In this case, use <see cref="TableMetadataForAttribute"/> to define a metadata type for Table component.</para>
14+
/// <para lang="en">Usually model types are at different layer to the blazor component UI layer</para>
15+
/// <para lang="en">In this case, use <see cref="TableMetadataForAttribute"/> to define a metadata type for Table component</para>
1616
/// <para lang="en">Then register metadata type with <seealso cref="TableMetadataTypeService"/></para>
1717
///
1818
/// <example>
@@ -42,9 +42,9 @@ namespace BootstrapBlazor.Components;
4242
/// public string? Name2 { get; set; }
4343
/// }
4444
/// </code>
45-
/// <para lang="zh">在使用元数据之前,需要注册元数据类型</para>
45+
/// <para lang="zh">在使用元数据之前,需要注册元数据类型</para>
4646
/// <para lang="zh">在程序集中注册元数据类型</para>
47-
/// <para lang="en">before using the metadata, it needs to register the metadata types.</para>
47+
/// <para lang="en">before using the metadata, it needs to register the metadata types</para>
4848
/// <para lang="en">register metadata types in assembly</para>
4949
/// <code>
5050
/// TableMetadataTypeService.RegisterMetadataTypes(typeof(Pig).Assembly);

src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public partial class AutoComplete
105105

106106
/// <summary>
107107
/// <para lang="zh">获得 清除图标样式</para>
108-
/// <para lang="en">Gets the clear icon class string.</para>
108+
/// <para lang="en">Gets the clear icon class string</para>
109109
/// </summary>
110110
private string? ClearClassString => CssBuilder.Default("clear-icon")
111111
.AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None)
@@ -176,7 +176,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
176176

177177
/// <summary>
178178
/// <para lang="zh">获得 是否显示清除按钮</para>
179-
/// <para lang="en">Gets whether show the clear button.</para>
179+
/// <para lang="en">Gets whether show the clear button</para>
180180
/// </summary>
181181
private bool GetClearable() => IsClearable && !IsDisabled;
182182

0 commit comments

Comments
 (0)