diff --git a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor
index ad87245079b..103ca7649a6 100644
--- a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor
+++ b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor
@@ -7,15 +7,15 @@
}
-
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs
index 3f4b848654e..e2d6dabd809 100644
--- a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs
@@ -21,12 +21,6 @@ public sealed partial class AttributeTable
[NotNull]
public string? Title { get; set; }
- ///
- /// 获得/设置 表格数据
- ///
- [Parameter]
- public IEnumerable Items { get; set; } = [];
-
///
/// 获得/设置 表格关联组件类型
///
@@ -39,18 +33,33 @@ public sealed partial class AttributeTable
[Parameter]
public bool ShowFooter { get; set; }
+ private List _items = [];
+
///
///
///
- protected override void OnInitialized()
+ protected override void OnParametersSet()
{
- base.OnInitialized();
-
- Title ??= Localizer[nameof(Title)];
+ base.OnParametersSet();
if (Type != null)
{
- Items = ComponentAttributeCacheService.GetAttributes(Type);
+ _items = ComponentAttributeCacheService.GetAttributes(Type);
+
+ Title ??= FormatTypeName(Type);
}
}
+
+ private static string FormatTypeName(Type type)
+ {
+ if (!type.IsGenericType)
+ {
+ return type.Name;
+ }
+
+ var index = type.Name.IndexOf('`');
+ var typeName = type.Name.Substring(0, index);
+ var genericArgs = string.Join(", ", type.GetGenericArguments().Select(i => i.Name));
+ return $"{typeName}<{genericArgs}>";
+ }
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs
index 99d0edf2b9b..e17f24023f8 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs
@@ -116,76 +116,4 @@ private static EventItem[] GetEvents() =>
Type = "EventCallback"
}
];
-
- ///
- /// 获得属性方法
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ChildContent",
- Description = "Content",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Class",
- Description = "Style",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Color",
- Description = "Color",
- Type = "Color",
- ValueList = "Primary / Secondary / Success / Danger / Warning / Info / Dark",
- DefaultValue = "Primary"
- },
- new()
- {
- Name = "Icon",
- Description = "Icon",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ShowDismiss",
- Description = "Close Button",
- Type = "bool",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowBar",
- Description = "Show the left Bar",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowBorder",
- Description = "Show border",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowShadow",
- Description = "Show Shadow",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs
index 4ceef5f8b2f..4b888b74d3f 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs
@@ -13,40 +13,4 @@ public partial class AnchorLinks
[Inject]
[NotNull]
private IStringLocalizer? Localizer { get; set; }
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(AnchorLink.Id),
- Description = Localizer[$"Attr{nameof(AnchorLink.Id)}"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AnchorLink.Icon),
- Description = Localizer[$"Attr{nameof(AnchorLink.Icon)}"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "fa-solid fa-link"
- },
- new()
- {
- Name = nameof(AnchorLink.Text),
- Description = Localizer[$"Attr{nameof(AnchorLink.Text)}"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AnchorLink.TooltipText),
- Description = Localizer[$"Attr{nameof(AnchorLink.TooltipText)}"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs
index 822a2c8ca4b..0f46fb8e014 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs
@@ -13,52 +13,4 @@ public partial class Anchors
[Inject]
[NotNull]
private IStringLocalizer? Localizer { get; set; }
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Target",
- Description = Localizer["DescTarget"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Container",
- Description = Localizer["DescContainer"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsAnimation",
- Description = Localizer["DescIsAnimation"],
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "Offset",
- Description = Localizer["DescOffset"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = "ChildContent",
- Description = Localizer["DescChildContent"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs
index 89d8de308b0..7387b60f515 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs
@@ -48,132 +48,4 @@ private Task GroupOnSelectedItemChanged(string val)
GroupLogger.Log($"Value: {val}");
return Task.CompletedTask;
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["Att1"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ChildContent",
- Description = Localizer["Att2"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ItemTemplate",
- Description = Localizer["AttItemTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Items",
- Description = Localizer["Att3"],
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "NoDataTip",
- Description = Localizer["Att4"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["Att4DefaultValue"]!
- },
- new()
- {
- Name = "DisplayCount",
- Description = Localizer["Att5"],
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ValueChanged",
- Description = Localizer["Att6"],
- Type = "Action",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsLikeMatch",
- Description = Localizer["Att7"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IgnoreCase",
- Description = Localizer["Att8"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "OnCustomFilter",
- Description = Localizer["Att9"],
- Type = "Func>>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Debounce",
- Description = Localizer["Debounce"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = nameof(AutoComplete.SkipEnter),
- Description = Localizer[nameof(AutoComplete.SkipEnter)],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(AutoComplete.SkipEsc),
- Description = Localizer[nameof(AutoComplete.SkipEsc)],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(AutoComplete.OnValueChanged),
- Description = Localizer[nameof(AutoComplete.OnValueChanged)],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AutoComplete.OnSelectedItemChanged),
- Description = Localizer[nameof(AutoComplete.OnSelectedItemChanged)],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs
index e4f6c7902ca..ef01732b3ce 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs
@@ -95,132 +95,4 @@ private async Task> OnQueryAsync(VirtualizeQueryOption option)
TotalCount = items.Count
};
}
-
- ///
- /// Get property method
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "DisplayCount",
- Description = Localizer["Att1"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "NoDataTip",
- Description = Localizer["Att2"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["Def2"]
- },
- new()
- {
- Name = "IgnoreCase",
- Description = Localizer["Att3"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "IsLikeMatch",
- Description = Localizer["Att4"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Items",
- Description = Localizer["Att5"],
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Debounce",
- Description = Localizer["Att6"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = "OnCustomFilter",
- Description = Localizer["Att7"],
- Type = "Func>>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnGetDisplayText",
- Description = Localizer["Att8"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnSelectedItemChanged",
- Description = Localizer["Att9"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- //new()
- //{
- // Name = nameof(AutoFill.ShowDropdownListOnFocus),
- // Description = Localizer["Att10"],
- // Type = "bool",
- // ValueList = "true/false",
- // DefaultValue = "true"
- //},
- new()
- {
- Name = "Template",
- Description = Localizer["Att11"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AutoFill.SkipEnter),
- Description = Localizer["Att12"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(AutoFill.SkipEsc),
- Description = Localizer["Att13"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(AutoFill.IsVirtualize),
- Description = Localizer["AttrIsVirtualize"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name=nameof(AutoFill.IsAutoClearWhenInvalid),
- Description=Localizer["AttIsAutoClearWhenInvalid"],
- Type="bool",
- ValueList="true/false",
- DefaultValue="false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor.cs
index 817b89f4c19..484598cde4f 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor.cs
@@ -18,44 +18,4 @@ private Task OnBeforeRedirectAsync()
Logger.Log("Ready to redirect");
return Task.FromResult(true);
}
-
- ///
- /// Get property method
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(AutoRedirect.Interval),
- Description = "Time interval",
- Type = "int",
- ValueList = " — ",
- DefaultValue = "60000"
- },
- new()
- {
- Name = nameof(AutoRedirect.RedirectUrl),
- Description = "Redirect address",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AutoRedirect.IsForceLoad),
- Description = "Whether to force redirection",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(AutoRedirect.OnBeforeRedirectAsync),
- Description = "Callback method before address jump",
- Type = "Func>",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor.cs
index 233d5e49782..854ec064996 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor.cs
@@ -16,84 +16,4 @@ private async Task GetUrlAsync()
await Task.Delay(500);
return $"{WebsiteOption.Value.AssetRootPath}images/Argo-C.png";
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Size",
- Description = Localizer["Size"],
- Type = "Size",
- ValueList = "ExtraSmall|Small|Medium|Large|ExtraLarge|ExtraExtraLarge",
- DefaultValue = "None"
- },
- new()
- {
- Name = "IsBorder",
- Description = Localizer["IsBorder"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsCircle",
- Description = Localizer["IsCircle"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsIcon",
- Description = Localizer["IsIcon"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsText",
- Description = Localizer["IsText"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Icon",
- Description = Localizer["Icon"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "fa-solid fa-user"
- },
- new()
- {
- Name = "Text",
- Description = Localizer["Text"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Url",
- Description = Localizer["Url"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "GetUrlAsync",
- Description = Localizer["GetUrlAsync"],
- Type = "Func>",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Badges.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Badges.razor.cs
index 2c5109c38d8..58744f45840 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Badges.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Badges.razor.cs
@@ -10,43 +10,4 @@ namespace BootstrapBlazor.Server.Components.Samples;
///
public sealed partial class Badges
{
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ChildContent",
- Description = Localizer["ChildContent"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Class",
- Description = Localizer["Class"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Color",
- Description = Localizer["Color"],
- Type = "Color",
- ValueList = "Primary / Secondary / Success / Danger / Warning / Info / Dark",
- DefaultValue = "Primary"
- },
- new()
- {
- Name = "IsPill",
- Description = Localizer["IsPill"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor b/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor
index 0e9681c78b1..3781a11f008 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor
@@ -16,4 +16,4 @@
-
+
diff --git a/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor.cs
index a6e1a0bbf84..0688f803315 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/BarcodeGenerators.razor.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -22,196 +22,4 @@ private Task OnCompletedAsync(string? val)
StateHasChanged();
return Task.CompletedTask;
}
-
- ///
- /// GetAttributes
- ///
- ///
- protected AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(BarcodeGenerator.Value),
- Description = Localizer[nameof(BarcodeGenerator.Value)],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGenerator.Options),
- Description = Localizer[nameof(BarcodeGenerator.Options)],
- Type = nameof(BarcodeGeneratorOption),
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGenerator.OnCompletedAsync),
- Description = Localizer[nameof(BarcodeGenerator.OnCompletedAsync)],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
- ///
- /// GetOptionsAttributes
- ///
- ///
- protected AttributeItem[] GetOptionsAttributes() =>
- [
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Format),
- Description = Localizer[nameof(BarcodeGeneratorOption.Format)],
- Type = nameof(EnumBarcodeFormat),
- ValueList = " — ",
- DefaultValue = "CODE128"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Width),
- Description = Localizer[nameof(BarcodeGeneratorOption.Width)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "2"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Height),
- Description = Localizer[nameof(BarcodeGeneratorOption.Height)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "100"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.DisplayValue),
- Description = Localizer[nameof(BarcodeGeneratorOption.DisplayValue)],
- Type = "bool",
- ValueList = " — ",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Text),
- Description = Localizer[nameof(BarcodeGeneratorOption.Text)],
- Type = "string",
- ValueList = " - ",
- DefaultValue = " - "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.FontOptions),
- Description = Localizer[nameof(BarcodeGeneratorOption.FontOptions)],
- Type = nameof(EnumBarcodeTextFontOption),
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Font),
- Description = Localizer[nameof(BarcodeGeneratorOption.Font)],
- Type = nameof(EnumBarcodeTextFont),
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.TextAlign),
- Description = Localizer[nameof(BarcodeGeneratorOption.TextAlign)],
- Type = nameof(EnumBarcodeTextAlign),
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.TextPosition),
- Description = Localizer[nameof(BarcodeGeneratorOption.TextPosition)],
- Type = nameof(EnumBarcodeTextPosition),
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.TextMargin),
- Description = Localizer[nameof(BarcodeGeneratorOption.TextMargin)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "2"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.FontSize),
- Description = Localizer[nameof(BarcodeGeneratorOption.FontSize)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "20"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Background),
- Description = Localizer[nameof(BarcodeGeneratorOption.TextPosition)],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "#FFFFFF"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.LineColor),
- Description = Localizer[nameof(BarcodeGeneratorOption.LineColor)],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "#000000"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Margin),
- Description = Localizer[nameof(BarcodeGeneratorOption.Margin)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "10"
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.MarginTop),
- Description = Localizer[nameof(BarcodeGeneratorOption.MarginTop)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.MarginBottom),
- Description = Localizer[nameof(BarcodeGeneratorOption.MarginBottom)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.MarginLeft),
- Description = Localizer[nameof(BarcodeGeneratorOption.MarginLeft)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.MarginRight),
- Description = Localizer[nameof(BarcodeGeneratorOption.MarginRight)],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BarcodeGeneratorOption.Flat),
- Description = Localizer[nameof(BarcodeGeneratorOption.Flat)],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor.cs
index 8749ec93e5b..31c072a6df8 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor.cs
@@ -57,132 +57,4 @@ private Task OnImageError(string err)
ImageLogger.Log($"{Localizer["ErrorLog"]} {err}");
return Task.CompletedTask;
}
-
- ///
- /// 获得属性
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ButtonScanText",
- Description = Localizer["ButtonScanText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["ButtonScanTextDefaultValue"]
- },
- new()
- {
- Name = "ButtonStopText",
- Description = Localizer["ButtonStopText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["ButtonStopTextDefaultValue"]
- },
- new()
- {
- Name = "AutoStopText",
- Description = Localizer["AutoStopText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["AutoStopTextDefaultValue"]
- },
- new()
- {
- Name = "DeviceLabel",
- Description = Localizer["DeviceLabel"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["DeviceLabelDefaultValue"]
- },
- new()
- {
- Name = "InitDevicesString",
- Description = Localizer["InitDevicesString"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["InitDevicesStringDefaultValue"]
- },
- new()
- {
- Name = "NotFoundDevicesString",
- Description = Localizer["NotFoundDevicesString"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["NotFoundDevicesStringDefaultValue"]
- },
- new()
- {
- Name = "AutoStart",
- Description = Localizer["AutoStart"],
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "AutoStop",
- Description = Localizer["AutoStart"],
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ScanType",
- Description = "",
- Type = "ScanType",
- ValueList = "Camera|Image",
- DefaultValue = "Camera"
- },
- new()
- {
- Name = "OnInit",
- Description = Localizer["OnInit"],
- Type = "Func, Task>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnResult",
- Description = Localizer["OnResult"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnStart",
- Description = Localizer["OnStart"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnClose",
- Description = Localizer["OnClose"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnError",
- Description = Localizer["OnError"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnDeviceChanged",
- Description = Localizer["OnDeviceChanged"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Blocks.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Blocks.razor.cs
index 47883f6c02b..206e0825550 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Blocks.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Blocks.razor.cs
@@ -70,40 +70,4 @@ private async Task ToggleAuthor()
private Task OnQueryCondition2(string name) => Task.FromResult(IsShow2);
private Task OnQueryUser(string name) => Task.FromResult(IsAuth);
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(Block.OnQueryCondition),
- Description = Localizer["OnQueryCondition"],
- Type = "Func>",
- ValueList = " — ",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(Block.ChildContent),
- Description = Localizer["ChildContent"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Block.Authorized),
- Description = Localizer["Authorized"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Block.NotAuthorized),
- Description = Localizer["NotAuthorized"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs
index be2746921fe..c58df306975 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs
@@ -73,118 +73,6 @@ private EventItem[] GetEvents() =>
}
];
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Color",
- Description = Localizer["Att1"],
- Type = "Color",
- ValueList = "None / Active / Primary / Secondary / Success / Danger / Warning / Info / Light / Dark / Link",
- DefaultValue = "Primary"
- },
- new()
- {
- Name = "Icon",
- Description = Localizer["Att2"],
- Type = "string",
- ValueList = "",
- DefaultValue = ""
- },
- new()
- {
- Name = "LoadingIcon",
- Description = Localizer["Att3"],
- Type = "string",
- ValueList = "",
- DefaultValue = "fa-fw fa-spin fa-solid fa-spinner"
- },
- new()
- {
- Name = "Text",
- Description = Localizer["Att4"],
- Type = "string",
- ValueList = "",
- DefaultValue = ""
- },
- new()
- {
- Name = "Size",
- Description = Localizer["Att5"],
- Type = "Size",
- ValueList = "None / ExtraSmall / Small / Medium / Large / ExtraLarge",
- DefaultValue = "None"
- },
- new()
- {
- Name = "Class",
- Description = Localizer["Att6"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsBlock",
- Description = Localizer["Att7"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsDisabled",
- Description = Localizer["Att8"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsOutline",
- Description = Localizer["Att9"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsAsync",
- Description = Localizer["Att10"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ChildContent",
- Description = Localizer["Att11"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ButtonStyle",
- Description = Localizer["Att12"],
- Type = "ButtonStyle",
- ValueList = "None / Circle / Round",
- DefaultValue = "None"
- },
- new()
- {
- Name = "ButtonType",
- Description = Localizer["Att13"],
- Type = "ButtonType",
- ValueList = "Button / Submit / Reset",
- DefaultValue = "Button"
- }
- ];
-
private MethodItem[] GetMethods() =>
[
new()
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs
index 79fa16f239e..0a951fa8478 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs
@@ -47,44 +47,4 @@ private EventItem[] GetEvents() =>
Type ="EventCallback"
}
];
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Value",
- Description = Localizer["Value"],
- Type = "DateTime",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ChildContent",
- Description = Localizer["ChildContent"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "CellTemplate",
- Description = Localizer["CellTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Calendar.FirstDayOfWeek),
- Description = Localizer["FirstDayOfWeek"],
- Type = "DayOfWeek",
- ValueList = " — ",
- DefaultValue = "Sunday"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Cameras.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Cameras.razor.cs
index 24df426c884..985a35ed901 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Cameras.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Cameras.razor.cs
@@ -159,92 +159,4 @@ private Task OnClose()
Logger.Log(TraceOnClose);
return Task.CompletedTask;
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Camera.VideoWidth),
- Description = Localizer["VideoWidth"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "320"
- },
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Camera.VideoHeight),
- Description = Localizer["VideoHeight"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "240"
- },
- new()
- {
- Name = "ShowPreview",
- Description = Localizer["ShowPreview"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "AutoStart",
- Description = Localizer["AutoStart"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "DeviceLabel",
- Description = Localizer["DeviceLabel"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnInit",
- Description = Localizer["OnInit"],
- Type = "Func, Task>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnStart",
- Description = Localizer["OnStart"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnClose",
- Description = Localizer["OnClose"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Camera.CaptureJpeg),
- Description = Localizer["CaptureJpeg"],
- Type = "bool",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Camera.Quality),
- Description = Localizer["Quality"],
- Type = "double",
- ValueList = " — ",
- DefaultValue = " 0.9d"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs
index 81d509cd928..02b77313fb0 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs
@@ -69,94 +69,6 @@ private async Task OnValidAsync(bool ret)
}
}
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ImagesPath",
- Description = Localizer["ImagesPath"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "images"
- },
- new()
- {
- Name = "ImagesName",
- Description = Localizer["ImagesName"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "Pic.jpg"
- },
- new()
- {
- Name = "HeaderText",
- Description = Localizer["HeaderText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["HeaderTextDefaultValue"]
- },
- new()
- {
- Name = "BarText",
- Description = Localizer["BarText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["BarTextDefaultValue"]
- },
- new()
- {
- Name = "FailedText",
- Description = Localizer["FailedText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["FailedTextDefaultValue"]
- },
- new()
- {
- Name = "LoadText",
- Description = Localizer["LoadText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["LoadTextDefaultValue"]
- },
- new()
- {
- Name = "TryText",
- Description = Localizer["TryText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["TryTextDefaultValue"]
- },
- new()
- {
- Name = "Offset",
- Description = Localizer["Offset"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "5"
- },
- new()
- {
- Name = "Width",
- Description = Localizer["Width"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "280"
- },
- new()
- {
- Name = "Height",
- Description = Localizer["Height"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "155"
- }
- ];
-
///
/// 获得事件方法
///
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Cards.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Cards.razor.cs
index a236ed063ce..b4f32026516 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Cards.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Cards.razor.cs
@@ -10,92 +10,5 @@ namespace BootstrapBlazor.Server.Components.Samples;
///
public sealed partial class Cards
{
- ///
- /// Card属性
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "BodyTemplate",
- Description = Localizer["BodyTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "FooterTemplate",
- Description = Localizer["FooterTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "HeaderTemplate",
- Description = Localizer["HeaderTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Class",
- Description = Localizer["Class"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Card.HeaderPaddingY),
- Description = Localizer["HeaderPaddingY"],
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Color",
- Description = Localizer["Color"],
- Type = "Color",
- ValueList = "None / Primary / Secondary / Success / Danger / Warning / Info / Light / Dark",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsCenter",
- Description = Localizer["IsCenter"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsCollapsible",
- Description = Localizer["IsCollapsible"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(Card.Collapsed),
- Description = Localizer["Collapsed"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsShadow",
- Description = Localizer["IsShadow"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.cs
index f136c83d900..e393c77f78c 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.cs
@@ -39,60 +39,4 @@ private Task OnClick(string imageUrl)
OnClickLogger.Log($"Image Clicked: {imageUrl}");
return Task.CompletedTask;
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Images",
- Description = Localizer["Images"],
- Type = "IEnumerable",
- ValueList = "—",
- DefaultValue = "—"
- },
- new()
- {
- Name = "IsFade",
- Description = Localizer["IsFade"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "HoverPause",
- Description = Localizer["HoverPause"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "Width",
- Description = Localizer["Width"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "—"
- },
- new()
- {
- Name = "OnClick",
- Description = Localizer["OnClick"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "PlayMode",
- Description = Localizer["PlayMode"],
- Type = "CarouselPlayMode",
- ValueList = "AutoPlayOnload|AutoPlayAfterManually|Manually",
- DefaultValue = "AutoPlayOnload"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs
index 448c0e76a18..6fd9a2fbc87 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs
@@ -92,68 +92,4 @@ private async Task OnValidate()
{
await ValidateForm1.ValidateAsync();
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["Att1"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "DisplayText",
- Description = Localizer["Att2"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "PlaceHolder",
- Description = Localizer["Att3"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["Att3Default"]!
- },
- new()
- {
- Name = "Class",
- Description = Localizer["Att4"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Color",
- Description = Localizer["Att5"],
- Type = "Color",
- ValueList = "Primary / Secondary / Success / Danger / Warning / Info / Dark",
- DefaultValue = "Primary"
- },
- new()
- {
- Name = "IsDisabled",
- Description = Localizer["Att6"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Items",
- Description = Localizer["Att7"],
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs
index 0d40e8d97dd..5ccf0f829f6 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs
@@ -171,50 +171,6 @@ class IconSelectedItem : SelectedItem
public string? Icon { get; init; }
}
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Items",
- Description = Localizer["Att1"],
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsDisabled",
- Description = Localizer["Att1"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Value",
- Description = Localizer["Att1"],
- Type = "TValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsVertical",
- Description = Localizer["Att1"],
- Type = "boolean",
- ValueList = " true / false ",
- DefaultValue = " false "
- },
- new()
- {
- Name = nameof(CheckboxList.MaxSelectedCount),
- Description = Localizer["AttributeMaxSelectedCount"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- }
- ];
-
///
/// Get event method
///
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs
index 3adef5c9c4a..53582671e41 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs
@@ -65,54 +65,6 @@ private Task OnBeforeStateChanged(CheckboxState state) => SwalService.Show
Content = Localizer["OnBeforeStateChangedSwalContent"]
});
- ///
- /// GetAttributes
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["Att1"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowAfterLabel",
- Description = Localizer["Att2"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "DisplayText",
- Description = Localizer["Att3"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsDisabled",
- Description = Localizer["Att4"],
- Type = "boolean",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "State",
- Description = Localizer["Att5"],
- Type = "CheckboxState",
- ValueList = "Mixed / Checked / UnChecked",
- DefaultValue = "UnChecked"
- }
- ];
-
///
/// 获得事件方法
///
diff --git a/src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor.cs
index f84e1d3e36b..a007c4fd055 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor.cs
@@ -60,56 +60,4 @@ private async Task OnFileUpload(CherryMarkdownUploadFile arg)
[Inject]
[NotNull]
private IStringLocalizer? Localizer { get; set; }
-
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "EditorSettings",
- Description = "编辑器设置",
- Type = "EditorSettings",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ToolbarSettings",
- Description = "工具栏设置",
- Type = "ToolbarSettings",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Value",
- Description = "组件值",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Html",
- Description = "组件 Html 代码",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnFileUpload",
- Description = "文件上传回调方法",
- Type = "Func>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsViewer",
- Description = "组件是否为浏览器模式",
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor.cs
index e66350cf4bf..67be76dde04 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor.cs
@@ -23,40 +23,4 @@ public partial class ClockPickers
private TimeSpan ScaleValue { get; set; } = TimeSpan.FromHours(12.5);
private bool _autoSwitch = false;
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(ClockPicker.IsAutoSwitch),
- Description = Localizer["IsAutoSwitchAttr"],
- Type = "bool",
- ValueList = "true / false",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(ClockPicker.ShowClockScale),
- Description = Localizer["ShowClockScaleAttr"],
- Type = "bool",
- ValueList = "true / false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(ClockPicker.ShowMinute),
- Description = Localizer["ShowMinuteAttr"],
- Type = "bool",
- ValueList = "true / false",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(ClockPicker.ShowSecond),
- Description = Localizer["ShowSecondAttr"],
- Type = "bool",
- ValueList = "true / false",
- DefaultValue = "true"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor.cs
index 12d9165666f..eefd338fa83 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor.cs
@@ -34,34 +34,6 @@ private void OnToggle()
new SelectedItem ("Shanghai", "上海") { Active = true },
};
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "CollapseItems",
- Description = Localizer["CollapseItems"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsAccordion",
- Description = Localizer["IsAccordion"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "OnCollapseChanged",
- Description = Localizer["OnCollapseChanged"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
private AttributeItem[] GetCollapseItemAttributes() =>
[
new()
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor.cs
index 69ecf04428d..f17af444fcc 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor.cs
@@ -58,48 +58,4 @@ private static async Task FormatValueAsync(string v)
}
return ret;
}
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(ColorPicker.Template),
- Description = Localizer["AttributeTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(ColorPicker.Formatter),
- Description = Localizer["AttributeFormatter"],
- Type = "Func>",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(ColorPicker.IsSupportOpacity),
- Description = Localizer["AttributeIsSupportOpacity"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(ColorPicker.Swatches),
- Description = Localizer["AttributeSwatches"],
- Type = "bool",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(ColorPicker.OnValueChanged),
- Description = Localizer["EventOnValueChanged"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor.cs
index ed79bcfc758..3781460cdd3 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor.cs
@@ -126,138 +126,4 @@ private static AttributeItem[] GetItemAttributes() =>
DefaultValue = "None"
}
];
-
- ///
- /// GetAttributes
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Console.Items),
- Description = "组件数据源",
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Height",
- Description = "组件高度",
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = nameof(BootstrapBlazor.Components.Console.IsAutoScroll),
- Description = "是否自动滚屏",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new(){
- Name = "ShowAutoScroll",
- Description = "是否显示自动滚屏选项",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "OnClear",
- Description = "组件清屏回调方法",
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = "HeaderText",
- Description = "Header 显示文字",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "系统监控"
- },
- new()
- {
- Name = "HeaderTemplate",
- Description = "Header 模板",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ItemTemplate",
- Description = "Item 模板",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new(){
- Name = "LightTitle",
- Description = "指示灯 Title",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "通讯指示灯"
- },
- new()
- {
- Name = "IsFlashLight",
- Description = "指示灯是否闪烁",
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "LightColor",
- Description = "指示灯颜色",
- Type = "Color",
- ValueList = " — ",
- DefaultValue = "Color.Success"
- },
- new()
- {
- Name = "ShowLight",
- Description = "是否显示指示灯",
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ClearButtonText",
- Description = "按钮显示文字",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "清屏"
- },
- new()
- {
- Name = "ClearButtonIcon",
- Description = "按钮显示图标",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "fa-fw fa-solid fa-xmark"
- },
- new()
- {
- Name = "ClearButtonColor",
- Description = "按钮颜色",
- Type = "Color",
- ValueList = "None / Active / Primary / Secondary / Success / Danger / Warning / Info / Light / Dark / Link",
- DefaultValue = "Secondary"
- },
- new()
- {
- Name = "FooterTemplate",
- Description = "Footer 模板",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor.cs
index 5ba51961b72..863ce59f476 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor.cs
@@ -13,32 +13,4 @@ public partial class CountButtons
private static Task OnClick() => Task.Delay(2000);
private string CountTextCallback(int count) => Localizer["CountButtonText", count];
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(CountButton.Count),
- Description = Localizer["Count"],
- Type = "TValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountButton.CountText),
- Description = Localizer["CountText"],
- Type = "CountOption",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountButton.CountTextCallback),
- Description = Localizer["CountTextCallback"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor b/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor
index c584899bad7..1ffaac1ccbd 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor
@@ -100,4 +100,4 @@
-
+
diff --git a/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.cs
index c90205f9a61..57cca2f06ad 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -57,164 +57,4 @@ private Task OnSelectedItemChanged(SelectedItem item)
}
return Task.CompletedTask;
}
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Value",
- Description = Localizer["Value"],
- Type = "TValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Option",
- Description = Localizer["CountOption"],
- Type = "CountOption",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnCompleted",
- Description = Localizer["OnCompleted"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
- private AttributeItem[] GetOptionAttributes() =>
- [
- new()
- {
- Name = nameof(CountUpOption.StartValue),
- Description = Localizer["StartValue"],
- Type = "decimal",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = nameof(CountUpOption.Duration),
- Description = Localizer["Duration"],
- Type = "float",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = nameof(CountUpOption.UseEasing),
- Description = Localizer["UseEasing"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(CountUpOption.DecimalPlaces),
- Description = Localizer["DecimalPlaces"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "0"
- },
- new()
- {
- Name = nameof(CountUpOption.Decimal),
- Description = Localizer["Decimal"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.UseGrouping),
- Description = Localizer["UseGrouping"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(CountUpOption.UseIndianSeparators),
- Description = Localizer["UseIndianSeparators"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(CountUpOption.Separator),
- Description = Localizer["Separator"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.Prefix),
- Description = Localizer["Prefix"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.Suffix),
- Description = Localizer["Suffix"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.SmartEasingAmount),
- Description = Localizer["SmartEasingAmount"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.SmartEasingThreshold),
- Description = Localizer["SmartEasingThreshold"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(CountUpOption.EnableScrollSpy),
- Description = Localizer["EnableScrollSpy"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(CountUpOption.ScrollSpyDelay),
- Description = Localizer["ScrollSpyDelay"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = "200"
- },
- new()
- {
- Name = nameof(CountUpOption.ScrollSpyOnce),
- Description = Localizer["ScrollSpyOnce"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(CountUpOption.Numerals),
- Description = Localizer["Numerals"],
- Type = "char[]",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs
index 0bafd2997be..7f3927f7695 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs
@@ -166,132 +166,4 @@ private EventItem[] GetEvents() =>
Type ="Func>>"
}
];
-
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["Att1"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ShowSidebar",
- Description = Localizer["Att2"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "DisplayText",
- Description = Localizer["Att3"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Format",
- Description = Localizer["Att4"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "yyyy-MM-dd"
- },
- new()
- {
- Name = "IsDisabled",
- Description = Localizer["Att6"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Value",
- Description = Localizer["Att8"],
- Type = "TValue",
- ValueList = "DateTime | DateTime?",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(DateTimePicker.FirstDayOfWeek),
- Description = Localizer["AttrFirstDayOfWeek"],
- Type = "DayOfWeek",
- ValueList = " — ",
- DefaultValue = "Sunday"
- },
- new()
- {
- Name = "ViewMode",
- Description = Localizer["Att9"],
- Type = "DatePickerViewMode",
- ValueList = " Date / DateTime / Year / Month",
- DefaultValue = "Date"
- },
- new() {
- Name = "AutoClose",
- Description = Localizer["AttrAutoClose"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "IsEditable",
- Description = Localizer["AttrIsEditable"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "ShowLunar",
- Description = Localizer["AttrShowLunar"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "ShowSolarTerm",
- Description = Localizer["AttrShowSolarTerm"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "ShowFestivals",
- Description = Localizer["AttrShowFestivals"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "ShowHolidays",
- Description = Localizer["AttrShowHolidays"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new() {
- Name = "EnableDisabledDaysCache",
- Description = Localizer["AttrEnableDisabledDaysCache"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new() {
- Name = "DisplayDisabledDayAsEmpty",
- Description = Localizer["AttrDisplayDisabledDayAsEmpty"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs
index b70f84da724..ca6fe3b3462 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs
@@ -158,108 +158,4 @@ private static List GetEvents() =>
Type ="Func"
}
];
-
- ///
- /// Get property method
- ///
- ///
- private static List GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = "Whether to show the pre-label",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ShowSidebar",
- Description = "Whether to show the shortcut sidebar",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(DateTimeRange.ShowSelectedValue),
- Description = "Whether to show the selected value",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowToday",
- Description = "Whether to show today shortcut button",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsDisabled",
- Description = "Whether to disable default is false",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowSidebar",
- Description = "Whether to display the shortcut sidebar The default is false",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Placement",
- Description = "Set the popup location",
- Type = "Placement",
- ValueList = "top|bottom|left|right",
- DefaultValue = "auto"
- },
- new()
- {
- Name = "DisplayText",
- Description = "Pre-label display text",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "DateFormat",
- Description = "Date format string defaults to yyyy-MM-dd",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "yyyy-MM-dd"
- },
- new()
- {
- Name = "Value",
- Description = "Custom class containing start time end time",
- Type = "DateTimeRangeValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "SidebarItems",
- Description = "Sidebar shortcut options collection",
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsEditable",
- Description = "Is manual date entry allowed",
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.cs
index eac4f2ebd0c..7c7c1e5917e 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.cs
@@ -20,36 +20,4 @@ private Task OnClick(DialMode mode)
}
private CheckboxState CheckState(string state) => Mode.ToString() == state ? CheckboxState.Checked : CheckboxState.UnChecked;
-
- ///
- /// GetAttributes
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = nameof(DialButton.Placement),
- Description = "the dial button placement",
- Type = "Placement",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(DialButton.DialMode),
- Description = "the dial button placement",
- Type = "DialMode",
- ValueList = "Linear/Radial",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(DialButton.Radius),
- Description = "the dial popup radius",
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs
index f8f1d8978a6..75e645b5033 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs
@@ -309,148 +309,4 @@ private async Task OnEmailButtonClick()
EmailInputValue = string.Join(";", Emails);
}
}
-
- ///
- /// 获得属性方法
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Component",
- Description = "Parameters of the component referenced in the dialog Body",
- Type = "DynamicComponent",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "BodyContext",
- Description = "pop-up window",
- Type = "object",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "HeaderTemplate",
- Description = "Modal body ModalHeader template",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "BodyTemplate",
- Description = "Modal body ModalBody component",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "FooterTemplate",
- Description = "ModalFooter component at the bottom of the modal",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsCentered",
- Description = "Whether to center vertically",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "IsScrolling",
- Description = "Whether to scroll when the text of the pop-up window is too long",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowCloseButton",
- Description = "whether to show the close button",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ShowHeaderCloseButton",
- Description = "Whether to display the close button on the right side of the title bar",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ShowFooter",
- Description = "whether to display Footer",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = nameof(DialogOption.ShowPrintButton),
- Description = "Whether to show the print button",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = nameof(DialogOption.ShowPrintButtonInHeader),
- Description = "Whether the print button is displayed in the Header",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Size",
- Description = "Size of dialog",
- Type = "Size",
- ValueList = "None / ExtraSmall / Small / Medium / Large / ExtraLarge",
- DefaultValue = "Large"
- },
- new()
- {
- Name = nameof(DialogOption.FullScreenSize),
- Description = "Full screen when smaller than a certain size",
- Type = "Size",
- ValueList = "None / Always / Small / Medium / Large / ExtraLarge",
- DefaultValue = "None"
- },
- new()
- {
- Name = "Title",
- Description = "Popup title",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " not set "
- },
- new()
- {
- Name = nameof(DialogOption.PrintButtonText),
- Description = "print button display text",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "The value set in the resource file"
- },
- new()
- {
- Name = nameof(DialogOption.ShowMaximizeButton),
- Description = "Whether to show the maximize button",
- Type = "boolean",
- ValueList = "true|false",
- DefaultValue = "false"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Displays.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Displays.razor.cs
index 929f2fc4b85..484ecb46874 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Displays.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Displays.razor.cs
@@ -57,48 +57,4 @@ protected override void OnInitialized()
Model.Hobby = Foo.GenerateHobbies(FooLocalizer).Take(3).Select(i => i.Text);
Hobbies = Foo.GenerateHobbies(FooLocalizer);
}
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["ShowLabel"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "DisplayText",
- Description = Localizer["DisplayText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "FormatString",
- Description = Localizer["FormatString"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Formatter",
- Description = Localizer["Formatter"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Display.TypeResolver),
- Description = Localizer["TypeResolver"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor.cs
index dbcff238727..a816183e532 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor.cs
@@ -10,46 +10,4 @@ namespace BootstrapBlazor.Server.Components.Samples;
///
public sealed partial class Dividers
{
- ///
- /// 获得属性方法
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new() {
- Name = "Text",
- Description = Localizer["Desc1"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new() {
- Name = "Icon",
- Description = Localizer["Desc2"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new() {
- Name = "Alignment",
- Description = Localizer["Desc3"],
- Type = "Aligment",
- ValueList = "Left|Center|Right|Top|Bottom",
- DefaultValue = "Center"
- },
- new() {
- Name = "IsVertical",
- Description = Localizer["Desc4"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new() {
- Name = "ChildContent",
- Description = Localizer["Desc5"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DockViews/Index.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DockViews/Index.razor.cs
index fd20ab88150..34b2c8c6ff7 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DockViews/Index.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DockViews/Index.razor.cs
@@ -10,104 +10,5 @@ namespace BootstrapBlazor.Server.Components.Samples.DockViews;
///
public partial class Index
{
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Name",
- Description = "DockView 本地化存储识别键值",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnInitializedCallbackAsync",
- Description = "客户端组件脚本初始化完成后回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnVisibleStateChangedAsync",
- Description = "标签切换 Visible 状态时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnTabDropCallbackAsync",
- Description = "标签页拖动完成时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnSplitterCallbackAsync",
- Description = "标签页调整大小完成时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnLockChangedCallbackAsync",
- Description = "锁定状态回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnResizeCallbackAsync",
- Description = "标签页位置变化时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsLock",
- Description = "是否锁定",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "LayoutConfig",
- Description = "布局配置",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Version",
- Description = "版本设置",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "EnableLocalStorage",
- Description = "是否启用本地存储布局",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "LocalStoragePrefix",
- Description = "本地存储前缀",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DockViews2/Index.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DockViews2/Index.razor.cs
index e6475953f53..65d82e40bd9 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DockViews2/Index.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DockViews2/Index.razor.cs
@@ -10,105 +10,6 @@ namespace BootstrapBlazor.Server.Components.Samples.DockViews2;
///
public partial class Index
{
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Name",
- Description = "DockView 本地化存储识别键值",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnInitializedCallbackAsync",
- Description = "客户端组件脚本初始化完成后回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnVisibleStateChangedAsync",
- Description = "标签切换 Visible 状态时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnTabDropCallbackAsync",
- Description = "标签页拖动完成时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnSplitterCallbackAsync",
- Description = "标签页调整大小完成时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnLockChangedCallbackAsync",
- Description = "锁定状态回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnResizeCallbackAsync",
- Description = "标签页位置变化时回调此方法",
- Type = "Func?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "IsLock",
- Description = "是否锁定",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "LayoutConfig",
- Description = "布局配置",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Version",
- Description = "版本设置",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "EnableLocalStorage",
- Description = "是否启用本地存储布局",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "LocalStoragePrefix",
- Description = "本地存储前缀",
- Type = "string?",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
private static AttributeItem[] GetDockContentAttributes() =>
[
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
index c767bedce4a..a98618de5bb 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
@@ -79,30 +79,6 @@ protected override void OnInitialized()
];
}
- ///
- /// GetAttributes
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "MaxItems",
- Description = Localizer["A1"],
- Type = "int?",
- ValueList = " — ",
- DefaultValue = "null"
- },
- new()
- {
- Name = "ChildContent",
- Description = Localizer["A1"],
- Type = "RenderFragment?",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
///
/// GetMethods
///
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs
index a1b2ea77676..88d80b43785 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs
@@ -69,108 +69,4 @@ private async Task DrawerServiceShow() => await DrawerService.Show(new DrawerOpt
AllowResize = true,
IsBackdrop = true
});
-
- ///
- /// Get property method
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Width",
- Description = "drawer width",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "360px"
- },
- new()
- {
- Name = "Height",
- Description = "drawer height",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "290px"
- },
- new()
- {
- Name = "IsOpen",
- Description = "Is the drawer open?",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "IsBackdrop",
- Description = "Whether click on the mask closes the drawer",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "AllowResize",
- Description = "Whether allow drag resize the drawer",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "OnClickBackdrop",
- Description = "Callback delegate method when background mask is clicked",
- Type = "Action",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Placement",
- Description = "Where the component appears",
- Type = "Placement",
- ValueList = "Left|Right|Top|Bottom",
- DefaultValue = "Left"
- },
- new()
- {
- Name = "Position",
- Description = "Where the component position",
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "BodyScroll",
- Description = "Where the enable body scrolling when drawer is shown",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ChildContent",
- Description = "Subassembly",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ZIndex",
- Description = "sets the z-order",
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Drawer.OnCloseAsync),
- Description = "The callback when close drawer",
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.cs
index f8bcc384a10..c82cbad4880 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.cs
@@ -17,88 +17,4 @@ private Task OnItemCloseAsync(DropdownWidgetItem item)
_logger.Log($"Item {item.BadgeNumber} closed");
return Task.CompletedTask;
}
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Icon",
- Description = Localizer["Icon"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = "fa-regular fa-bell"
- },
- new()
- {
- Name = "BadgeColor",
- Description = Localizer["BadgeColor"],
- Type = "Color",
- ValueList = " — ",
- DefaultValue = "Success"
- },
- new()
- {
- Name = "HeaderColor",
- Description = Localizer["HeaderColor"],
- Type = "Color",
- ValueList = "Primary / Secondary / Info / Warning / Danger ",
- DefaultValue = "Primary"
- },
- new()
- {
- Name = "BadgeNumber",
- Description = Localizer["BadgeNumber"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ShowArrow",
- Description = Localizer["ShowArrow"],
- Type = "boolean",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "MenuAlignment",
- Description = Localizer["MenuAlignment"],
- Type = "Alignment",
- ValueList = "None / Left / Center / Right ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "HeaderTemplate",
- Description = Localizer["HeaderTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "BodyTemplate",
- Description = Localizer["BodyTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "FooterTemplate",
- Description = Localizer["FooterTemplate"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "OnItemCloseAsync",
- Description = Localizer["OnItemCloseAsync"],
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs
index 03b097dccd0..e02908a9aa2 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs
@@ -165,117 +165,6 @@ private async Task OnIsAsyncClick()
private Task OnClickAction(string actionName) => ToastService.Information("Custom Action", $"Trigger {actionName}");
- ///
- /// GetAttributes
- ///
- ///
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Value",
- Description = Localizer["AttributeValue"],
- Type = "TValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Class",
- Description = Localizer["AttributeClass"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new() {
- Name = "Color",
- Description = Localizer["AttributeColor"],
- Type = "Color",
- ValueList = "Primary / Secondary / Info / Warning / Danger ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Direction",
- Description = Localizer["AttributeDirection"],
- Type = "Direction",
- ValueList = "Dropup / Dropright / Dropleft",
- DefaultValue = " None "
- },
- new()
- {
- Name = "Items",
- Description = Localizer["AttributeItems"],
- Type = "list",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "MenuAlignment",
- Description = Localizer["AttributeMenuAlignment"],
- Type = "Alignment",
- ValueList = "None / Left / Center / Right ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "MenuItem",
- Description = Localizer["AttributeMenuItem"],
- Type = "string",
- ValueList = "button / a ",
- DefaultValue = " a "
- },
- new()
- {
- Name = "Responsive",
- Description = Localizer["AttributeResponsive"],
- Type = "string",
- ValueList = "dropdown-menu / dropdown-menu-end / dropdown-menu-{lg | md | sm }-{right | left}",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ShowSplit",
- Description = Localizer["AttributeShowSplit"],
- Type = "bool",
- ValueList = "true / false ",
- DefaultValue = " false "
- },
- new()
- {
- Name = "IsAsync",
- Description = Localizer["AttributeIsAsync"],
- Type = "boolean",
- ValueList = " — ",
- DefaultValue = "false"
- },
- new()
- {
- Name = "Size",
- Description = Localizer["AttributeSize"],
- Type = "Size",
- ValueList = "None / ExtraSmall / Small / Medium / Large / ExtraLarge / ExtraExtraLarge",
- DefaultValue = "None"
- },
- new()
- {
- Name = "TagName",
- Description = Localizer["AttributeTagName"],
- Type = "string",
- ValueList = " a / button ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(Dropdown.FixedButtonText),
- Description = Localizer["FixedButtonText"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
///
/// GetEvents
///
diff --git a/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor.cs
index 6e3faa58c61..29f804777ea 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor.cs
@@ -123,92 +123,4 @@ private async Task NormalShowAlignDialog()
await DialogService.ShowEditDialog(option);
}
-
- ///
- /// get property method
- ///
- ///
- private static AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "ShowLabel",
- Description = "Whether to show labels",
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "Model",
- Description = "Generic parameters are used to render the UI",
- Type = "TModel",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Items",
- Description = "Edit item collection",
- Type = "IEnumerable",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "DialogBodyTemplate",
- Description = "EditDialog Body template",
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "CloseButtonText",
- Description = "Close button text",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "closure"
- },
- new()
- {
- Name = "SaveButtonText",
- Description = "Save button text",
- Type = "string",
- ValueList = " — ",
- DefaultValue = "save"
- },
- new()
- {
- Name = "OnSaveAsync",
- Description = "Save callback delegate",
- Type = "Func",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ItemsPerRow",
- Description = "Displays the number of components per line",
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "RowType",
- Description = "Set the component layout",
- Type = "RowType",
- ValueList = "Row|Inline",
- DefaultValue = "Row"
- },
- new()
- {
- Name = "LabelAlign",
- Description = "Inline Label alignment in layout mode",
- Type = "Alignment",
- ValueList = "None|Left|Center|Right",
- DefaultValue = "None"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs
index ccaac6089fd..71d7fc9ffdd 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs
@@ -55,98 +55,6 @@ protected override void OnInitialized()
[NotNull]
private Foo? ValidateModel { get; set; }
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Model",
- Description = Localizer["Att1"],
- Type = "TModel",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "FieldItems",
- Description = Localizer["Att2"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "Buttons",
- Description = Localizer["Att3"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = nameof(EditorForm.IsDisplay),
- Description = Localizer["IsDisplay"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowLabel",
- Description = Localizer["Att4"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ShowLabelTooltip",
- Description = Localizer["ShowLabelTooltip"],
- Type = "bool?",
- ValueList = "true/false/null",
- DefaultValue = "null"
- },
- new()
- {
- Name = "AutoGenerateAllItem",
- Description = Localizer["Att5"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "ItemsPerRow",
- Description = Localizer["Att6"],
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "RowType",
- Description = Localizer["Att7"],
- Type = "RowType",
- ValueList = "Row|Inline",
- DefaultValue = "Row"
- },
- new()
- {
- Name = "LabelAlign",
- Description = Localizer["Att8"],
- Type = "Alignment",
- ValueList = "None|Left|Center|Right",
- DefaultValue = "None"
- },
- new()
- {
- Name = "LabelWidth",
- Description = Localizer["LabelWidthAttr"],
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- }
- ];
-
private List GetEditorItemAttributes() =>
[
new()
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Editors.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Editors.razor.cs
index 2c340824e87..d4f9c749de5 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Editors.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Editors.razor.cs
@@ -128,64 +128,4 @@ private async Task OnGetCode()
{
_editorCode = await Editor.GetCode();
}
-
- private AttributeItem[] GetAttributes() =>
- [
- new()
- {
- Name = "Placeholder",
- Description = Localizer["Att1"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = Localizer["Att1DefaultValue"]!
- },
- new()
- {
- Name = "IsEditor",
- Description = Localizer["Att2"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "false"
- },
- new()
- {
- Name = "ShowSubmit",
- Description = Localizer["AttrShowSubmit"],
- Type = "bool",
- ValueList = "true|false",
- DefaultValue = "true"
- },
- new()
- {
- Name = "Height",
- Description = Localizer["Att3"],
- Type = "int",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new()
- {
- Name = "ToolbarItems",
- Description = Localizer["Att4"],
- Type = "IEnumerable