Skip to content

Commit 7d17f0f

Browse files
committed
doc: 更新参数说明文档
1 parent 4672bcb commit 7d17f0f

File tree

3 files changed

+32
-44
lines changed

3 files changed

+32
-44
lines changed

src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ private Task OnCompletedAsync(string? val)
3030
/// <returns></returns>
3131
protected AttributeItem[] GetAttributes() =>
3232
[
33-
//new()
34-
//{
35-
// Name = nameof(BarcodeGenerator.Type),
36-
// Description = Localizer[nameof(BarcodeGenerator.Type)].Value,
37-
// Type = "EnumBarcodeType",
38-
// ValueList = "CODE128 / CODE128A / CODE128B / CODE128C / EAN13 / EAN8 / EAN5 / EAN2 / UPC / CODE39 / ITF14 / ITF / MSI / MSI10 / MSI11 / MSI1010 / MSI1110 / Pharmacode",
39-
// DefaultValue = "'auto' (CODE128)"
40-
//},
4133
new()
4234
{
4335
Name = nameof(BarcodeGenerator.Value),
44-
Description = Localizer[nameof(BarcodeGenerator.Value)].Value,
36+
Description = Localizer[nameof(BarcodeGenerator.Value)],
4537
Type = "string",
4638
ValueList = " — ",
4739
DefaultValue = " — "
4840
},
4941
new()
5042
{
5143
Name = nameof(BarcodeGenerator.Options),
52-
Description = Localizer[nameof(BarcodeGenerator.Options)].Value,
53-
Type = "BarcodeGeneratorOption",
44+
Description = Localizer[nameof(BarcodeGenerator.Options)],
45+
Type = nameof(BarcodeGeneratorOption),
46+
ValueList = " — ",
47+
DefaultValue = " — "
48+
},
49+
new()
50+
{
51+
Name = nameof(BarcodeGenerator.OnCompletedAsync),
52+
Description = Localizer[nameof(BarcodeGenerator.OnCompletedAsync)],
53+
Type = "Func<string?, Task>",
5454
ValueList = " — ",
5555
DefaultValue = " — "
5656
}
@@ -66,9 +66,9 @@ protected AttributeItem[] GetOptionsAttributes() =>
6666
{
6767
Name = nameof(BarcodeGeneratorOption.Format),
6868
Description = Localizer[nameof(BarcodeGeneratorOption.Format)],
69-
Type = "EnumBarcodeType",
70-
ValueList = "CODE128 / CODE128A / CODE128B / CODE128C / EAN13 / EAN8 / EAN5 / EAN2 / UPC / CODE39 / ITF14 / ITF / MSI / MSI10 / MSI11 / MSI1010 / MSI1110 / Pharmacode",
71-
DefaultValue = "'auto' (CODE128)"
69+
Type = nameof(EnumBarcodeFormat),
70+
ValueList = "",
71+
DefaultValue = "CODE128"
7272
},
7373
new()
7474
{
@@ -106,33 +106,33 @@ protected AttributeItem[] GetOptionsAttributes() =>
106106
{
107107
Name = nameof(BarcodeGeneratorOption.FontOptions),
108108
Description = Localizer[nameof(BarcodeGeneratorOption.FontOptions)],
109-
Type = "EnumBarcodeFontOption",
110-
ValueList = "normal / bold / italic / bold italic",
111-
DefaultValue = "2"
109+
Type = nameof(EnumBarcodeTextFontOption),
110+
ValueList = "",
111+
DefaultValue = ""
112112
},
113113
new()
114114
{
115115
Name = nameof(BarcodeGeneratorOption.Font),
116116
Description = Localizer[nameof(BarcodeGeneratorOption.Font)],
117-
Type = "EnumBarcodeFont",
118-
ValueList = "Monospace / SansSerif / Serif / Fantasy / Cursive",
119-
DefaultValue = "Monospace"
117+
Type = nameof(EnumBarcodeTextFont),
118+
ValueList = "",
119+
DefaultValue = ""
120120
},
121121
new()
122122
{
123123
Name = nameof(BarcodeGeneratorOption.TextAlign),
124124
Description = Localizer[nameof(BarcodeGeneratorOption.TextAlign)],
125-
Type = "EnumBarcodeTextAlign",
126-
ValueList = "left / center / right",
127-
DefaultValue = "center"
125+
Type = nameof(EnumBarcodeTextAlign),
126+
ValueList = "",
127+
DefaultValue = ""
128128
},
129129
new()
130130
{
131131
Name = nameof(BarcodeGeneratorOption.TextPosition),
132132
Description = Localizer[nameof(BarcodeGeneratorOption.TextPosition)],
133-
Type = "EnumTextPosition",
134-
ValueList = "bottom / top",
135-
DefaultValue = "bottom"
133+
Type = nameof(EnumBarcodeTextPosition),
134+
ValueList = "",
135+
DefaultValue = ""
136136
},
137137
new()
138138
{

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6520,16 +6520,10 @@
65206520
"BootstrapBlazor.Server.Components.Samples.BarcodeGenerators": {
65216521
"Title": "Barcode generator",
65226522
"BarcodeGeneratorNormalText": "Barcode Generator",
6523-
"BarcodeGeneratorNormalIntro": "Complete parameter setting",
6524-
"BarcodeGeneratorGroupBoxText": "Parameters",
6525-
"BarcodeGeneratorBatchText": "Batch Demo",
6526-
"BarcodeGeneratorBatchIntro": "Batch setting parameters",
6527-
"BarcodeGeneratorSimpleText": "Simple",
6528-
"BarcodeGeneratorSimpleIntro": "Simple configuration parameters",
6529-
"OnResult": "Barcode generation (svg) callback method",
6530-
"OnError": "Error callback method",
6523+
"BarcodeGeneratorNormalIntro": "Renders a one-dimensional barcode in the corresponding format by giving the <code>Value</code> value",
6524+
"OnCompletedAsync": "Barcode generation (svg) callback method",
65316525
"Options": "Barcode options",
6532-
"Type": "Barcode type",
6526+
"Format": "Barcode format",
65336527
"Value": "Barcode value",
65346528
"Width": "Width of a single bar",
65356529
"Height": "Height of the barcode",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6520,16 +6520,10 @@
65206520
"BootstrapBlazor.Server.Components.Samples.BarcodeGenerators": {
65216521
"Title": "BarcodeGenerator 条码生成器",
65226522
"BarcodeGeneratorNormalText": "条码生成器",
6523-
"BarcodeGeneratorNormalIntro": "完整设置参数演示",
6524-
"BarcodeGeneratorGroupBoxText": "参数",
6525-
"BarcodeGeneratorBatchText": "批量演示",
6526-
"BarcodeGeneratorBatchIntro": "批量设置参数",
6527-
"BarcodeGeneratorSimpleText": "简单配置",
6528-
"BarcodeGeneratorSimpleIntro": "简单配置参数",
6529-
"OnResult": "条码生成(svg)回调方法",
6530-
"OnError": "错误回调方法",
6523+
"BarcodeGeneratorNormalIntro": "通过给定 <code>Value</code> 值渲染成相对应格式的一维条码",
6524+
"OnCompletedAsync": "条码生成(svg)回调方法",
65316525
"Options": "条码选项",
6532-
"Type": "条码类型",
6526+
"Format": "条码类型",
65336527
"Value": "条码值",
65346528
"Width": "单个条形的宽度",
65356529
"Height": "条形码的高度",

0 commit comments

Comments
 (0)