ant-design-blazor/components/modal/ModalFooter.razor.cs
zxyao 6db07ad916 feat: add component modal (#167)
* feat: add component modal

* fix: adjust namespace and fix TAB keyboard bug

* fix: reset package.json to cuueernt head

* fix: remove antblazor.sln

* refactor: using c# to control the display and hiding of modal
2020-06-02 14:25:44 +08:00

34 lines
799 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.HasDelegate)
{
await onCancel.InvokeAsync(e);
}
}
private async Task HandleOk(MouseEventArgs e)
{
var onOk = ModalProps.OnOk;
if (onOk.HasDelegate)
{
await onOk.InvokeAsync(e);
}
}
}
}