From f2f31a73da909ee306895b583efa8c80f466cd0f Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Wed, 30 Oct 2024 23:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=AE=E7=9B=98=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=B8=AD=E7=9A=84=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8F=AA=E8=AF=BB?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BB=A5=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MarkdownEditor/editor/utils/keyboard.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MarkdownEditor/editor/utils/keyboard.ts b/src/MarkdownEditor/editor/utils/keyboard.ts index 9aa1cb2a..c10a49d0 100644 --- a/src/MarkdownEditor/editor/utils/keyboard.ts +++ b/src/MarkdownEditor/editor/utils/keyboard.ts @@ -202,11 +202,15 @@ export class KeyboardTask { ); }; input.onchange = async (e: any) => { + if (input.dataset.readonly) { + return; + } + input.dataset.readonly = 'true'; const hideLoading = message.loading('Uploading...'); try { const url = (await this.props?.image?.upload?.( - Array.from(e.target.files) || [], + (Array.from(e.target.files) as File[]) || [], )) || []; [url].flat().forEach((u: string) => { insertMedia(u);