bootstrap table 合计行

  1. 首先在bootstrap table的init方法中添加属性showFooter:true
  2. 其次在需要合计字段下方加入footerFormatter方法
    eg:
    	footerFormatter: function(){
          
          
    	//统计总分数
    	var count=0;
    	$.each(data.rows, function(index,item) {
          
          
    		count+=item.score;
    	});
    	return count;
    	}
    

猜你喜欢

转载自blog.csdn.net/qq_43550109/article/details/89455114