2020-05-18 14:46:42 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using System.Threading.Tasks;
|
2020-05-29 00:33:49 +08:00
|
|
|
|
using AntDesign.Internal;
|
|
|
|
|
using AntDesign.JsInterop;
|
2020-05-18 14:46:42 +08:00
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
|
|
2020-05-29 00:33:49 +08:00
|
|
|
|
namespace AntDesign
|
2020-05-18 14:46:42 +08:00
|
|
|
|
{
|
|
|
|
|
public partial class Dropdown : OverlayTrigger
|
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
|
|
|
|
public Func<RenderFragment, RenderFragment, RenderFragment> ButtonsRender { get; set; }
|
|
|
|
|
|
|
|
|
|
private string _rightButtonIcon = "ellipsis";
|
|
|
|
|
private string _buttonSize = AntSizeLDSType.Default;
|
2020-05-29 12:55:15 +08:00
|
|
|
|
private string _buttonType = ButtonType.Default;
|
2020-05-18 14:46:42 +08:00
|
|
|
|
|
|
|
|
|
private RenderFragment _leftButton;
|
|
|
|
|
private RenderFragment _rightButton;
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
private DomEventService DomEventService { get; set; }
|
|
|
|
|
|
|
|
|
|
protected void ChangeRightButtonIcon(string icon)
|
|
|
|
|
{
|
|
|
|
|
_rightButtonIcon = icon;
|
|
|
|
|
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void ChangeButtonSize(string size)
|
|
|
|
|
{
|
|
|
|
|
_buttonSize = size;
|
|
|
|
|
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void ChangeButtonType(string type)
|
|
|
|
|
{
|
|
|
|
|
_buttonType = type;
|
|
|
|
|
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|