在jspdf-autotable.How中准备汇总报告。如何隐藏空列和表头
const headers=[["PRICE","CARRIER","CUSTOMER ID","QUANTITY"]]
const data = this.state.data.map(elt=> [elt.price,elt.carrier,elt.from,elt.duration]);
let content = {
startY: 50,
head: headers,
body: data,
};
doc.text(title, marginLeft, 40);
doc.autoTable(content);我希望输出在pdf中隐藏customerid,因为它在表中没有任何数据。

发布于 2019-08-07 19:59:31
最简单的解决方案可能是在将这些值传递给插件之前过滤掉它们。
https://stackoverflow.com/questions/56786988
复制相似问题