Skip to content

Commit e07313a

Browse files
committed
doc: 增加 Clearable 文档
1 parent 3df469b commit e07313a

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,33 @@
222222
</div>
223223
</DemoBlock>
224224

225+
<DemoBlock Title="@Localizer["ClearableTitle"]"
226+
Introduction="@Localizer["ClearableIntro"]"
227+
Name="OnInput">
228+
<div class="row g-3">
229+
<div class="col-12 col-sm-6">
230+
<BootstrapInput Value="Model.Name" Clearable="true" ShowLabel="true" DisplayText="Clearable" />
231+
</div>
232+
</div>
233+
<div class="row form-inline g-3 mt-0">
234+
<div class="col-12 col-sm-6">
235+
<BootstrapInput Value="Model.Name" Clearable="true" ShowLabel="true" DisplayText="Clearable" />
236+
</div>
237+
</div>
238+
<div class="row g-3 mt-0">
239+
<div class="col-12 col-sm-6">
240+
<BootstrapInputGroup>
241+
<BootstrapInputGroupLabel ShowRequiredMark DisplayText="Clearable"></BootstrapInputGroupLabel>
242+
<BootstrapInput Value="@Model.Name" Clearable="true" />
243+
</BootstrapInputGroup>
244+
</div>
245+
<div class="col-12 col-sm-6">
246+
<BootstrapInputGroup>
247+
<BootstrapInput Value="@Model.Name" Clearable="true" />
248+
<BootstrapInputGroupLabel ShowRequiredMark DisplayText="Clearable"></BootstrapInputGroupLabel>
249+
</BootstrapInputGroup>
250+
</div>
251+
</div>
252+
</DemoBlock>
253+
225254
<AttributeTable Items="@GetAttributes()" />

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,9 @@
27802780
"InputsFormatStringSetting": "Set up",
27812781
"InputsFormatStringTips": "The <code>BootstrapInput</code> component binds <code>byte[]</code> array and formats it as an example of <code>base64</code> encoded string",
27822782
"UseInputEvent": "Whether use oninput event when bind-value",
2783-
"IsTrim": "automatically trim white space when entering content"
2783+
"IsTrim": "automatically trim white space when entering content",
2784+
"ClearableTitle": "Clearable",
2785+
"ClearableIntro": "By setting the <code>Clearable=\"true\"</code> parameter, a small <b>Clear</b> button will be displayed when the component gains focus or when the mouse hovers over it."
27842786
},
27852787
"BootstrapBlazor.Server.Components.Samples.InputNumbers": {
27862788
"InputNumbersTitle": "InputNumber",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,9 @@
27802780
"InputsFormatStringSetting": "设置",
27812781
"InputsFormatStringTips": "<code>BootstrapInput</code> 组件绑定 <code>byte[]</code> 数组,格式化成 <code>base64</code> 编码字符串示例",
27822782
"UseInputEvent": "是否在文本框输入值时触发",
2783-
"IsTrim": "是否自动去除空格"
2783+
"IsTrim": "是否自动去除空格",
2784+
"ClearableTitle": "清除",
2785+
"ClearableIntro": "通过设置 <code>Clearable=\"true\"</code> 参数,使组件获得焦点或者鼠标悬浮时显示一个 <b>清除</b> 小按钮"
27842786
},
27852787
"BootstrapBlazor.Server.Components.Samples.InputNumbers": {
27862788
"InputNumbersTitle": "InputNumber 组件",

0 commit comments

Comments
 (0)