fix(descriptions): column prop number type error (#4007)
parent
731a58d518
commit
5eeaaae08c
|
@ -126,7 +126,7 @@ const descriptionsProps = {
|
||||||
extra: PropTypes.VNodeChild,
|
extra: PropTypes.VNodeChild,
|
||||||
column: {
|
column: {
|
||||||
type: [Number, Object] as PropType<number | Partial<Record<Breakpoint, number>>>,
|
type: [Number, Object] as PropType<number | Partial<Record<Breakpoint, number>>>,
|
||||||
default: () => DEFAULT_COLUMN_MAP,
|
default: (): number | Partial<Record<Breakpoint, number>> => DEFAULT_COLUMN_MAP,
|
||||||
},
|
},
|
||||||
layout: PropTypes.oneOf(tuple('horizontal', 'vertical')),
|
layout: PropTypes.oneOf(tuple('horizontal', 'vertical')),
|
||||||
colon: PropTypes.looseBool,
|
colon: PropTypes.looseBool,
|
||||||
|
@ -135,8 +135,9 @@ const descriptionsProps = {
|
||||||
export type DescriptionsProps = HTMLAttributes &
|
export type DescriptionsProps = HTMLAttributes &
|
||||||
Partial<ExtractPropTypes<typeof descriptionsProps>>;
|
Partial<ExtractPropTypes<typeof descriptionsProps>>;
|
||||||
|
|
||||||
const Descriptions = defineComponent<DescriptionsProps>({
|
const Descriptions = defineComponent({
|
||||||
name: 'ADescriptions',
|
name: 'ADescriptions',
|
||||||
|
props: descriptionsProps,
|
||||||
Item: DescriptionsItem,
|
Item: DescriptionsItem,
|
||||||
setup(props, { slots }) {
|
setup(props, { slots }) {
|
||||||
const { getPrefixCls } = inject('configProvider', defaultConfigProvider);
|
const { getPrefixCls } = inject('configProvider', defaultConfigProvider);
|
||||||
|
@ -215,8 +216,6 @@ const Descriptions = defineComponent<DescriptionsProps>({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Descriptions.props = descriptionsProps;
|
|
||||||
|
|
||||||
Descriptions.install = function(app: App) {
|
Descriptions.install = function(app: App) {
|
||||||
app.component(Descriptions.name, Descriptions);
|
app.component(Descriptions.name, Descriptions);
|
||||||
app.component(Descriptions.Item.name, Descriptions.Item);
|
app.component(Descriptions.Item.name, Descriptions.Item);
|
||||||
|
|
Loading…
Reference in New Issue