From fb5d2e5054d08c3cdfd61d2536b5994450b424b3 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 17 Apr 2021 21:27:13 +0800 Subject: [PATCH] fix: image preview not work #3701 (#3956) --- components/vc-image/src/Image.tsx | 2 +- components/vc-image/src/Preview.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/vc-image/src/Image.tsx b/components/vc-image/src/Image.tsx index 4367e1315..2885a4fff 100644 --- a/components/vc-image/src/Image.tsx +++ b/components/vc-image/src/Image.tsx @@ -281,7 +281,7 @@ const ImageInternal = defineComponent({ mousePosition={mousePosition.value} src={mergedSrc} alt={alt} - getContainer={getPreviewContainer} + getContainer={getPreviewContainer.value} /> )} diff --git a/components/vc-image/src/Preview.tsx b/components/vc-image/src/Preview.tsx index b43db2d3c..a6f9d2a7f 100644 --- a/components/vc-image/src/Preview.tsx +++ b/components/vc-image/src/Preview.tsx @@ -252,6 +252,7 @@ const Preview = defineComponent({ afterClose={onAfterClose} visible={props.visible} wrapClassName={wrapClassName} + getContainer={props.getContainer} >