Skip to content

Commit ffb6411

Browse files
committed
doc: 更新示例
1 parent 66593c4 commit ffb6411

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
<Button Text="Disabled" OnClickWithoutRender="OnToggleDisable"></Button>
3+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
namespace BootstrapBlazor.Server.Components.Components;
7+
8+
/// <summary>
9+
/// TabItemContentDemo 组件
10+
/// </summary>
11+
public partial class TabItemContentDemo
12+
{
13+
[CascadingParameter]
14+
[NotNull]
15+
private TabItem? TabItem { get; set; }
16+
17+
private Task OnToggleDisable()
18+
{
19+
TabItem.SetDisabled(true);
20+
return Task.CompletedTask;
21+
}
22+
}

src/BootstrapBlazor.Server/Components/Samples/Tabs.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ private void Navigation()
170170
</TabItem>
171171
<TabItem Text="@Localizer["TabItem2Text"]" Icon="fa-solid fa-gauge-high">
172172
<div>@Localizer["TabItem2Content"]</div>
173+
<TabItemContentDemo></TabItemContentDemo>
173174
</TabItem>
174175
<TabItem Text="@Localizer["TabItem3Text"]" Icon="fa-solid fa-sitemap">
175176
<div>@Localizer["TabItem3Content"]</div>

0 commit comments

Comments
 (0)