From d11edc93296cc41c2fde10bb236f08c87ae18d32 Mon Sep 17 00:00:00 2001 From: zhixin Date: Mon, 25 Apr 2022 15:47:58 +0800 Subject: [PATCH] Fixed exportOptions option cannot support data attribute --- src/extensions/export/bootstrap-table-export.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extensions/export/bootstrap-table-export.js b/src/extensions/export/bootstrap-table-export.js index 6b2c115281..55dcd3bc09 100644 --- a/src/extensions/export/bootstrap-table-export.js +++ b/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()