示例#1
0
    private static List <TreeItem> GetExpandItems()
    {
        var ret = TreeDataFoo.GetTreeItems();

        ret[1].IsCollapsed = false;
        return(ret);
    }
示例#2
0
    private static List <TreeItem> GetDisabledItems()
    {
        var ret = TreeDataFoo.GetTreeItems();

        ret[1].Items[1].IsDisabled = true;
        return(ret);
    }
示例#3
0
    private async Task OnLoadAsyncItems()
    {
        AsyncItems = null;
        await Task.Delay(2000);

        AsyncItems = TreeDataFoo.GetTreeItems();
    }
示例#4
0
    private static List <TreeItem> GetTemplateItems()
    {
        var ret = TreeDataFoo.GetTreeItems();

        ret[0].Template = BootstrapDynamicComponent.CreateComponent <CustomerTreeItem>().Render();
        return(ret);
    }
示例#5
0
    private static List <TreeItem> GetColorItems()
    {
        var ret = TreeDataFoo.GetTreeItems();

        ret[0].CssClass = "text-primary";
        ret[1].CssClass = "text-success";
        ret[2].CssClass = "text-danger";
        return(ret);
    }
示例#6
0
    private static List <TreeItem> GetLazyItems()
    {
        var ret = TreeDataFoo.GetTreeItems();

        ret[1].Items[0].IsCollapsed  = false;
        ret[1].Items[1].Text         = "懒加载";
        ret[1].Items[1].HasChildNode = true;
        ret[1].Items[2].Text         = "懒加载延时";
        ret[1].Items[2].HasChildNode = true;
        ret[1].Items[2].Key          = "Delay";

        return(ret);
    }
示例#7
0
 private static List <TreeItem> GetIconItems() => TreeDataFoo.GetTreeItems();