ソースを参照

use data attrribute footer-formatter

Yoni Jah 10 年 前
コミット
0dd5e0a006
1 ファイル変更7 行追加7 行削除
  1. 7 7
      src/bootstrap-table.js

+ 7 - 7
src/bootstrap-table.js

@@ -507,11 +507,9 @@
             style = sprintf('vertical-align: %s; ', column.valign);
 
             html.push('<td', class_, sprintf(' style="%s"', falign + style), '>');
-            html.push(
-                typeof column.footerFormatter === 'function' ?
-                    column.footerFormatter(data) || '&nbsp;' :
-                    '&nbsp;'
-            );
+
+
+            html.push(calculateObjectValue(column, column.footerFormatter, [data], '&nbsp;') || '&nbsp;');
             html.push('</td>');
         });
 
@@ -1481,9 +1479,11 @@
             padding += cellHeight;
         }
 
-        if (this.options.showFooter && this.options.height) {
+        if (this.options.showFooter) {
             this.resetFooter();
-            padding += cellHeight;
+            if (this.options.height) {
+                padding += cellHeight;
+            }
         }
 
         $tableContainer.css('padding-bottom', padding + 'px');