Skip to content

Commit 5144966

Browse files
committed
doc: 更新文档
1 parent bc981bc commit 5144966

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed

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

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,41 @@ private AttributeItem[] GetAttributes() =>
6363
[
6464
new()
6565
{
66-
Name = "OnValueChanged",
67-
Description = Localizer["Event1"],
68-
Type = "Func<string, Task>",
66+
Name = nameof(ColorPicker.Template),
67+
Description = Localizer["AttributeTemplate"],
68+
Type = "RenderFragment<string>",
6969
ValueList = " — ",
7070
DefaultValue = " — "
7171
},
7272
new()
7373
{
74-
Name = nameof(ColorPicker.Template),
75-
Description = Localizer["EventTemplate"],
76-
Type = "Func<string>",
74+
Name = nameof(ColorPicker.Formatter),
75+
Description = Localizer["AttributeFormatter"],
76+
Type = "Func<string, Task<string>>",
77+
ValueList = " — ",
78+
DefaultValue = " — "
79+
},
80+
new()
81+
{
82+
Name = nameof(ColorPicker.IsSupportOpacity),
83+
Description = Localizer["AttributeIsSupportOpacity"],
84+
Type = "bool",
85+
ValueList = "true|false",
86+
DefaultValue = "false"
87+
},
88+
new()
89+
{
90+
Name = nameof(ColorPicker.Swatches),
91+
Description = Localizer["AttributeSwatches"],
92+
Type = "bool",
93+
ValueList = "true|false",
94+
DefaultValue = "false"
95+
},
96+
new()
97+
{
98+
Name = nameof(ColorPicker.OnValueChanged),
99+
Description = Localizer["EventOnValueChanged"],
100+
Type = "Func<string, Task>",
77101
ValueList = " — ",
78102
DefaultValue = " — "
79103
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,11 @@
24902490
"ValidateFormIntro": "Built in <code>ValidateForm</code> to use",
24912491
"IsSupportOpacityTitle": "Support Opacity",
24922492
"IsSupportOpacityIntro": "Enable transparency support by setting <code>IsSupportOpacity=\"true\"</code>",
2493-
"Event1": "Color change callback delegate method"
2493+
"EventOnValueChanged": "Color change callback delegate method",
2494+
"AttributeTemplate": "The template for display",
2495+
"AttributeFormatter": "Display color value formatting callback method",
2496+
"AttributeIsSupportOpacity": "Whether to support transparency",
2497+
"AttributeAttributeSwatches": "Preset candidate colors"
24942498
},
24952499
"BootstrapBlazor.Server.Components.Samples.DateTimePickers": {
24962500
"Title": "DatePicker",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,11 @@
24902490
"ValidateFormIntro": "内置于 <code>ValidateForm</code> 中使用",
24912491
"IsSupportOpacityTitle": "支持透明度",
24922492
"IsSupportOpacityIntro": "通过设置 <code>IsSupportOpacity=\"true\"</code> 开启透明度支持",
2493-
"Event1": "颜色改变回调委托方法"
2493+
"EventOnValueChanged": "颜色改变回调委托方法",
2494+
"AttributeTemplate": "显示模板",
2495+
"AttributeFormatter": "显示颜色值格式化回调方法",
2496+
"AttributeIsSupportOpacity": "是否支持透明度",
2497+
"AttributeAttributeSwatches": "预设候选颜色"
24942498
},
24952499
"BootstrapBlazor.Server.Components.Samples.DateTimePickers": {
24962500
"Title": "DatePicker 日期选择器",

0 commit comments

Comments
 (0)