feat(文档导出): 新增文档导出进度显示
build.yaml / build (push) Successful in 34s

This commit is contained in:
xiaoqidun committed 2026-09-14 13:16:07 +08:00
1 parent a7e86a322f
commit 92585edd1e
6 files changed
+46 -8

No files matched your search

+6
View File
@@ -24,11 +24,17 @@ async function handleMessage({ id, name, args }) {
setTimeout(done, 0);
}
});
if (name === "ofdgoExportDocument") {
args.push((completed, total) => {
self.postMessage({ id, type: "export", stage: "pages", completed, total });
});
}
}
const payload = await globalThis[name](...args);
const result = typeof payload === "string" ? JSON.parse(payload) : payload;
if (exporting && result.ok) {
result.data.size = size;
self.postMessage({ id, type: "export", stage: "save" });
if (output) {
await output.close();
} else {