From 8d7e1e9a532b7e1de29ee127fb78131174997d16 Mon Sep 17 00:00:00 2001 From: ZLY Date: Thu, 27 Nov 2025 10:38:44 +0800 Subject: [PATCH] =?UTF-8?q?docs(componentList):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=BB=84=E4=BB=B6=E5=8A=9F=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在onExportComponent函数中增加注释说明next.js代理异常问题 - 提醒开发者在dev模式下可能出现二进制数据处理异常 - 建议使用pnpm run build和pnpm run start运行项目以避免问题 --- src/pages/componentDevelopment/componentList/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/componentDevelopment/componentList/index.tsx b/src/pages/componentDevelopment/componentList/index.tsx index 077b941..f69534c 100644 --- a/src/pages/componentDevelopment/componentList/index.tsx +++ b/src/pages/componentDevelopment/componentList/index.tsx @@ -414,6 +414,10 @@ const GlobalVarContainer = () => { // 修改导出组件的回调函数 const onExportComponent = async (row) => { + /* + * 特殊说明, next.js 使用rewrites 代理和静态导出会导致代理异常,这个时候使用dev运行会出现二进制接口返回异常的问题, + * 导致无法正确处理二进制数据并把二进制数据转换成字符串,导致导出功能异常。这里需要使用 pnpm run build 和pnpm run start 运行项目。 + * */ try { const res: any = await exportComponent(row.id);