本文整理汇总了TypeScript中ts/opg.ts.default.format.timeLength方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.format.timeLength方法的具体用法?TypeScript ts.default.format.timeLength怎么用?TypeScript ts.default.format.timeLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/opg.ts.default.format
的用法示例。
在下文中一共展示了ts.default.format.timeLength方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: bindMetaData
function bindMetaData(data) {
if (!data.seconds) {
data.seconds = data.length;
data.length = opg.format.timeLength(data.seconds);
}
renameAttr(data, 'tags', 'tagIds');
renameAttr(data, 'genre', 'genreIds');
if (data.originDate) data.originDate = data.originDate.split(' ')[0];
if(!data.episodeNumber) data.episodeNumber = 1;
console.log(data);
progInfo = data;
$('#d1').jsonToFields(data);
$('#progType').text(data.typeName);
$('#contentType').text(data.contentType);
$('#length').text(data.length);
//todo:可能会有扩展类别
if (data.type != 1000) {
$('.forOne').find('*').css('visibility', 'visible');
}
else {
$('.forOne').find('*').css('visibility', 'hidden');
}
}
示例2: appendRow
//append a comment table row
appendRow(curTime: number, text?: string = '') :HTMLInputElement {
let trId = `tr_${serial()}`;
let row =
$(`<tr id="${trId}">
<td class="lead2">
${opg.format.timeLength(curTime)}
</td>
<td>
<div class="expandingArea ">
<pre><span></span><br></pre>
<textarea data-time="${curTime}" placeholder="输入意见">${text}</textarea>
</div>
</td>
<td class="text-center">
<button class="btn-mini btn-info" data-time="${curTime}" title="从该时间点播放">
<svg style="width: 8px;height: 8px; fill: currentColor;">
<use xlink:href="${this._svgPath}#plyr-play"></use>
</svg>
</button>
<button data-tid="${trId}" data-time="${curTime}" class="btn-mini btn-danger">×</button>
</td>
</tr>`);
this.tb.append(row);
makeExpandingArea(row.find('.expandingArea')[0]);
return row.find('textarea')[0] as HTMLInputElement;
}
示例3:
opg.api.meta({assetId}, (data) => {
data.length = opg.format.timeLength(data.length);
data.vodArrange = contentUsages[data.vodArrange] || '';
data.copyrightType = copyRightTypes[data.copyrightType] || '';
data.defaultPriceType = priceTypes[data.defaultPriceType] || '';
data.sourceType = serialSourceTypes[data.sourceType] || '';
data.starLevel = starLevels[data.starLevel] || '';
data.rating = ratings[data.rating] || '';
if (data.originDate) data.originDate = data.originDate.split(' ')[0];
for (let attr in data) {
$(document.getElementById(attr)).text(`${data[attr]}`);
}
//todo:可能会有扩展类别
if (data.type != 1000) {
$('.forOne').find('*').css('visibility', 'visible');
}
else {
$('.forOne').find('*').css('visibility', 'hidden');
}
});
示例4:
opg.api.metaInfo({assetId}, (data) => {
data.length = opg.format.timeLength(data.length);
data.vodArrange = contentUsages[data.vodArrange] || '';
data.copyrightType = copyRightTypes[data.copyrightType] || '';
data.defaultPriceType = priceTypes[data.defaultPriceType] || '';
data.sourceType = serialSourceTypes[data.sourceType] || '';
data.starLevel = starLevels[data.starLevel] || '';
data.rating = ratings[data.rating] || '';
if (data.originDate) data.originDate = data.originDate.split(' ')[0];
let singleProgramClassName = 'forOne' ;
//todo:可能会有扩展类别
if (data.type != 1000) {
singleProgramClassName = '';
}
let html = `
<table class="search-table">
<thead>
<tr>
<td colspan="4" class="lead text-center">基本信息</td>
</tr>
</thead>
<tbody>
<tr class="forSingleFileOnly">
<td class="lead">节目名称</td>
<td>${data.managerName||''}</td>
<td class="lead">原名称</td>
<td>${data.oriName||''}</td>
</tr>
<tr class="forSingleFileOnly">
<td class="lead">索引名</td>
<td>${data.sortName||''}<span id=""></span></td>
<td class="lead">查询名</td>
<td>${data.srarchName||''}</td>
</tr>
<tr>
<td class="lead">节目类型</td>
<td>${data.typeDesc||''}<span id=""></span></td>
<td class="lead">类别</td>
<td>${data.contentType||''}</td>
</tr>
<tr>
<td class="lead">栏目Category</td>
<td>${data.category||''}</td>
<td class="lead ${singleProgramClassName}"><span>总集数</span></td>
<td class="${singleProgramClassName}">${data.episodeNumber||''}</td>
</tr>
<tr>
<td class="lead"><label for="genre">子类别Genre</label></td>
<td colspan="3">${data.genre||''}</td>
</tr>
<tr>
<td class="lead">标签Tag</td>
<td colspan="3">${data.tags||''}</td>
</tr>
<tr>
<td class="lead"><label for="categoryNames">分类</label></td>
<td colspan="3">${data.categoryNames||''}</td>
</tr>
<tr>
<td class="lead"><label for="groupNames">内容分组 </label></td>
<td colspan="3">${data.groupNames||''}</td>
</tr>
<tr>
<td class="lead">生效时间</td>
<td>${data.validTime||''}</td>
<td class="lead"><label for="expireTime">失效时间</label></td>
<td>${data.expireTime||''}</td>
</tr>
<tr>
<td class="lead">节目时长</td>
<td colspan="3">${data.length||''}</td>
</tr>
<tr>
<td class="lead"><label for="keyword">关键字</label></td>
<td colspan="3">${data.keyword||''}</td>
</tr>
<tr>
<td class="lead"><label for="description">简介</label></td>
<td colspan="3">${data.description||''}</td>
</tr>
<tr>
<td class="lead"><label for="adName">广告名称</label></td>
<td colspan="3">${data.adName||''}</td>
</tr>
</tbody>
</table>
<table class="search-table">
<thead>
<tr>
<td colspan="4" class="lead text-center">版权信息</td>
</tr>
</thead>
<tbody>
<tr>
<td class="lead"><label for="vodArrange">用途</label></td>
<td>${data.vodArrange||''}</td>
//.........这里部分代码省略.........