Skip to content

Commit 5a07246

Browse files
committed
doc: 更新示例
1 parent 885c281 commit 5a07246

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
<h4>@Localizer["Description"]</h4>
77

8-
<DemoBlock Title="@Localizer["ToggleButton"]" Introduction="@Localizer["ToggleIntroduction"]" Name="Toggle">
9-
<ToggleButton Text="Toggle" Color="Color.Danger"></ToggleButton>
10-
</DemoBlock>
11-
128
<DemoBlock Title="@Localizer["Block1Title"]" Introduction="@Localizer["Block1Intro"]" Name="Normal">
139
<div class="row g-3">
1410
<div class="col-6 col-sm-4 col-md-3 col-lg-auto"><Button OnClick="@ButtonClick" Color="Color.Primary">@Localizer["PrimaryButton"]</Button></div>
@@ -156,6 +152,10 @@
156152
</div>
157153
</DemoBlock>
158154

155+
<DemoBlock Title="@Localizer["ToggleButton"]" Introduction="@Localizer["ToggleIntroduction"]" Name="Toggle">
156+
<ToggleButton Text="Toggle" Color="Color.Danger"></ToggleButton>
157+
</DemoBlock>
158+
159159
<AttributeTable Items="@GetAttributes()" />
160160

161161
<EventTable Items="@GetEvents()" />

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,9 @@
22112211
"TooltipText": "Button",
22122212
"TooltipTitle": "Tooltip",
22132213
"TooltipIntro": "Set <code>TooltipText</code> <code>TooltipPlacement</code> <code>TooltipTrigger</code> shortcut button prompt bar information, position, and triggering method. For more functions, please use the <code>Tooltip</code> component to implement. In this example, the second button is in the <b>disabled</b> state, and the prompt bar is still available",
2214-
"TooltipDisabledText": "Disabled"
2214+
"TooltipDisabledText": "Disabled",
2215+
"ToggleButton": "Toggle",
2216+
"ToggleIntroduction": "Get the current button <code>Toggle</code> state by setting the <code>IsActiveChanged</code> or <code>OnToggleAsync</code> callback method"
22152217
},
22162218
"BootstrapBlazor.Server.Components.Samples.PulseButtons": {
22172219
"Block1Title": "Basic usage",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,9 @@
22112211
"TooltipText": "按钮",
22122212
"TooltipTitle": "按钮提示栏",
22132213
"TooltipIntro": "通过设置 <code>TooltipText</code> <code>TooltipPlacement</code> <code>TooltipTrigger</code> 快捷设置按钮提示栏信息、位置、触发方式,更多功能请使用 <code>Tooltip</code> 组件实现,本例中第二个按钮是 <b>禁用</b> 状态,提示栏仍然可用",
2214-
"TooltipDisabledText": "禁用按钮"
2214+
"TooltipDisabledText": "禁用按钮",
2215+
"ToggleButton": "状态切换按钮",
2216+
"ToggleIntroduction": "通过设置 <code>IsActiveChanged</code> 或者 <code>OnToggleAsync</code> 回调方法获得当前按钮 <code>Toggle</code> 状态"
22152217
},
22162218
"BootstrapBlazor.Server.Components.Samples.PulseButtons": {
22172219
"Block1Title": "基础用法",

0 commit comments

Comments
 (0)