From 3d311c003ccaa047829d82f1742c0057f6f5f360 Mon Sep 17 00:00:00 2001 From: Xc Date: Tue, 19 Jul 2022 07:32:48 +0800 Subject: [PATCH] fix(components): [upload] one-way cannot add attachments (#8877) --- packages/components/upload/src/use-handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/upload/src/use-handlers.ts b/packages/components/upload/src/use-handlers.ts index 22818bac98..ba32787367 100644 --- a/packages/components/upload/src/use-handlers.ts +++ b/packages/components/upload/src/use-handlers.ts @@ -100,7 +100,7 @@ export const useHandlers = ( props.onError(err as Error, uploadFile, uploadFiles.value) } } - uploadFiles.value.push(uploadFile) + uploadFiles.value = [...uploadFiles.value, uploadFile] props.onChange(uploadFile, uploadFiles.value) }