Skip to content

Commit 6ca9ede

Browse files
committed
doc: 更新示例
1 parent 034b9b9 commit 6ca9ede

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

8-
<DemoBlock Title="@Localizer["MultiSelectColorTitle"]" Introduction="@Localizer["MultiSelectColorIntro"]" Name="Color">
8+
@* <DemoBlock Title="@Localizer["MultiSelectColorTitle"]" Introduction="@Localizer["MultiSelectColorIntro"]" Name="Color">
99
<div class="row g-3">
1010
<div class="col-12 col-sm-6">
1111
<MultiSelect TValue="string" Items="@Items1" />
@@ -96,15 +96,24 @@
9696
<section ignore>@((MarkupString)Localizer["MultiSelectBindingEnumCollectionDescription"].Value)</section>
9797
<MultiSelect @bind-Value="@SelectedEnumValues"></MultiSelect>
9898
<section ignore>@(string.Join(",", SelectedEnumValues))</section>
99-
</DemoBlock>
99+
</DemoBlock> *@
100100

101101
<DemoBlock Title="@Localizer["MultiSelectFlagsEnumTitle"]" Introduction="@Localizer["MultiSelectFlagsEnumIntro"]"
102102
Name="Flags">
103-
<section ignore>@((MarkupString)Localizer["MultiSelectFlagsEnumDescription"].Value)</section>
103+
<section ignore>
104+
<Pre>[Flags]
105+
private enum MultiSelectEnumFoo
106+
{
107+
One = 1,
108+
Two = 2,
109+
Three = 4,
110+
Four = 8
111+
}</Pre>
112+
</section>
104113
<MultiSelect @bind-Value="@EnumFoo"></MultiSelect>
105114
</DemoBlock>
106115

107-
<DemoBlock Title="@Localizer["MultiSelectSearchTitle"]" Introduction="@Localizer["MultiSelectSearchIntro"]" Name="Search">
116+
@* <DemoBlock Title="@Localizer["MultiSelectSearchTitle"]" Introduction="@Localizer["MultiSelectSearchIntro"]" Name="Search">
108117
<section ignore>@((MarkupString)Localizer["MultiSelectSearchDescription"].Value)</section>
109118
<MultiSelect Items="@Items" @bind-Value="@SelectedSearchItemsValue" ShowSearch="true" OnSearchTextChanged="@OnSearch" />
110119
<section ignore>@SelectedSearchItemsValue</section>
@@ -259,7 +268,7 @@
259268
<Display Value="@_editString"></Display>
260269
</div>
261270
</div>
262-
</DemoBlock>
271+
</DemoBlock> *@
263272

264273
<AttributeTable Items="@GetAttributes()" />
265274

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,8 @@
29412941
"MultiSelectSearchTitle": "Search function",
29422942
"MultiSelectSearchIntro": "Turn on search by setting the <code>ShowSearch</code> value",
29432943
"MultiSelectSearchDescription": "In this example, the search callback delegate method is set <code>onSearchTextChanged</code> to customize search results if the display text is used internally to make a fuzzy match when not set",
2944+
"MultiSelectFlagsEnumTitle": "Flags Enum",
2945+
"MultiSelectFlagsEnumIntro": "When the binding value is an <code>Enum</code> data type, if it has a <code>Flags</code> tag, multiple selection mode is automatically supported",
29442946
"MultiSelectGroupTitle": "Grouping",
29452947
"MultiSelectGroupIntro": "Alternatives are presented in groups",
29462948
"MultiSelectDisableTitle": "Disable the feature",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,8 @@
29412941
"MultiSelectSearchTitle": "搜索功能",
29422942
"MultiSelectSearchIntro": "通过设置 <code>ShowSearch</code> 值开启搜索功能",
29432943
"MultiSelectSearchDescription": "本例中设置搜索回调委托方法 <code>OnSearchTextChanged</code> 进行自定义搜索结果,如果未设置时内部使用显示文本进行模糊匹配",
2944+
"MultiSelectFlagsEnumTitle": "Flags 枚举",
2945+
"MultiSelectFlagsEnumIntro": "绑定值为 <code>Enum</code> 数据类型时,如果枚举有 <code>Flags</code> 标签时,自动支持多选模式",
29442946
"MultiSelectGroupTitle": "分组",
29452947
"MultiSelectGroupIntro": "通过设置 <code>GroupName</code> 将下拉框中的备选项进行分组显示",
29462948
"MultiSelectDisableTitle": "禁用功能",

0 commit comments

Comments
 (0)