chore(types): card typo

pull/2740/head
Amour1688 2020-08-21 10:46:56 +08:00
parent 1f73e1f026
commit 16575da13c
2 changed files with 79 additions and 76 deletions

151
types/card.d.ts vendored
View File

@ -2,6 +2,7 @@
// 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, CSSProperties } from 'vue';
import { AntdComponent } from './component'; import { AntdComponent } from './component';
import { Meta } from './meta'; import { Meta } from './meta';
@ -11,91 +12,93 @@ export declare class Card extends AntdComponent {
static Grid: any; static Grid: any;
static Meta: typeof Meta; static Meta: typeof Meta;
tabBarExtraContent: any; $props: {
/** tabBarExtraContent: any;
* The action list, shows at the bottom of the Card. /**
* @type any (slots) * The action list, shows at the bottom of the Card.
*/ * @type any (slots)
actions: any; */
actions: VNodeChild | JSX.Element;
/** /**
* Current TabPane's key * Current TabPane's key
* @type string * @type string
*/ */
activeTabKey: string; activeTabKey?: string;
/** /**
* Inline style to apply to the card head * Inline style to apply to the card head
* @type object * @type object
*/ */
headStyle: object; headStyle?: CSSProperties;
/** /**
* Inline style to apply to the card content * Inline style to apply to the card content
* @type object * @type object
*/ */
bodyStyle: object; bodyStyle?: CSSProperties;
/** /**
* Toggles rendering of the border around the card * Toggles rendering of the border around the card
* @default true * @default true
* @type boolean * @type boolean
*/ */
bordered: boolean; bordered?: boolean;
/** /**
* Card cover * Card cover
* @type any (slot) * @type any (slot)
*/ */
cover: any; cover?: VNodeChild | JSX.Element;
/** /**
* Initial active TabPane's key, if activeTabKey is not set. * Initial active TabPane's key, if activeTabKey is not set.
* @type string * @type string
*/ */
defaultActiveTabKey: string; defaultActiveTabKey?: string;
/** /**
* Content to render in the top-right corner of the card * Content to render in the top-right corner of the card
* @type any (string | slot) * @type any (string | slot)
*/ */
extra: any; extra?: VNodeChild | JSX.Element;
/** /**
* Lift up when hovering card * Lift up when hovering card
* @default false * @default false
* @type boolean * @type boolean
*/ */
hoverable: boolean; hoverable?: boolean;
/** /**
* Shows a loading indicator while the contents of the card are being fetched * Shows a loading indicator while the contents of the card are being fetched
* @default false * @default false
* @type boolean * @type boolean
*/ */
loading: boolean; loading?: boolean;
/** /**
* List of TabPane's head, Custom tabs can be created with the scopedSlots property * List of TabPane's head, Custom tabs can be created with the scopedSlots property
* @type Array<{key: string, tab: any, scopedSlots: {tab: string}}> * @type Array<{key: string, tab: any, scopedSlots: {tab: string}}>
*/ */
tabList: Array<{ key: string; tab: any; scopedSlots: { tab: string } }>; tabList?: Array<{ key: string; tab: any; scopedSlots: { tab: string } }>;
/** /**
* Card title * Card title
* @type any (string | slot) * @type any (string | slot)
*/ */
title: any; title?: VNodeChild | JSX.Element;
/** /**
* Card style type, can be set to inner or not set * Card style type, can be set to inner or not set
* @type string * @type string
*/ */
type: string; type?: string;
/** /**
* Size of card * Size of card
* @type string * @type string
*/ */
size: CardSize; size?: CardSize;
};
} }

4
types/meta.d.ts vendored
View File

@ -16,12 +16,12 @@ export declare class Meta {
* The description of list item * The description of list item
* @type any (string | slot) * @type any (string | slot)
*/ */
description?: string | VNodeChild; description?: VNodeChild | JSX.Element;
/** /**
* The title of list item * The title of list item
* @type any (string | slot) * @type any (string | slot)
*/ */
title?: string | VNodeChild; title?: VNodeChild | JSX.Element;
}; };
} }