BootStrap Table - JS事件绑定

表格加载完成事件,表格行数据二层展开及缩起 事件

    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);
            }
        });
    });