diff --git a/types/card.d.ts b/types/card.d.ts index 455925d8e..ef13f7a0d 100644 --- a/types/card.d.ts +++ b/types/card.d.ts @@ -13,13 +13,14 @@ export declare class Card extends AntdComponent { static Meta: typeof Meta; $props: AntdProps & { - tabBarExtraContent?: any; + tabBarExtraContent?: VNodeChild | JSX.Element; + /** * The action list, shows at the bottom of the Card. * @type any (slots) */ - actions?: VNodeChild | JSX.Element; - + actions?: VNodeChild[] | JSX.Element[]; + /** * Current TabPane's key * @type string @@ -93,7 +94,7 @@ export declare class Card extends AntdComponent { * Card style type, can be set to inner or not set * @type string */ - type?: string; + type?: 'inner'; /** * Size of card diff --git a/types/input/input-search.d.ts b/types/input/input-search.d.ts index e111a0dc7..601431ed8 100644 --- a/types/input/input-search.d.ts +++ b/types/input/input-search.d.ts @@ -4,14 +4,22 @@ import { AntdComponent, AntdProps } from '../component'; import { VNodeChild } from 'vue'; +import { InputProps } from './input'; export declare class InputSearch extends AntdComponent { - $props: AntdProps & { - /** - * to show an enter button after input - * @default false - * @type any (boolean | slot) - */ - enterButton?: boolean | VNodeChild | JSX.Element; - }; + $props: AntdProps & + InputProps & { + /** + * to show an enter button after input + * @default false + * @type any (boolean | slot) + */ + enterButton?: boolean | VNodeChild | JSX.Element; + + /** + * Callback when search is clicked or enter is pressed + * @type Function + */ + onSearch?: (value: string | number, event: Event) => void; + }; } diff --git a/types/input/input.d.ts b/types/input/input.d.ts index a6d66068a..36229972e 100644 --- a/types/input/input.d.ts +++ b/types/input/input.d.ts @@ -9,77 +9,79 @@ import { TextArea } from './textarea'; import { Password } from './password'; import { VNodeChild } from 'vue'; +export type InputProps = { + /** + * The label text displayed after (on the right side of) the input field. + * @type any (string | slot) + */ + addonAfter?: VNodeChild | JSX.Element; + + /** + * The label text displayed before (on the left side of) the input field. + * @type any (string | slot) + */ + addonBefore?: VNodeChild | JSX.Element; + + /** + * The initial input content + * @type string | number + */ + defaultValue?: string | number; + + /** + * Whether the input is disabled. + * @default false + * @type boolean + */ + disabled?: boolean; + + /** + * The ID for input + * @type string + */ + id?: string; + + /** + * The prefix icon for the Input. + * @type any (string | slot) + */ + prefix?: VNodeChild | JSX.Element; + + /** + * The size of the input box. Note: in the context of a form, the large size is used. Available: large default small + * @default 'default' + * @type string + */ + size?: 'small' | 'large' | 'default'; + + /** + * The suffix icon for the Input. + * @type any (string | slot) + */ + suffix?: VNodeChild | JSX.Element; + + /** + * The type of input, see: MDN (use Input.TextArea instead of type="textarea") + * @default 'text' + * @type string + */ + type?: string; + + /** + * The input content value + * @type string | number + */ + value?: string | number; + /** + * allow to remove input content with clear icon + */ + allowClear?: boolean; +}; + export declare class Input extends AntdComponent { static Group: typeof InputGroup; static Search: typeof InputSearch; static TextArea: typeof TextArea; static Password: typeof Password; - $props: AntdProps & { - /** - * The label text displayed after (on the right side of) the input field. - * @type any (string | slot) - */ - addonAfter?: VNodeChild | JSX.Element; - - /** - * The label text displayed before (on the left side of) the input field. - * @type any (string | slot) - */ - addonBefore?: VNodeChild | JSX.Element; - - /** - * The initial input content - * @type string | number - */ - defaultValue?: string | number; - - /** - * Whether the input is disabled. - * @default false - * @type boolean - */ - disabled?: boolean; - - /** - * The ID for input - * @type string - */ - id?: string; - - /** - * The prefix icon for the Input. - * @type any (string | slot) - */ - prefix?: VNodeChild | JSX.Element; - - /** - * The size of the input box. Note: in the context of a form, the large size is used. Available: large default small - * @default 'default' - * @type string - */ - size?: 'small' | 'large' | 'default'; - - /** - * The suffix icon for the Input. - * @type any (string | slot) - */ - suffix?: VNodeChild | JSX.Element; - - /** - * The type of input, see: MDN (use Input.TextArea instead of type="textarea") - * @default 'text' - * @type string - */ - type?: string; - - /** - * The input content value - * @type string | number - */ - value?: string | number; - /** - * allow to remove input content with clear icon - */ - allowClear?: boolean; - }; + $props: AntdProps & InputProps; } diff --git a/types/input/password.d.ts b/types/input/password.d.ts index 2229fb050..ec81cae34 100644 --- a/types/input/password.d.ts +++ b/types/input/password.d.ts @@ -3,13 +3,15 @@ // Definitions: https://github.com/vueComponent/ant-design-vue/types import { AntdComponent, AntdProps } from '../component'; +import { InputProps } from './input'; export declare class Password extends AntdComponent { - $props: AntdProps & { - /** - * Whether show toggle button - * @default true - */ - visibilityToggle?: boolean; - }; + $props: AntdProps & + Omit & { + /** + * Whether show toggle button + * @default true + */ + visibilityToggle?: boolean; + }; } diff --git a/types/page-header.d.ts b/types/page-header.d.ts index 59039a477..9d4acca7d 100644 --- a/types/page-header.d.ts +++ b/types/page-header.d.ts @@ -69,6 +69,6 @@ export declare class PageHeader extends AntdComponent { /** * Specify a callback that will be called when a user clicks backIcon. */ - onBack(): () => void; + onBack?: (e: MouseEvent) => void; }; } diff --git a/types/tag/tag.d.ts b/types/tag/tag.d.ts index 2a5e3d585..a41177c2f 100644 --- a/types/tag/tag.d.ts +++ b/types/tag/tag.d.ts @@ -10,10 +10,10 @@ export declare class Tag extends AntdComponent { $props: AntdProps & { /** - * Callback executed when close animation is completed + * Callback executed when close * @type Function */ - afterClose?: () => void; + onClose?: (e: MouseEvent) => void; /** * Whether the Tag can be closed