Skip to content

Commit 75c673e

Browse files
committed
feat(Link): 添加 Rel 属性参数 #4437
1 parent a760712 commit 75c673e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@namespace BootstrapBlazor.Components
22
@inherits BootstrapComponentBase
33

4-
<link @attributes="AdditionalAttributes" href="@GetHref()" rel="stylesheet" />
4+
<link @attributes="AdditionalAttributes" href="@GetHref()" rel="@Rel" />

src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public partial class Link
1616
[EditorRequired]
1717
public string? Href { get; set; }
1818

19+
/// <summary>
20+
/// 获得/设置 Rel 属性值, 默认 stylesheet
21+
/// </summary>
22+
[Parameter]
23+
[EditorRequired]
24+
public string? Rel { get; set; }= "stylesheet";
25+
1926
/// <summary>
2027
/// 获得/设置 版本号 默认 null 自动生成
2128
/// </summary>

0 commit comments

Comments
 (0)