Browse Source

Fixed exportOptions option cannot support data attribute

zhixin 3 years ago
parent
commit
d11edc9329
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/extensions/export/bootstrap-table-export.js

+ 4 - 0
src/extensions/export/bootstrap-table-export.js

@@ -84,6 +84,10 @@ $.BootstrapTable = class extends $.BootstrapTable {
         exportTypes = types.map(t => t.slice(1, -1))
       }
 
+      if (typeof o.exportOptions === 'string') {
+        o.exportOptions = Utils.calculateObjectValue(null, o.exportOptions)
+      }
+
       this.$export = this.$toolbar.find('>.columns div.export')
       if (this.$export.length) {
         this.updateExportButton()