chore: update type input (#2720)

pull/2722/head
binhaoCen 4 years ago committed by GitHub
parent 45562123d4
commit 6681b50892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,17 +5,19 @@
import { AntdComponent } from '../component';
export declare class InputGroup extends AntdComponent {
$props: {
/**
* Whether use compact style
* @default false
* @type boolean
*/
compact: 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';
size?: 'small' | 'large' | 'default';
}
}

@ -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 {
$props: {
/**
* to show an enter button after input
* @default false
* @type any (boolean | slot)
*/
enterButton: any;
enterButton?: boolean | VNodeChild | JSX.Element;
}
}

@ -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: any;
addonAfter?: VNodeChild | JSX.Element;
/**
* The label text displayed before (on the left side of) the input field.
* @type any (string | slot)
*/
addonBefore: any;
addonBefore?: VNodeChild | JSX.Element;
/**
* The initial input content
* @type string | number
*/
defaultValue: string | number;
defaultValue?: string | number;
/**
* Whether the input is disabled.
* @default false
* @type boolean
*/
disabled: boolean;
disabled?: boolean;
/**
* The ID for input
* @type string
*/
id: string;
id?: string;
/**
* The prefix icon for the Input.
* @type any (string | slot)
*/
prefix: any;
prefix?: VNodeChild | JSX.Element;
/**
* 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';
size?: 'small' | 'large' | 'default';
/**
* The suffix icon for the Input.
* @type any (string | slot)
*/
suffix: any;
suffix?: VNodeChild | JSX.Element;
/**
* The type of input, see: MDN (use Input.TextArea instead of type="textarea")
* @default 'text'
* @type string
*/
type: string;
type?: string;
/**
* The input content value
* @type string | number
*/
value: string | number;
value?: string | number;
/**
* allow to remove input content with clear icon
*/
allowClear?: boolean;
}
}

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

@ -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
}

Loading…
Cancel
Save