Skip to content

Commit 0db420d

Browse files
authored
doc(Comments): update documentation (#7737)
* doc: 更新注释信息 * doc: 更新注释文档 * refactor: 更正单词拼写 * chore: 更正注释信息 * doc: 更新注释文档
1 parent 1fc4ae6 commit 0db420d

File tree

8 files changed

+696
-231
lines changed

8 files changed

+696
-231
lines changed

src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ private List<IEditorItem> RenderItems
247247
}
248248

249249
/// <summary>
250-
/// <para lang="zh">OnInitialized 方法</para>
251-
/// <para lang="en">OnInitialized Method</para>
250+
/// <inheritdoc/>
252251
/// </summary>
253252
protected override void OnInitialized()
254253
{

src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ public partial class BootstrapLabel
1313
{
1414
/// <summary>
1515
/// <para lang="zh">获得/设置 组件值 显示文本 默认 null</para>
16-
/// <para lang="en">Gets or sets component值 display文本 Default is null</para>
16+
/// <para lang="en">Gets or sets the component value display text. Default is null</para>
1717
/// </summary>
1818
[Parameter]
1919
[NotNull]
2020
public string? Value { get; set; }
2121

2222
/// <summary>
2323
/// <para lang="zh">获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示</para>
24-
/// <para lang="en">Gets or sets whetherdisplay Tooltip 多用于标签文字过长导致裁减时使用 Default is false 不display</para>
24+
/// <para lang="en">Gets or sets whether to display a tooltip for the label, often used when the label text is too long and gets truncated. Default is false</para>
2525
/// </summary>
2626
[Parameter]
2727
public bool? ShowLabelTooltip { get; set; }
2828

2929
/// <summary>
3030
/// <para lang="zh">获得/设置 标签宽度 默认 null 未设置使用全局设置 <code>--bb-row-label-width</code> 值</para>
31-
/// <para lang="en">Gets or sets 标签width Default is null 未Sets使用全局Sets <code>--bb-row-label-width</code> </para>
31+
/// <para lang="en">Gets or sets the label width. Default is null, uses the global setting <code>--bb-row-label-width</code> value</para>
3232
/// </summary>
3333
[Parameter]
3434
public int? LabelWidth { get; set; }

src/BootstrapBlazor/Extensions/EnumExtensions.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
namespace BootstrapBlazor.Components;
1010

1111
/// <summary>
12-
/// <para lang="zh">枚举类型扩展方法</para>
13-
/// <para lang="en">Enum Extensions</para>
12+
/// <para lang="zh">Enum 枚举扩展方法</para>
13+
/// <para lang="en">Enum extensions</para>
1414
/// </summary>
1515
public static class EnumExtensions
1616
{
1717
/// <summary>
18-
/// <para lang="zh">获取 DescriptionAttribute 标签方法</para>
19-
/// <para lang="en">Get DescriptionAttribute method</para>
18+
/// <para lang="zh">获得 枚举值的 <see cref="DescriptionAttribute"/> 标签值</para>
19+
/// <para lang="en">Gets the <see cref="DescriptionAttribute"/> value of the enum value</para>
2020
/// </summary>
2121
/// <param name="val"></param>
2222
public static string ToDescriptionString<TEnum>(this TEnum val) where TEnum : Enum => typeof(TEnum).ToDescriptionString(val.ToString());
2323

2424
/// <summary>
25-
/// <para lang="zh">通过字段名称获取 DescriptionAttribute 标签值</para>
26-
/// <para lang="en">Get DescriptionAttribute value by field name</para>
25+
/// <para lang="zh">获得 指定字段的 <see cref="DescriptionAttribute"/> 标签值</para>
26+
/// <para lang="en">Gets the <see cref="DescriptionAttribute"/> value by field name</para>
2727
/// </summary>
2828
/// <param name="type"></param>
2929
/// <param name="fieldName"></param>
@@ -40,16 +40,16 @@ public static string ToDescriptionString(this Type? type, string? fieldName)
4040
}
4141

4242
/// <summary>
43-
/// <para lang="zh">通过字段名称获取 DisplayAttribute/DescriptionAttribute 标签值</para>
44-
/// <para lang="en">Get DisplayAttribute/DescriptionAttribute value by field name</para>
43+
/// <para lang="zh">获得 枚举值的显示名称</para>
44+
/// <para lang="en">Gets the display name of the enum value</para>
4545
/// </summary>
4646
/// <typeparam name="TEnum"></typeparam>
4747
/// <param name="enum"></param>
4848
public static string ToDisplayName<TEnum>(this TEnum @enum) where TEnum : Enum => Utility.GetDisplayName<TEnum>(@enum.ToString());
4949

5050
/// <summary>
51-
/// <para lang="zh">获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称</para>
52-
/// <para lang="en">获取指定enumtype的enum值collection,Default is通过 DisplayAttribute DescriptionAttribute 标签display DisplayName 支持资源文件 回退机制display字段名称</para>
51+
/// <para lang="zh">获得 指定枚举类型的枚举值集合</para>
52+
/// <para lang="en">Gets the enum value collection for the specified enum type</para>
5353
/// </summary>
5454
/// <param name="type"></param>
5555
/// <param name="additionalItem"></param>
@@ -70,8 +70,8 @@ public static List<SelectedItem> ToSelectList(this Type type, SelectedItem? addi
7070
}
7171

7272
/// <summary>
73-
/// <para lang="zh">获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称</para>
74-
/// <para lang="en">获取指定enumtype的enum值collection,Default is通过 DisplayAttribute DescriptionAttribute 标签display DisplayName 支持资源文件 回退机制display字段名称</para>
73+
/// <para lang="zh">获得 指定枚举类型的枚举值集合</para>
74+
/// <para lang="en">Gets the enum value collection for the specified enum type</para>
7575
/// </summary>
7676
/// <param name="type"></param>
7777
/// <param name="additionalItem"></param>
@@ -97,8 +97,8 @@ public static List<SelectedItem<TValue>> ToSelectList<TValue>(this Type type, Se
9797
}
9898

9999
/// <summary>
100-
/// <para lang="zh">判断类型是否为枚举类型</para>
101-
/// <para lang="en">Determine whether the type is an enumeration type</para>
100+
/// <para lang="zh">获得 类型是否为枚举类型</para>
101+
/// <para lang="en">Gets whether the type is an enumeration type</para>
102102
/// </summary>
103103
/// <param name="type"></param>
104104
public static bool IsEnum(this Type? type)
@@ -113,8 +113,8 @@ public static bool IsEnum(this Type? type)
113113
}
114114

115115
/// <summary>
116-
/// <para lang="zh">判断类型是否为 Flag 枚举类型</para>
117-
/// <para lang="en">Determine whether the type is a Flag enumeration type</para>
116+
/// <para lang="zh">获得 类型是否为 <see cref="FlagsAttribute"/> 枚举类型</para>
117+
/// <para lang="en">Gets whether the type is a <see cref="FlagsAttribute"/> enumeration type</para>
118118
/// </summary>
119119
/// <param name="type"></param>
120120
public static bool IsFlagEnum(this Type? type) => type != null && IsEnum(type) && type.GetCustomAttribute<FlagsAttribute>() != null;

src/BootstrapBlazor/Utils/BootstrapDynamicComponent.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ namespace BootstrapBlazor.Components;
1010
/// <para lang="en">Dynamic component class</para>
1111
/// </summary>
1212
/// <param name="componentType"></param>
13-
/// <param name="parameters"><para lang="zh">TCom 组件所需要的参数集合</para><para lang="en">TCom component所需要的参数collection</para></param>
13+
/// <param name="parameters">
14+
/// <para lang="zh">TCom 组件所需要的参数集合</para>
15+
/// <para lang="en">TCom component所需要的参数collection</para>
16+
/// </param>
1417
public class BootstrapDynamicComponent(Type componentType, IDictionary<string, object?>? parameters = null)
1518
{
1619
/// <summary>
1720
/// <para lang="zh">创建自定义组件方法</para>
1821
/// <para lang="en">Create custom component method</para>
1922
/// </summary>
2023
/// <typeparam name="TCom"></typeparam>
21-
/// <param name="parameters"><para lang="zh">TCom 组件所需要的参数集合</para><para lang="en">TCom component所需要的参数collection</para></param>
24+
/// <param name="parameters">
25+
/// <para lang="zh">TCom 组件所需要的参数集合</para>
26+
/// <para lang="en">TCom component所需要的参数collection</para>
27+
/// </param>
2228
public static BootstrapDynamicComponent CreateComponent<TCom>(IDictionary<string, object?>? parameters = null) where TCom : IComponent => CreateComponent(typeof(TCom), parameters);
2329

2430
/// <summary>
@@ -33,7 +39,10 @@ public class BootstrapDynamicComponent(Type componentType, IDictionary<string, o
3339
/// <para lang="en">Create custom component method</para>
3440
/// </summary>
3541
/// <param name="type"></param>
36-
/// <param name="parameters"></param>
42+
/// <param name="parameters">
43+
/// <para lang="zh">组件所需要的参数集合</para>
44+
/// <para lang="en">Parameters required by the component</para>
45+
/// </param>
3746
public static BootstrapDynamicComponent CreateComponent(Type type, IDictionary<string, object?>? parameters = null) => new(type, parameters);
3847

3948
/// <summary>

0 commit comments

Comments
 (0)