浏览代码

Merge pull request #5977 from wenzhixin/fix/5976

fix/5976
文翼 4 年之前
父节点
当前提交
6d6b93f6d5
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/extensions/print/bootstrap-table-print.js

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

@@ -277,7 +277,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
     const table = buildTable(data, this.options.columns)
     const newWin = window.open('')
 
-    newWin.document.write(this.options.printPageBuilder.call(this, table))
+    const calculatedPrintPage = Utils.calculateObjectValue(this, this.options.printPageBuilder, [table], printPageBuilderDefault(table))
+
+    newWin.document.write(calculatedPrintPage)
     newWin.document.close()
     newWin.focus()
     newWin.print()