I wrote a paging to display the total amount of all amounts in the data, but I don’t know how to assign the value using footerformatter. I have no choice but to put it in the footer.
First A rendering:
To do this, you need to modify the source code: bootstrap-table.js
1: Define a name
##2:
3:
4:
5: If the value you pass in the background is the same as the value in the quotation marks in the first step, the following rendering will appear
The final returned json style is like this:
{"total":2,"rows":[{"id":1,"categoryid":11,"money":100,"creattime":1509116611000,"updatetime":1509116611000,"describemon":"捡的","userid":17,"state":1,"categoryName":"卢太波"}],"sumMoney":110.0}
Don’t forget sumMoney is The same level as total
The above is the detailed content of Detailed explanation of total quantity statistics of bootstrap-table sum (picture). For more information, please follow other related articles on the PHP Chinese website!