mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 13:37:35 +08:00
19f51c87fa
* fix: drawer close event bug * refactor: translate some comments Co-authored-by: ElderJames <shunjiey@hotmail.com>
30 lines
741 B
C#
30 lines
741 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign
|
|
{
|
|
public class DrawerTemplate<TComponentOptions, TResult> : TemplateComponentBase<TComponentOptions>
|
|
{
|
|
[Parameter]
|
|
public DrawerRef<TResult> DrawerRef { get; set; }
|
|
|
|
/// <summary>
|
|
/// Close the drawer
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected async Task CloseAsync(TResult result = default)
|
|
{
|
|
await DrawerRef.CloseAsync(result);
|
|
}
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
DrawerRef.OnOpen?.Invoke();
|
|
}
|
|
}
|
|
}
|