chore: update type input (#2720)

This commit is contained in:
binhaoCen 2020-08-19 21:01:12 +08:00 committed by GitHub
parent 45562123d4
commit 6681b50892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 79 deletions

View File

@ -5,17 +5,19 @@
import { AntdComponent } from '../component';
export declare class InputGroup extends AntdComponent {
/**
* Whether use compact style
* @default false
* @type boolean
*/
compact: boolean;
$props: {
/**
* Whether use compact style
* @default false
* @type boolean
*/
compact?: boolean;
/**
* The size of Input.Group specifies the size of the included Input fields. Available: large default small
* @default 'default'
* @type string
*/
size: 'small' | 'large' | 'default';
/**
* The size of Input.Group specifies the size of the included Input fields. Available: large default small
* @default 'default'
* @type string
*/
size?: 'small' | 'large' | 'default';
}
}

View File

@ -3,12 +3,15 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { VNodeChild } from 'vue';
export declare class InputSearch extends AntdComponent {
/**
* to show an enter button after input
* @default false
* @type any (boolean | slot)
*/
enterButton: any;
$props: {
/**
* to show an enter button after input
* @default false
* @type any (boolean | slot)
*/
enterButton?: boolean | VNodeChild | JSX.Element;
}
}

116
types/input/input.d.ts vendored
View File

@ -7,75 +7,79 @@ import { InputGroup } from './input-group';
import { InputSearch } from './input-search';
import { TextArea } from './textarea';
import { Password } from './password';
import { VNodeChild } from 'vue';
export declare class Input extends AntdComponent {
static Group: typeof InputGroup;
static Search: typeof InputSearch;
static TextArea: typeof TextArea;
static Password: typeof Password;
$props: {
/**
* 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 after (on the right side of) the input field.
* @type any (string | slot)
*/
addonAfter: any;
/**
* The label text displayed before (on the left side of) the input field.
* @type any (string | slot)
*/
addonBefore?: VNodeChild | JSX.Element;
/**
* The label text displayed before (on the left side of) the input field.
* @type any (string | slot)
*/
addonBefore: any;
/**
* The initial input content
* @type string | number
*/
defaultValue?: string | number;
/**
* The initial input content
* @type string | number
*/
defaultValue: string | number;
/**
* Whether the input is disabled.
* @default false
* @type boolean
*/
disabled?: boolean;
/**
* Whether the input is disabled.
* @default false
* @type boolean
*/
disabled: boolean;
/**
* The ID for input
* @type string
*/
id?: string;
/**
* The ID for input
* @type string
*/
id: string;
/**
* The prefix icon for the Input.
* @type any (string | slot)
*/
prefix?: VNodeChild | JSX.Element;
/**
* The prefix icon for the Input.
* @type any (string | slot)
*/
prefix: any;
/**
* 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 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 suffix icon for the Input.
* @type any (string | slot)
*/
suffix: any;
/**
* The type of input, see: MDN (use Input.TextArea instead of type="textarea")
* @default 'text'
* @type string
*/
type?: string;
/**
* 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;
allowClear?: boolean;
/**
* The input content value
* @type string | number
*/
value?: string | number;
/**
* allow to remove input content with clear icon
*/
allowClear?: boolean;
}
}

View File

@ -5,5 +5,12 @@
import { AntdComponent } from '../component';
export declare class Password extends AntdComponent {
visibilityToggle?: boolean;
$props:{
/**
* Whether show toggle button
* @default true
*/
visibilityToggle?: boolean;
}
}

View File

@ -10,18 +10,22 @@ export declare class TextArea extends AntdComponent {
* @default false
* @type boolean | object
*/
autosize: boolean | { minRows: number; maxRows: number };
autoSize: boolean | { minRows: number; maxRows: number };
autosize?: boolean | { minRows: number; maxRows: number };
/**
* The initial input content
* @type string | number
*/
defaultValue: string | number;
defaultValue?: string | number;
/**
* The input content value
* @type string | number
*/
value: string | number;
value?: string | number;
/**
*allow to remove input content with clear icon (1.5.0)
* @type boolean
*/
allowClear?: boolean
}