bootstrapTable表最后一行固定显示某些内容

直接上代码,红色为关键代码
$('#table').bootstrapTable('destroy').bootstrapTable({
    columns: [
    {
        field: '',
        title: '序号',
        formatter: function (value, row, index) {
            return index+1;
        }
    }, {
        field: 'name',
        title: '姓名',
        footerFormatter: function(data) {
            return '<div style="">总计</div>';
        },
    }, {
        field: 'department',
        title: '部门',
        footerFormatter: function(data) {
            return '<div style="">所有部门</div>';
        },
    },{
        field: 'loginCount',
        title: '登录次数',
        footerFormatter: function(data) { 
            return '<div style="">'+totalLoginCount+'</div>';
        },
    },{
        field: 'loginTime',
        title: '登录时间',
    }
    ],
    data:data,
    striped:true,
    sortName:sort_name,//按照这个排序
    sortOrder:'desc', //降序排列
    search:true, //搜索框
    pagination:true,  //设置为 true 会在表格底部显示分页条。
    paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
    pageList:[10,15,20],
    showFooter:true,//显示列脚
   
});

效果图如下:

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值