@namespace AntDesign @inherits AntDomComponentBase @using AntDesign.Internal; @if (!IsPictureCard || !ShowUploadList) { @ChildContent } @if (ShowUploadList) {
@{ var containerClass = ListType switch { "picture-card" => "ant-upload-list-picture-card-container", "text" => "ant-upload-list-text-container", "picture" => "ant-upload-list-picture-container", _ => "" }; } @foreach (var file in FileList) { var tips = string.Empty; var stateClass = string.Empty; switch (file.State) { case UploadState.Uploading: tips = Locale.Uploading; break; case UploadState.Fail: tips = !string.IsNullOrWhiteSpace(file.Response) ? file.Response : Locale.UploadError; stateClass = "ant-upload-list-item-error"; break; case UploadState.Success: tips = file.FileName; stateClass = "ant-upload-list-item-done"; break; }
@if (IsPictureCard && file.State == UploadState.Uploading) {
@Locale.Uploading
@file.FileName
} else {
@if (IsText) {
@if (file.State == UploadState.Uploading) { } else { }
@file.FileName } else { if (file.State == UploadState.Success) { @if (file.IsPicture()) { @file.FileName } else { } } else {
} @file.FileName }
@if (IsPictureCard) { } @if (file.State == UploadState.Uploading) {
}
}
} @if (IsPictureCard) { @ChildContent }
}