fix: 浏览器端用 pres.write() 替代 pres.writeFile()
writeFile 在浏览器中直接下载文件,不返回 buffer。
改用 write({ outputType: 'arraybuffer' }) 返回数据供后处理。
This commit is contained in:
@@ -558,8 +558,8 @@ async function schemaToPptxBlob(schema) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成 PPTX buffer
|
// 生成 PPTX buffer(浏览器用 write,不用 writeFile)
|
||||||
const pptxBuffer = await pres.writeFile({ outputType: 'arraybuffer' });
|
const pptxBuffer = await pres.write({ outputType: 'arraybuffer' });
|
||||||
|
|
||||||
// 后处理:加 type="custom"
|
// 后处理:加 type="custom"
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user