fix(image): fix iamge prop error (#3488)

Co-authored-by: annsion <annsion@ann.local>
pull/3317/head
Vben 2021-01-05 20:49:18 +08:00 committed by GitHub
parent eafc6dd0ba
commit 75931a1b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -44,9 +44,14 @@ export const ImageProps = {
previewPrefixCls: PropTypes.string,
placeholder: PropTypes.VNodeChild,
fallback: PropTypes.string,
preview: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.shape<ImagePreviewType>({})]).def(
true,
),
preview: PropTypes.oneOfType([
PropTypes.looseBool,
PropTypes.shape({
visible: PropTypes.bool,
onVisibleChange: PropTypes.func,
getContainer: PropTypes.oneOf([PropTypes.func, PropTypes.bool]),
}),
]).def(true),
};
type ImageStatus = 'normal' | 'error' | 'loading';