本文整理匯總了TypeScript中jui-grid.GridTable類的典型用法代碼示例。如果您正苦於以下問題:TypeScript GridTable類的具體用法?TypeScript GridTable怎麽用?TypeScript GridTable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GridTable類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: table
jui.ready([ "grid.table" ], (table: GridTable) => {
const table_3: GridTable = table("#table_3", {
event: {
expand(row: any, e: any): void {
$(row.list[0]).html("<i class='icon-right'></i>");
},
expandend(row: any, e: any): void {
$(row.list[0]).html("<i class='icon-left'></i>");
}
},
expand: true
});
table_3.update([
{ name: "Hong", age: "20", location: "Ilsan" },
{ name: "Jung", age: "30", location: "Seoul" },
{ name: "Park", age: "10", location: "Dangjin" }
]);
const table_3_submit: Function = (index: number) => {
const name = $(table_3.root).find(".name").val();
const age = $(table_3.root).find(".age").val();
const location = $(table_3.root).find(".location").val();
//noinspection TypeScriptValidateTypes
table_3.update(index, { name, age, location });
table_3.hideExpand();
};
});
示例2:
const table_3_submit: Function = (index: number) => {
const name = $(table_3.root).find(".name").val();
const age = $(table_3.root).find(".age").val();
const location = $(table_3.root).find(".location").val();
//noinspection TypeScriptValidateTypes
table_3.update(index, { name, age, location });
table_3.hideExpand();
};