fix(types): input prefix prop types (#2880)
parent
0367f3e57e
commit
12afa05aee
|
@ -2,24 +2,23 @@
|
||||||
// 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 { AntdComponent, AntdProps } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
import { VNodeChild } from 'vue';
|
import { VNodeChild } from 'vue';
|
||||||
import { InputProps } from './input';
|
import { InputProps } from './input';
|
||||||
|
|
||||||
export declare class InputSearch extends AntdComponent {
|
export declare class InputSearch extends AntdComponent {
|
||||||
$props: AntdProps &
|
$props: InputProps & {
|
||||||
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
|
* Callback when search is clicked or enter is pressed
|
||||||
* @type Function
|
* @type Function
|
||||||
*/
|
*/
|
||||||
onSearch?: (value: string | number, event: Event) => void;
|
onSearch?: (value: string | number, event: Event) => void;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { TextArea } from './textarea';
|
||||||
import { Password } from './password';
|
import { Password } from './password';
|
||||||
import { VNodeChild } from 'vue';
|
import { VNodeChild } from 'vue';
|
||||||
|
|
||||||
export type InputProps = {
|
export type InputProps = Omit<AntdProps, 'prefix'> & {
|
||||||
/**
|
/**
|
||||||
* 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)
|
||||||
|
@ -83,5 +83,5 @@ export declare class Input extends AntdComponent {
|
||||||
static Search: typeof InputSearch;
|
static Search: typeof InputSearch;
|
||||||
static TextArea: typeof TextArea;
|
static TextArea: typeof TextArea;
|
||||||
static Password: typeof Password;
|
static Password: typeof Password;
|
||||||
$props: AntdProps & InputProps;
|
$props: InputProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
// 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 { AntdComponent, AntdProps } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
import { InputProps } from './input';
|
import { InputProps } from './input';
|
||||||
|
|
||||||
export declare class Password extends AntdComponent {
|
export declare class Password extends AntdComponent {
|
||||||
$props: AntdProps &
|
$props: Omit<InputProps, 'type' | 'suffix'> & {
|
||||||
Omit<InputProps, 'type' | 'suffix'> & {
|
/**
|
||||||
/**
|
* Whether show toggle button
|
||||||
* Whether show toggle button
|
* @default true
|
||||||
* @default true
|
*/
|
||||||
*/
|
visibilityToggle?: boolean;
|
||||||
visibilityToggle?: boolean;
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue