下拉框 (Dropdown)

用于向下弹出内容。

概述

  • 向下弹出内容

代码演示

1.默认示例

namespace WebSite.Docus.View.Dropdowns;

class Dropdown1 : BaseComponent
{
    private readonly List<MenuItem> items = new()
    {
        new MenuItem("Action1", "操作一", "fa fa-close"),
        new MenuItem("Action2", "操作二", "fa fa-user")
    };

    protected override void BuildRenderTree(RenderTreeBuilder builder)
    {
        builder.Dropdown(items, "更多", "button");
    }
}