Skip to content

Commit 0587798

Browse files
authored
chore: update type avatar (#2689)
1 parent 25a97ec commit 0587798

File tree

1 file changed

+46
-43
lines changed

1 file changed

+46
-43
lines changed

types/avatar.d.ts

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,53 @@
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 Avatar extends AntdComponent {
8-
/**
9-
* the Icon type for an icon avatar, see Icon Component
10-
* @type any (VNode | slot)
11-
*/
12-
icon: any;
13-
14-
/**
15-
* the shape of avatar
16-
* @default 'circle'
17-
* @type string
18-
*/
19-
shape: 'circle' | 'square';
20-
21-
/**
22-
* the size of the avatar
23-
* @default 'default'
24-
* @type number | string
25-
*/
26-
size: 'small' | 'large' | 'default' | number;
27-
28-
/**
29-
* the address of the image for an image avatar
30-
* @type string
31-
*/
32-
src: string;
33-
34-
/**
35-
* a list of sources to use for different screen resolutions
36-
* @type string
37-
*/
38-
srcSet: string;
39-
40-
/**
41-
* This attribute defines the alternative text describing the image
42-
* @type string
43-
*/
44-
alt: string;
45-
46-
/**
47-
* handler when img load error,return false to prevent default fallback behavior
48-
* @type
49-
*/
50-
loadError: () => boolean;
9+
$props: {
10+
/**
11+
* the Icon type for an icon avatar, see Icon Component
12+
* @type any (VNode | slot)
13+
*/
14+
icon?: VNodeChild | JSX.Element;
15+
16+
/**
17+
* the shape of avatar
18+
* @default 'circle'
19+
* @type string
20+
*/
21+
shape?: 'circle' | 'square';
22+
23+
/**
24+
* the size of the avatar
25+
* @default 'default'
26+
* @type number | string
27+
*/
28+
size?: 'small' | 'large' | 'default' | number;
29+
30+
/**
31+
* the address of the image for an image avatar
32+
* @type string
33+
*/
34+
src?: string;
35+
36+
/**
37+
* a list of sources to use for different screen resolutions
38+
* @type string
39+
*/
40+
srcSet?: string;
41+
42+
/**
43+
* This attribute defines the alternative text describing the image
44+
* @type string
45+
*/
46+
alt?: string;
47+
48+
/**
49+
* handler when img load error,return false to prevent default fallback behavior
50+
* @type
51+
*/
52+
loadError?: () => boolean;
53+
};
5154
}

0 commit comments

Comments
 (0)