1 | import { VXETableComponent } from './component'
|
2 | import { Form } from './form'
|
3 | import { RenderParams, RenderOptions, OptionProps, OptionGroupProps } from './v-x-e-table'
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export class FormItem extends VXETableComponent {
|
9 | |
10 |
|
11 |
|
12 | title?: string;
|
13 | |
14 |
|
15 |
|
16 | field?: string;
|
17 | |
18 |
|
19 |
|
20 | span?: string | number;
|
21 | |
22 |
|
23 |
|
24 | align?: 'left' | 'center' | 'right';
|
25 | |
26 |
|
27 |
|
28 | titleAlign?: 'left' | 'center' | 'right';
|
29 | |
30 |
|
31 |
|
32 | titleWidth?: string | number;
|
33 | |
34 |
|
35 |
|
36 | titlePrefix?: FormItemTitleOptions;
|
37 | |
38 |
|
39 |
|
40 | titleSuffix?: FormItemTitleOptions;
|
41 | |
42 |
|
43 |
|
44 | resetValue?: any;
|
45 | |
46 |
|
47 |
|
48 | visibleMethod?(params: { data: any, property: string }): boolean;
|
49 | |
50 |
|
51 |
|
52 | folding?: boolean;
|
53 | |
54 |
|
55 |
|
56 | collapseNode?: boolean;
|
57 | |
58 |
|
59 |
|
60 | itemRender?: FormItemRenderOptions;
|
61 | }
|
62 |
|
63 | export interface FormItemOptions {
|
64 | |
65 |
|
66 |
|
67 | title?: string;
|
68 | |
69 |
|
70 |
|
71 | field?: string;
|
72 | |
73 |
|
74 |
|
75 | span?: string | number;
|
76 | |
77 |
|
78 |
|
79 | align?: 'left' | 'center' | 'right';
|
80 | |
81 |
|
82 |
|
83 | titleAlign?: 'left' | 'center' | 'right';
|
84 | |
85 |
|
86 |
|
87 | titleWidth?: string | number;
|
88 | |
89 |
|
90 |
|
91 | titlePrefix?: FormItemTitleOptions;
|
92 | |
93 |
|
94 |
|
95 | titleSuffix?: FormItemTitleOptions;
|
96 | |
97 |
|
98 |
|
99 | resetValue?: any;
|
100 | |
101 |
|
102 |
|
103 | visibleMethod?(params: { data: any, property: string }): boolean;
|
104 | |
105 |
|
106 |
|
107 | folding?: boolean;
|
108 | |
109 |
|
110 |
|
111 | collapseNode?: boolean;
|
112 | |
113 |
|
114 |
|
115 | itemRender?: FormItemRenderOptions;
|
116 | }
|
117 |
|
118 | export interface FormItemTitleOptions {
|
119 | message?: string;
|
120 | enterable?: boolean;
|
121 | theme?: string;
|
122 | icon?: string;
|
123 | }
|
124 |
|
125 |
|
126 |
|
127 |
|
128 | export interface FormItemRenderOptions extends RenderOptions {
|
129 | |
130 |
|
131 |
|
132 | options?: { [key: string]: any }[];
|
133 | |
134 |
|
135 |
|
136 | optionProps?: OptionProps;
|
137 | |
138 |
|
139 |
|
140 | optionGroups?: { [key: string]: any }[];
|
141 | |
142 |
|
143 |
|
144 | optionGroupProps?: OptionGroupProps;
|
145 | |
146 |
|
147 |
|
148 | content?: string;
|
149 | |
150 |
|
151 |
|
152 | defaultValue?: any;
|
153 | }
|
154 |
|
155 |
|
156 |
|
157 |
|
158 | export interface FormItemRenderParams extends RenderParams {
|
159 | |
160 |
|
161 |
|
162 | $form: Form;
|
163 | |
164 |
|
165 |
|
166 | data: any;
|
167 | |
168 |
|
169 |
|
170 | property: string;
|
171 | }
|
172 |
|
173 |
|
174 |
|
175 |
|
176 | export interface FormItemVisibleParams extends RenderParams {
|
177 | |
178 |
|
179 |
|
180 | $form: Form;
|
181 | |
182 |
|
183 |
|
184 | data: any;
|
185 | |
186 |
|
187 |
|
188 | property: string;
|
189 | }
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | export interface FormItemResetParams extends RenderParams {
|
195 | |
196 |
|
197 |
|
198 | $form: Form;
|
199 | |
200 |
|
201 |
|
202 | data: any;
|
203 | |
204 |
|
205 |
|
206 | property: string;
|
207 | }
|