|
3 | 3 | // Definitions: https://github.com/vueComponent/ant-design-vue/types
|
4 | 4 |
|
5 | 5 | import { AntdComponent } from './component';
|
6 |
| -import { VNode } from 'vue'; |
| 6 | +import { VNodeChild, CSSProperties } from 'vue'; |
7 | 7 |
|
8 | 8 | 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; |
15 | 11 |
|
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; |
22 | 17 |
|
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; |
28 | 24 |
|
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>; |
35 | 30 |
|
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; |
42 | 37 |
|
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; |
48 | 44 |
|
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'; |
54 | 50 |
|
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; |
60 | 56 |
|
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 | + }; |
67 | 70 | }
|
0 commit comments