浏览代码

Dont export the detail view icon column

Dustin Utecht 5 年之前
父节点
当前提交
de1d97c6fc
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/extensions/export/bootstrap-table-export.js

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

@@ -196,6 +196,12 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
       const data = this.getData()
 
+      if (o.detailView && o.detailViewIcon) {
+        const detailViewIndex = o.detailViewAlign === 'left' ? 0 : this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options)
+
+        o.exportOptions.ignoreColumn = $.merge(o.exportOptions.ignoreColumn || [], [detailViewIndex])
+      }
+
       if (o.exportFooter) {
         const $footerRow = this.$tableFooter.find('tr').first()
         const footerData = {}