Files
TechHelper/TechHelper.Client/Pages/Exam/ExamView/ExamView.razor
SpecialX ac900159ba
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
重构项目结构,移除Assignment相关功能,优化Submission模块
2025-10-09 18:57:28 +08:00

46 lines
1.1 KiB
Plaintext

@using Entities.DTO
@using TechHelper.Client.Exam
@if (ParsedExam != null)
{
<MudPaper Height="@Height" Class="@Class" Style="@Style" Width="@Width" Elevation="5">
<MudText Class="d-flex justify-content-center" Typo="Typo.button"> <b> @ParsedExam.Title </b></MudText>
<MudText Typo="Typo.body1"> @ParsedExam.Description </MudText>
<ExamStructView ExamStruct="@ParsedExam.ExamStruct" Elevation="0" ClickedStruct="HandleClickedStruct" Class="ma-0 pa-2 rounded-xl" />
</MudPaper>
}
else
{
<MudPaper Class="justify-content-center">
<MudProgressCircular Indeterminate="true" Color="Color.Primary" />
<MudText Class="ml-4">加载试卷中...</MudText>
</MudPaper>
}
@code {
[Parameter]
public ExamDto ParsedExam { get; set; } = new ExamDto();
[Parameter]
public EventCallback<ExamQuestionDto> ClickedStruct { get; set; }
[Parameter]
public string Height { get; set; } = "100%";
[Parameter]
public string Width { get; set; } = "100%";
[Parameter]
public string Class { get; set; } = "";
[Parameter]
public string Style { get; set; } = "";
private void HandleClickedStruct(ExamQuestionDto dto)
{
ClickedStruct.InvokeAsync(dto);
}
}