!2378 feat(#I4SL49): add TypeResolver parameter on Display component

* doc: 增加 Display 组件 TypeResolver 说明文档
* doc: 更新 Display 组件资源文件
This commit is contained in:
Argo 2022-02-02 05:22:07 +00:00
parent 7516cb7da7
commit a5e3ce5c1f
3 changed files with 38 additions and 29 deletions

View File

@ -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",

View File

@ -2147,6 +2147,7 @@
"DisplayText": "前置标签显示文本",
"FormatString": "数值格式化字符串",
"Formatter": "TableHeader 实例",
"TypeResolver": "类型解析回调方法 TValue 为 Array 实例时内部使用",
"Integer": "整型",
"Enum": "枚举",
"Collection": "集合",

View File

@ -62,33 +62,40 @@ public partial class Displays
private IEnumerable<AttributeItem> 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<TItem>",
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<TItem>",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem() {
Name = nameof(Display<string>.TypeResolver),
Description = Localizer["TypeResolver"],
Type = "Func<Assembly?, string, bool, Type?>",
ValueList = " — ",
DefaultValue = " — "
}
};
}