This commit is contained in:
34
TechHelper.Client/Pages/Common/QuestionCardDialog.razor
Normal file
34
TechHelper.Client/Pages/Common/QuestionCardDialog.razor
Normal file
@@ -0,0 +1,34 @@
|
||||
@using Entities.DTO
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<MudDialog Class="rounded-xl" Style="background-color: #dedede" >
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h6">
|
||||
<MudIcon Icon="@Icons.Material.Filled.EditAttributes" Class="mr-3 mb-n1" />
|
||||
<b> 编辑属性 </b>
|
||||
</MudText>
|
||||
</TitleContent>
|
||||
<DialogContent>
|
||||
<TechHelper.Client.Pages.Exam.AssignmentQuestionEdit AssignmentQuestion="Questions"/>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton OnClick="Cancel">Cancel</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="Confirm">确认</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
private IMudDialogInstance MudDialog { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public AssignmentQuestionDto Questions { get; set; } = new AssignmentQuestionDto();
|
||||
|
||||
private void Cancel() => MudDialog.Cancel();
|
||||
|
||||
private void Confirm()
|
||||
{
|
||||
Snackbar.Add("属性已更新", Severity.Success);
|
||||
MudDialog.Close(DialogResult.Ok(Questions));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user