update the props types of some components (#2860)
* chore(types): update tags props types remove afterClose prop types and add onClose prop types * chore(types): update input props types * chore(types): update card props types * chore(types): update page-header props types Co-authored-by: tangjinzhou <415800467@qq.com>pull/2868/head
parent
47c5191b8c
commit
efdb38d9f2
|
@ -13,12 +13,13 @@ export declare class Card extends AntdComponent {
|
||||||
static Meta: typeof Meta;
|
static Meta: typeof Meta;
|
||||||
|
|
||||||
$props: AntdProps & {
|
$props: AntdProps & {
|
||||||
tabBarExtraContent?: any;
|
tabBarExtraContent?: VNodeChild | JSX.Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action list, shows at the bottom of the Card.
|
* The action list, shows at the bottom of the Card.
|
||||||
* @type any (slots)
|
* @type any (slots)
|
||||||
*/
|
*/
|
||||||
actions?: VNodeChild | JSX.Element;
|
actions?: VNodeChild[] | JSX.Element[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current TabPane's key
|
* Current TabPane's key
|
||||||
|
@ -93,7 +94,7 @@ export declare class Card extends AntdComponent {
|
||||||
* 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?: 'inner';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of card
|
* Size of card
|
||||||
|
|
|
@ -4,14 +4,22 @@
|
||||||
|
|
||||||
import { AntdComponent, AntdProps } from '../component';
|
import { AntdComponent, AntdProps } from '../component';
|
||||||
import { VNodeChild } from 'vue';
|
import { VNodeChild } from 'vue';
|
||||||
|
import { InputProps } from './input';
|
||||||
|
|
||||||
export declare class InputSearch extends AntdComponent {
|
export declare class InputSearch extends AntdComponent {
|
||||||
$props: AntdProps & {
|
$props: AntdProps &
|
||||||
|
InputProps & {
|
||||||
/**
|
/**
|
||||||
* to show an enter button after input
|
* to show an enter button after input
|
||||||
* @default false
|
* @default false
|
||||||
* @type any (boolean | slot)
|
* @type any (boolean | slot)
|
||||||
*/
|
*/
|
||||||
enterButton?: boolean | VNodeChild | JSX.Element;
|
enterButton?: boolean | VNodeChild | JSX.Element;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback when search is clicked or enter is pressed
|
||||||
|
* @type Function
|
||||||
|
*/
|
||||||
|
onSearch?: (value: string | number, event: Event) => void;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,7 @@ import { TextArea } from './textarea';
|
||||||
import { Password } from './password';
|
import { Password } from './password';
|
||||||
import { VNodeChild } from 'vue';
|
import { VNodeChild } from 'vue';
|
||||||
|
|
||||||
export declare class Input extends AntdComponent {
|
export type InputProps = {
|
||||||
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.
|
* The label text displayed after (on the right side of) the input field.
|
||||||
* @type any (string | slot)
|
* @type any (string | slot)
|
||||||
|
@ -81,5 +76,12 @@ export declare class Input extends AntdComponent {
|
||||||
* allow to remove input content with clear icon
|
* allow to remove input content with clear icon
|
||||||
*/
|
*/
|
||||||
allowClear?: boolean;
|
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 & InputProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||||
|
|
||||||
import { AntdComponent, AntdProps } from '../component';
|
import { AntdComponent, AntdProps } from '../component';
|
||||||
|
import { InputProps } from './input';
|
||||||
|
|
||||||
export declare class Password extends AntdComponent {
|
export declare class Password extends AntdComponent {
|
||||||
$props: AntdProps & {
|
$props: AntdProps &
|
||||||
|
Omit<InputProps, 'type' | 'suffix'> & {
|
||||||
/**
|
/**
|
||||||
* Whether show toggle button
|
* Whether show toggle button
|
||||||
* @default true
|
* @default true
|
||||||
|
|
|
@ -69,6 +69,6 @@ export declare class PageHeader extends AntdComponent {
|
||||||
/**
|
/**
|
||||||
* Specify a callback that will be called when a user clicks backIcon.
|
* Specify a callback that will be called when a user clicks backIcon.
|
||||||
*/
|
*/
|
||||||
onBack(): () => void;
|
onBack?: (e: MouseEvent) => void;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,10 @@ export declare class Tag extends AntdComponent {
|
||||||
|
|
||||||
$props: AntdProps & {
|
$props: AntdProps & {
|
||||||
/**
|
/**
|
||||||
* Callback executed when close animation is completed
|
* Callback executed when close
|
||||||
* @type Function
|
* @type Function
|
||||||
*/
|
*/
|
||||||
afterClose?: () => void;
|
onClose?: (e: MouseEvent) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the Tag can be closed
|
* Whether the Tag can be closed
|
||||||
|
|
Loading…
Reference in New Issue