UNPKG

1.03 kBTypeScriptView Raw
1import { ElementUIComponent, ElementUIComponentSize } from './component'
2
3/** FormItem Component */
4export declare class ElFormItem extends ElementUIComponent {
5 /** A key of `model` of the enclosing `el-form` component */
6 prop: string
7
8 /** Label */
9 label: string
10
11 /** Width of label, e.g. '50px' */
12 labelWidth: string
13
14 /** Whether the field is required or not, will be determined by validation rules if omitted */
15 required: boolean
16
17 /** Validation rules of form */
18 rules: object
19
20 /** Field error message, set its value and the field will validate error and show this message immediately */
21 error: string
22
23 /** Whether to show the error message */
24 showMessage: boolean
25
26 /** Whether to display the error message inline with the form item */
27 inlineMessage: boolean
28
29 /** Controls the size of components in this form */
30 size: ElementUIComponentSize
31
32 /** Reset current field and remove validation result */
33 resetField (): void
34
35 /** Remove validation status of the field */
36 clearValidate (): void
37}