AsiignmentStruct

This commit is contained in:
SpecialX
2025-06-20 18:58:11 +08:00
parent d20c051c51
commit 681c0862b6
32 changed files with 414 additions and 752 deletions

View File

@@ -4,14 +4,14 @@
<MudPaper Class=@Class Elevation=@Elevation Outlined="false">
<MudText Typo="Typo.subtitle1">
<b>@Question.Index</b> @((MarkupString)Question.Title.Replace("\n", "<br />"))
@if (Question.Score > 0)
<b>@Index</b> @((MarkupString)Question.Title.Replace("\n", "<br />"))
@if (Score > 0)
{
<MudText Typo="Typo.body2" Class="d-inline ml-2">(@Question.Score 分)</MudText>
<MudText Typo="Typo.body2" Class="d-inline ml-2">(@Score 分)</MudText>
}
</MudText>
@if (Question.Options != null)
@if (!string.IsNullOrEmpty(Question.Options))
{
<div class="mt-2">
@foreach (var option in Question.Options.ParseOptionsFromText())
@@ -22,12 +22,6 @@
</div>
}
@foreach(var item in Question.ChildrenQuestion)
{
<QuestionCard Question="item"/>
}
</MudPaper>
@code {
@@ -35,7 +29,13 @@
public QuestionDto Question { get; set; } = new QuestionDto();
[Parameter]
public string Class { get; set; }
public byte Index { get; set; } = 0;
[Parameter]
public byte Score { get; set; } = 0;
[Parameter]
public string Class { get; set; } = string.Empty;
[Parameter]
public int Elevation { get; set; }