Files
TechHelper/TechHelper.Client/Pages/Exam/ExamPreview.razor
2025-06-12 19:01:05 +08:00

58 lines
1.4 KiB
Plaintext

@using Entities.DTO
<MudPaper Class="overflow-hidden " Style="background-color:pink" Width="@Width" Height="@Height" MaxHeight="@MaxHeight" MaxWidth="@MaxWidth">
<MudPaper Class="d-flex flex-column flex-grow-1 justify-content-between" Height="100%" Style="background-color:green">
<MudText Typo="Typo.body2"> @examDto.AssignmentTitle </MudText>
<MudPaper>
<MudButtonGroup Size="Size.Small" Color="Color.Primary" Variant="Variant.Filled">
<MudButton OnClick="ExamClick"> 详情 </MudButton>
<MudIconButton Icon="@Icons.Material.Filled.Delete" aria-label="delete" />
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" OnClick="CheckExam" Color="Color.Primary" aria-label="github" />
<MudIconButton Icon="@Icons.Material.Filled.Favorite" Color="Color.Secondary" aria-label="add to favorite" />
</MudButtonGroup>
</MudPaper>
</MudPaper>
</MudPaper>
@code {
[Inject]
public NavigationManager navigationManager { get; set; }
[Parameter]
public ExamDto examDto { get; set; }
[Parameter]
public string? Width { get; set; } = "256";
[Parameter]
public string? Height { get; set; } = "64";
[Parameter]
public string? MaxWidth { get; set; } = "256";
[Parameter]
public string? MaxHeight { get; set; } = "64";
private void ExamClick()
{
navigationManager.NavigateTo($"exam/edit/{examDto.AssignmentId}");
}
private void CheckExam()
{
navigationManager.NavigateTo($"exam/check/{examDto.AssignmentId}");
}
}