Skip to content

Commit 841ccab

Browse files
authored
doc(Table): add IsGroupExtendButtons documentation (#7050)
* doc: 更新样式增加内联布局 * doc: 增加 IsGroupExtendButtons 文档
1 parent 8640cbf commit 841ccab

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@
99
<h4>@((MarkupString)Localizer["TablesEditDescription"].Value)</h4>
1010

1111
<DemoBlock Title="@Localizer["TablesEditItemsTitle"]" Introduction="@Localizer["TablesEditItemsIntro"]" Name="EditItems">
12-
<section ignore>@((MarkupString)Localizer["TablesEditItemsDescription"].Value)</section>
12+
<section ignore class="row form-inline g-3">
13+
<div class="col-12">
14+
<div>@((MarkupString)Localizer["TablesEditItemsDescription"].Value)</div>
15+
</div>
16+
<div class="col-12 col-sm-6">
17+
<BootstrapInputGroup>
18+
<BootstrapInputGroupLabel DisplayText="IsGroupExtendButtons"></BootstrapInputGroupLabel>
19+
<Switch @bind-Value="_useGroup"></Switch>
20+
</BootstrapInputGroup>
21+
</div>
22+
</section>
1323
<Table TItem="Foo" @bind-Items="EditItems"
14-
IsStriped="true" IsBordered="true" IsMultipleSelect="true"
24+
IsStriped="true" IsBordered="true" IsMultipleSelect="true" IsGroupExtendButtons="_useGroup"
1525
ShowToolbar="true" ShowExtendButtons="true" ShowSkeleton="true"
1626
OnAddAsync="@OnAddAsync">
1727
<TableColumns>

src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public partial class TablesEdit
3838

3939
private string DataServiceUrl => $"{WebsiteOption.Value.GiteeRepositoryUrl}/wikis/Table%20%E7%BB%84%E4%BB%B6%E6%95%B0%E6%8D%AE%E6%9C%8D%E5%8A%A1%E4%BB%8B%E7%BB%8D?sort_id=3207977";
4040

41+
private bool _useGroup = false;
42+
4143
/// <summary>
4244
/// <inheritdoc/>
4345
/// </summary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5179,7 +5179,7 @@
51795179
"TablesEditDescription": "Commonly used in single table maintenance, simple addition, deletion, modification, search, sorting, filtering, search and other common functions can be realized through attribute configuration, and very complex business requirements can be realized through advanced usage of <code>Template</code>",
51805180
"TablesEditItemsTitle": "Use collection as data source to realize editing function",
51815181
"TablesEditItemsIntro": "Set <code>Items</code> as the data source, without setting <code>OnSaveAsync</code> <code>OnDeleteAsync</code> callback delegate to use built-in processing logic to update and delete functions",
5182-
"TablesEditItemsDescription": "Setting <code>Items</code> as the data source eliminates the need to set <code>OnSaveAsync</code> <code>OnDeleteAsync</code> callback delegates to use built-in processing logic for updates and deletes. Meanwhile, it should be noted that the <code>[Key]</code> tag of the <code>Foo</code> attribute of the class instance <code>Foo</code> of the generic constraint of <code>TItem</code> should be configured correctly",
5182+
"TablesEditItemsDescription": "Setting <code>Items</code> as the data source eliminates the need to set <code>OnSaveAsync</code> <code>OnDeleteAsync</code> callback delegates to use built-in processing logic for updates and deletes. Meanwhile, it should be noted that the <code>[Key]</code> tag of the <code>Foo</code> attribute of the class instance <code>Foo</code> of the generic constraint of <code>TItem</code> should be configured correctly; The `IsGroupExtendButtons` parameter controls whether the inline function buttons are displayed in a group. The default is `true`.",
51835183
"TablesEditTemplateTitle": "Tables with single table maintenance",
51845184
"TablesEditTemplateIntro": "Set <code>ShowSearch</code> to show the query component",
51855185
"TablesEditTemplateDescription": "In this example, the right alignment of <code>Count</code> is set, the <code>Complete</code> column is set to center alignment, and the Boolean column is automatically rendered as a <code>Switch</code> component",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5179,7 +5179,7 @@
51795179
"TablesEditDescription": "常用于单表维护,通过属性配置实现简单的增、删、改、查、排序、过滤、搜索等常用功能,通过 <code>Template</code> 的高级用法能实现非常复杂的业务需求功能",
51805180
"TablesEditItemsTitle": "使用集合作为数据源实现编辑功能",
51815181
"TablesEditItemsIntro": "设置 <code>Items</code> 作为数据源,无需设置 <code>OnSaveAsync</code> <code>OnDeleteAsync</code> 回调委托使用内置处理逻辑进行更新与删除功能",
5182-
"TablesEditItemsDescription": "设置 <code>Items</code> 作为数据源,必须使用双向绑定 <code>@bind-Items</code>, 同时 <code>TItem</code> 泛型约束的类实例,如本例中的 <code>Foo</code> ,需要正确配置 <code>[Key]</code> 标签,否则内置编辑功能无法正常工作",
5182+
"TablesEditItemsDescription": "设置 <code>Items</code> 作为数据源,必须使用双向绑定 <code>@bind-Items</code>, 同时 <code>TItem</code> 泛型约束的类实例,如本例中的 <code>Foo</code> ,需要正确配置 <code>[Key]</code> 标签,否则内置编辑功能无法正常工作;通过设置 <code>IsGroupExtendButtons</code> 参数控制行内功能按钮是否组合显示 默认 <code>true</code>",
51835183
"TablesEditTemplateTitle": "具有单表维护功能的表格",
51845184
"TablesEditTemplateIntro": "通过设置 <code>EditTemplate</code> 自定义编辑弹窗,如果属性需要联动时必须像本例这样封装成一个独立的组件再放置到模板中",
51855185
"TablesEditTemplateDescription": "本例中设置 <code>Count</code> 右侧对齐,<code>Complete</code> 列设置为居中对齐,布尔类型列自动渲染成 <code>Switch</code> 组件,点击 <code>学历</code> 下拉框时右侧只读组件描述信息联动更新,<b>此功能必须封装成独立组件</b>",

src/BootstrapBlazor/Components/Table/Table.razor.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,10 @@ form .table .table-cell > textarea {
969969
cursor: pointer;
970970
}
971971

972-
.btn-separate > button:not(:last-child) {
973-
margin-inline-end: .25rem;
972+
.btn-separate {
973+
display: inline-flex;
974+
975+
> button:not(:last-child) {
976+
margin-inline-end: .25rem;
977+
}
974978
}

0 commit comments

Comments
 (0)