using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; namespace AntDesign { public class DrawerTemplate : TemplateComponentBase { [Parameter] public DrawerRef DrawerRef { get; set; } /// /// Close the drawer /// /// protected async Task CloseAsync(TResult result = default) { await DrawerRef.CloseAsync(result); } protected override void OnInitialized() { base.OnInitialized(); DrawerRef.OnOpen?.Invoke(); } } }