Skip to content

Commit 25a97ec

Browse files
authored
chore: update type descriptions (#2686)
* chore: update type descriptions * fix: object * fix: add pub
1 parent 61ec4ad commit 25a97ec

File tree

3 files changed

+73
-57
lines changed

3 files changed

+73
-57
lines changed

types/descriptions/descriptions-item.d.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5+
import { VNodeChild } from 'vue';
56
import { AntdComponent } from '../component';
67

78
export declare class DescriptionsItem extends AntdComponent {
8-
/**
9-
* the label of descriptions item
10-
* @type any
11-
*/
12-
label: any;
9+
$props: {
10+
/**
11+
* the label of descriptions item
12+
* @type any
13+
*/
14+
label?: VNodeChild | JSX.Element;
1315

14-
/**
15-
* can be set to small large or omitted
16-
* @default 1
17-
* @type number
18-
*/
19-
span: number;
16+
/**
17+
* can be set to small large or omitted
18+
* @default 1
19+
* @type number
20+
*/
21+
span?: number;
22+
};
2023
}

types/descriptions/descriptions.d.ts

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,61 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5+
import { VNodeChild } from 'vue';
56
import { AntdComponent } from '../component';
67
import { DescriptionsItem } from './descriptions-item';
78

9+
import { Breakpoint } from '../pub';
10+
811
export declare class Descriptions extends AntdComponent {
912
static Item: typeof DescriptionsItem;
1013

11-
/**
12-
* descriptions size type
13-
* @default 'default'
14-
* @type string
15-
*/
16-
size: 'default' | 'middle' | 'small';
17-
18-
/**
19-
* custom prefixCls
20-
* @type string
21-
*/
22-
prefixCls: string;
23-
24-
/**
25-
* whether descriptions have border
26-
* @default false
27-
* @type boolean
28-
*/
29-
bordered: boolean;
30-
31-
/**
32-
* custom title
33-
* @type any
34-
*/
35-
title: any;
36-
37-
/**
38-
* the number of descriptionsitem in one line
39-
* @default 3
40-
* @type number | object
41-
*/
42-
column: number | object;
43-
44-
/**
45-
* descriptions layout
46-
* @default 'horizontal'
47-
* @type string
48-
*/
49-
layout: 'horizontal' | 'vertical';
50-
51-
/**
52-
* whether have colon in descriptionsitem
53-
* @default true
54-
* @type boolean
55-
*/
56-
colon: boolean;
14+
$props: {
15+
/**
16+
* descriptions size type
17+
* @default 'default'
18+
* @type string
19+
*/
20+
size?: 'default' | 'middle' | 'small';
21+
22+
/**
23+
* custom prefixCls
24+
* @type string
25+
*/
26+
prefixCls?: string;
27+
28+
/**
29+
* whether descriptions have border
30+
* @default false
31+
* @type boolean
32+
*/
33+
bordered?: boolean;
34+
35+
/**
36+
* custom title
37+
* @type any
38+
*/
39+
title?: VNodeChild | JSX.Element;
40+
41+
/**
42+
* the number of descriptionsitem in one line
43+
* @default 3
44+
* @type number | object
45+
*/
46+
column?: number | Partial<Breakpoint>;
47+
48+
/**
49+
* descriptions layout
50+
* @default 'horizontal'
51+
* @type string
52+
*/
53+
layout?: 'horizontal' | 'vertical';
54+
55+
/**
56+
* whether have colon in descriptionsitem
57+
* @default true
58+
* @type boolean
59+
*/
60+
colon?: boolean;
61+
};
5762
}

types/pub.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export type Breakpoint = {
2+
xs: number;
3+
sm: number;
4+
md: number;
5+
lg: number;
6+
xl: number;
7+
xxl: number;
8+
};

0 commit comments

Comments
 (0)