ant-design-blazor/components/modal/ModalFooter.razor.cs
zxyao db64810a20 feat: add DrawerService (#241)
* refactor: change confirm return

* feat(module: drawer): add DrawerService

* fix: change type EventCallback in configs to Func

* fix: typo

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-23 15:19:44 +08:00

34 lines
781 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
namespace AntDesign
{
public partial class ModalFooter
{
[CascadingParameter]
public DialogOptions ModalProps { get; set; }
private async Task HandleCancel(MouseEventArgs e)
{
var onCancel = ModalProps.OnCancel;
if (onCancel != null)
{
await onCancel.Invoke(e);
}
}
private async Task HandleOk(MouseEventArgs e)
{
var onOk = ModalProps.OnOk;
if (onOk != null)
{
await onOk.Invoke(e);
}
}
}
}