mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
7cc424c0f0
* fix: drawer OnOpen bull * Update DrawerTemplate.razor.cs
32 lines
723 B
C#
32 lines
723 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign
|
|
{
|
|
public class DrawerTemplate<TContentParams, TResult> : TemplateComponentBase<TContentParams>
|
|
{
|
|
[Parameter]
|
|
public DrawerRef<TResult> DrawerRef { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 关闭抽屉
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected async Task CloseAsync(TResult result)
|
|
{
|
|
await DrawerRef.CloseAsync(result);
|
|
}
|
|
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
DrawerRef.OnOpen?.Invoke();
|
|
}
|
|
}
|
|
}
|