【问题标题】:How to get use of the options in ngx-export-as如何使用 ngx-export-as 中的选项
【发布时间】:2019-11-17 13:48:53
【问题描述】:

我是 Angular 新手,我有一个数据表,其中显示了一组数据,我正在使用 ngx-export-as 将表的数据导出为 pdf,但是在下载的 pdf 中一切正常它显示了我的 pdf 中不需要的排序箭头和一些数据,我已经使用此链接 https://www.npmjs.com/package/ngx-export-as 查看了文档,但它没有说明选项。如果您能告诉我如何隐藏排序箭头和任何其他元素,我将不胜感激

employees.component.html

<button (click)="ExportAsPDF()" class="dropdown-item">PDF</button>
<table id="myTable" datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger"></table>

employees.component.ts

exportAsConfigPdf: ExportAsConfig = {
    type: 'pdf',
    elementId: 'myTable',
    options: {
    }
}

ExportAsPDF(){
    this.exportAsService.save(this.exportAsConfigPdf, 'Employees Table').subscribe(() 
   => {});
  }

【问题讨论】:

    标签: javascript html typescript datatables angular6


    【解决方案1】:

    库选项应该在 config.options 对象中 https://github.com/wnabil/ngx-export-as#configuration

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-04
      • 2021-04-10
      • 2018-10-26
      • 2015-11-02
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      相关资源
      最近更新 更多