From 05877986747f6dd50abef4f8a6f6b6a5407024e7 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 17 Aug 2020 13:53:47 +0800 Subject: [PATCH] chore: update type avatar (#2689) --- types/avatar.d.ts | 77 ++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/types/avatar.d.ts b/types/avatar.d.ts index 85e633dae..4a2421900 100644 --- a/types/avatar.d.ts +++ b/types/avatar.d.ts @@ -2,50 +2,53 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types +import { VNodeChild } from 'vue'; import { AntdComponent } from './component'; export declare class Avatar extends AntdComponent { - /** - * the Icon type for an icon avatar, see Icon Component - * @type any (VNode | slot) - */ - icon: any; + $props: { + /** + * the Icon type for an icon avatar, see Icon Component + * @type any (VNode | slot) + */ + icon?: VNodeChild | JSX.Element; - /** - * the shape of avatar - * @default 'circle' - * @type string - */ - shape: 'circle' | 'square'; + /** + * the shape of avatar + * @default 'circle' + * @type string + */ + shape?: 'circle' | 'square'; - /** - * the size of the avatar - * @default 'default' - * @type number | string - */ - size: 'small' | 'large' | 'default' | number; + /** + * the size of the avatar + * @default 'default' + * @type number | string + */ + size?: 'small' | 'large' | 'default' | number; - /** - * the address of the image for an image avatar - * @type string - */ - src: string; + /** + * the address of the image for an image avatar + * @type string + */ + src?: string; - /** - * a list of sources to use for different screen resolutions - * @type string - */ - srcSet: string; + /** + * a list of sources to use for different screen resolutions + * @type string + */ + srcSet?: string; - /** - * This attribute defines the alternative text describing the image - * @type string - */ - alt: string; + /** + * This attribute defines the alternative text describing the image + * @type string + */ + alt?: string; - /** - * handler when img load error,return false to prevent default fallback behavior - * @type - */ - loadError: () => boolean; + /** + * handler when img load error,return false to prevent default fallback behavior + * @type + */ + loadError?: () => boolean; + }; }