From b0cbe1da842e93b1732354bb485233a252608a88 Mon Sep 17 00:00:00 2001 From: Argo Date: Thu, 6 Jan 2022 11:17:37 +0000 Subject: [PATCH] =?UTF-8?q?!2290=20doc(#I4PPRR):=20update=20sample=20code?= =?UTF-8?q?=20for=20table=20footer=20*=20doc:=20=E6=9B=B4=E6=96=B0=20Foote?= =?UTF-8?q?r=20=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs | 7 +++++++ .../Samples/Table/TablesFooter.razor | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs b/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs index e49b2b3f0..e1b97ec22 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs @@ -362,6 +362,13 @@ public partial class Tables ValueList = "true / false / null", DefaultValue = "null" }, + new() { + Name = nameof(Table.IsHideFooterWhenNoData), + Description = "无数据时是否显示 Footer", + Type = "boolean", + ValueList = "true / false", + DefaultValue = "false" + }, new() { Name = "ClickToSelect", Description = "点击行即选中本行", diff --git a/src/BootstrapBlazor.Shared/Samples/Table/TablesFooter.razor b/src/BootstrapBlazor.Shared/Samples/Table/TablesFooter.razor index f488c78a5..70b025218 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/TablesFooter.razor +++ b/src/BootstrapBlazor.Shared/Samples/Table/TablesFooter.razor @@ -4,7 +4,7 @@

用于数据统计

- +

Table 组件有 TableFooter 模板,其数据上下文为 Table 组件的数据集合 IEnumerable<TItem>

TableFooter 模板中关联的上下文 context 值为当页数据集合

TableFooter 模板内可以自定义单元格 td 内容,也可以使用内置的 TableFooterCell 组件进行数据显示

@@ -36,7 +36,7 @@
-

FooterTemplate 组件有 TableFooter 模板,其数据上下文为 Table 组件的数据集合 IEnumerable<TItem>

+

无数据时默认显示 Footer 可通过设置 @nameof(Table.IsHideFooterWhenNoData) 参数隐藏 Footer