2020-06-02 14:25:44 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
|
|
|
|
|
|
namespace AntDesign
|
|
|
|
|
{
|
2020-12-26 21:39:04 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// modal footer Component
|
|
|
|
|
/// </summary>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
public partial class ModalFooter
|
|
|
|
|
{
|
2020-12-26 21:39:04 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
[CascadingParameter]
|
|
|
|
|
public DialogOptions ModalProps { get; set; }
|
|
|
|
|
|
|
|
|
|
private async Task HandleCancel(MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
var onCancel = ModalProps.OnCancel;
|
2020-06-23 15:19:44 +08:00
|
|
|
|
if (onCancel != null)
|
2020-06-02 14:25:44 +08:00
|
|
|
|
{
|
2020-06-23 15:19:44 +08:00
|
|
|
|
await onCancel.Invoke(e);
|
2020-06-02 14:25:44 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task HandleOk(MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
var onOk = ModalProps.OnOk;
|
2020-06-23 15:19:44 +08:00
|
|
|
|
if (onOk != null)
|
2020-06-02 14:25:44 +08:00
|
|
|
|
{
|
2020-06-23 15:19:44 +08:00
|
|
|
|
await onOk.Invoke(e);
|
2020-06-02 14:25:44 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|