From 821d355223b147d7c8b62516964b1f575ae81f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=AB=E5=90=9B?= Date: Thu, 11 May 2023 18:12:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E7=A9=BA=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/utils/export/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/s2-core/src/utils/export/index.ts b/packages/s2-core/src/utils/export/index.ts index e15fa29fdc..1dd1268191 100644 --- a/packages/s2-core/src/utils/export/index.ts +++ b/packages/s2-core/src/utils/export/index.ts @@ -67,9 +67,11 @@ export const copyToClipboardByClipboard = (data: Copyable): Promise => { new ClipboardItem( [].concat(data).reduce((prev, copyable: CopyableItem) => { const { type, content } = copyable; + // eslint-disable-next-line no-control-regex + const contentToCopy = content.replace(/\x00/g, ''); return { ...prev, - [type]: new Blob([content], { type }), + [type]: new Blob([contentToCopy], { type }), }; }, {}), ),