@vunk/form 0.0.1-alpha.4 → 0.0.1-alpha.41
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/components/button/index.d.ts +4 -0
- package/components/button/index.js +126 -0
- package/components/button/src/ctx.d.ts +91 -0
- package/components/button/src/ctx.js +39 -0
- package/components/button/src/index.vue.d.ts +241 -0
- package/components/button/src/types.d.ts +7 -0
- package/components/button/src/types.js +1 -0
- package/components/cascader/index.d.ts +4 -0
- package/components/cascader/index.js +108 -0
- package/components/cascader/src/ctx.d.ts +130 -0
- package/components/cascader/src/ctx.js +38 -0
- package/components/cascader/src/index.vue.d.ts +313 -0
- package/components/cascader/src/types.d.ts +1 -0
- package/components/cascader/src/types.js +1 -0
- package/components/checkbox/index.css +38 -0
- package/components/checkbox/index.d.ts +4 -0
- package/components/checkbox/index.js +127 -0
- package/components/checkbox/src/ctx.d.ts +82 -0
- package/components/checkbox/src/ctx.js +43 -0
- package/components/checkbox/src/index.vue.d.ts +213 -0
- package/components/checkbox/src/types.d.ts +1 -0
- package/components/checkbox/src/types.js +1 -0
- package/components/color-picker/index.d.ts +4 -0
- package/components/color-picker/index.js +77 -0
- package/components/color-picker/src/ctx.d.ts +74 -0
- package/components/color-picker/src/ctx.js +23 -0
- package/components/color-picker/src/index.vue.d.ts +196 -0
- package/components/color-picker/src/types.d.ts +1 -0
- package/components/color-picker/src/types.js +1 -0
- package/components/date-picker/index.js +26 -15
- package/components/date-picker/src/ctx.d.ts +64 -57
- package/components/date-picker/src/ctx.js +1 -1
- package/components/date-picker/src/index.vue.d.ts +183 -153
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/firt-ep/index.d.ts +4 -0
- package/components/firt-ep/index.js +80 -0
- package/components/firt-ep/src/ctx.d.ts +9 -0
- package/components/firt-ep/src/ctx.js +9 -0
- package/components/firt-ep/src/index.vue.d.ts +19 -0
- package/components/firt-ep/src/types.d.ts +1 -0
- package/components/firt-ep/src/types.js +1 -0
- package/components/form/index.js +37 -16
- package/components/form/src/ctx.d.ts +95 -81
- package/components/form/src/ctx.js +5 -2
- package/components/form/src/index.vue.d.ts +284 -250
- package/components/form-item/index.css +4 -0
- package/components/form-item/index.js +34 -13
- package/components/form-item/src/ctx.d.ts +15 -7
- package/components/form-item/src/ctx.js +8 -0
- package/components/form-item/src/index.vue.d.ts +44 -14
- package/components/form-item-renderer/index.js +34 -30
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +8 -8
- package/components/form-item-renderer/src/types.d.ts +2 -0
- package/components/form-item-renderer-template/index.js +13 -6
- package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
- package/components/form-item-renderer-template-default/index.js +130 -31
- package/components/form-item-renderer-template-default/src/index.vue.d.ts +7 -7
- package/components/form-item-renderer-template-layout/index.js +41 -24
- package/components/form-item-renderer-template-layout/src/ctx.d.ts +3 -2
- package/components/form-item-renderer-template-layout/src/ctx.js +1 -1
- package/components/form-item-renderer-template-layout/src/index.vue.d.ts +18 -6
- package/components/input/index.js +39 -14
- package/components/input/src/ctx.d.ts +96 -49
- package/components/input/src/ctx.js +13 -1
- package/components/input/src/index.vue.d.ts +234 -128
- package/components/input-number/index.css +17 -0
- package/components/input-number/index.js +46 -14
- package/components/input-number/src/ctx.d.ts +28 -16
- package/components/input-number/src/ctx.js +13 -1
- package/components/input-number/src/index.vue.d.ts +104 -44
- package/components/radio/index.css +29 -0
- package/components/radio/index.d.ts +4 -0
- package/components/radio/index.js +123 -0
- package/components/radio/src/ctx.d.ts +77 -0
- package/components/radio/src/ctx.js +39 -0
- package/components/radio/src/index.vue.d.ts +204 -0
- package/components/radio/src/types.d.ts +1 -0
- package/components/radio/src/types.js +1 -0
- package/components/select/index.css +11 -0
- package/components/select/index.js +69 -49
- package/components/select/src/ctx.d.ts +48 -36
- package/components/select/src/ctx.js +4 -0
- package/components/select/src/index.vue.d.ts +206 -129
- package/components/switch/index.css +11 -0
- package/components/switch/index.js +44 -16
- package/components/switch/src/ctx.d.ts +46 -11
- package/components/switch/src/ctx.js +13 -2
- package/components/switch/src/index.vue.d.ts +147 -37
- package/components/upload/index.css +29 -0
- package/components/upload/index.d.ts +5 -0
- package/components/upload/index.js +522 -0
- package/components/upload/src/ctx.d.ts +173 -0
- package/components/upload/src/ctx.js +41 -0
- package/components/upload/src/file.vue.d.ts +96 -0
- package/components/upload/src/index.vue.d.ts +421 -0
- package/components/upload/src/types.d.ts +1 -0
- package/components/upload/src/types.js +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/index.js +311 -7
- package/composables/useForm.d.ts +9 -0
- package/composables/useSourceManager.d.ts +2 -0
- package/index.css +146 -0
- package/index.d.ts +1 -0
- package/index.esm.js +4 -1
- package/package.json +4 -1
- package/shared/default-renderer-source/index.d.ts +12 -0
- package/shared/default-renderer-source/index.js +83 -0
- package/shared/element-plus/ctx.d.ts +86 -13
- package/shared/element-plus/index.js +18165 -32
- package/shared/element-plus/instances.d.ts +129 -27
- package/shared/infer-prop/index.d.ts +17 -0
- package/shared/infer-prop/index.js +34 -0
- package/shared/types/basic-source/index.d.ts +7 -0
- package/shared/types/basic-source/index.js +1 -0
- package/shared/types/ep-source/el-divider.d.ts +7 -0
- package/shared/types/ep-source/el-link.d.ts +8 -0
- package/shared/types/ep-source/index.d.ts +3 -0
- package/shared/types/ep-source/index.js +1 -0
- package/shared/types/form/checkbox.d.ts +13 -0
- package/shared/types/form/index.d.ts +2 -0
- package/shared/types/form/index.js +1 -0
- package/shared/types/form/radio.d.ts +8 -0
- package/shared/types/index.d.ts +2 -0
- package/shared/types/layout-source/index.d.ts +6 -4
- package/shared/types/renderer-source/button.d.ts +7 -0
- package/shared/types/renderer-source/cascader.d.ts +7 -0
- package/shared/types/renderer-source/checkbox.d.ts +7 -0
- package/shared/types/renderer-source/color-picker.d.ts +7 -0
- package/shared/types/renderer-source/compoent.d.ts +3 -0
- package/shared/types/renderer-source/date-picker.d.ts +3 -2
- package/shared/types/renderer-source/index.d.ts +13 -1
- package/shared/types/renderer-source/input-number.d.ts +3 -2
- package/shared/types/renderer-source/input.d.ts +3 -2
- package/shared/types/renderer-source/radio.d.ts +7 -0
- package/shared/types/renderer-source/select.d.ts +3 -2
- package/shared/types/renderer-source/switch.d.ts +3 -2
- package/shared/types/renderer-source/upload.d.ts +7 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CascaderNode } from 'element-plus';
|
|
1
2
|
import { PropType, Component } from 'vue';
|
|
2
3
|
export declare const datePickerProps: {
|
|
3
4
|
type: {
|
|
@@ -7,13 +8,13 @@ export declare const datePickerProps: {
|
|
|
7
8
|
disabledDate: {
|
|
8
9
|
readonly type: PropType<Function>;
|
|
9
10
|
readonly required: false;
|
|
10
|
-
readonly validator: (val: unknown) => boolean;
|
|
11
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
12
|
__epPropKey: true;
|
|
12
13
|
};
|
|
13
14
|
cellClassName: {
|
|
14
15
|
readonly type: PropType<Function>;
|
|
15
16
|
readonly required: false;
|
|
16
|
-
readonly validator: (val: unknown) => boolean;
|
|
17
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
18
|
__epPropKey: true;
|
|
18
19
|
};
|
|
19
20
|
shortcuts: import("element-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
@@ -25,25 +26,25 @@ export declare const datePickerProps: {
|
|
|
25
26
|
disabledHours: {
|
|
26
27
|
readonly type: PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledHours>;
|
|
27
28
|
readonly required: false;
|
|
28
|
-
readonly validator: (val: unknown) => boolean;
|
|
29
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
30
|
__epPropKey: true;
|
|
30
31
|
};
|
|
31
32
|
disabledMinutes: {
|
|
32
33
|
readonly type: PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledMinutes>;
|
|
33
34
|
readonly required: false;
|
|
34
|
-
readonly validator: (val: unknown) => boolean;
|
|
35
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
36
|
__epPropKey: true;
|
|
36
37
|
};
|
|
37
38
|
disabledSeconds: {
|
|
38
39
|
readonly type: PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledSeconds>;
|
|
39
40
|
readonly required: false;
|
|
40
|
-
readonly validator: (val: unknown) => boolean;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
42
|
__epPropKey: true;
|
|
42
43
|
};
|
|
43
44
|
id: {
|
|
44
45
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>>;
|
|
45
46
|
readonly required: false;
|
|
46
|
-
readonly validator: (val: unknown) => boolean;
|
|
47
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
48
|
__epPropKey: true;
|
|
48
49
|
};
|
|
49
50
|
name: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown, "", boolean>;
|
|
@@ -57,7 +58,7 @@ export declare const datePickerProps: {
|
|
|
57
58
|
size: {
|
|
58
59
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
59
60
|
readonly required: false;
|
|
60
|
-
readonly validator: (val: unknown) => boolean;
|
|
61
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
61
62
|
__epPropKey: true;
|
|
62
63
|
};
|
|
63
64
|
readonly: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -71,33 +72,33 @@ export declare const datePickerProps: {
|
|
|
71
72
|
defaultValue: {
|
|
72
73
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
73
74
|
readonly required: false;
|
|
74
|
-
readonly validator: (val: unknown) => boolean;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
75
76
|
__epPropKey: true;
|
|
76
77
|
};
|
|
77
78
|
defaultTime: {
|
|
78
79
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
79
80
|
readonly required: false;
|
|
80
|
-
readonly validator: (val: unknown) => boolean;
|
|
81
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
81
82
|
__epPropKey: true;
|
|
82
83
|
};
|
|
83
84
|
isRange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
84
85
|
};
|
|
85
86
|
export declare const datePickerEmits: {
|
|
86
|
-
'update:modelValue':
|
|
87
|
-
change:
|
|
88
|
-
focus:
|
|
89
|
-
blur:
|
|
90
|
-
'calendar-change':
|
|
91
|
-
'panel-change':
|
|
92
|
-
'visible-change':
|
|
93
|
-
keydown:
|
|
87
|
+
'update:modelValue': null;
|
|
88
|
+
change: null;
|
|
89
|
+
focus: null;
|
|
90
|
+
blur: null;
|
|
91
|
+
'calendar-change': null;
|
|
92
|
+
'panel-change': null;
|
|
93
|
+
'visible-change': null;
|
|
94
|
+
keydown: null;
|
|
94
95
|
};
|
|
95
96
|
export declare const selectProps: {
|
|
96
97
|
name: StringConstructor;
|
|
97
98
|
id: StringConstructor;
|
|
98
99
|
modelValue: {
|
|
99
|
-
type: (
|
|
100
|
-
default:
|
|
100
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
101
|
+
default: undefined;
|
|
101
102
|
};
|
|
102
103
|
autocomplete: {
|
|
103
104
|
type: StringConstructor;
|
|
@@ -169,16 +170,117 @@ export declare const selectProps: {
|
|
|
169
170
|
default: string;
|
|
170
171
|
type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
171
172
|
required: false;
|
|
172
|
-
validator: (val: unknown) => boolean;
|
|
173
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
173
174
|
__epPropKey: true;
|
|
174
175
|
};
|
|
175
176
|
};
|
|
176
177
|
export declare const selectEmits: {
|
|
177
|
-
'update:modelValue':
|
|
178
|
-
change:
|
|
179
|
-
'remove-tag':
|
|
180
|
-
clear:
|
|
181
|
-
'visible-change':
|
|
182
|
-
focus:
|
|
183
|
-
blur:
|
|
178
|
+
'update:modelValue': null;
|
|
179
|
+
change: null;
|
|
180
|
+
'remove-tag': null;
|
|
181
|
+
clear: null;
|
|
182
|
+
'visible-change': null;
|
|
183
|
+
focus: null;
|
|
184
|
+
blur: null;
|
|
185
|
+
};
|
|
186
|
+
export declare const colorPickerProps: {
|
|
187
|
+
modelValue: StringConstructor;
|
|
188
|
+
id: StringConstructor;
|
|
189
|
+
showAlpha: BooleanConstructor;
|
|
190
|
+
colorFormat: StringConstructor;
|
|
191
|
+
disabled: BooleanConstructor;
|
|
192
|
+
size: {
|
|
193
|
+
type: PropType<"" | "default" | "small" | "large">;
|
|
194
|
+
validator: (val: string) => val is "" | "default" | "small" | "large";
|
|
195
|
+
};
|
|
196
|
+
popperClass: StringConstructor;
|
|
197
|
+
label: {
|
|
198
|
+
type: StringConstructor;
|
|
199
|
+
default: undefined;
|
|
200
|
+
};
|
|
201
|
+
tabindex: {
|
|
202
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
203
|
+
default: number;
|
|
204
|
+
};
|
|
205
|
+
predefine: ArrayConstructor;
|
|
206
|
+
validateEvent: {
|
|
207
|
+
type: BooleanConstructor;
|
|
208
|
+
default: boolean;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
export declare const colorPickerEmits: {
|
|
212
|
+
change: null;
|
|
213
|
+
'active-change': null;
|
|
214
|
+
'update:modelValue': null;
|
|
215
|
+
};
|
|
216
|
+
export declare const cascaderProps: {
|
|
217
|
+
size: {
|
|
218
|
+
type: PropType<"" | "default" | "small" | "large">;
|
|
219
|
+
validator: (val: string) => val is "" | "default" | "small" | "large";
|
|
220
|
+
};
|
|
221
|
+
placeholder: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
};
|
|
224
|
+
disabled: BooleanConstructor;
|
|
225
|
+
clearable: BooleanConstructor;
|
|
226
|
+
filterable: BooleanConstructor;
|
|
227
|
+
filterMethod: {
|
|
228
|
+
type: PropType<(node: CascaderNode, keyword: string) => boolean>;
|
|
229
|
+
default: (node: CascaderNode, keyword: string) => boolean;
|
|
230
|
+
};
|
|
231
|
+
separator: {
|
|
232
|
+
type: StringConstructor;
|
|
233
|
+
default: string;
|
|
234
|
+
};
|
|
235
|
+
showAllLevels: {
|
|
236
|
+
type: BooleanConstructor;
|
|
237
|
+
default: boolean;
|
|
238
|
+
};
|
|
239
|
+
collapseTags: BooleanConstructor;
|
|
240
|
+
collapseTagsTooltip: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
debounce: {
|
|
245
|
+
type: NumberConstructor;
|
|
246
|
+
default: number;
|
|
247
|
+
};
|
|
248
|
+
beforeFilter: {
|
|
249
|
+
type: PropType<(value: string) => boolean | Promise<any>>;
|
|
250
|
+
default: () => boolean;
|
|
251
|
+
};
|
|
252
|
+
popperClass: {
|
|
253
|
+
type: StringConstructor;
|
|
254
|
+
default: string;
|
|
255
|
+
};
|
|
256
|
+
teleported: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
257
|
+
tagType: {
|
|
258
|
+
default: string;
|
|
259
|
+
type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
260
|
+
required: false;
|
|
261
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
262
|
+
__epPropKey: true;
|
|
263
|
+
};
|
|
264
|
+
validateEvent: {
|
|
265
|
+
type: BooleanConstructor;
|
|
266
|
+
default: boolean;
|
|
267
|
+
};
|
|
268
|
+
modelValue: PropType<import("element-plus/es/components/cascader-panel/src/node").CascaderValue>;
|
|
269
|
+
options: {
|
|
270
|
+
type: PropType<import("element-plus").CascaderOption[]>;
|
|
271
|
+
default: () => import("element-plus").CascaderOption[];
|
|
272
|
+
};
|
|
273
|
+
props: {
|
|
274
|
+
type: PropType<import("element-plus").CascaderProps>;
|
|
275
|
+
default: () => import("element-plus").CascaderProps;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
export declare const cascaderEmits: {
|
|
279
|
+
"update:modelValue": null;
|
|
280
|
+
change: null;
|
|
281
|
+
focus: null;
|
|
282
|
+
blur: null;
|
|
283
|
+
'visible-change': null;
|
|
284
|
+
'expand-change': null;
|
|
285
|
+
'remove-tag': null;
|
|
184
286
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentSource, FormItemRendererSource } from '@vunk/form/shared/types';
|
|
2
|
+
export interface PropInfo {
|
|
3
|
+
prop: string;
|
|
4
|
+
type: string;
|
|
5
|
+
precision?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type InferPropInfo = (item: Exclude<FormItemRendererSource, ComponentSource>) => Partial<PropInfo>;
|
|
8
|
+
export declare const propInfoAction: {
|
|
9
|
+
VkfSelect: InferPropInfo;
|
|
10
|
+
VkfRadio: InferPropInfo;
|
|
11
|
+
VkfCheckbox: InferPropInfo;
|
|
12
|
+
VkfColorPicker: InferPropInfo;
|
|
13
|
+
VkfInputNumber: InferPropInfo;
|
|
14
|
+
VkfSwitch: InferPropInfo;
|
|
15
|
+
VkfUpload: InferPropInfo;
|
|
16
|
+
VkfDatePicker: InferPropInfo;
|
|
17
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const inferString = (item) => ({
|
|
2
|
+
prop: item.prop,
|
|
3
|
+
type: "String"
|
|
4
|
+
});
|
|
5
|
+
const inferBoolean = (item) => ({
|
|
6
|
+
prop: item.prop,
|
|
7
|
+
type: "Boolean"
|
|
8
|
+
});
|
|
9
|
+
const inferNumber = (item) => {
|
|
10
|
+
const info = {
|
|
11
|
+
prop: item.prop,
|
|
12
|
+
type: "Number"
|
|
13
|
+
};
|
|
14
|
+
if (item.precision) {
|
|
15
|
+
info.precision = item.precision;
|
|
16
|
+
}
|
|
17
|
+
return info;
|
|
18
|
+
};
|
|
19
|
+
const inferDate = (item) => ({
|
|
20
|
+
prop: item.prop,
|
|
21
|
+
type: "Date"
|
|
22
|
+
});
|
|
23
|
+
const propInfoAction = {
|
|
24
|
+
VkfSelect: inferString,
|
|
25
|
+
VkfRadio: inferString,
|
|
26
|
+
VkfCheckbox: inferString,
|
|
27
|
+
VkfColorPicker: inferString,
|
|
28
|
+
VkfInputNumber: inferNumber,
|
|
29
|
+
VkfSwitch: inferBoolean,
|
|
30
|
+
VkfUpload: inferString,
|
|
31
|
+
VkfDatePicker: inferDate
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { propInfoAction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ElDivider } from 'element-plus';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface ElDividerSource extends VueComponentPropsType<typeof ElDivider>, BasicSource {
|
|
5
|
+
templateType: 'ElDivider';
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElLink } from 'element-plus';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface ElLinkSource extends VueComponentPropsType<typeof ElLink>, BasicSource {
|
|
5
|
+
templateType: 'ElLink';
|
|
6
|
+
label: string;
|
|
7
|
+
target?: '_blank';
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface CheckboxProps {
|
|
2
|
+
value?: string | number;
|
|
3
|
+
label?: string;
|
|
4
|
+
'trueLabel'?: string | number;
|
|
5
|
+
'falseLabel'?: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
border?: boolean;
|
|
8
|
+
size?: '' | 'default' | 'small' | 'large';
|
|
9
|
+
name?: string;
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
indeterminate?: boolean;
|
|
12
|
+
validateEvent?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/shared/types/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { VueComponentPropsType } from '@vunk/core';
|
|
2
2
|
import { ElCol, ElRow } from 'element-plus';
|
|
3
|
-
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface ElRowSource<S> extends VueComponentPropsType<typeof ElRow>, BasicSource {
|
|
4
5
|
templateType: 'ElRow';
|
|
5
6
|
templateSlots: S[];
|
|
6
7
|
}
|
|
7
|
-
export interface ElColSource<S> extends VueComponentPropsType<typeof ElCol
|
|
8
|
+
export interface ElColSource<S> extends VueComponentPropsType<typeof ElCol>, BasicSource {
|
|
8
9
|
templateType: 'ElCol';
|
|
9
10
|
templateSlots: S[];
|
|
10
11
|
}
|
|
@@ -22,9 +23,10 @@ interface VkfFlexItem {
|
|
|
22
23
|
basis?: string | IntrinsicSizing | GlobalValues | 'revert' | 'revert-layer' | 'content';
|
|
23
24
|
overflow?: 'hidden' | 'visible' | 'scroll' | 'auto' | string;
|
|
24
25
|
}
|
|
25
|
-
export interface VkfFlexSource<S> extends VkfFlex, VkfFlexItem {
|
|
26
|
+
export interface VkfFlexSource<S> extends VkfFlex, VkfFlexItem, BasicSource {
|
|
26
27
|
templateType: 'VkfFlex';
|
|
27
|
-
templateSlots
|
|
28
|
+
templateSlots?: S[];
|
|
29
|
+
[s: string]: any;
|
|
28
30
|
}
|
|
29
31
|
export declare type LayoutSourceEnhance<S> = ElRowSource<S> | ElColSource<S> | VkfFlexSource<S>;
|
|
30
32
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfButton } from '@vunk/form/components/button';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfButtonSource<P extends string = string> extends VueComponentPropsType<typeof VkfButton>, BasicSource {
|
|
5
|
+
prop?: P;
|
|
6
|
+
templateType: 'VkfButton';
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfCascader } from '@vunk/form/components/cascader';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfCascaderSource<P extends string = string> extends VueComponentPropsType<typeof VkfCascader>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfCascader';
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfCheckbox } from '@vunk/form/components/checkbox';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfCheckboxSource<P extends string = string> extends VueComponentPropsType<typeof VkfCheckbox>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfCheckbox';
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfColorPicker } from '@vunk/form/components/color-picker';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfColorPickerSource<P extends string = string> extends VueComponentPropsType<typeof VkfColorPicker>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfColorPicker';
|
|
7
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Merge } from '@vunk/core';
|
|
2
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
2
3
|
export declare type ComponentSource<C = undefined> = Merge<{
|
|
3
4
|
templateType: 'Component';
|
|
5
|
+
templateIf?: BasicSource['templateIf'];
|
|
4
6
|
is: any;
|
|
7
|
+
prop?: string;
|
|
5
8
|
}, C>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfDatePickerProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfDatePicker>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfDatePickerSource<P extends string = string> extends VkfDatePickerProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfDatePicker';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -4,10 +4,22 @@ import type { VkfInputSource } from './input';
|
|
|
4
4
|
import type { VkfSelectSource } from './select';
|
|
5
5
|
import type { VkfSwitchSource } from './switch';
|
|
6
6
|
import type { VkfInputNumberSource } from './input-number';
|
|
7
|
+
import type { VkfRadioSource } from './radio';
|
|
8
|
+
import type { VkfCheckboxSource } from './checkbox';
|
|
9
|
+
import type { VkfUploadSource } from './upload';
|
|
10
|
+
import type { VkfColorPickerSource } from './color-picker';
|
|
11
|
+
import type { VkfButtonSource } from './button';
|
|
12
|
+
import type { VkfCascaderSource } from './cascader';
|
|
7
13
|
export * from './compoent';
|
|
8
14
|
export * from './date-picker';
|
|
9
15
|
export * from './input';
|
|
10
16
|
export * from './select';
|
|
11
17
|
export * from './switch';
|
|
12
18
|
export * from './input-number';
|
|
13
|
-
export
|
|
19
|
+
export * from './radio';
|
|
20
|
+
export * from './checkbox';
|
|
21
|
+
export * from './upload';
|
|
22
|
+
export * from './color-picker';
|
|
23
|
+
export * from './button';
|
|
24
|
+
export * from './cascader';
|
|
25
|
+
export declare type FormItemRendererSource<P extends string = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | ComponentSource;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfInputNumber } from '@vunk/form/components/input-number';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfInputNumberProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInputNumber>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfInputNumberSource<P extends string = string> extends VkfInputNumberProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfInputNumber';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfInput } from '@vunk/form/components/input';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInput>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfInputSource<P extends string = string> extends VkfInputProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfInput';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import VkfRadio from '@vunk/form/components/radio';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfRadioSource<P extends string = string> extends VueComponentPropsType<typeof VkfRadio>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfRadio';
|
|
7
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfSelectProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSelect>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfSelectSource<P extends string = string> extends VkfSelectProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfSelect';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfSwitchProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSwitch>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfSwitchSource<P extends string = string> extends VkfSwitchProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfSwitch';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfUpload } from '@vunk/form/components/upload';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfUploadSource<P extends string = string> extends VueComponentPropsType<typeof VkfUpload>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfUpload';
|
|
7
|
+
}
|