Skip to content

Commit 75931a1

Browse files
anncwbannsion
and
annsion
authored
fix(image): fix iamge prop error (#3488)
Co-authored-by: annsion <[email protected]>
1 parent eafc6dd commit 75931a1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

components/vc-image/src/Image.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ export const ImageProps = {
4444
previewPrefixCls: PropTypes.string,
4545
placeholder: PropTypes.VNodeChild,
4646
fallback: PropTypes.string,
47-
preview: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.shape<ImagePreviewType>({})]).def(
48-
true,
49-
),
47+
preview: PropTypes.oneOfType([
48+
PropTypes.looseBool,
49+
PropTypes.shape({
50+
visible: PropTypes.bool,
51+
onVisibleChange: PropTypes.func,
52+
getContainer: PropTypes.oneOf([PropTypes.func, PropTypes.bool]),
53+
}),
54+
]).def(true),
5055
};
5156
type ImageStatus = 'normal' | 'error' | 'loading';
5257

0 commit comments

Comments
 (0)