From 366811a99e0aa0735599c851e1cc45622becc997 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 22 Sep 2020 14:09:38 +0800 Subject: [PATCH] fix(types): input prefix prop types --- types/input/input-search.d.ts | 29 ++++++++++++++--------------- types/input/input.d.ts | 4 ++-- types/input/password.d.ts | 17 ++++++++--------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/types/input/input-search.d.ts b/types/input/input-search.d.ts index 601431ed89..836a8817d8 100644 --- a/types/input/input-search.d.ts +++ b/types/input/input-search.d.ts @@ -2,24 +2,23 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types -import { AntdComponent, AntdProps } from '../component'; +import { AntdComponent } from '../component'; import { VNodeChild } from 'vue'; import { InputProps } from './input'; export declare class InputSearch extends AntdComponent { - $props: AntdProps & - InputProps & { - /** - * to show an enter button after input - * @default false - * @type any (boolean | slot) - */ - enterButton?: boolean | VNodeChild | JSX.Element; + $props: 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; - }; + /** + * 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 36229972eb..603dfa2ba4 100644 --- a/types/input/input.d.ts +++ b/types/input/input.d.ts @@ -9,7 +9,7 @@ import { TextArea } from './textarea'; import { Password } from './password'; import { VNodeChild } from 'vue'; -export type InputProps = { +export type InputProps = Omit & { /** * The label text displayed after (on the right side of) the input field. * @type any (string | slot) @@ -83,5 +83,5 @@ export declare class Input extends AntdComponent { static Search: typeof InputSearch; static TextArea: typeof TextArea; static Password: typeof Password; - $props: AntdProps & InputProps; + $props: InputProps; } diff --git a/types/input/password.d.ts b/types/input/password.d.ts index ec81cae347..7351efcb48 100644 --- a/types/input/password.d.ts +++ b/types/input/password.d.ts @@ -2,16 +2,15 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types -import { AntdComponent, AntdProps } from '../component'; +import { AntdComponent } from '../component'; import { InputProps } from './input'; export declare class Password extends AntdComponent { - $props: AntdProps & - Omit & { - /** - * Whether show toggle button - * @default true - */ - visibilityToggle?: boolean; - }; + $props: Omit & { + /** + * Whether show toggle button + * @default true + */ + visibilityToggle?: boolean; + }; }