From 17ab32a4395a6ac5a4faefc8c7404e0df84da32d Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 9 Mar 2024 14:43:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=88=E5=AF=BC=E5=85=A5PPTX=E6=96=87=E4=BB=B6=E5=B8=A6?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E5=BC=82=E5=B8=B8=E6=95=B0=E6=8D=AE=EF=BC=8C?= =?UTF-8?q?#255=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useExport.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/useExport.ts b/src/hooks/useExport.ts index 8a8b2143..0bc2d81c 100644 --- a/src/hooks/useExport.ts +++ b/src/hooks/useExport.ts @@ -490,6 +490,7 @@ export default () => { else if (el.type === 'shape') { if (el.special) { const svgRef = document.querySelector(`.thumbnail-list .base-element-${el.id} svg`) as HTMLElement + if (svgRef.clientWidth < 1 || svgRef.clientHeight < 1) continue // 临时处理(导入PPTX文件带来的异常数据) const base64SVG = svg2Base64(svgRef) const options: pptxgen.ImageProps = {