From 7430d3034fd62ff2a0f841cd6479776615eb23c5 Mon Sep 17 00:00:00 2001 From: Nine <948825551@qq.com> Date: Thu, 26 May 2022 02:06:42 +0000 Subject: [PATCH] =?UTF-8?q?!2824=20doc(#I59B4B):add=20english=20translatio?= =?UTF-8?q?n=20of=20table=20dynamic=20page=20*=20doc:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20table=20dynamic=20=E9=A1=B5=E9=9D=A2=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Locales/en.json | 11 +++++++++++ src/BootstrapBlazor.Shared/Locales/zh.json | 11 +++++++++++ .../Samples/Table/TablesDynamic.razor | 12 ++++++------ .../Samples/Table/TablesDynamic.razor.cs | 4 ++++ 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index 7cfb134a1..6c5d32e34 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -3146,6 +3146,17 @@ "SetRowClassFormatterIntro": "By setting the SetRowClassFormatter attribute value, you can set the row style through the row data logic, and realize the function of your own highlighting requirements", "SetRowClassFormatterP": "In this example, the SetRowClassFormatter method will highlight the row by judging the Count > 60 of the bound data" }, + "BootstrapBlazor.Shared.Samples.Table.TablesDynamic": { + "Title": "Table Dynamic", + "Desc": "Supports dynamically adding columns", + "DataTableTitle": "Common usage", + "DataTableIntro": "Only show DataTable data", + "EditTitle": "Edit function", + "EditIntro": "Add editing and maintenance functions", + "EditP": "By setting the OnChanged callback method of the DataTableDynamicContext instance, the value is automatically set when a new row is created", + "DynamicColTitle": "Dynamic Column", + "DynamicColIntro": "Dynamic adjustment of the DataTable table component automatically updates via code" + }, "BootstrapBlazor.Shared.Pages.Introduction": { "Title": "Introduction", "P1": "BootstrapBlazor is an enterprise-level component library based on Bootstrap and Blazor, which can be considered as the Blazor version of the Bootstrap project.", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 3cc87b564..e0c1b92af 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -3159,6 +3159,17 @@ "SetRowClassFormatterIntro": "通过设置 SetRowClassFormatter 属性值可以实现通过行数据逻辑对行样式进行设置,实现自己高亮需求功能", "SetRowClassFormatterP": "本例中 SetRowClassFormatter 方法通过判断绑定数据的 Count > 60 时行高亮显示" }, + "BootstrapBlazor.Shared.Samples.Table.TablesDynamic": { + "Title": "Table 表格", + "Desc": "支持动态添加列", + "DataTableTitle": "普通用法", + "DataTableIntro": "仅展示 DataTable 数据", + "EditTitle": "编辑功能", + "EditIntro": "增加编辑维护功能", + "EditP": "通过设置 DataTableDynamicContext 实例的 OnChanged 回调方法,新建行时自动设置值", + "DynamicColTitle": "动态列", + "DynamicColIntro": "通过代码动态调整 DataTable 表格组件自动更新" + }, "BootstrapBlazor.Shared.Pages.Introduction": { "Title": "简介", "P1": "BootstrapBlazor 是一套基于 Bootstrap 和 Blazor 的企业级组件库,可以认为是 Bootstrap 项目的 Blazor 版实现。", diff --git a/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor b/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor index 96c3ab293..05c342fc2 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor +++ b/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor @@ -1,21 +1,21 @@ @page "/tables/dynamic" -

Table 表格

+

@DynamicLocalizer["Title"]

-

支持动态添加列

+

@DynamicLocalizer["Desc"]

- + - -

通过设置 DataTableDynamicContext 实例的 OnChanged 回调方法,新建行时自动设置值

+ +

@((MarkupString)DynamicLocalizer["EditP"].Value)

- +
diff --git a/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor.cs b/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor.cs index b48151b98..b5d33ff87 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Table/TablesDynamic.razor.cs @@ -28,6 +28,10 @@ public partial class TablesDynamic [NotNull] private IStringLocalizer? TablesLocalizer { get; set; } + [Inject] + [NotNull] + private IStringLocalizer? DynamicLocalizer { get; set; } + private string? ButtonAddColumnText { get; set; } private string? ButtonRemoveColumnText { get; set; }