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