mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-05 13:39:39 +08:00
!2392 doc(#I4SNTP): add english translation of search page
* doc: 添加 search 示例资源文件
This commit is contained in:
parent
3d50fcedd1
commit
1c21fd9d1a
@ -2350,6 +2350,37 @@
|
||||
"Component": "Node custom components",
|
||||
"AttributeTitle": "TimelineItem attributes"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Samples.Searchs": {
|
||||
"Title": "Search box",
|
||||
"SubTitle": "Used for data search",
|
||||
"PlaceHolder": "Search for examples",
|
||||
"BasicUsageTitle": "Basic usage",
|
||||
"BasicUsageIntro": "Enter some of the data to search",
|
||||
"BasicUsageP": "Please enter <code>1234</code> to get the Smart Prompt and turn on auto focus by setting <code>IsAutoFocus='true'</code>",
|
||||
"ClearValueTitle": "Values are automatically emptied after searching",
|
||||
"ClearValueIntro": "Turn on the automatic emptying of the search box after search by setting <code>IsAutoClearAfterSearch="true"</code>",
|
||||
"DispalyButtonTitle": "The Empty button is displayed",
|
||||
"DispalyButtonIntro": "Control whether the Empty button is displayed by setting the <code>ShowClearButton</code> parameter",
|
||||
"keyboardsTitle": "Keyboard input instant search",
|
||||
"keyboardsIntro": "Control whether search operations are performed in real time by setting <code>the IsOnInputTrigger</code> parameter",
|
||||
"ChildContent": "Content",
|
||||
"Items": "Data source",
|
||||
"NoDataTip": "Auto-complete data prompts when there is no match",
|
||||
"NoDataTipDefaultValue": "No matching data",
|
||||
"SearchButtonLoadingIcon": "Searching for button icon",
|
||||
"ClearButtonIcon": "Clear the button color",
|
||||
"ClearButtonText": "Empty the button text",
|
||||
"ClearButtonColor": "Clear the button color",
|
||||
"SearchButtonColor": "Search for button color",
|
||||
"IsLikeMatch": "Whether fuzzy matching is turned on",
|
||||
"IsAutoFocus": "Whether to get the focus automatically",
|
||||
"IsAutoClearAfterSearch": "Click Search to automatically empty the search box",
|
||||
"IsOnInputTrigger": "Whether the search mode is triggered by input, it is triggered by clicking the search button by default",
|
||||
"IgnoreCase": "Whether case is ignored when matching",
|
||||
"ShowClearButton": "Whether the Clear button is displayed",
|
||||
"OnSearch": "Call back this delegate when you click Search",
|
||||
"OnClear": "Click Recall this order when emptying"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Components.DemoBlock": {
|
||||
"Title": "",
|
||||
"SubTitle": "Demo"
|
||||
|
@ -2355,6 +2355,37 @@
|
||||
"Component": "节点自定义组件",
|
||||
"AttributeTitle": "TimelineItem 属性"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Samples.Searchs": {
|
||||
"Title": "Search 搜索框",
|
||||
"SubTitle": "用于数据搜索",
|
||||
"PlaceHolder": "搜索示例",
|
||||
"BasicUsageTitle": "基本用法",
|
||||
"BasicUsageIntro": "输入部分数据进行搜索",
|
||||
"BasicUsageP": "请输入 <code>1234</code> 获取智能提示,通过设置 <code>IsAutoFocus='true'</code> 开启自动获得焦点功能",
|
||||
"ClearValueTitle": "搜索后自动清空值",
|
||||
"ClearValueIntro": "通过设置 <code>IsAutoClearAfterSearch="true"</code> 开启搜索后自动清空搜索框功能",
|
||||
"DispalyButtonTitle": "显示清空按钮",
|
||||
"DispalyButtonIntro": "通过设置 <code>ShowClearButton</code> 参数控制是否显示清空按钮",
|
||||
"keyboardsTitle": "键盘输入即时搜索",
|
||||
"keyboardsIntro": "通过设置 <code>IsOnInputTrigger</code> 参数控制是否实时进行搜索操作",
|
||||
"ChildContent": "内容",
|
||||
"Items": "数据源",
|
||||
"NoDataTip": "自动完成数据无匹配项时提示信息",
|
||||
"NoDataTipDefaultValue": "无匹配数据",
|
||||
"SearchButtonLoadingIcon": "正在搜索按钮图标",
|
||||
"ClearButtonIcon": "清空按钮颜色",
|
||||
"ClearButtonText": "清空按钮文本",
|
||||
"ClearButtonColor": "清空按钮颜色",
|
||||
"SearchButtonColor": "搜索按钮颜色",
|
||||
"IsLikeMatch": "是否开启模糊匹配",
|
||||
"IsAutoFocus": "是否自动获得焦点",
|
||||
"IsAutoClearAfterSearch": "点击搜索后是否自动清空搜索框",
|
||||
"IsOnInputTrigger": "搜索模式是否为输入即触发,默认点击搜索按钮触发",
|
||||
"IgnoreCase": "匹配时是否忽略大小写",
|
||||
"ShowClearButton": "是否显示清除按钮",
|
||||
"OnSearch": "点击搜索时回调此委托",
|
||||
"OnClear": "点击清空时回调此委托"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Components.DemoBlock": {
|
||||
"Title": "未设置",
|
||||
"SubTitle": "示例"
|
||||
|
@ -1,27 +1,28 @@
|
||||
@page "/searchs"
|
||||
@inject IStringLocalizer<Searchs> Localizer
|
||||
|
||||
<h3>Search 搜索框</h3>
|
||||
<h3>@Localizer["Title"]</h3>
|
||||
|
||||
<h4>用于数据搜索</h4>
|
||||
<h4>@Localizer["SubTitle"]</h4>
|
||||
|
||||
<DemoBlock Title="基本用法" Introduction="输入部分数据进行搜索" Name="Normal">
|
||||
<p>请输入 <code>1234</code> 获取智能提示,通过设置 <code>IsAutoFocus="true"</code> 开启自动获得焦点功能</p>
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" IsAutoFocus="true" PlaceHolder="搜索示例" Items="@Items" OnSearch="@OnSearch1" IsSelectAllTextOnFocus="true"></Search>
|
||||
<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
|
||||
<p>@((MarkupString)Localizer["BasicUsageP"].Value)</p>
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" IsAutoFocus="true" PlaceHolder="@Localizer["PlaceHolder"]" Items="@Items" OnSearch="@OnSearch1" IsSelectAllTextOnFocus="true"></Search>
|
||||
<BlockLogger @ref="Trace" class="mt-3" />
|
||||
</DemoBlock>
|
||||
|
||||
<DemoBlock Title="搜索后自动清空值" Introduction="通过设置 <code>IsAutoClearAfterSearch="true"</code> 开启搜索后自动清空搜索框功能" Name="ClearValue">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" IsAutoClearAfterSearch="true" PlaceHolder="搜索示例" Items="@Items" OnSearch="@OnSearch2"></Search>
|
||||
<DemoBlock Title="@Localizer["ClearValueTitle"]" Introduction="@Localizer["ClearValueIntro"]" Name="ClearValue">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" IsAutoClearAfterSearch="true" PlaceHolder="@Localizer["PlaceHolder"]" Items="@Items" OnSearch="@OnSearch2"></Search>
|
||||
<BlockLogger @ref="Trace2" class="mt-3" />
|
||||
</DemoBlock>
|
||||
|
||||
<DemoBlock Title="显示清空按钮" Introduction="通过设置 <code>ShowClearButton</code> 参数控制是否显示清空按钮" Name="DispalyButton">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" PlaceHolder="搜索示例" ShowClearButton="true" Items="@Items" OnSearch="@OnSearch3" OnClear="@OnClear"></Search>
|
||||
<DemoBlock Title="@Localizer["DispalyButtonTitle"]" Introduction="@Localizer["DispalyButtonIntro"]" Name="DispalyButton">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" PlaceHolder="@Localizer["PlaceHolder"]" ShowClearButton="true" Items="@Items" OnSearch="@OnSearch3" OnClear="@OnClear"></Search>
|
||||
<BlockLogger @ref="Trace3" class="mt-3" />
|
||||
</DemoBlock>
|
||||
|
||||
<DemoBlock Title="键盘输入即时搜索" Introduction="通过设置 <code>IsOnInputTrigger</code> 参数控制是否实时进行搜索操作" Name="keyboards">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" PlaceHolder="搜索示例" IsOnInputTrigger="true" Items="@Items" OnSearch="@OnSearch4"></Search>
|
||||
<DemoBlock Title="@Localizer["keyboardsTitle"]" Introduction="@Localizer["keyboardsIntro"]" Name="keyboards">
|
||||
<Search IgnoreCase="true" IsLikeMatch="true" PlaceHolder="@Localizer["PlaceHolder"]" IsOnInputTrigger="true" Items="@Items" OnSearch="@OnSearch4"></Search>
|
||||
<BlockLogger @ref="Trace4" class="mt-3" />
|
||||
</DemoBlock>
|
||||
|
||||
|
@ -60,90 +60,90 @@ public sealed partial class Searchs
|
||||
/// 获得属性方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static IEnumerable<AttributeItem> GetAttributes() => new AttributeItem[]
|
||||
private IEnumerable<AttributeItem> GetAttributes() => new AttributeItem[]
|
||||
{
|
||||
// TODO: 移动到数据库中
|
||||
new AttributeItem() {
|
||||
Name = "ChildContent",
|
||||
Description = "内容",
|
||||
Description = Localizer["ChildContent"],
|
||||
Type = "RenderFragment",
|
||||
ValueList = " — ",
|
||||
DefaultValue = " — "
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "Items",
|
||||
Description = "内容",
|
||||
Description = Localizer["Items"],
|
||||
Type = "IEnumerable<string>",
|
||||
ValueList = " — ",
|
||||
DefaultValue = " — "
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "NoDataTip",
|
||||
Description = "自动完成数据无匹配项时提示信息",
|
||||
Description = Localizer["NoDataTip"],
|
||||
Type = "string",
|
||||
ValueList = " — ",
|
||||
DefaultValue = "无匹配数据"
|
||||
DefaultValue = Localizer["NoDataTipDefaultValue"]
|
||||
},
|
||||
new AttributeItem()
|
||||
{
|
||||
Name="SearchButtonLoadingIcon",
|
||||
Description = "正在搜索按钮图标",
|
||||
Description = Localizer["SearchButtonLoadingIcon"],
|
||||
Type = "string",
|
||||
ValueList = " — ",
|
||||
DefaultValue = "fa fa-fw fa-spinner fa-spin"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "ClearButtonIcon",
|
||||
Description = "清空按钮图标",
|
||||
Description = Localizer["ChildContent"],
|
||||
Type = "string",
|
||||
ValueList = " — ",
|
||||
DefaultValue = "fa fa-trash"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "ClearButtonText",
|
||||
Description = "清空按钮文本",
|
||||
Description = Localizer["ClearButtonText"],
|
||||
Type = "string",
|
||||
ValueList = " — ",
|
||||
DefaultValue = " — "
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "ClearButtonColor",
|
||||
Description = "清空按钮颜色",
|
||||
Description = Localizer["ClearButtonColor"],
|
||||
Type = "Color",
|
||||
ValueList = " — ",
|
||||
DefaultValue = "Secondary"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "SearchButtonColor",
|
||||
Description = "搜索按钮颜色",
|
||||
Description = Localizer["SearchButtonColor"],
|
||||
Type = "Color",
|
||||
ValueList = " — ",
|
||||
DefaultValue = "Primary"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "IsLikeMatch",
|
||||
Description = "是否开启模糊匹配",
|
||||
Description = Localizer["IsLikeMatch"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "false"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "IsAutoFocus",
|
||||
Description = "是否自动获得焦点",
|
||||
Description = Localizer["IsAutoFocus"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "false"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "IsAutoClearAfterSearch",
|
||||
Description = "点击搜索后是否自动清空搜索框",
|
||||
Description = Localizer["IsAutoClearAfterSearch"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "false"
|
||||
},
|
||||
new AttributeItem() {
|
||||
Name = "IsOnInputTrigger",
|
||||
Description = "搜索模式是否为输入即触发,默认点击搜索按钮触发",
|
||||
Description = Localizer["IsOnInputTrigger"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "false"
|
||||
@ -151,7 +151,7 @@ public sealed partial class Searchs
|
||||
new AttributeItem()
|
||||
{
|
||||
Name = "IgnoreCase",
|
||||
Description = "匹配时是否忽略大小写",
|
||||
Description = Localizer["IgnoreCase"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "true"
|
||||
@ -159,7 +159,7 @@ public sealed partial class Searchs
|
||||
new AttributeItem()
|
||||
{
|
||||
Name = "ShowClearButton",
|
||||
Description = "是否显示清除按钮",
|
||||
Description = Localizer["ShowClearButton"],
|
||||
Type = "bool",
|
||||
ValueList = "true|false",
|
||||
DefaultValue = "false"
|
||||
@ -167,7 +167,7 @@ public sealed partial class Searchs
|
||||
new AttributeItem()
|
||||
{
|
||||
Name="OnSearch",
|
||||
Description = "点击搜索时回调此委托",
|
||||
Description = Localizer["OnSearch"],
|
||||
Type = "Func<string, Task>",
|
||||
ValueList = " — ",
|
||||
DefaultValue = " — "
|
||||
@ -175,7 +175,7 @@ public sealed partial class Searchs
|
||||
new AttributeItem()
|
||||
{
|
||||
Name="OnClear",
|
||||
Description = "点击清空时回调此委托",
|
||||
Description = Localizer["OnClear"],
|
||||
Type = "Func<string, Task>",
|
||||
ValueList = " — ",
|
||||
DefaultValue = " — "
|
||||
|
Loading…
Reference in New Issue
Block a user