Skip to content
5 changes: 0 additions & 5 deletions src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ class User
private Task Goto() => AjaxService.Goto("/introduction");

private Task GotoSelf() => AjaxService.Goto("/ajax");

/// <summary>
/// 获得属性方法
/// </summary>
/// <returns></returns>
private List<MethodItem> GetMethods() =>
[
new()
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/Components/Samples/Alerts.razor
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
</Alert>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
<AttributeTable Name="Alert" />

<EventTable Items="@GetEvents()" />
72 changes: 0 additions & 72 deletions src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,76 +116,4 @@ private static EventItem[] GetEvents() =>
Type = "EventCallback<MouseEventArgs>"
}
];

/// <summary>
/// 获得属性方法
/// </summary>
/// <returns></returns>
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"
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
<div>@((MarkupString)Localizer["AnchorLinkTips5"].Value)</div>
</Tips>

<AttributeTable Items="@GetAttributes()" />
<AttributeTable Name="AnchorLink" />
36 changes: 0 additions & 36 deletions src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,4 @@ public partial class AnchorLinks
[Inject]
[NotNull]
private IStringLocalizer<AnchorLinks>? 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 = " — "
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
</div>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
<AttributeTable Name="Anchor" />
48 changes: 0 additions & 48 deletions src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,4 @@ public partial class Anchors
[Inject]
[NotNull]
private IStringLocalizer<Anchors>? Localizer { get; set; }

/// <summary>
/// 获得属性方法
/// </summary>
/// <returns></returns>
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 = " — "
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
<AutoComplete Items="@StaticItems" IsPopover="true"></AutoComplete>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
<AttributeTable Name="AutoComplete" />
128 changes: 0 additions & 128 deletions src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,132 +48,4 @@ private Task GroupOnSelectedItemChanged(string val)
GroupLogger.Log($"Value: {val}");
return Task.CompletedTask;
}

/// <summary>
/// 获得属性方法
/// </summary>
/// <returns></returns>
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<string>",
ValueList = " — ",
DefaultValue = " — "
},
new()
{
Name = "Items",
Description = Localizer["Att3"],
Type = "IEnumerable<string>",
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<string>",
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<string, Task<IEnumerable<string>>>",
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<string, Task>",
ValueList = " — ",
DefaultValue = " — "
},
new()
{
Name = nameof(AutoComplete.OnSelectedItemChanged),
Description = Localizer[nameof(AutoComplete.OnSelectedItemChanged)],
Type = "Func<string, Task>",
ValueList = " — ",
DefaultValue = " — "
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@
</section>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
<AttributeTable Name="AutoFill" />
Loading