1 | import { ElementUIComponent, ElementUIComponentSize } from './component'
|
2 |
|
3 | /** The resizability of el-input component */
|
4 | export type Resizability = 'none' | 'both' | 'horizontal' | 'vertical'
|
5 | export type InputType = 'text' | 'textarea'
|
6 |
|
7 | /** Controls how el-input component automatically sets size */
|
8 | export interface AutoSize {
|
9 | /** Minimum rows to show */
|
10 | minRows: number,
|
11 |
|
12 | /** Maximum rows to show */
|
13 | maxRows: number
|
14 | }
|
15 |
|
16 | /** Input Component */
|
17 | export declare class ElInput extends ElementUIComponent {
|
18 | /** Type of input */
|
19 | type: InputType
|
20 |
|
21 | /** Binding value */
|
22 | value: string | number
|
23 |
|
24 | /** Maximum Input text length */
|
25 | maxlength: number
|
26 |
|
27 | /** Minimum Input text length */
|
28 | minlength: number
|
29 |
|
30 | /** Placeholder of Input */
|
31 | placeholder: string
|
32 |
|
33 | /** Whether Input is disabled */
|
34 | disabled: boolean
|
35 |
|
36 | /** Size of Input, works when type is not 'textarea' */
|
37 | size: ElementUIComponentSize
|
38 |
|
39 | /** Prefix icon class */
|
40 | prefixIcon: string
|
41 |
|
42 | /** Suffix icon class */
|
43 | suffixIcon: string
|
44 |
|
45 | /** Number of rows of textarea, only works when type is 'textarea' */
|
46 | rows: number
|
47 |
|
48 | /** Whether textarea has an adaptive height, only works when type is 'textarea' */
|
49 | autosize: boolean | AutoSize
|
50 |
|
51 | /** @Deprecated in next major version */
|
52 | autoComplete: string
|
53 |
|
54 | /** Same as autocomplete in native input */
|
55 | autocomplete: string
|
56 |
|
57 | /** Same as name in native input */
|
58 | name: string
|
59 |
|
60 | /** Same as readonly in native input */
|
61 | readonly: boolean
|
62 |
|
63 | /** Same as max in native input */
|
64 | max: any
|
65 |
|
66 | /** Same as min in native input */
|
67 | min: any
|
68 |
|
69 | /** Same as step in native input */
|
70 | step: any
|
71 |
|
72 | /** Control the resizability */
|
73 | resize: Resizability
|
74 |
|
75 | /** Same as autofocus in native input */
|
76 | autofocus: boolean
|
77 |
|
78 | /** Same as form in native input */
|
79 | form: string
|
80 |
|
81 | /**
|
82 | * Focus the Input component
|
83 | */
|
84 | focus (): void
|
85 |
|
86 | /**
|
87 | * Blur the Input component
|
88 | */
|
89 | blur (): void
|
90 |
|
91 | /**
|
92 | * Select the text in input element
|
93 | */
|
94 | select (): void
|
95 | }
|