我想创建具有动态行数的pdf
这是示例代码
var columns = [
{title: "Definition", dataKey: "def"},
{title: "Cash", dataKey: "cash"},
{title: "30", dataKey: "30"},
{title: "60", dataKey: "60"},
{title: "90", dataKey: "90"},
{title: "120", dataKey: "120"},
{title: "150", dataKey: "150"}
];
var x = values.length / 10;
var rows = [
];
for(var i = 0; i < x; i++) {
rows.push({"def": values[7+(10*+i)], "cash": values[0+(10*+i)], "30": values[2+(10*+i)], "60": values[3+(10*+i)], "90": values[4+(10*+i)], "120": values[5+(10*+i)], "150": values[6+(10*+i)]}
);
};
如何将这些数据插入pdfMake。在此示例中,有2行和7列。