From 26379e9354674f0bed848e30170e16cb697bcd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=8B=E7=8E=8B?= <992512186@qq.com> Date: Sat, 18 Jun 2022 19:52:22 +0800 Subject: [PATCH] fix(upload): Fixed the issue that the upload component took effect because the attrs were not transparently transmitted, and eliminated the impact of the style being transparently transmitted again. Thanks @tangjinzhou for the reminder. Runs all unit tests that pass. #5714 --- components/upload/Upload.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index aff0378463..3d7cb09024 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -342,11 +342,13 @@ export default defineComponent({ }; return () => { const { listType, disabled, type } = props; + const { class: className, style: styleName, ...transAttrs } = attrs; const rcUploadProps = { onBatchStart, onError, onProgress, onSuccess, + ...transAttrs, ...(props as RcUploadProps), id: props.id ?? formItemContext.id.value, prefixCls: prefixCls.value,