文章目录
- 前言
- ICON开发
- 使用
前言
Blazor 简单组件(0):简单介绍
ICON开发
<i class="@Type" style="font-size:@(Size)px;color:@Color;"></i>
@code {
/// <summary>
/// icon类型
/// </summary>
[Parameter]
public string Type { get; set; } = "";
/// <summary>
/// icon大小
/// </summary>
[Parameter]
public string Size { get; set; } = "25";
/// <summary>
/// icon颜色
/// </summary>
[Parameter]
public string Color { get; set; } = "black";
private string StyleStr { get; set; } = "";
}
使用
<B_Icon Type="fas fa-arrows-to-dot" />
<B_Icon Type="fas fa-globe" Size="50" />
<B_Icon Type="fas fa-poo" Color="yellow" />
Font Awesome 图标合集