Browse Source

Fixed print formatter bug

zhixin 4 years ago
parent
commit
fb71d8b8bf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/extensions/print/bootstrap-table-print.js

+ 2 - 1
src/extensions/print/bootstrap-table-print.js

@@ -134,7 +134,8 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
 
   doPrint (data) {
   doPrint (data) {
     const formatValue = (row, i, column) => {
     const formatValue = (row, i, column) => {
-      const value = Utils.calculateObjectValue(column, column.printFormatter,
+      const value = Utils.calculateObjectValue(column,
+        column.printFormatter || column.formatter,
         [row[column.field], row, i], row[column.field])
         [row[column.field], row, i], row[column.field])
 
 
       return typeof value === 'undefined' || value === null ?
       return typeof value === 'undefined' || value === null ?