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