From 5f2124f114bfd9a5fbbf27865b5a543e0e53627f Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Wed, 2 Feb 2022 13:14:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=20Display=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Locales/en.json | 1 + src/BootstrapBlazor.Shared/Locales/zh.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index 58ab4c0f2..1f809c724 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -2142,6 +2142,7 @@ "DisplayText": "The front label displays text", "FormatString": "The numerically formatted string", "Formatter": "TableHeader instance", + "TypeResolver": "It is used internally when the type resolution callback method tvalue is an array instance", "Integer": "Integer", "Enum": "Enumerate", "Collection": "Collection", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 27cf8539c..7d73ee299 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -2147,6 +2147,7 @@ "DisplayText": "前置标签显示文本", "FormatString": "数值格式化字符串", "Formatter": "TableHeader 实例", + "TypeResolver": "类型解析回调方法 TValue 为 Array 实例时内部使用", "Integer": "整型", "Enum": "枚举", "Collection": "集合", -- Gitee From d0c727f9f79ba867d257f0ccde10daa191984848 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Wed, 2 Feb 2022 13:14:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=20Display=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20TypeResolver=20=E8=AF=B4=E6=98=8E=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Samples/Displays.razor.cs | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Samples/Displays.razor.cs b/src/BootstrapBlazor.Shared/Samples/Displays.razor.cs index 85a612c99..66aad3f55 100644 --- a/src/BootstrapBlazor.Shared/Samples/Displays.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Displays.razor.cs @@ -62,33 +62,40 @@ public partial class Displays private IEnumerable GetAttributes() => new[] { - new AttributeItem() { - Name = "ShowLabel", - Description = Localizer["ShowLabel"], - Type = "bool", - ValueList = "true|false", - DefaultValue = "false" - }, - new AttributeItem() { - Name = "DisplayText", - Description = Localizer["DisplayText"], - Type = "string", - ValueList = " — ", - DefaultValue = " — " - }, - new AttributeItem() { - Name = "FormatString", - Description = Localizer["FormatString"], - Type = "string", - ValueList = " — ", - DefaultValue = " — " - }, - new AttributeItem() { - Name = "Formatter", - Description = Localizer["Formatter"], - Type = "RenderFragment", - ValueList = " — ", - DefaultValue = " — " - } - }; + new AttributeItem() { + Name = "ShowLabel", + Description = Localizer["ShowLabel"], + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" + }, + new AttributeItem() { + Name = "DisplayText", + Description = Localizer["DisplayText"], + Type = "string", + ValueList = " — ", + DefaultValue = " — " + }, + new AttributeItem() { + Name = "FormatString", + Description = Localizer["FormatString"], + Type = "string", + ValueList = " — ", + DefaultValue = " — " + }, + new AttributeItem() { + Name = "Formatter", + Description = Localizer["Formatter"], + Type = "RenderFragment", + ValueList = " — ", + DefaultValue = " — " + }, + new AttributeItem() { + Name = nameof(Display.TypeResolver), + Description = Localizer["TypeResolver"], + Type = "Func", + ValueList = " — ", + DefaultValue = " — " + } + }; } -- Gitee