浏览代码

Merge pull request #6112 from wenzhixin/fix/6107

Fixed exportOptions option cannot support data attribute
Dustin Utecht 3 年之前
父节点
当前提交
e3cc7da204
共有 1 个文件被更改,包括 4 次插入0 次删除
  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))
         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')
       this.$export = this.$toolbar.find('>.columns div.export')
       if (this.$export.length) {
       if (this.$export.length) {
         this.updateExportButton()
         this.updateExportButton()