📜  pdfmaker 循环遍历数组 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:00.455000             🧑  作者: Mango

代码示例1
var stuff = [
    'aaaaaaaaaaaaaaaaaaa',
    'bbbbbbbbbbbbbbbbbbb',
    'ccccccccccccccccccc',
    'ddddddddddddddddddd'
];

var dd  = {
    content: stuff.map(function(item) {
        return { text: item, pageBreak: 'after'}
    })
};