chore: update type avatar (#2689)

pull/2695/head
xrkffgg 2020-08-17 13:53:47 +08:00 committed by GitHub
parent 25a97ec5ce
commit 0587798674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 40 additions and 37 deletions

17
types/avatar.d.ts vendored
View File

@ -2,50 +2,53 @@
// Definitions by: akki-jat <https://github.com/akki-jat> // Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types // Definitions: https://github.com/vueComponent/ant-design-vue/types
import { VNodeChild } from 'vue';
import { AntdComponent } from './component'; import { AntdComponent } from './component';
export declare class Avatar extends AntdComponent { export declare class Avatar extends AntdComponent {
$props: {
/** /**
* the Icon type for an icon avatar, see Icon Component * the Icon type for an icon avatar, see Icon Component
* @type any (VNode | slot) * @type any (VNode | slot)
*/ */
icon: any; icon?: VNodeChild | JSX.Element;
/** /**
* the shape of avatar * the shape of avatar
* @default 'circle' * @default 'circle'
* @type string * @type string
*/ */
shape: 'circle' | 'square'; shape?: 'circle' | 'square';
/** /**
* the size of the avatar * the size of the avatar
* @default 'default' * @default 'default'
* @type number | string * @type number | string
*/ */
size: 'small' | 'large' | 'default' | number; size?: 'small' | 'large' | 'default' | number;
/** /**
* the address of the image for an image avatar * the address of the image for an image avatar
* @type string * @type string
*/ */
src: string; src?: string;
/** /**
* a list of sources to use for different screen resolutions * a list of sources to use for different screen resolutions
* @type string * @type string
*/ */
srcSet: string; srcSet?: string;
/** /**
* This attribute defines the alternative text describing the image * This attribute defines the alternative text describing the image
* @type string * @type string
*/ */
alt: string; alt?: string;
/** /**
* handler when img load errorreturn false to prevent default fallback behavior * handler when img load errorreturn false to prevent default fallback behavior
* @type * @type
*/ */
loadError: () => boolean; loadError?: () => boolean;
};
} }