telwanggs

其实上一篇blog里已经贴了代码,简单解释一下吧:

1、showFooter: true,很重要,设置footer显示:

$(cur_table).bootstrapTable({
    url: \'/etestpaper/getPaperQType\',
    method: \'get\',
    queryParams: {strParentID: parentid},
    ajaxOptions: {strParentID: parentid},
    showFooter: true,
2、在列中指定footerFormatter函数:

{
    field: \'questionnum\',
    title: \'小题数量\',
    align: \'center\',
    footerFormatter: function (value) {
        var count = 0;
        for (var i in value) {
            count += value[i].questionnum;
        }
        return count;
    }

3、贴个效果图:

分类:

技术点:

相关文章:

  • 2021-05-10
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2021-11-26
  • 2021-06-16
  • 2022-12-23
  • 2021-09-28
猜你喜欢
  • 2021-12-14
  • 2021-12-03
  • 2021-08-22
  • 2021-07-05
  • 2021-07-22
  • 2021-09-02
相关资源
相似解决方案