<File OnChange="upload"></File><br>
@code{
void upload(InputFileChangeEventArgs e)
{
//上传逻辑
//https://docs.microsoft.com/zh-cn/aspnet/core/blazor/file-uploads?view=aspnetcore-5.0
}
}
<File Color="Color.Primary" OnChange="upload"></File><br>
<File Color="Color.Info" OnChange="upload"></File><br>
<File Color="Color.Warning" IsBoxed OnChange="upload"></File><br>
<File Color="Color.Danger" IsBoxed HasName OnChange="upload"></File><br>
@code{
void upload(InputFileChangeEventArgs e)
{
//上传逻辑
//https://docs.microsoft.com/zh-cn/aspnet/core/blazor/file-uploads?view=aspnetcore-5.0
}
}
<File IsSmall HasName OnChange="upload"></File><br>
<File IsNormal HasName OnChange="upload"></File><br>
<File IsMedium HasName OnChange="upload"></File><br>
<File IsLarge HasName OnChange="upload"></File><br>
@code{
void upload(InputFileChangeEventArgs e)
{
//上传逻辑
//https://docs.microsoft.com/zh-cn/aspnet/core/blazor/file-uploads?view=aspnetcore-5.0
}
}
<File OnChange="upload" HasName DefaultName="请选择要上传的文件..."></File><br>
<File OnChange="upload" IsRight HasName DefaultName="请选择要上传的文件..."></File><br>
<File OnChange="upload" IsBoxed></File><br>
<File OnChange="upload" IsBoxed HasName DefaultName="请选择要上传的文件..."></File><br>
<File OnChange="upload" HasName IsRight Multiple MaxCount="3"
Label="Choose Files" Color="Color.Primary" IconClass="fa fa-cloud-upload"></File>
@code{
void upload(InputFileChangeEventArgs e)
{
//上传逻辑
//https://docs.microsoft.com/zh-cn/aspnet/core/blazor/file-uploads?view=aspnetcore-5.0
}
}
文档