Skip to content

Commit 06c8623

Browse files
authored
chore: update type badge (#2693)
* chore: update type badge * Update types/badge.d.ts
1 parent 8b19623 commit 06c8623

File tree

1 file changed

+54
-51
lines changed

1 file changed

+54
-51
lines changed

types/badge.d.ts

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,68 @@
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

55
import { AntdComponent } from './component';
6-
import { VNode } from 'vue';
6+
import { VNodeChild, CSSProperties } from 'vue';
77

88
export declare class Badge extends AntdComponent {
9-
color: string;
10-
/**
11-
* Number to show in badge, support slot
12-
* @type number | string | VNode
13-
*/
14-
count: number | string | VNode;
9+
$props: {
10+
color?: string;
1511

16-
/**
17-
* to display a red dot instead of count
18-
* @default false
19-
* @type boolean
20-
*/
21-
dot: boolean;
12+
/**
13+
* Number to show in badge, support slot
14+
* @type number | string | VNode
15+
*/
16+
count?: number | VNodeChild | JSX.Element;
2217

23-
/**
24-
* set offset of the badge dot, like [x, y]
25-
* @type Array<number | string>
26-
*/
27-
offset: Array<number | string>;
18+
/**
19+
* to display a red dot instead of count
20+
* @default false
21+
* @type boolean
22+
*/
23+
dot?: boolean;
2824

29-
/**
30-
* Max count to show
31-
* @default 99
32-
* @type number
33-
*/
34-
overflowCount: number;
25+
/**
26+
* set offset of the badge dot, like [x, y]
27+
* @type Array<number | string>
28+
*/
29+
offset?: Array<number | string>;
3530

36-
/**
37-
* Whether to show badge when count is zero
38-
* @default false
39-
* @type boolean
40-
*/
41-
showZero: boolean;
31+
/**
32+
* Max count to show
33+
* @default 99
34+
* @type number
35+
*/
36+
overflowCount?: number;
4237

43-
/**
44-
* Set Badge as a status dot
45-
* @type string
46-
*/
47-
status: 'success' | 'processing' | 'default' | 'error' | 'warning';
38+
/**
39+
* Whether to show badge when count is zero
40+
* @default false
41+
* @type boolean
42+
*/
43+
showZero?: boolean;
4844

49-
/**
50-
* If status is set, text sets the display text of the status dot
51-
* @type string
52-
*/
53-
text: string;
45+
/**
46+
* Set Badge as a status dot
47+
* @type string
48+
*/
49+
status?: 'success' | 'processing' | 'default' | 'error' | 'warning';
5450

55-
/**
56-
* sets the display style of the status dot
57-
* @type
58-
*/
59-
numberStyle: object;
51+
/**
52+
* If status is set, text sets the display text of the status dot
53+
* @type string
54+
*/
55+
text?: string;
6056

61-
/**
62-
* Text to show when hovering over the badge
63-
* @default 'count'
64-
* @type string
65-
*/
66-
title: string;
57+
/**
58+
* sets the display style of the status dot
59+
* @type
60+
*/
61+
numberStyle?: CSSProperties | string;
62+
63+
/**
64+
* Text to show when hovering over the badge
65+
* @default 'count'
66+
* @type string
67+
*/
68+
title?: string;
69+
};
6770
}

0 commit comments

Comments
 (0)