Skip to content

Commit 4d0f444

Browse files
authored
doc(Tab): update document as english (#5644)
* chore: 更新依赖包 * doc: 使用英文注释 * doc: 注释更改为英语 * doc: 注释更改为英语
1 parent d212ea6 commit 4d0f444

File tree

4 files changed

+35
-37
lines changed

4 files changed

+35
-37
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<PackageReference Include="BootstrapBlazor.Chart" Version="9.0.0" />
3232
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="9.0.0" />
3333
<PackageReference Include="BootstrapBlazor.Dock" Version="9.0.0" />
34-
<PackageReference Include="BootstrapBlazor.DockView" Version="9.1.1" />
34+
<PackageReference Include="BootstrapBlazor.DockView" Version="9.1.3" />
3535
<PackageReference Include="BootstrapBlazor.DriverJs" Version="9.0.3" />
3636
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="9.0.3" />
3737
<PackageReference Include="BootstrapBlazor.FileViewer" Version="9.0.0" />
@@ -65,7 +65,7 @@
6565
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.1" />
6666
<PackageReference Include="BootstrapBlazor.Topology" Version="9.0.0" />
6767
<PackageReference Include="BootstrapBlazor.UniverIcon" Version="9.0.1" />
68-
<PackageReference Include="BootstrapBlazor.UniverSheet" Version="9.0.0-beta07" />
68+
<PackageReference Include="BootstrapBlazor.UniverSheet" Version="9.0.0-beta09" />
6969
<PackageReference Include="BootstrapBlazor.VideoPlayer" Version="9.0.3" />
7070
<PackageReference Include="BootstrapBlazor.WinBox" Version="9.0.7" />
7171
</ItemGroup>

src/BootstrapBlazor/Components/Tab/BootstrapBlazorAuthorizeView.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
55

6-
using Microsoft.AspNetCore.Authorization;
76
using Microsoft.AspNetCore.Components.Authorization;
87
using Microsoft.AspNetCore.Components.Rendering;
98
using Microsoft.AspNetCore.Components.Routing;
@@ -12,31 +11,31 @@
1211
namespace BootstrapBlazor.Components;
1312

1413
/// <summary>
15-
/// BootstrapBlazorAuthorizeView 组件
14+
/// BootstrapBlazorAuthorizeView component
1615
/// </summary>
1716
public class BootstrapBlazorAuthorizeView : ComponentBase
1817
{
1918
/// <summary>
20-
/// 获得/设置 路由关联上下文
19+
/// Gets or sets the type associated with the route. default is null
2120
/// </summary>
2221
[Parameter]
2322
[NotNull]
2423
public Type? Type { get; set; }
2524

2625
/// <summary>
27-
/// 获得/设置 路由关联上下文
26+
/// Gets or sets the parameters associated with the route. default is null
2827
/// </summary>
2928
[Parameter]
3029
public IReadOnlyDictionary<string, object>? Parameters { get; set; }
3130

3231
/// <summary>
33-
/// 获得/设置 NotAuthorized 模板
32+
/// Gets or sets the template to display when the user is not authorized. default is null
3433
/// </summary>
3534
[Parameter]
3635
public RenderFragment? NotAuthorized { get; set; }
3736

3837
/// <summary>
39-
/// The resource to which access is being controlled.
38+
/// Gets or sets the resource to which access is being controlled. default is null
4039
/// </summary>
4140
[Parameter]
4241
public object? Resource { get; set; }
@@ -56,7 +55,7 @@ public class BootstrapBlazorAuthorizeView : ComponentBase
5655
/// <summary>
5756
/// <inheritdoc/>
5857
/// </summary>
59-
/// <returns></returns>
58+
/// <returns>A task that represents the asynchronous operation.</returns>
6059
protected override async Task OnInitializedAsync()
6160
{
6261
Authorized = Type == null || await Type.IsAuthorizedAsync(ServiceProvider, AuthenticationState, Resource);
@@ -65,10 +64,9 @@ protected override async Task OnInitializedAsync()
6564
/// <summary>
6665
/// <inheritdoc/>
6766
/// </summary>
68-
/// <param name="builder"></param>
6967
protected override void BuildRenderTree(RenderTreeBuilder builder)
7068
{
71-
// 判断是否开启权限
69+
// Check if authorization is enabled
7270
if (Authorized && Type != null)
7371
{
7472
var index = 0;

src/BootstrapBlazor/Components/Tab/TabItem.cs

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

88
/// <summary>
9-
/// TabItem 组件基类
9+
/// TabItem component
1010
/// </summary>
1111
public class TabItem : ComponentBase
1212
{
1313
/// <summary>
14-
/// 获得/设置 文本文字
14+
/// Gets or sets the text. Default is null
1515
/// </summary>
1616
[Parameter]
1717
public string? Text { get; set; }
1818

1919
/// <summary>
20-
/// 获得/设置 TabItem Header 模板
20+
/// Gets or sets the TabItem Header template. Default is null
2121
/// </summary>
2222
[Parameter]
2323
public RenderFragment<TabItem>? HeaderTemplate { get; set; }
2424

2525
/// <summary>
26-
/// 获得/设置 请求地址
26+
/// Gets or sets the request URL. Default is null
2727
/// </summary>
2828
[Parameter]
2929
[NotNull]
3030
public string? Url { get; set; }
3131

3232
/// <summary>
33-
/// 获得/设置 当前状态是否激活
33+
/// Gets or sets whether the current state is active. Default is false
3434
/// </summary>
3535
[Parameter]
3636
public bool IsActive { get; set; }
3737

3838
/// <summary>
39-
/// 获得/设置 当前状态是否 禁用 默认 false
39+
/// Gets or sets whether the current state is disabled, default is false
4040
/// </summary>
4141
[Parameter]
4242
public bool IsDisabled { get; set; }
4343

4444
/// <summary>
45-
/// 获得/设置 当前 TabItem 是否可关闭 默认为 true 可关闭
45+
/// Gets or sets whether the current TabItem is closable, default is true
4646
/// </summary>
4747
[Parameter]
4848
public bool Closable { get; set; } = true;
4949

5050
/// <summary>
51-
/// 获得/设置 当前 TabItem 是否始终加载 此参数作用于设置 <see cref="Tab.IsLazyLoadTabItem"/> 默认 false
51+
/// Gets or sets whether the current TabItem is always loaded, this parameter is used to set <see cref="Tab.IsLazyLoadTabItem"/>, default is false
5252
/// </summary>
5353
[Parameter]
5454
public bool AlwaysLoad { get; set; }
5555

5656
/// <summary>
57-
/// 获得/设置 自定义样式名
57+
/// Gets or sets the custom CSS class. Default is null
5858
/// </summary>
5959
[Parameter]
6060
public string? CssClass { get; set; }
6161

6262
/// <summary>
63-
/// 获得/设置 图标字符串
63+
/// Gets or sets the icon string. Default is null
6464
/// </summary>
6565
[Parameter]
6666
public string? Icon { get; set; }
6767

6868
/// <summary>
69-
/// 获得/设置 是否显示全屏按钮 默认 true
69+
/// Gets or sets whether to show the full screen button, default is true
7070
/// </summary>
7171
[Parameter]
7272
public bool ShowFullScreen { get; set; } = true;
7373

7474
/// <summary>
75-
/// 获得/设置 组件内容
75+
/// Gets or sets the component content. Default is null
7676
/// </summary>
7777
[Parameter]
7878
public RenderFragment? ChildContent { get; set; }
7979

8080
/// <summary>
81-
/// 获得/设置 所属 Tab 实例
81+
/// Gets or sets the associated Tab instance
8282
/// </summary>
8383
[CascadingParameter]
8484
protected internal Tab? TabSet { get; set; }
8585

8686
private string? LastText { get; set; }
8787

8888
/// <summary>
89-
/// OnInitialized 方法
89+
/// <inheritdoc/>
9090
/// </summary>
9191
protected override void OnInitialized()
9292
{
@@ -110,13 +110,13 @@ protected override void OnParametersSet()
110110
}
111111

112112
/// <summary>
113-
/// 设置是否被选中方法
113+
/// Method to set whether it is active
114114
/// </summary>
115115
/// <param name="active"></param>
116116
public void SetActive(bool active) => IsActive = active;
117117

118118
/// <summary>
119-
/// 设置是否被禁用
119+
/// Method to set whether it is disabled
120120
/// </summary>
121121
/// <param name="disabled"></param>
122122
public void SetDisabled(bool disabled)
@@ -125,13 +125,13 @@ public void SetDisabled(bool disabled)
125125
}
126126

127127
/// <summary>
128-
/// 设置是否被禁用
128+
/// Method to set whether it is disabled without rendering
129129
/// </summary>
130130
/// <param name="disabled"></param>
131131
internal void SetDisabledWithoutRender(bool disabled) => IsDisabled = disabled;
132132

133133
/// <summary>
134-
/// 重新设置标签文字等参数
134+
/// Method to reset the tab text and other parameters
135135
/// </summary>
136136
/// <param name="text"></param>
137137
/// <param name="icon"></param>
@@ -155,7 +155,7 @@ public void SetHeader(string text, string? icon = null, bool? closable = null)
155155
}
156156

157157
/// <summary>
158-
/// 通过指定参数集合获取 TabItem 实例
158+
/// Gets a TabItem instance by specifying a set of parameters
159159
/// </summary>
160160
/// <param name="parameters"></param>
161161
/// <returns></returns>

src/BootstrapBlazor/Components/Tab/TabLink.razor.cs

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

88
/// <summary>
9-
///
9+
/// Represents a link within a tab component.
1010
/// </summary>
1111
public sealed partial class TabLink
1212
{
1313
/// <summary>
14-
/// 获得/设置 文本文字
14+
/// Gets or sets the text of the link. Default is null
1515
/// </summary>
1616
[Parameter]
1717
public string? Text { get; set; }
1818

1919
/// <summary>
20-
/// 获得/设置 请求地址
20+
/// Gets or sets the URL of the link. Default is null
2121
/// </summary>
2222
[Parameter]
2323
public string? Url { get; set; }
2424

2525
/// <summary>
26-
/// 获得/设置 图标字符串
26+
/// Gets or sets the icon of the link. Default is null
2727
/// </summary>
2828
[Parameter]
2929
public string? Icon { get; set; }
3030

3131
/// <summary>
32-
/// 获得/设置 当前 TabItem 是否可关闭 默认为 true 可关闭
32+
/// Gets or sets a value indicating whether the tab item is closable. Default is true.
3333
/// </summary>
3434
[Parameter]
3535
public bool Closable { get; set; } = true;
3636

3737
/// <summary>
38-
/// 点击组件时回调此委托方法 默认为空
38+
/// Gets or sets the callback method when the link is clicked. Default is null.
3939
/// </summary>
4040
[Parameter]
4141
public Func<Task>? OnClick { get; set; }
@@ -45,7 +45,7 @@ public sealed partial class TabLink
4545
private TabItemTextOptions? TabItemOptions { get; set; }
4646

4747
/// <summary>
48-
/// 获得/设置 组件内容
48+
/// Gets or sets the content of the component. Default is null
4949
/// </summary>
5050
[Parameter]
5151
public RenderFragment? ChildContent { get; set; }

0 commit comments

Comments
 (0)