chore: update type badge (#2693)

* chore: update type badge

* Update types/badge.d.ts
pull/2692/head^2
xrkffgg 2020-08-17 17:10:11 +08:00 committed by GitHub
parent 8b19623ca1
commit 06c8623db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 54 additions and 51 deletions

105
types/badge.d.ts vendored
View File

@ -3,65 +3,68 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types // Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component'; import { AntdComponent } from './component';
import { VNode } from 'vue'; import { VNodeChild, CSSProperties } from 'vue';
export declare class Badge extends AntdComponent { export declare class Badge extends AntdComponent {
color: string; $props: {
/** color?: string;
* Number to show in badge, support slot
* @type number | string | VNode
*/
count: number | string | VNode;
/** /**
* to display a red dot instead of count * Number to show in badge, support slot
* @default false * @type number | string | VNode
* @type boolean */
*/ count?: number | VNodeChild | JSX.Element;
dot: boolean;
/** /**
* set offset of the badge dot, like [x, y] * to display a red dot instead of count
* @type Array<number | string> * @default false
*/ * @type boolean
offset: Array<number | string>; */
dot?: boolean;
/** /**
* Max count to show * set offset of the badge dot, like [x, y]
* @default 99 * @type Array<number | string>
* @type number */
*/ offset?: Array<number | string>;
overflowCount: number;
/** /**
* Whether to show badge when count is zero * Max count to show
* @default false * @default 99
* @type boolean * @type number
*/ */
showZero: boolean; overflowCount?: number;
/** /**
* Set Badge as a status dot * Whether to show badge when count is zero
* @type string * @default false
*/ * @type boolean
status: 'success' | 'processing' | 'default' | 'error' | 'warning'; */
showZero?: boolean;
/** /**
* If status is set, text sets the display text of the status dot * Set Badge as a status dot
* @type string * @type string
*/ */
text: string; status?: 'success' | 'processing' | 'default' | 'error' | 'warning';
/** /**
* sets the display style of the status dot * If status is set, text sets the display text of the status dot
* @type * @type string
*/ */
numberStyle: object; text?: string;
/** /**
* Text to show when hovering over the badge * sets the display style of the status dot
* @default 'count' * @type
* @type string */
*/ numberStyle?: CSSProperties | string;
title: string;
/**
* Text to show when hovering over the badge
* @default 'count'
* @type string
*/
title?: string;
};
} }