本文整理匯總了TypeScript中ts/ui/Table.update函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript update函數的具體用法?TypeScript update怎麽用?TypeScript update使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了update函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
opg.api.modifyTimer(param, () => {
row.validTime = param.validTime ;
if(srcTable){
srcTable.update();
}
this.popWin.close();
});
示例2:
let callback = () => {
if (tb)
tb.update();
if (pop)
pop.close();
else{
opg.ok('元數據信息已保存');
}
};
示例3:
opg.api.newAsset(param , (data)=>{
pop.close();
tb.update();
parentWin['doCatalog'](data.assetId , data.id , param.managerName);
});
示例4: function
onClose: function () {
cache.remove(cacheKey);
tb.update();
},
示例6: createTable
createTable(mediaRow) {
let that = this;
this.tbMedia = opg('#tbMedia').table({
data: [],
columns: [
{
text: '內容名稱',
src: 'managerName',
width: 200,
},
{
text: '內容類型',
src: 'contentType',
width: 150,
},
{
text: '已生產業務',
src: 'busiCodes',
width: 150,
},
{
text: '生產中業務',
src: 'produceBusiCodes',
width: 150,
},
{
text: '創建時間',
src: 'createTime',
width: 150,
},
{
text: '時長',
src: 'length',
width: 150,
},
{
text: '創建人',
src: 'creator',
},
{
text: '操作',
src: 'id',
width: 180, lign: 'left',
render: (val, i, row) => {
let btnHTML = '';
if (mediaRow.updateValidTime_visible) {
btnHTML += `
<button class="btn-mini btn-warning btnModifyTime" data-id="${val}" data-title="${row.managerName}" data-idx="${row[':index']}" data-time="${row.validTime || ''}">修改生效時間</button>
`;
}
if (mediaRow.deleteAsset_visible) {
btnHTML += `
<button class="btn-mini btn-danger btnDelete" data-id="${mediaRow.id}" data-title="${row.managerName}" data-idx="${row[':index']}">刪除</button>
`;
}
return btnHTML;
}
},
],
onUpdate: function () {
opg.api.medias({id: mediaRow.id}, (data) => {
if (data && data.length) {
/*let th = $(`<tr class="subTHead esd_${esd}">
<th></th><th>錄入時間</th><th>合同號</th>
<th>版權類型</th><th>版權開始時間</th><th>版權結束時間</th>
</tr>`).insertAfter(tr);*/
let tr = $(`<tr></tr>`);
let td = $('<td colspan="8" style="padding: 3px;"></td>').appendTo(tr);
let tb = $('<table class="grid"></table>').appendTo(td);
tb.append(`<tbody><tr class="subTHead">
<th>生產庫</th><th style="width: 90px;">生產狀態</th>
<th style="width: 90px;">備份</th><th style="width: 90px;">雲上備份</th>
<th style="width: 180px;">編碼格式</th><th style="width: 90px;">視頻尺寸</th>
<th style="width: 90px;">音頻格式</th>
</tr></tbody>`);
tb.bindList({
list: data,
template: '<tr class="subTBody">' +
'<td class="text-center">${workPath}</td><td class="text-center">${workStatusDesc}</td>' +
'<td class="text-center">${offlineStatusDesc}</td><td class="text-center">${cloudBackupStatusDesc}</td>' +
'<td class="text-center">${movieTypeDesc}</td><td class="text-center">${screenFormatDesc}</td>' +
'<td class="text-center">${audioType}</td>' +
'</tr>',
itemRender: {
btnDeleteFile: function (v, i, row) {
if (v)
return `<button class="btn-mini btn-danger btnDeleteFile" data-id="${row.id}" data-idx="${row[':index']}">刪除</button>`;
return '';
}
},
mode: 'append'
});
that.tbMedia.tbody.append(tr);
}
else {
//.........這裏部分代碼省略.........
示例7:
opg.api.submitCollect(param, (data) => {
pop.close();
tb.update();
});