mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 20:17:58 +08:00
6db07ad916
* 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
34 lines
799 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|