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

25
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 * Number to show in badge, support slot
* @type number | string | VNode * @type number | string | VNode
*/ */
count: number | string | VNode; count?: number | VNodeChild | JSX.Element;
/** /**
* to display a red dot instead of count * to display a red dot instead of count
* @default false * @default false
* @type boolean * @type boolean
*/ */
dot: boolean; dot?: boolean;
/** /**
* set offset of the badge dot, like [x, y] * set offset of the badge dot, like [x, y]
* @type Array<number | string> * @type Array<number | string>
*/ */
offset: Array<number | string>; offset?: Array<number | string>;
/** /**
* Max count to show * Max count to show
* @default 99 * @default 99
* @type number * @type number
*/ */
overflowCount: number; overflowCount?: number;
/** /**
* Whether to show badge when count is zero * Whether to show badge when count is zero
* @default false * @default false
* @type boolean * @type boolean
*/ */
showZero: boolean; showZero?: boolean;
/** /**
* Set Badge as a status dot * Set Badge as a status dot
* @type string * @type string
*/ */
status: 'success' | 'processing' | 'default' | 'error' | 'warning'; status?: 'success' | 'processing' | 'default' | 'error' | 'warning';
/** /**
* If status is set, text sets the display text of the status dot * If status is set, text sets the display text of the status dot
* @type string * @type string
*/ */
text: string; text?: string;
/** /**
* sets the display style of the status dot * sets the display style of the status dot
* @type * @type
*/ */
numberStyle: object; numberStyle?: CSSProperties | string;
/** /**
* Text to show when hovering over the badge * Text to show when hovering over the badge
* @default 'count' * @default 'count'
* @type string * @type string
*/ */
title: string; title?: string;
};
} }