Skip to content

Commit 731a58d

Browse files
authored
fix: add loose to PropTypes.shape (#4001)
1 parent 41657ea commit 731a58d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

components/modal/Modal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ const modalProps = {
7979
maskClosable: PropTypes.looseBool,
8080
/** 强制渲染 Modal*/
8181
forceRender: PropTypes.looseBool,
82-
okButtonProps: PropTypes.shape(buttonTypes),
83-
cancelButtonProps: PropTypes.shape(buttonTypes),
82+
okButtonProps: PropTypes.shape(buttonTypes).loose,
83+
cancelButtonProps: PropTypes.shape(buttonTypes).loose,
8484
destroyOnClose: PropTypes.looseBool,
8585
wrapClassName: PropTypes.string,
8686
maskTransitionName: PropTypes.string,

components/skeleton/Paragraph.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const skeletonParagraphProps = {
99
rows: PropTypes.number,
1010
};
1111

12-
export const SkeletonParagraphProps = PropTypes.shape(skeletonParagraphProps);
12+
export const SkeletonParagraphProps = PropTypes.shape(skeletonParagraphProps).loose;
1313

1414
export type ISkeletonParagraphProps = Partial<ExtractPropTypes<typeof skeletonParagraphProps>>;
1515

components/skeleton/Title.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const skeletonTitleProps = {
66
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
77
};
88

9-
export const SkeletonTitleProps = PropTypes.shape(skeletonTitleProps);
9+
export const SkeletonTitleProps = PropTypes.shape(skeletonTitleProps).loose;
1010

1111
export type ISkeletonTitleProps = Partial<ExtractPropTypes<typeof skeletonTitleProps>>;
1212

components/vc-image/src/Image.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const ImageProps = {
5050
visible: PropTypes.bool,
5151
onVisibleChange: PropTypes.func,
5252
getContainer: PropTypes.oneOf([PropTypes.func, PropTypes.bool]),
53-
}),
53+
}).loose,
5454
]).def(true),
5555
};
5656
type ImageStatus = 'normal' | 'error' | 'loading';

components/vc-table/src/Table.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ export default defineComponent({
4949
wrapper: PropTypes.any,
5050
row: PropTypes.any,
5151
cell: PropTypes.any,
52-
}),
52+
}).loose,
5353
body: PropTypes.shape({
5454
wrapper: PropTypes.any,
5555
row: PropTypes.any,
5656
cell: PropTypes.any,
57-
}),
58-
}),
57+
}).loose,
58+
}).loose,
5959
expandIconAsCell: PropTypes.looseBool,
6060
expandedRowKeys: PropTypes.array,
6161
expandedRowClassName: PropTypes.func,

components/vc-trigger/Popup.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
point: PropTypes.shape({
3232
pageX: PropTypes.number,
3333
pageY: PropTypes.number,
34-
}),
34+
}).loose,
3535
},
3636
data() {
3737
this.domEl = null;

0 commit comments

Comments
 (0)