Skip to content

fix: add loose to PropTypes.shape #4001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/skeleton/Paragraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;

Expand Down
2 changes: 1 addition & 1 deletion components/skeleton/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;

Expand Down
2 changes: 1 addition & 1 deletion components/vc-image/src/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions components/vc-table/src/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/vc-trigger/Popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
point: PropTypes.shape({
pageX: PropTypes.number,
pageY: PropTypes.number,
}),
}).loose,
},
data() {
this.domEl = null;
Expand Down