From d5003b324c5babca524460e3e700479a90a05e54 Mon Sep 17 00:00:00 2001 From: "dong.wang" Date: Thu, 16 Jun 2022 13:10:56 +0800 Subject: [PATCH] fix(upload): Fixed the issue that the events and styles generated by the upload component because attrs were not transparently transmitted could not take effect. At the same time run the unit tests that passed upload and the two snapshot updates. #5714 --- components/upload/Upload.tsx | 1 + components/upload/__tests__/__snapshots__/demo.test.js.snap | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index aff0378463..1be74ec022 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -347,6 +347,7 @@ export default defineComponent({ onError, onProgress, onSuccess, + ...attrs, ...(props as RcUploadProps), id: props.id ?? formItemContext.id.value, prefixCls: prefixCls.value, diff --git a/components/upload/__tests__/__snapshots__/demo.test.js.snap b/components/upload/__tests__/__snapshots__/demo.test.js.snap index 2ad41f681e..2e4ca7039e 100644 --- a/components/upload/__tests__/__snapshots__/demo.test.js.snap +++ b/components/upload/__tests__/__snapshots__/demo.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ./components/upload/demo/avatar.vue correctly 1`] = ` -
+
Upload
`; @@ -206,7 +206,7 @@ exports[`renders ./components/upload/demo/picture-style.vue correctly 1`] = `
-


+