2020-06-23 15:19:44 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace AntDesign
|
|
|
|
|
{
|
2020-06-30 13:40:51 +08:00
|
|
|
|
public class DrawerTemplate<TContentParams, TResult> : TemplateComponentBase<TContentParams>
|
2020-06-23 15:19:44 +08:00
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
2020-06-30 13:40:51 +08:00
|
|
|
|
public DrawerRef<TResult> DrawerRef { get; set; }
|
|
|
|
|
|
2020-06-23 15:19:44 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-30 13:40:51 +08:00
|
|
|
|
/// 关闭抽屉
|
2020-06-23 15:19:44 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2020-06-30 13:40:51 +08:00
|
|
|
|
protected async Task CloseAsync(TResult result)
|
|
|
|
|
{
|
|
|
|
|
await DrawerRef.CloseAsync(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnInitialized()
|
2020-06-23 15:19:44 +08:00
|
|
|
|
{
|
2020-06-30 13:40:51 +08:00
|
|
|
|
base.OnInitialized();
|
|
|
|
|
DrawerRef.OnOpen.Invoke();
|
2020-06-23 15:19:44 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|