Skip to content

Commit 12afa05

Browse files
authored
fix(types): input prefix prop types (#2880)
1 parent 0367f3e commit 12afa05

File tree

3 files changed

+24
-26
lines changed

3 files changed

+24
-26
lines changed

types/input/input-search.d.ts

+14-15
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5-
import { AntdComponent, AntdProps } from '../component';
5+
import { AntdComponent } from '../component';
66
import { VNodeChild } from 'vue';
77
import { InputProps } from './input';
88

99
export declare class InputSearch extends AntdComponent {
10-
$props: AntdProps &
11-
InputProps & {
12-
/**
13-
* to show an enter button after input
14-
* @default false
15-
* @type any (boolean | slot)
16-
*/
17-
enterButton?: boolean | VNodeChild | JSX.Element;
10+
$props: InputProps & {
11+
/**
12+
* to show an enter button after input
13+
* @default false
14+
* @type any (boolean | slot)
15+
*/
16+
enterButton?: boolean | VNodeChild | JSX.Element;
1817

19-
/**
20-
* Callback when search is clicked or enter is pressed
21-
* @type Function
22-
*/
23-
onSearch?: (value: string | number, event: Event) => void;
24-
};
18+
/**
19+
* Callback when search is clicked or enter is pressed
20+
* @type Function
21+
*/
22+
onSearch?: (value: string | number, event: Event) => void;
23+
};
2524
}

types/input/input.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TextArea } from './textarea';
99
import { Password } from './password';
1010
import { VNodeChild } from 'vue';
1111

12-
export type InputProps = {
12+
export type InputProps = Omit<AntdProps, 'prefix'> & {
1313
/**
1414
* The label text displayed after (on the right side of) the input field.
1515
* @type any (string | slot)
@@ -83,5 +83,5 @@ export declare class Input extends AntdComponent {
8383
static Search: typeof InputSearch;
8484
static TextArea: typeof TextArea;
8585
static Password: typeof Password;
86-
$props: AntdProps & InputProps;
86+
$props: InputProps;
8787
}

types/input/password.d.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5-
import { AntdComponent, AntdProps } from '../component';
5+
import { AntdComponent } from '../component';
66
import { InputProps } from './input';
77

88
export declare class Password extends AntdComponent {
9-
$props: AntdProps &
10-
Omit<InputProps, 'type' | 'suffix'> & {
11-
/**
12-
* Whether show toggle button
13-
* @default true
14-
*/
15-
visibilityToggle?: boolean;
16-
};
9+
$props: Omit<InputProps, 'type' | 'suffix'> & {
10+
/**
11+
* Whether show toggle button
12+
* @default true
13+
*/
14+
visibilityToggle?: boolean;
15+
};
1716
}

0 commit comments

Comments
 (0)