const versionList = Object.keys(releaseNote) for (versionList 的 const 键) { // 如果没有选择该版本的发行说明进行挑选,则跳过该版本。 const shouldIninclude =cherryPick[key].some(Boolean) 如果(!应该包括){ 继续 }
// Add version title
doc.addSection({
properties: {},
children: [
new Paragraph({
children: [
new TextRun({
text: key,
bold: true,
size: 16,
}),
],
}),
],
})
// Iterate over each release note in the current version.
for (let i = 0; i < releaseNote[key].length; i++) {
// Check if that release note is selected or not
if (cherryPick[key][i]) {
// Add a bullet point before each release note.
doc.addSection({
properties: {},
children: [
new Paragraph({
children: [
new TextRun({
text: '•',
bold: true,
}),
new TextRun({
text: releaseNote[key][i],
}),
],
}),
],
})
}
}
我正在尝试添加一个部分,但这不起作用,任何解决方案
我也在努力寻找解决方案。有一种情况,但不太酷。
const doc = new Document({
sections: [
// Your sections
],
});