BootStrap Table - JS事件綁定

表格加載完成事件,表格行數據二層展開及縮起 事件bootstrap

    var $tableFahuo = $('#tabFahuo');
    $tableFahuo.on('load-success.bs.table', function (data) {
        $.each(currExpandFahuoRows, function (v, n) {
            $tableFahuo.bootstrapTable('expandRow', n);
        });
        setTimeout(function () {
            $tableFahuo.bootstrapTable('scrollTo', currFahuoScroll);
        }, 200);

    }).on('expand-row.bs.table', function (index, row, $detail) {
        if (currExpandFahuoRows.indexOf(row) < 0) {
            currExpandFahuoRows.push(row);
        }
    }).on('collapse-row.bs.table', function (index, row, $detail) {
        currExpandFahuoRows.forEach(function (item, index, arr) {
            if (item == row) {
                currExpandFahuoRows.splice(index, 1);
            }
        });
    });
相關文章
相關標籤/搜索