From d685586994ff43f6148396d51c9f7415cdb7cf3f Mon Sep 17 00:00:00 2001 From: yijie4188 Date: Thu, 21 Mar 2024 20:47:18 +0800 Subject: [PATCH] fix(image): forget pass referrerpolicy to real image tag props #2810 --- src/image/Image.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/image/Image.tsx b/src/image/Image.tsx index f561ac7db8..e134422ac4 100644 --- a/src/image/Image.tsx +++ b/src/image/Image.tsx @@ -35,7 +35,6 @@ const InternalImage: React.ForwardRefRenderFunction className, src, style, - alt, fit, position, shape, @@ -50,8 +49,14 @@ const InternalImage: React.ForwardRefRenderFunction fallback, onLoad, onError, - ...rest + ...waitPassRest } = props; + const { + // penetrate pass to image tag element props + alt, + referrerpolicy, + ...rest + } = waitPassRest; const { classPrefix } = useConfig(); const imageRef = useRef(null); @@ -197,6 +202,7 @@ const InternalImage: React.ForwardRefRenderFunction `${classPrefix}-image--position-${position}`, )} alt={alt} + referrerPolicy={referrerpolicy} /> ); };