From 9771a3d69d16db56680a81d4412b72eb6bbf9f78 Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 6 Feb 2026 00:07:18 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-web):=20=E4=BF=AE=E5=A4=8D=20TypeScri?= =?UTF-8?q?pt=20=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 Uint8Array[] 改为 ArrayBuffer[] 以兼容 Blob 构造函数 Co-Authored-By: Claude Opus 4.5 --- frontend/admin-web/src/app/(dashboard)/contracts/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx b/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx index 0cfc4488..0636ba32 100644 --- a/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx +++ b/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx @@ -196,14 +196,14 @@ export default function ContractsPage() { } const reader = response.body.getReader(); - const chunks: Uint8Array[] = []; + const chunks: ArrayBuffer[] = []; let loaded = 0; while (true) { const { done, value } = await reader.read(); if (done) break; - chunks.push(value); + chunks.push(value.buffer as ArrayBuffer); loaded += value.length; if (total > 0) { @@ -213,7 +213,7 @@ export default function ContractsPage() { } // 合并所有 chunks 为 Blob - const blob = new Blob(chunks); + const blob = new Blob(chunks, { type: 'application/zip' }); // 写入文件 const writable = await fileHandle.createWritable();