@tmagic/form 1.2.0-beta.2 → 1.2.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/tmagic-form.js +3673 -0
- package/dist/tmagic-form.js.map +1 -0
- package/dist/tmagic-form.umd.cjs +3713 -0
- package/dist/tmagic-form.umd.cjs.map +1 -0
- package/package.json +10 -9
- package/src/Form.vue +124 -159
- package/src/FormDialog.vue +108 -126
- package/src/containers/Col.vue +24 -38
- package/src/containers/Container.vue +143 -171
- package/src/containers/Fieldset.vue +15 -8
- package/src/containers/GroupList.vue +86 -116
- package/src/containers/GroupListItem.vue +91 -125
- package/src/containers/Panel.vue +29 -49
- package/src/containers/Row.vue +20 -40
- package/src/containers/Step.vue +38 -48
- package/src/containers/Table.vue +466 -481
- package/src/containers/Tabs.vue +94 -118
- package/src/fields/Cascader.vue +88 -136
- package/src/fields/Checkbox.vue +46 -50
- package/src/fields/CheckboxGroup.vue +39 -35
- package/src/fields/ColorPicker.vue +5 -3
- package/src/fields/Date.vue +21 -27
- package/src/fields/DateTime.vue +31 -39
- package/src/fields/Daterange.vue +4 -3
- package/src/fields/Display.vue +1 -1
- package/src/fields/DynamicField.vue +63 -77
- package/src/fields/Hidden.vue +1 -1
- package/src/fields/Link.vue +65 -86
- package/src/fields/Number.vue +32 -34
- package/src/fields/RadioGroup.vue +23 -23
- package/src/fields/Select.vue +294 -310
- package/src/fields/SelectOptionGroups.vue +11 -6
- package/src/fields/SelectOptions.vue +5 -3
- package/src/fields/Switch.vue +46 -49
- package/src/fields/Text.vue +99 -107
- package/src/fields/Textarea.vue +32 -44
- package/src/fields/Time.vue +21 -30
- package/src/index.ts +22 -23
- package/src/schema.ts +50 -12
- package/src/theme/form.scss +1 -1
- package/src/utils/form.ts +9 -5
- package/types/Form.vue.d.ts +211 -111
- package/types/FormDialog.vue.d.ts +813 -154
- package/types/containers/Col.vue.d.ts +96 -40
- package/types/containers/Container.vue.d.ts +126 -65
- package/types/containers/Fieldset.vue.d.ts +5 -3
- package/types/containers/GroupList.vue.d.ts +90 -53
- package/types/containers/GroupListItem.vue.d.ts +101 -67
- package/types/containers/Panel.vue.d.ts +96 -39
- package/types/containers/Row.vue.d.ts +96 -39
- package/types/containers/Step.vue.d.ts +106 -42
- package/types/containers/Table.vue.d.ts +161 -130
- package/types/containers/Tabs.vue.d.ts +97 -50
- package/types/fields/Cascader.vue.d.ts +95 -71
- package/types/fields/Checkbox.vue.d.ts +95 -56
- package/types/fields/CheckboxGroup.vue.d.ts +95 -53
- package/types/fields/ColorPicker.vue.d.ts +1 -3
- package/types/fields/Date.vue.d.ts +95 -54
- package/types/fields/DateTime.vue.d.ts +95 -54
- package/types/fields/Daterange.vue.d.ts +1 -3
- package/types/fields/Display.vue.d.ts +1 -3
- package/types/fields/DynamicField.vue.d.ts +95 -64
- package/types/fields/Hidden.vue.d.ts +1 -3
- package/types/fields/Link.vue.d.ts +60 -657
- package/types/fields/Number.vue.d.ts +99 -56
- package/types/fields/RadioGroup.vue.d.ts +96 -52
- package/types/fields/Select.vue.d.ts +97 -65
- package/types/fields/SelectOptionGroups.vue.d.ts +1 -3
- package/types/fields/SelectOptions.vue.d.ts +1 -3
- package/types/fields/Switch.vue.d.ts +95 -56
- package/types/fields/Text.vue.d.ts +98 -57
- package/types/fields/Textarea.vue.d.ts +100 -60
- package/types/fields/Time.vue.d.ts +95 -55
- package/types/index.d.ts +0 -1
- package/types/schema.d.ts +42 -9
- package/types/utils/form.d.ts +2 -1
- package/dist/tmagic-form.mjs +0 -3925
- package/dist/tmagic-form.mjs.map +0 -1
- package/dist/tmagic-form.umd.js +0 -3965
- package/dist/tmagic-form.umd.js.map +0 -1
- package/src/utils/fieldProps.ts +0 -39
- package/types/utils/fieldProps.d.ts +0 -21
package/src/schema.ts
CHANGED
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
export interface ValidateError {
|
|
20
|
+
message: string;
|
|
21
|
+
field: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* 整个表单的数据,会注入到各个组件中去
|
|
21
26
|
*/
|
|
@@ -167,7 +172,7 @@ type DefaultValueFunction = (mForm: FormState | undefined) => any;
|
|
|
167
172
|
/**
|
|
168
173
|
* 下拉选择器选项配置
|
|
169
174
|
*/
|
|
170
|
-
export interface
|
|
175
|
+
export interface SelectConfigOption {
|
|
171
176
|
/** 选项的标签 */
|
|
172
177
|
text: string | SelectOptionTextFunction;
|
|
173
178
|
/** 选项的值 */
|
|
@@ -176,10 +181,19 @@ export interface SelectOption {
|
|
|
176
181
|
disabled?: boolean;
|
|
177
182
|
}
|
|
178
183
|
|
|
184
|
+
export interface SelectOption {
|
|
185
|
+
/** 选项的标签 */
|
|
186
|
+
text: string;
|
|
187
|
+
/** 选项的值 */
|
|
188
|
+
value: any;
|
|
189
|
+
/** 是否禁用该选项 */
|
|
190
|
+
disabled?: boolean;
|
|
191
|
+
}
|
|
192
|
+
|
|
179
193
|
/**
|
|
180
194
|
* 下拉选择器分组选项配置
|
|
181
195
|
*/
|
|
182
|
-
export interface
|
|
196
|
+
export interface SelectConfigGroupOption {
|
|
183
197
|
/** 分组的组名 */
|
|
184
198
|
label: string;
|
|
185
199
|
/** 是否禁用该选项组 */
|
|
@@ -194,6 +208,22 @@ export interface SelectGroupOption {
|
|
|
194
208
|
}[];
|
|
195
209
|
}
|
|
196
210
|
|
|
211
|
+
export interface SelectGroupOption {
|
|
212
|
+
/** 分组的组名 */
|
|
213
|
+
label: string;
|
|
214
|
+
/** 是否禁用该选项组 */
|
|
215
|
+
disabled: boolean;
|
|
216
|
+
options: {
|
|
217
|
+
/** 选项的标签 */
|
|
218
|
+
label?: string;
|
|
219
|
+
text?: string;
|
|
220
|
+
/** 选项的值 */
|
|
221
|
+
value: any;
|
|
222
|
+
/** 是否禁用该选项 */
|
|
223
|
+
disabled?: boolean;
|
|
224
|
+
}[];
|
|
225
|
+
}
|
|
226
|
+
|
|
197
227
|
type SelectOptionFunction = (
|
|
198
228
|
mForm: FormState | undefined,
|
|
199
229
|
data: {
|
|
@@ -226,11 +256,11 @@ type RemoteSelectOptionRequestFunction = (
|
|
|
226
256
|
},
|
|
227
257
|
) => any;
|
|
228
258
|
|
|
229
|
-
type RemoteSelectOptionItemFunction = (optionsData: Record<string, any>) => SelectOption[];
|
|
259
|
+
type RemoteSelectOptionItemFunction = (optionsData: Record<string, any>) => SelectOption[] | SelectGroupOption[];
|
|
230
260
|
type SelectOptionValueFunction = (item: Record<string, any>) => any;
|
|
231
261
|
type SelectOptionTextFunction = (item: Record<string, any>) => string;
|
|
232
262
|
|
|
233
|
-
interface CascaderOption {
|
|
263
|
+
export interface CascaderOption {
|
|
234
264
|
/** 指定选项的值为选项对象的某个属性值 */
|
|
235
265
|
value: any;
|
|
236
266
|
/** 指定选项标签为选项对象的某个属性值 */
|
|
@@ -302,7 +332,7 @@ export interface NumberConfig extends FormItem {
|
|
|
302
332
|
min?: number;
|
|
303
333
|
max?: number;
|
|
304
334
|
step?: number;
|
|
305
|
-
placeholder?:
|
|
335
|
+
placeholder?: string;
|
|
306
336
|
}
|
|
307
337
|
|
|
308
338
|
/**
|
|
@@ -318,6 +348,7 @@ export interface HiddenConfig extends FormItem {
|
|
|
318
348
|
export interface DateConfig extends FormItem, Input {
|
|
319
349
|
type: 'date';
|
|
320
350
|
format?: 'YYYY-MM-dd HH:mm:ss' | string;
|
|
351
|
+
valueFormat?: 'YYYY-MM-dd HH:mm:ss' | string;
|
|
321
352
|
}
|
|
322
353
|
|
|
323
354
|
/**
|
|
@@ -335,6 +366,8 @@ export interface DateTimeConfig extends FormItem, Input {
|
|
|
335
366
|
*/
|
|
336
367
|
export interface TimeConfig extends FormItem, Input {
|
|
337
368
|
type: 'time';
|
|
369
|
+
format?: 'HH:mm:ss' | string;
|
|
370
|
+
valueFormat?: 'HH:mm:ss' | string;
|
|
338
371
|
}
|
|
339
372
|
|
|
340
373
|
/**
|
|
@@ -361,7 +394,7 @@ export interface SwitchConfig extends FormItem {
|
|
|
361
394
|
export interface RadioGroupConfig extends FormItem {
|
|
362
395
|
type: 'radio-group';
|
|
363
396
|
options: {
|
|
364
|
-
|
|
397
|
+
value: string | number | boolean;
|
|
365
398
|
text: string;
|
|
366
399
|
}[];
|
|
367
400
|
}
|
|
@@ -378,10 +411,13 @@ export interface ColorPickConfig extends FormItem {
|
|
|
378
411
|
*/
|
|
379
412
|
export interface CheckboxGroupConfig extends FormItem {
|
|
380
413
|
type: 'checkbox-group';
|
|
381
|
-
options:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
414
|
+
options:
|
|
415
|
+
| {
|
|
416
|
+
value: any;
|
|
417
|
+
text: string;
|
|
418
|
+
disabled?: boolean;
|
|
419
|
+
}[]
|
|
420
|
+
| Function;
|
|
385
421
|
}
|
|
386
422
|
|
|
387
423
|
/**
|
|
@@ -394,7 +430,7 @@ export interface SelectConfig extends FormItem, Input {
|
|
|
394
430
|
valueKey?: string;
|
|
395
431
|
allowCreate?: boolean;
|
|
396
432
|
group?: boolean;
|
|
397
|
-
options:
|
|
433
|
+
options: SelectConfigOption[] | SelectConfigGroupOption[] | SelectOptionFunction;
|
|
398
434
|
remote: true;
|
|
399
435
|
option: {
|
|
400
436
|
url: string;
|
|
@@ -520,7 +556,7 @@ export interface TabPaneConfig {
|
|
|
520
556
|
}
|
|
521
557
|
export interface TabConfig extends FormItem, ContainerCommonConfig {
|
|
522
558
|
type: 'tab' | 'dynamic-tab';
|
|
523
|
-
tabType?:
|
|
559
|
+
tabType?: string;
|
|
524
560
|
editable?: boolean;
|
|
525
561
|
dynamic?: boolean;
|
|
526
562
|
tabPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -577,6 +613,7 @@ export interface TableConfig extends FormItem {
|
|
|
577
613
|
border?: boolean;
|
|
578
614
|
/** 显示行号 */
|
|
579
615
|
showIndex?: boolean;
|
|
616
|
+
pagination?: boolean;
|
|
580
617
|
enum?: any[];
|
|
581
618
|
/** 是否显示添加按钮 */
|
|
582
619
|
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
|
@@ -596,6 +633,7 @@ export interface TableConfig extends FormItem {
|
|
|
596
633
|
enableFullscreen?: boolean;
|
|
597
634
|
fixed?: boolean;
|
|
598
635
|
itemExtra?: string | FilterFunction;
|
|
636
|
+
rowKey: string;
|
|
599
637
|
}
|
|
600
638
|
|
|
601
639
|
export interface GroupListConfig extends FormItem {
|
package/src/theme/form.scss
CHANGED
package/src/utils/form.ts
CHANGED
|
@@ -62,9 +62,9 @@ const initItemsValue = (
|
|
|
62
62
|
{ items, name, extensible }: any,
|
|
63
63
|
) => {
|
|
64
64
|
if (Array.isArray(initValue[name])) {
|
|
65
|
-
value[name] = initValue[name].map((v: any, index: number) =>
|
|
65
|
+
value[name] = initValue[name].map((v: any, index: number) => createValues(mForm, items, v, value[name]?.[index]));
|
|
66
66
|
} else {
|
|
67
|
-
value[name] =
|
|
67
|
+
value[name] = createValues(mForm, items, initValue[name], value[name]);
|
|
68
68
|
if (extensible) {
|
|
69
69
|
value[name] = Object.assign({}, initValue[name], value[name]);
|
|
70
70
|
}
|
|
@@ -129,7 +129,7 @@ const initValueItem = function (
|
|
|
129
129
|
|
|
130
130
|
if (!name) {
|
|
131
131
|
// 没有配置name,直接跳过
|
|
132
|
-
return
|
|
132
|
+
return createValues(mForm, items, initValue, value);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
setValue(mForm, value, initValue, item);
|
|
@@ -137,7 +137,7 @@ const initValueItem = function (
|
|
|
137
137
|
return value;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
const
|
|
140
|
+
export const createValues = function (
|
|
141
141
|
mForm: FormState | undefined,
|
|
142
142
|
config: FormConfig | TabPaneConfig[] = [],
|
|
143
143
|
initValue: FormValue = {},
|
|
@@ -197,6 +197,10 @@ export const filterFunction = (mForm: FormState | undefined, config: any, props:
|
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
export const display = function (mForm: FormState | undefined, config: any, props: any) {
|
|
200
|
+
if (config === 'expand') {
|
|
201
|
+
return config;
|
|
202
|
+
}
|
|
203
|
+
|
|
200
204
|
if (typeof config === 'function') {
|
|
201
205
|
return filterFunction(mForm, config, props);
|
|
202
206
|
}
|
|
@@ -249,7 +253,7 @@ export const initValue = async (
|
|
|
249
253
|
) => {
|
|
250
254
|
if (!Array.isArray(config)) throw new Error('config应该为数组');
|
|
251
255
|
|
|
252
|
-
let valuesTmp =
|
|
256
|
+
let valuesTmp = createValues(mForm, config, toRaw(initValues), {});
|
|
253
257
|
|
|
254
258
|
const [firstForm] = config as [ContainerCommonConfig];
|
|
255
259
|
if (firstForm && typeof firstForm.onInitValue === 'function') {
|
package/types/Form.vue.d.ts
CHANGED
|
@@ -1,125 +1,225 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import type { FormConfig, FormState, FormValue } from './schema';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
$: import("vue").ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: Partial<{
|
|
7
|
+
config: FormConfig;
|
|
8
|
+
initValues: Object;
|
|
9
|
+
keyProp: string;
|
|
10
|
+
parentValues: Object;
|
|
11
|
+
labelWidth: string;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
stepActive: string | number;
|
|
14
|
+
height: string;
|
|
15
|
+
inline: boolean;
|
|
16
|
+
labelPosition: string;
|
|
17
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
18
|
+
config: FormConfig;
|
|
19
|
+
initValues: Object;
|
|
20
|
+
parentValues?: Object | undefined;
|
|
21
|
+
labelWidth?: string | undefined;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
height?: string | undefined;
|
|
24
|
+
stepActive?: string | number | undefined;
|
|
25
|
+
size?: "small" | "default" | "large" | undefined;
|
|
26
|
+
inline?: boolean | undefined;
|
|
27
|
+
labelPosition?: string | undefined;
|
|
28
|
+
keyProp?: string | undefined;
|
|
29
|
+
popperClass?: string | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
config: () => never[];
|
|
32
|
+
initValues: () => {};
|
|
33
|
+
parentValues: () => {};
|
|
34
|
+
labelWidth: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
height: string;
|
|
37
|
+
stepActive: number;
|
|
38
|
+
inline: boolean;
|
|
39
|
+
labelPosition: string;
|
|
40
|
+
keyProp: string;
|
|
41
|
+
}>>> & {
|
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
|
|
46
|
+
$attrs: {
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
$refs: {
|
|
50
|
+
[x: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
$slots: Readonly<{
|
|
53
|
+
[name: string]: import("vue").Slot | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
56
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
57
|
+
$emit: (event: "change" | "field-input" | "field-change", ...args: any[]) => void;
|
|
58
|
+
$el: any;
|
|
59
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
60
|
+
config: FormConfig;
|
|
61
|
+
initValues: Object;
|
|
62
|
+
parentValues?: Object | undefined;
|
|
63
|
+
labelWidth?: string | undefined;
|
|
64
|
+
disabled?: boolean | undefined;
|
|
65
|
+
height?: string | undefined;
|
|
66
|
+
stepActive?: string | number | undefined;
|
|
67
|
+
size?: "small" | "default" | "large" | undefined;
|
|
68
|
+
inline?: boolean | undefined;
|
|
69
|
+
labelPosition?: string | undefined;
|
|
70
|
+
keyProp?: string | undefined;
|
|
71
|
+
popperClass?: string | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
config: () => never[];
|
|
74
|
+
initValues: () => {};
|
|
75
|
+
parentValues: () => {};
|
|
76
|
+
labelWidth: string;
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
height: string;
|
|
79
|
+
stepActive: number;
|
|
80
|
+
inline: boolean;
|
|
81
|
+
labelPosition: string;
|
|
82
|
+
keyProp: string;
|
|
83
|
+
}>>> & {
|
|
84
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
86
|
+
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
values: import("vue").Ref<FormValue>;
|
|
89
|
+
formState: FormState;
|
|
90
|
+
initialized: import("vue").Ref<boolean>;
|
|
91
|
+
changeHandler: () => void;
|
|
92
|
+
resetForm: () => any;
|
|
93
|
+
submitForm: (native?: boolean) => Promise<any>;
|
|
94
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], string, {
|
|
95
|
+
config: FormConfig;
|
|
96
|
+
initValues: Object;
|
|
97
|
+
keyProp: string;
|
|
98
|
+
parentValues: Object;
|
|
99
|
+
labelWidth: string;
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
stepActive: string | number;
|
|
102
|
+
height: string;
|
|
103
|
+
inline: boolean;
|
|
104
|
+
labelPosition: string;
|
|
105
|
+
}> & {
|
|
106
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
107
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
108
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
109
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
110
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
111
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
112
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
113
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
114
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
115
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
116
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
117
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
118
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
119
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
120
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
121
|
+
};
|
|
122
|
+
$forceUpdate: () => void;
|
|
123
|
+
$nextTick: typeof import("vue").nextTick;
|
|
124
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
125
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
126
|
+
config: FormConfig;
|
|
127
|
+
initValues: Object;
|
|
128
|
+
parentValues?: Object | undefined;
|
|
129
|
+
labelWidth?: string | undefined;
|
|
130
|
+
disabled?: boolean | undefined;
|
|
131
|
+
height?: string | undefined;
|
|
132
|
+
stepActive?: string | number | undefined;
|
|
133
|
+
size?: "small" | "default" | "large" | undefined;
|
|
134
|
+
inline?: boolean | undefined;
|
|
135
|
+
labelPosition?: string | undefined;
|
|
136
|
+
keyProp?: string | undefined;
|
|
137
|
+
popperClass?: string | undefined;
|
|
138
|
+
}>, {
|
|
139
|
+
config: () => never[];
|
|
140
|
+
initValues: () => {};
|
|
141
|
+
parentValues: () => {};
|
|
142
|
+
labelWidth: string;
|
|
143
|
+
disabled: boolean;
|
|
144
|
+
height: string;
|
|
145
|
+
stepActive: number;
|
|
146
|
+
inline: boolean;
|
|
147
|
+
labelPosition: string;
|
|
148
|
+
keyProp: string;
|
|
149
|
+
}>>> & {
|
|
150
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
151
|
+
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
152
|
+
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
153
|
+
} & import("vue").ShallowUnwrapRef<{
|
|
154
|
+
values: import("vue").Ref<FormValue>;
|
|
155
|
+
formState: FormState;
|
|
156
|
+
initialized: import("vue").Ref<boolean>;
|
|
157
|
+
changeHandler: () => void;
|
|
158
|
+
resetForm: () => any;
|
|
159
|
+
submitForm: (native?: boolean) => Promise<any>;
|
|
160
|
+
}> & {} & import("vue").ComponentCustomProperties;
|
|
161
|
+
__isFragment?: undefined;
|
|
162
|
+
__isTeleport?: undefined;
|
|
163
|
+
__isSuspense?: undefined;
|
|
164
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
165
|
+
config: FormConfig;
|
|
166
|
+
initValues: Object;
|
|
167
|
+
parentValues?: Object | undefined;
|
|
168
|
+
labelWidth?: string | undefined;
|
|
169
|
+
disabled?: boolean | undefined;
|
|
170
|
+
height?: string | undefined;
|
|
171
|
+
stepActive?: string | number | undefined;
|
|
172
|
+
size?: "small" | "default" | "large" | undefined;
|
|
173
|
+
inline?: boolean | undefined;
|
|
174
|
+
labelPosition?: string | undefined;
|
|
175
|
+
keyProp?: string | undefined;
|
|
176
|
+
popperClass?: string | undefined;
|
|
177
|
+
}>, {
|
|
178
|
+
config: () => never[];
|
|
179
|
+
initValues: () => {};
|
|
180
|
+
parentValues: () => {};
|
|
181
|
+
labelWidth: string;
|
|
182
|
+
disabled: boolean;
|
|
183
|
+
height: string;
|
|
184
|
+
stepActive: number;
|
|
185
|
+
inline: boolean;
|
|
186
|
+
labelPosition: string;
|
|
187
|
+
keyProp: string;
|
|
188
|
+
}>>> & {
|
|
189
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
190
|
+
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
191
|
+
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
52
192
|
}, {
|
|
53
|
-
initialized: import("vue").Ref<boolean>;
|
|
54
193
|
values: import("vue").Ref<FormValue>;
|
|
55
|
-
elForm: import("vue").Ref<any>;
|
|
56
194
|
formState: FormState;
|
|
195
|
+
initialized: import("vue").Ref<boolean>;
|
|
57
196
|
changeHandler: () => void;
|
|
58
197
|
resetForm: () => any;
|
|
59
198
|
submitForm: (native?: boolean) => Promise<any>;
|
|
60
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], "change" | "field-input" | "field-change",
|
|
61
|
-
initValues: {
|
|
62
|
-
type: ObjectConstructor;
|
|
63
|
-
required: true;
|
|
64
|
-
default: () => {};
|
|
65
|
-
};
|
|
66
|
-
parentValues: {
|
|
67
|
-
type: ObjectConstructor;
|
|
68
|
-
default: () => {};
|
|
69
|
-
};
|
|
70
|
-
config: {
|
|
71
|
-
type: PropType<FormConfig>;
|
|
72
|
-
required: true;
|
|
73
|
-
default: () => never[];
|
|
74
|
-
};
|
|
75
|
-
labelWidth: {
|
|
76
|
-
type: StringConstructor;
|
|
77
|
-
default: () => string;
|
|
78
|
-
};
|
|
79
|
-
disabled: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
default: () => boolean;
|
|
82
|
-
};
|
|
83
|
-
height: {
|
|
84
|
-
type: StringConstructor;
|
|
85
|
-
default: () => string;
|
|
86
|
-
};
|
|
87
|
-
stepActive: {
|
|
88
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
89
|
-
default: () => number;
|
|
90
|
-
};
|
|
91
|
-
size: {
|
|
92
|
-
type: PropType<"small" | "default" | "large">;
|
|
93
|
-
};
|
|
94
|
-
inline: {
|
|
95
|
-
type: BooleanConstructor;
|
|
96
|
-
default: boolean;
|
|
97
|
-
};
|
|
98
|
-
labelPosition: {
|
|
99
|
-
type: StringConstructor;
|
|
100
|
-
default: string;
|
|
101
|
-
};
|
|
102
|
-
keyProp: {
|
|
103
|
-
type: StringConstructor;
|
|
104
|
-
default: string;
|
|
105
|
-
};
|
|
106
|
-
popperClass: {
|
|
107
|
-
type: StringConstructor;
|
|
108
|
-
};
|
|
109
|
-
}>> & {
|
|
110
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
111
|
-
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
112
|
-
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
113
|
-
}, {
|
|
199
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], "change" | "field-input" | "field-change", {
|
|
114
200
|
config: FormConfig;
|
|
115
|
-
initValues:
|
|
201
|
+
initValues: Object;
|
|
116
202
|
keyProp: string;
|
|
117
|
-
parentValues:
|
|
203
|
+
parentValues: Object;
|
|
118
204
|
labelWidth: string;
|
|
119
205
|
disabled: boolean;
|
|
120
|
-
height: string;
|
|
121
206
|
stepActive: string | number;
|
|
207
|
+
height: string;
|
|
122
208
|
inline: boolean;
|
|
123
209
|
labelPosition: string;
|
|
124
|
-
}
|
|
210
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
125
211
|
export default _default;
|
|
212
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
213
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
214
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
215
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
216
|
+
} : {
|
|
217
|
+
type: import('vue').PropType<T[K]>;
|
|
218
|
+
required: true;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
222
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
223
|
+
default: D[K];
|
|
224
|
+
} : P[K];
|
|
225
|
+
};
|