①table标签
<div class="col-sm-12 select-info table-striped">
<table id="bootstrap-table" data-mobile-responsive="true" ></table>
</div>
②js方式表格初始化,属性一定要加
showFooter:true,
③添加columns属性(.balance是field)
footerFormatter:function (value) {
var count =0;
for(var i = 0;i< value.length;i++){
count += JSON.parse(JSON.stringify(value[i])).balance
}
return count+'¥'
}
④这样还是显示不出来底部footer哇?忘记了一件事,添加table标签的属性data-show-footer"true"
<div class="col-sm-12 select-info table-striped">
<table id="bootstrap-table" data-mobile-responsive="true" data-show-footer"true" ></table>
</div>
如果解决了你的问题那么点个赞再走吧~
2018/11/6 By TIAN