exam_service
This commit is contained in:
36
TechHelper.Client/Pages/Exam/QuestionCard.razor
Normal file
36
TechHelper.Client/Pages/Exam/QuestionCard.razor
Normal file
@@ -0,0 +1,36 @@
|
||||
@using Entities.DTO
|
||||
@using TechHelper.Client.Exam
|
||||
|
||||
<MudPaper Class=@Class Elevation=@Elevation Outlined="false">
|
||||
|
||||
<MudText Typo="Typo.subtitle1">
|
||||
<b>@Question.Index</b> @((MarkupString)Question.Stem.Replace("\n", "<br />"))
|
||||
@if (Question.Score > 0)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="d-inline ml-2">(@Question.Score 分)</MudText>
|
||||
}
|
||||
</MudText>
|
||||
|
||||
@if (Question.Options.Any())
|
||||
{
|
||||
<div class="mt-2">
|
||||
@foreach (var option in Question.Options)
|
||||
{
|
||||
var tempOption = option;
|
||||
<p>@((MarkupString)(tempOption.Value.Replace("\n", "<br />")))</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
</MudPaper>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public SubQuestionDto Question { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string Class { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int Elevation { get; set; }
|
||||
}
|
Reference in New Issue
Block a user