数据列表 DataListView

HTML代码

<!--页面-->
<div id="dataListView" class="dataListView data-list-view-video-info-search"></div>
<!--模板-->
<scrip t type="text/html" id="dataListViewTpl">
    <table class="data-list-view">
        <tbody>
            <tr>
                <td colspan="4">
                <span class="video_name">{videoName}</span>
                <span>(<a href="{url}" target="_blank">链接地址</a>)</span>
                <span class="font-gray update-time">{infoUpdateTime}</span>
                </td>
            </tr>
            <tr>
                <td class="table-data-list-left"><span class="font-gray">频道:</span><span>{channelName}</span></td>
                <td class="table-data-list-right">
                <span class="font-gray fl">演员:</span>
                <span class="ellipsis fl">{actor}</span>
                </td>
            </tr>
            <tr>
                <td class="table-data-list-left"><span class="font-gray">专辑:</span><span>{albumName}</span></td>
                <td class="table-data-list-right"><span class="font-gray">导演:</span><span>{director}</span></td>
            </tr>
            <tr>
                <td class="table-data-list-left"><span class="font-gray">类型:</span><span>{videoType}</span></td>
                <td class="table-data-list-right"><span class="font-gray">版权:</span><span>{copyright}</span></td>
            </tr>
            <tr>
                <td class="table-data-list-left"><span class="font-gray">地区:</span><span>{area}</span></td>
                <td class="table-data-list-right"><span class="font-gray">上映时间:</span><span>{pubTime}</span></td>
            </tr>
        </tbody>
    </table>
</script>

Javascript代码

require('../../widgets/datalistview/module');
    var tpl = $("#dataListViewTpl").html();
    var oDataListView = $p.dataListView("#dataListView", {
        "dataSource": model.getDataList,
        "tplHtml": tpl,
        "sDom": ["T", "D", "S", "P"],
        "fnParams": function () {
            return {};
        },
        "fnFormat": function (row) {
            return $p.tpl(tpl, row);
        }
    });

JSON 数据

datalistdata.json