debug: 下载日志

This commit is contained in:
李进
2026-07-27 14:57:08 +08:00
parent 42a869aaaf
commit 7b8b560dc0
+7 -1
View File
@@ -89,7 +89,13 @@ async function exportPptx() {
const safeTitle = title.replace(/[\\/:*?"<>|]+/g, '-').replace(/\s+/g, '-').slice(0, 64) || 'webpage'; const safeTitle = title.replace(/[\\/:*?"<>|]+/g, '-').replace(/\s+/g, '-').slice(0, 64) || 'webpage';
const filename = `web-to-ppt/${safeTitle}-${Date.now()}.pptx`; const filename = `web-to-ppt/${safeTitle}-${Date.now()}.pptx`;
await chrome.downloads.download({ url: dataUrl, filename }); try {
const dlId = await chrome.downloads.download({ url: dataUrl, filename });
console.log('[WebToPPT] download id:', dlId);
} catch (e) {
console.error('[WebToPPT] download error:', e.message, e);
throw e;
}
setProgress(100, '导出完成'); setProgress(100, '导出完成');
setResult('success', '导出完成'); setResult('success', '导出完成');