From c71c526e81a2851df6653682bfad9b9b84704462 Mon Sep 17 00:00:00 2001 From: yeling Date: Thu, 21 Sep 2023 17:14:17 +0800 Subject: [PATCH] fix: `ImagePreview` refresh problem when onload of multiple pictures is triggered at the same time (#173) --- .../arcodesign/components/image-preview/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/arcodesign/components/image-preview/index.tsx b/packages/arcodesign/components/image-preview/index.tsx index e5f9ef2e..2b11bc6f 100644 --- a/packages/arcodesign/components/image-preview/index.tsx +++ b/packages/arcodesign/components/image-preview/index.tsx @@ -852,12 +852,14 @@ const ImagePreview = forwardRef((props: ImagePreviewProps, ref: Ref { + const newStatus = current.slice(); + newStatus[index] = { + ...(newStatus[index] || {}), + ...data, + }; + return newStatus; + }); } /**