gpt4 book ai didi

javascript - 如何使用 ngx-export-as 中的选项

转载 作者:行者123 更新时间:2023-12-05 07:17:06 27 4
gpt4 key购买 nike

我是 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(()
=> {});
}

最佳答案

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

关于javascript - 如何使用 ngx-export-as 中的选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58901107/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com