当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript GridXTable.updateTree方法代码示例

本文整理汇总了TypeScript中jui-grid.GridXTable.updateTree方法的典型用法代码示例。如果您正苦于以下问题:TypeScript GridXTable.updateTree方法的具体用法?TypeScript GridXTable.updateTree怎么用?TypeScript GridXTable.updateTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jui-grid.GridXTable的用法示例。


在下文中一共展示了GridXTable.updateTree方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: xtable

jui.ready([ "grid.xtable" ], (xtable: GridXTable) => {
    const xtable_8: GridXTable = xtable("#xtable_8", {
        fields: [ "url", "count" ],
        resize: true,
        buffer: "vscroll",
        rowHeight: 27,
        scrollHeight: 300,
        tpl: {
            row: $("#tpl_row").html(),
            none: $("#tpl_none").html()
        },
        event: {
            select(row: GridRow, e: any) {
                if (row.type === "fold") {
                    xtable_8.open(row.index);
                } else {
                    xtable_8.fold(row.index);
                }
            }
        }
    });

    xtable_8.updateTree([
        { index: "0", type: "open", data: { url: "/", count: 105 } },
        { index: "0.0", type: "fold", data: { url: "/css", count: 35 } },
        { index: "0.0.0", type: "fold", data: { url: "/index.css", count: 15 } },
        { index: "0.0.1", type: "fold", data: { url: "/layout.css", count: 15 } },
        { index: "0.0.2", type: "fold", data: { url: "/login.css", count: 5 } },
        { index: "0.1", type: "fold", data: { url: "/js", count: 35 } },
        { index: "0.1.0", type: "fold", data: { url: "/index.js", count: 23 } },
        { index: "0.1.1", type: "fold", data: { url: "/jquery.js", count: 12 } },
        { index: "0.2", type: "fold", data: { url: "/img", count: 0 } },
        { index: "0.2.0", type: "fold", data: { url: "logo.ico", count: 0 } },
        { index: "0.3", type: "fold", data: { url: "/main.jsp", count: 10 } },
        { index: "0.4", type: "fold", data: { url: "/login.jsp", count: 10 } },
        { index: "0.5", type: "fold", data: { url: "/sitemap.xml", count: 10 } },
        { index: "0.6", type: "fold", data: { url: "/package.json", count: 5 } }
    ]);
});
开发者ID:AbraaoAlves,项目名称:DefinitelyTyped,代码行数:39,代码来源:jui-grid-tests.ts


注:本文中的jui-grid.GridXTable.updateTree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。