!2824 doc(#I59B4B):add english translation of table dynamic page

* doc: 添加 table dynamic 页面示例
This commit is contained in:
Nine 2022-05-26 02:06:42 +00:00
parent f10d25e78e
commit 7430d3034f
4 changed files with 32 additions and 6 deletions

View File

@ -3146,6 +3146,17 @@
"SetRowClassFormatterIntro": "By setting the <code>SetRowClassFormatter</code> 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 <code>SetRowClassFormatter</code> method will highlight the row by judging the <code>Count > 60</code> of the bound data"
},
"BootstrapBlazor.Shared.Samples.Table.TablesDynamic": {
"Title": "Table Dynamic",
"Desc": "Supports dynamically adding columns",
"DataTableTitle": "Common usage",
"DataTableIntro": "Only show <code>DataTable</code> data",
"EditTitle": "Edit function",
"EditIntro": "Add editing and maintenance functions",
"EditP": "By setting the <code>OnChanged</code> callback method of the <code>DataTableDynamicContext</code> instance, the value is automatically set when a new row is created",
"DynamicColTitle": "Dynamic Column",
"DynamicColIntro": "Dynamic adjustment of the <code>DataTable</code> 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.",

View File

@ -3159,6 +3159,17 @@
"SetRowClassFormatterIntro": "通过设置 <code>SetRowClassFormatter</code> 属性值可以实现通过行数据逻辑对行样式进行设置,实现自己高亮需求功能",
"SetRowClassFormatterP": "本例中 <code>SetRowClassFormatter</code> 方法通过判断绑定数据的 <code>Count > 60</code> 时行高亮显示"
},
"BootstrapBlazor.Shared.Samples.Table.TablesDynamic": {
"Title": "Table 表格",
"Desc": "支持动态添加列",
"DataTableTitle": "普通用法",
"DataTableIntro": "仅展示 <code>DataTable</code> 数据",
"EditTitle": "编辑功能",
"EditIntro": "增加编辑维护功能",
"EditP": "通过设置 <code>DataTableDynamicContext</code> 实例的 <code>OnChanged</code> 回调方法,新建行时自动设置值",
"DynamicColTitle": "动态列",
"DynamicColIntro": "通过代码动态调整 <code>DataTable</code> 表格组件自动更新"
},
"BootstrapBlazor.Shared.Pages.Introduction": {
"Title": "简介",
"P1": "BootstrapBlazor 是一套基于 Bootstrap 和 Blazor 的企业级组件库,可以认为是 Bootstrap 项目的 Blazor 版实现。",

View File

@ -1,21 +1,21 @@
@page "/tables/dynamic"
<h3>Table 表格</h3>
<h3>@DynamicLocalizer["Title"]</h3>
<h4>支持动态添加列</h4>
<h4>@DynamicLocalizer["Desc"]</h4>
<DemoBlock Title="普通用法" Introduction="仅展示 <code>DataTable</code> 数据" Name="DataTable">
<DemoBlock Title="@DynamicLocalizer["DataTableTitle"]" Introduction="@DynamicLocalizer["DataTableIntro"]" Name="DataTable">
<Table TItem="DynamicObject" DynamicContext="DataTableDynamicContext" />
</DemoBlock>
<DemoBlock Title="编辑功能" Introduction="增加编辑维护功能" Name="Edit">
<p>通过设置 <code>DataTableDynamicContext</code> 实例的 <code>OnChanged</code> 回调方法,新建行时自动设置值</p>
<DemoBlock Title="@DynamicLocalizer["EditTitle"]" Introduction="@DynamicLocalizer["EditIntro"]" Name="Edit">
<p>@((MarkupString)DynamicLocalizer["EditP"].Value)</p>
<Table TItem="DynamicObject" DynamicContext="DataTableDynamicContext"
IsMultipleSelect="true" IsBordered="true" IsStriped="true" @bind-SelectedRows="SelectedItems"
ShowToolbar="true" ShowExtendButtons="true" />
</DemoBlock>
<DemoBlock Title="动态列" Introduction="通过代码动态调整 <code>DataTable</code> 表格组件自动更新" Name="DynamicCol">
<DemoBlock Title="@DynamicLocalizer["DynamicColTitle"]" Introduction="@DynamicLocalizer["DynamicColIntro"]" Name="DynamicCol">
<Table TItem="DynamicObject" DynamicContext="DataTableDynamicContext"
IsMultipleSelect="true" IsBordered="true" IsStriped="true"
ShowToolbar="true" ShowExtendButtons="true">

View File

@ -28,6 +28,10 @@ public partial class TablesDynamic
[NotNull]
private IStringLocalizer<Tables>? TablesLocalizer { get; set; }
[Inject]
[NotNull]
private IStringLocalizer<TablesDynamic>? DynamicLocalizer { get; set; }
private string? ButtonAddColumnText { get; set; }
private string? ButtonRemoveColumnText { get; set; }