fix: add loose to PropTypes.shape (#4001)

pull/4013/head
zkwolf 2021-04-27 22:11:31 +08:00 committed by GitHub
parent 41657eacef
commit 731a58d518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -79,8 +79,8 @@ const modalProps = {
maskClosable: PropTypes.looseBool,
/** 强制渲染 Modal*/
forceRender: PropTypes.looseBool,
okButtonProps: PropTypes.shape(buttonTypes),
cancelButtonProps: PropTypes.shape(buttonTypes),
okButtonProps: PropTypes.shape(buttonTypes).loose,
cancelButtonProps: PropTypes.shape(buttonTypes).loose,
destroyOnClose: PropTypes.looseBool,
wrapClassName: PropTypes.string,
maskTransitionName: PropTypes.string,

View File

@ -9,7 +9,7 @@ const skeletonParagraphProps = {
rows: PropTypes.number,
};
export const SkeletonParagraphProps = PropTypes.shape(skeletonParagraphProps);
export const SkeletonParagraphProps = PropTypes.shape(skeletonParagraphProps).loose;
export type ISkeletonParagraphProps = Partial<ExtractPropTypes<typeof skeletonParagraphProps>>;

View File

@ -6,7 +6,7 @@ const skeletonTitleProps = {
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
};
export const SkeletonTitleProps = PropTypes.shape(skeletonTitleProps);
export const SkeletonTitleProps = PropTypes.shape(skeletonTitleProps).loose;
export type ISkeletonTitleProps = Partial<ExtractPropTypes<typeof skeletonTitleProps>>;

View File

@ -50,7 +50,7 @@ export const ImageProps = {
visible: PropTypes.bool,
onVisibleChange: PropTypes.func,
getContainer: PropTypes.oneOf([PropTypes.func, PropTypes.bool]),
}),
}).loose,
]).def(true),
};
type ImageStatus = 'normal' | 'error' | 'loading';

View File

@ -49,13 +49,13 @@ export default defineComponent({
wrapper: PropTypes.any,
row: PropTypes.any,
cell: PropTypes.any,
}),
}).loose,
body: PropTypes.shape({
wrapper: PropTypes.any,
row: PropTypes.any,
cell: PropTypes.any,
}),
}),
}).loose,
}).loose,
expandIconAsCell: PropTypes.looseBool,
expandedRowKeys: PropTypes.array,
expandedRowClassName: PropTypes.func,

View File

@ -31,7 +31,7 @@ export default {
point: PropTypes.shape({
pageX: PropTypes.number,
pageY: PropTypes.number,
}),
}).loose,
},
data() {
this.domEl = null;