Skip to content

Commit 5eeaaae

Browse files
authored
fix(descriptions): column prop number type error (#4007)
1 parent 731a58d commit 5eeaaae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/descriptions/index.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const descriptionsProps = {
126126
extra: PropTypes.VNodeChild,
127127
column: {
128128
type: [Number, Object] as PropType<number | Partial<Record<Breakpoint, number>>>,
129-
default: () => DEFAULT_COLUMN_MAP,
129+
default: (): number | Partial<Record<Breakpoint, number>> => DEFAULT_COLUMN_MAP,
130130
},
131131
layout: PropTypes.oneOf(tuple('horizontal', 'vertical')),
132132
colon: PropTypes.looseBool,
@@ -135,8 +135,9 @@ const descriptionsProps = {
135135
export type DescriptionsProps = HTMLAttributes &
136136
Partial<ExtractPropTypes<typeof descriptionsProps>>;
137137

138-
const Descriptions = defineComponent<DescriptionsProps>({
138+
const Descriptions = defineComponent({
139139
name: 'ADescriptions',
140+
props: descriptionsProps,
140141
Item: DescriptionsItem,
141142
setup(props, { slots }) {
142143
const { getPrefixCls } = inject('configProvider', defaultConfigProvider);
@@ -215,8 +216,6 @@ const Descriptions = defineComponent<DescriptionsProps>({
215216
},
216217
});
217218

218-
Descriptions.props = descriptionsProps;
219-
220219
Descriptions.install = function(app: App) {
221220
app.component(Descriptions.name, Descriptions);
222221
app.component(Descriptions.Item.name, Descriptions.Item);

0 commit comments

Comments
 (0)