@vunk/form 0.0.1-alpha.9 → 1.1.1
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/component.d.ts +1 -1
- package/components/button/index.d.ts +4 -0
- package/components/button/index.js +126 -0
- package/components/button/src/ctx.d.ts +92 -0
- package/components/button/src/ctx.js +39 -0
- package/components/button/src/index.vue.d.ts +245 -0
- package/components/button/src/types.d.ts +13 -0
- package/components/cascader/index.d.ts +4 -0
- package/components/cascader/index.js +114 -0
- package/components/cascader/src/ctx.d.ts +129 -0
- package/components/cascader/src/ctx.js +38 -0
- package/components/cascader/src/index.vue.d.ts +311 -0
- package/components/cascader/src/types.d.ts +7 -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 +8 -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 +72 -0
- package/components/color-picker/src/ctx.js +23 -0
- package/components/color-picker/src/index.vue.d.ts +193 -0
- package/components/color-picker/src/types.d.ts +7 -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 +176 -146
- package/components/date-picker/src/types.d.ts +14 -8
- package/components/form/index.d.ts +1 -0
- package/components/form/index.js +44 -19
- package/components/form/src/ctx.d.ts +147 -97
- package/components/form/src/ctx.js +5 -2
- package/components/form/src/index.vue.d.ts +424 -287
- package/components/form/src/types.d.ts +2 -0
- package/components/form/src/types.js +1 -0
- 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 +9 -9
- 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/geoinput/index.d.ts +4 -0
- package/components/geoinput/index.js +94 -0
- package/components/geoinput/src/ctx.d.ts +218 -0
- package/components/geoinput/src/ctx.js +39 -0
- package/components/geoinput/src/index.vue.d.ts +608 -0
- package/components/geoinput/src/types.d.ts +12 -0
- package/components/geoinput/src/types.js +1 -0
- package/components/geoinput-read/index.css +9 -0
- package/components/geoinput-read/index.d.ts +5 -0
- package/components/geoinput-read/index.js +355 -0
- package/components/geoinput-read/src/append.vue.d.ts +6 -0
- package/components/geoinput-read/src/core.vue.d.ts +457 -0
- package/components/geoinput-read/src/ctx.d.ts +205 -0
- package/components/geoinput-read/src/ctx.js +62 -0
- package/components/geoinput-read/src/index.vue.d.ts +486 -0
- package/components/geoinput-read/src/types.d.ts +3 -0
- package/components/geoinput-read/src/types.js +1 -0
- package/components/geoinput-update/index.css +44 -0
- package/components/geoinput-update/index.d.ts +5 -0
- package/components/geoinput-update/index.js +982 -0
- package/components/geoinput-update/src/append.vue.d.ts +20 -0
- package/components/geoinput-update/src/ctx.d.ts +211 -0
- package/components/geoinput-update/src/ctx.js +85 -0
- package/components/geoinput-update/src/index.vue.d.ts +483 -0
- package/components/geoinput-update/src/types.d.ts +6 -0
- package/components/geoinput-update/src/types.js +1 -0
- package/components/input/index.js +29 -15
- package/components/input/src/ctx.d.ts +88 -49
- package/components/input/src/ctx.js +5 -1
- package/components/input/src/index.vue.d.ts +219 -129
- package/components/input/src/types.d.ts +7 -1
- package/components/input-link/index.css +5 -0
- package/components/input-link/index.d.ts +4 -0
- package/components/input-link/index.js +181 -0
- package/components/input-link/src/ctx.d.ts +143 -0
- package/components/input-link/src/ctx.js +46 -0
- package/components/input-link/src/index.vue.d.ts +373 -0
- package/components/input-link/src/types.d.ts +7 -0
- package/components/input-link/src/types.js +1 -0
- package/components/input-number/index.css +17 -0
- package/components/input-number/index.js +46 -14
- package/components/input-number/src/ctx.d.ts +22 -10
- package/components/input-number/src/ctx.js +13 -1
- package/components/input-number/src/index.vue.d.ts +92 -32
- package/components/input-number/src/types.d.ts +7 -0
- 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 +8 -0
- package/components/radio/src/types.js +1 -0
- package/components/select/index.css +11 -0
- package/components/select/index.js +75 -49
- package/components/select/src/ctx.d.ts +37 -25
- package/components/select/src/ctx.js +4 -0
- package/components/select/src/index.vue.d.ts +181 -104
- package/components/select/src/types.d.ts +7 -1
- package/components/switch/index.css +11 -0
- package/components/switch/index.js +40 -29
- package/components/switch/src/ctx.d.ts +41 -13
- package/components/switch/src/ctx.js +3 -4
- package/components/switch/src/index.vue.d.ts +123 -49
- package/components/switch/src/types.d.ts +7 -0
- package/components/templates-default/index.d.ts +4 -0
- package/components/templates-default/index.js +244 -0
- package/components/{form-item-renderer-template-default → templates-default}/src/index.vue.d.ts +7 -7
- package/components/templates-default/src/types.d.ts +31 -0
- package/components/templates-default/src/types.js +1 -0
- package/components/templates-element-plus/index.d.ts +4 -0
- package/components/templates-element-plus/index.js +80 -0
- package/components/{form-item-renderer-template-layout → templates-element-plus}/src/ctx.d.ts +3 -2
- package/components/{form-item-renderer-template-layout → templates-element-plus}/src/ctx.js +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +19 -0
- package/components/templates-element-plus/src/types.d.ts +13 -0
- package/components/templates-element-plus/src/types.js +1 -0
- package/components/templates-layout/index.css +5 -0
- package/components/templates-layout/index.d.ts +4 -0
- package/components/templates-layout/index.js +108 -0
- package/components/templates-layout/src/ctx.d.ts +9 -0
- package/components/templates-layout/src/ctx.js +9 -0
- package/components/templates-layout/src/index.vue.d.ts +19 -0
- package/{shared/types/layout-source/index.d.ts → components/templates-layout/src/types.d.ts} +5 -4
- package/components/templates-layout/src/types.js +1 -0
- package/components/templates-mapbox/index.d.ts +4 -0
- package/components/templates-mapbox/index.js +64 -0
- package/components/templates-mapbox/src/ctx.d.ts +11 -0
- package/components/templates-mapbox/src/ctx.js +11 -0
- package/components/templates-mapbox/src/index.vue.d.ts +20 -0
- package/components/templates-mapbox/src/types.d.ts +3 -0
- package/components/templates-mapbox/src/types.js +1 -0
- package/components/upload/index.css +33 -0
- package/components/upload/index.d.ts +5 -0
- package/components/upload/index.js +606 -0
- package/components/upload/src/ctx.d.ts +168 -0
- package/components/upload/src/ctx.js +45 -0
- package/components/upload/src/file.vue.d.ts +96 -0
- package/components/upload/src/index.vue.d.ts +416 -0
- package/components/upload/src/types.d.ts +7 -0
- package/components/upload/src/types.js +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/index.js +28 -6
- package/composables/useForm.d.ts +9 -0
- package/composables/useSourceManager.d.ts +2 -0
- package/index.css +211 -2
- package/index.d.ts +14 -1
- package/index.esm.js +16 -5
- package/package.json +4 -1
- package/shared/element-plus/ctx.d.ts +86 -13
- package/shared/element-plus/index.js +18156 -35
- package/shared/element-plus/instances.d.ts +97 -26
- package/shared/helper/index.d.ts +1 -0
- package/shared/infer-prop/index.d.ts +17 -0
- package/shared/infer-prop/index.js +34 -0
- package/shared/progress-it/index.d.ts +16 -0
- package/shared/progress-it/index.js +57 -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 +1 -2
- package/shared/types/source/index.d.ts +13 -0
- package/shared/types/source/index.js +1 -0
- package/components/form-item-renderer-template-default/index.d.ts +0 -4
- package/components/form-item-renderer-template-default/index.js +0 -129
- package/components/form-item-renderer-template-default/src/types.d.ts +0 -1
- package/components/form-item-renderer-template-layout/index.css +0 -7
- package/components/form-item-renderer-template-layout/index.d.ts +0 -4
- package/components/form-item-renderer-template-layout/index.js +0 -91
- package/components/form-item-renderer-template-layout/src/index.vue.d.ts +0 -7
- package/components/form-item-renderer-template-layout/src/types.d.ts +0 -1
- package/shared/types/renderer-source/compoent.d.ts +0 -5
- package/shared/types/renderer-source/date-picker.d.ts +0 -7
- package/shared/types/renderer-source/index.d.ts +0 -13
- package/shared/types/renderer-source/input-number.d.ts +0 -7
- package/shared/types/renderer-source/input.d.ts +0 -7
- package/shared/types/renderer-source/select.d.ts +0 -7
- package/shared/types/renderer-source/switch.d.ts +0 -7
- /package/components/{form-item-renderer-template-default → button}/src/types.js +0 -0
- /package/components/{form-item-renderer-template-layout → cascader}/src/types.js +0 -0
- /package/{shared/types/layout-source/index.js → components/checkbox/src/types.js} +0 -0
- /package/{shared/types/renderer-source/index.js → components/color-picker/src/types.js} +0 -0
- /package/components/{form-item-renderer-template-default → templates-default}/src/ctx.d.ts +0 -0
- /package/components/{form-item-renderer-template-default → templates-default}/src/ctx.js +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ComputedRef } from 'vue';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
options: {
|
|
4
3
|
type: import("vue").PropType<import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -14,16 +13,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
13
|
};
|
|
15
14
|
}, {
|
|
16
15
|
ns: {
|
|
17
|
-
namespace: ComputedRef<string>;
|
|
18
|
-
b: (blockSuffix?: string) => string;
|
|
19
|
-
e: (element?: string) => string;
|
|
20
|
-
m: (modifier?: string) => string;
|
|
21
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
22
|
-
em: (element?: string, modifier?: string) => string;
|
|
23
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
24
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
16
|
+
namespace: import("vue").ComputedRef<string>;
|
|
17
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
18
|
+
e: (element?: string | undefined) => string;
|
|
19
|
+
m: (modifier?: string | undefined) => string;
|
|
20
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
21
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
22
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
23
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
25
24
|
is: {
|
|
26
|
-
(name: string, state: boolean): string;
|
|
25
|
+
(name: string, state: boolean | undefined): string;
|
|
27
26
|
(name: string): string;
|
|
28
27
|
};
|
|
29
28
|
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
@@ -31,10 +30,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
30
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
32
31
|
cssVarBlockName: (name: string) => string;
|
|
33
32
|
};
|
|
34
|
-
currentLabel: ComputedRef<any>;
|
|
35
|
-
itemSelected: ComputedRef<boolean>;
|
|
36
|
-
isDisabled: ComputedRef<any>;
|
|
37
|
-
select: import("element-plus").SelectContext;
|
|
33
|
+
currentLabel: import("vue").ComputedRef<any>;
|
|
34
|
+
itemSelected: import("vue").ComputedRef<boolean>;
|
|
35
|
+
isDisabled: import("vue").ComputedRef<any>;
|
|
36
|
+
select: import("element-plus").SelectContext | undefined;
|
|
38
37
|
hoverItem: () => void;
|
|
39
38
|
visible: import("vue").Ref<boolean>;
|
|
40
39
|
hover: import("vue").Ref<boolean>;
|
|
@@ -61,17 +60,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
60
|
disabled: boolean;
|
|
62
61
|
created: boolean;
|
|
63
62
|
}>>>[]>;
|
|
64
|
-
default: () =>
|
|
63
|
+
default: () => never[];
|
|
65
64
|
};
|
|
66
65
|
selectSlots: {
|
|
67
66
|
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
68
|
-
default:
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
optionsUrl: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
69
72
|
};
|
|
70
73
|
name: StringConstructor;
|
|
71
74
|
id: StringConstructor;
|
|
72
75
|
modelValue: {
|
|
73
76
|
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor | ArrayConstructor)[];
|
|
74
|
-
default:
|
|
77
|
+
default: undefined;
|
|
75
78
|
};
|
|
76
79
|
autocomplete: {
|
|
77
80
|
type: StringConstructor;
|
|
@@ -143,7 +146,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
146
|
default: string;
|
|
144
147
|
type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
145
148
|
required: false;
|
|
146
|
-
validator: (val: unknown) => boolean;
|
|
149
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
147
150
|
__epPropKey: true;
|
|
148
151
|
};
|
|
149
152
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
@@ -152,20 +155,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
155
|
prop: {
|
|
153
156
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
154
157
|
readonly required: false;
|
|
155
|
-
readonly validator: (val: unknown) => boolean;
|
|
158
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
156
159
|
__epPropKey: true;
|
|
157
160
|
};
|
|
158
161
|
rules: {
|
|
159
|
-
readonly type: import("vue").PropType<unknown
|
|
162
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
160
163
|
readonly required: false;
|
|
161
|
-
readonly validator: (val: unknown) => boolean;
|
|
164
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
162
165
|
__epPropKey: true;
|
|
163
166
|
};
|
|
164
167
|
error: StringConstructor;
|
|
165
168
|
validateStatus: {
|
|
166
169
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
167
170
|
readonly required: false;
|
|
168
|
-
readonly validator: (val: unknown) => boolean;
|
|
171
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
169
172
|
__epPropKey: true;
|
|
170
173
|
};
|
|
171
174
|
for: StringConstructor;
|
|
@@ -177,25 +180,82 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
180
|
};
|
|
178
181
|
formItemSlots: {
|
|
179
182
|
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
180
|
-
default:
|
|
183
|
+
default: undefined;
|
|
181
184
|
};
|
|
182
185
|
elRef: {
|
|
183
186
|
type: import("vue").PropType<any>;
|
|
184
187
|
required: boolean;
|
|
185
188
|
};
|
|
189
|
+
inline: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: boolean;
|
|
192
|
+
};
|
|
193
|
+
readonly: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: undefined;
|
|
196
|
+
};
|
|
186
197
|
}, {
|
|
187
|
-
formItemBindProps: ComputedRef<{
|
|
188
|
-
|
|
198
|
+
formItemBindProps: import("vue").ComputedRef<{
|
|
199
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
200
|
+
label: string | undefined;
|
|
201
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
202
|
+
prop: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown> | undefined;
|
|
203
|
+
rules: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown> | undefined;
|
|
204
|
+
error: string | undefined;
|
|
205
|
+
validateStatus: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown> | undefined;
|
|
206
|
+
for: string | undefined;
|
|
207
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
208
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
209
|
+
formItemSize: "default" | "small" | "large";
|
|
210
|
+
formItemSlots: import("../../form-item/src/types").FormItemSlots | undefined;
|
|
211
|
+
elRef: any;
|
|
212
|
+
inline: boolean;
|
|
213
|
+
readonly: boolean | undefined;
|
|
214
|
+
}>;
|
|
215
|
+
selectBindProps: import("vue").ComputedRef<{
|
|
216
|
+
size: "" | "default" | "small" | "large" | undefined;
|
|
217
|
+
name: string | undefined;
|
|
218
|
+
loading: boolean;
|
|
219
|
+
multiple: boolean;
|
|
220
|
+
id: string | undefined;
|
|
221
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
|
|
222
|
+
autocomplete: string;
|
|
223
|
+
placeholder: string | undefined;
|
|
224
|
+
clearable: boolean;
|
|
225
|
+
suffixIcon: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
226
|
+
automaticDropdown: boolean;
|
|
227
|
+
effect: string;
|
|
228
|
+
filterable: boolean;
|
|
229
|
+
allowCreate: boolean;
|
|
230
|
+
popperClass: string;
|
|
231
|
+
remote: boolean;
|
|
232
|
+
loadingText: string | undefined;
|
|
233
|
+
noMatchText: string | undefined;
|
|
234
|
+
noDataText: string | undefined;
|
|
235
|
+
remoteMethod: Function | undefined;
|
|
236
|
+
filterMethod: Function | undefined;
|
|
237
|
+
multipleLimit: number;
|
|
238
|
+
defaultFirstOption: boolean;
|
|
239
|
+
reserveKeyword: boolean;
|
|
240
|
+
valueKey: string;
|
|
241
|
+
collapseTags: boolean;
|
|
242
|
+
collapseTagsTooltip: boolean;
|
|
243
|
+
teleported: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
244
|
+
persistent: boolean;
|
|
245
|
+
clearIcon: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
246
|
+
fitInputWidth: boolean;
|
|
247
|
+
tagType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>;
|
|
248
|
+
}>;
|
|
189
249
|
selectOnEmits: {
|
|
190
|
-
|
|
191
|
-
change: (
|
|
192
|
-
focus: (
|
|
193
|
-
|
|
194
|
-
"
|
|
195
|
-
|
|
196
|
-
"remove-tag": (
|
|
197
|
-
};
|
|
198
|
-
selectOptions: ComputedRef<(import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
250
|
+
blur: (...e: any[]) => void;
|
|
251
|
+
change: (...e: any[]) => void;
|
|
252
|
+
focus: (...e: any[]) => void;
|
|
253
|
+
clear: (...e: any[]) => void;
|
|
254
|
+
"update:modelValue": (...e: any[]) => void;
|
|
255
|
+
"visible-change": (...e: any[]) => void;
|
|
256
|
+
"remove-tag": (...e: any[]) => void;
|
|
257
|
+
};
|
|
258
|
+
selectOptions: import("vue").ComputedRef<(import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
199
259
|
value: {
|
|
200
260
|
required: true;
|
|
201
261
|
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
@@ -208,16 +268,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
208
268
|
};
|
|
209
269
|
}, {
|
|
210
270
|
ns: {
|
|
211
|
-
namespace: ComputedRef<string>;
|
|
212
|
-
b: (blockSuffix?: string) => string;
|
|
213
|
-
e: (element?: string) => string;
|
|
214
|
-
m: (modifier?: string) => string;
|
|
215
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
216
|
-
em: (element?: string, modifier?: string) => string;
|
|
217
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
218
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
271
|
+
namespace: import("vue").ComputedRef<string>;
|
|
272
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
273
|
+
e: (element?: string | undefined) => string;
|
|
274
|
+
m: (modifier?: string | undefined) => string;
|
|
275
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
276
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
277
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
278
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
219
279
|
is: {
|
|
220
|
-
(name: string, state: boolean): string;
|
|
280
|
+
(name: string, state: boolean | undefined): string;
|
|
221
281
|
(name: string): string;
|
|
222
282
|
};
|
|
223
283
|
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
@@ -225,10 +285,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
225
285
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
226
286
|
cssVarBlockName: (name: string) => string;
|
|
227
287
|
};
|
|
228
|
-
currentLabel: ComputedRef<any>;
|
|
229
|
-
itemSelected: ComputedRef<boolean>;
|
|
230
|
-
isDisabled: ComputedRef<any>;
|
|
231
|
-
select: import("element-plus").SelectContext;
|
|
288
|
+
currentLabel: import("vue").ComputedRef<any>;
|
|
289
|
+
itemSelected: import("vue").ComputedRef<boolean>;
|
|
290
|
+
isDisabled: import("vue").ComputedRef<any>;
|
|
291
|
+
select: import("element-plus").SelectContext | undefined;
|
|
232
292
|
hoverItem: () => void;
|
|
233
293
|
visible: import("vue").Ref<boolean>;
|
|
234
294
|
hover: import("vue").Ref<boolean>;
|
|
@@ -257,14 +317,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
257
317
|
}>>> & {
|
|
258
318
|
key: any;
|
|
259
319
|
})[]>;
|
|
320
|
+
reshow: import("vue").Ref<boolean>;
|
|
321
|
+
readonly: import("vue").ComputedRef<boolean>;
|
|
260
322
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
261
|
-
'update:modelValue':
|
|
262
|
-
change:
|
|
263
|
-
'remove-tag':
|
|
264
|
-
clear:
|
|
265
|
-
'visible-change':
|
|
266
|
-
focus:
|
|
267
|
-
blur:
|
|
323
|
+
'update:modelValue': null;
|
|
324
|
+
change: null;
|
|
325
|
+
'remove-tag': null;
|
|
326
|
+
clear: null;
|
|
327
|
+
'visible-change': null;
|
|
328
|
+
focus: null;
|
|
329
|
+
blur: null;
|
|
268
330
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
269
331
|
options: {
|
|
270
332
|
type: import("vue").PropType<import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -280,16 +342,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
280
342
|
};
|
|
281
343
|
}, {
|
|
282
344
|
ns: {
|
|
283
|
-
namespace: ComputedRef<string>;
|
|
284
|
-
b: (blockSuffix?: string) => string;
|
|
285
|
-
e: (element?: string) => string;
|
|
286
|
-
m: (modifier?: string) => string;
|
|
287
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
288
|
-
em: (element?: string, modifier?: string) => string;
|
|
289
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
290
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
345
|
+
namespace: import("vue").ComputedRef<string>;
|
|
346
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
347
|
+
e: (element?: string | undefined) => string;
|
|
348
|
+
m: (modifier?: string | undefined) => string;
|
|
349
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
350
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
351
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
352
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
291
353
|
is: {
|
|
292
|
-
(name: string, state: boolean): string;
|
|
354
|
+
(name: string, state: boolean | undefined): string;
|
|
293
355
|
(name: string): string;
|
|
294
356
|
};
|
|
295
357
|
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
@@ -297,10 +359,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
297
359
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
298
360
|
cssVarBlockName: (name: string) => string;
|
|
299
361
|
};
|
|
300
|
-
currentLabel: ComputedRef<any>;
|
|
301
|
-
itemSelected: ComputedRef<boolean>;
|
|
302
|
-
isDisabled: ComputedRef<any>;
|
|
303
|
-
select: import("element-plus").SelectContext;
|
|
362
|
+
currentLabel: import("vue").ComputedRef<any>;
|
|
363
|
+
itemSelected: import("vue").ComputedRef<boolean>;
|
|
364
|
+
isDisabled: import("vue").ComputedRef<any>;
|
|
365
|
+
select: import("element-plus").SelectContext | undefined;
|
|
304
366
|
hoverItem: () => void;
|
|
305
367
|
visible: import("vue").Ref<boolean>;
|
|
306
368
|
hover: import("vue").Ref<boolean>;
|
|
@@ -327,17 +389,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
327
389
|
disabled: boolean;
|
|
328
390
|
created: boolean;
|
|
329
391
|
}>>>[]>;
|
|
330
|
-
default: () =>
|
|
392
|
+
default: () => never[];
|
|
331
393
|
};
|
|
332
394
|
selectSlots: {
|
|
333
395
|
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
334
|
-
default:
|
|
396
|
+
default: undefined;
|
|
397
|
+
};
|
|
398
|
+
optionsUrl: {
|
|
399
|
+
type: StringConstructor;
|
|
400
|
+
default: string;
|
|
335
401
|
};
|
|
336
402
|
name: StringConstructor;
|
|
337
403
|
id: StringConstructor;
|
|
338
404
|
modelValue: {
|
|
339
405
|
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor | ArrayConstructor)[];
|
|
340
|
-
default:
|
|
406
|
+
default: undefined;
|
|
341
407
|
};
|
|
342
408
|
autocomplete: {
|
|
343
409
|
type: StringConstructor;
|
|
@@ -409,7 +475,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
409
475
|
default: string;
|
|
410
476
|
type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
411
477
|
required: false;
|
|
412
|
-
validator: (val: unknown) => boolean;
|
|
478
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
413
479
|
__epPropKey: true;
|
|
414
480
|
};
|
|
415
481
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
@@ -418,20 +484,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
418
484
|
prop: {
|
|
419
485
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
420
486
|
readonly required: false;
|
|
421
|
-
readonly validator: (val: unknown) => boolean;
|
|
487
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
422
488
|
__epPropKey: true;
|
|
423
489
|
};
|
|
424
490
|
rules: {
|
|
425
|
-
readonly type: import("vue").PropType<unknown
|
|
491
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
426
492
|
readonly required: false;
|
|
427
|
-
readonly validator: (val: unknown) => boolean;
|
|
493
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
428
494
|
__epPropKey: true;
|
|
429
495
|
};
|
|
430
496
|
error: StringConstructor;
|
|
431
497
|
validateStatus: {
|
|
432
498
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
433
499
|
readonly required: false;
|
|
434
|
-
readonly validator: (val: unknown) => boolean;
|
|
500
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
435
501
|
__epPropKey: true;
|
|
436
502
|
};
|
|
437
503
|
for: StringConstructor;
|
|
@@ -443,20 +509,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
443
509
|
};
|
|
444
510
|
formItemSlots: {
|
|
445
511
|
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
446
|
-
default:
|
|
512
|
+
default: undefined;
|
|
447
513
|
};
|
|
448
514
|
elRef: {
|
|
449
515
|
type: import("vue").PropType<any>;
|
|
450
516
|
required: boolean;
|
|
451
517
|
};
|
|
518
|
+
inline: {
|
|
519
|
+
type: BooleanConstructor;
|
|
520
|
+
default: boolean;
|
|
521
|
+
};
|
|
522
|
+
readonly: {
|
|
523
|
+
type: BooleanConstructor;
|
|
524
|
+
default: undefined;
|
|
525
|
+
};
|
|
452
526
|
}>> & {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
onFocus?: ((...args: any[]) => any) |
|
|
456
|
-
onBlur?: ((...args: any[]) => any) |
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
"onRemove-tag"?: ((...args: any[]) => any) |
|
|
527
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
528
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
529
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
530
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
531
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
532
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
533
|
+
"onRemove-tag"?: ((...args: any[]) => any) | undefined;
|
|
460
534
|
}, {
|
|
461
535
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
462
536
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
@@ -464,20 +538,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
464
538
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
465
539
|
formItemSize: "default" | "small" | "large";
|
|
466
540
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
clearIcon: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
541
|
+
inline: boolean;
|
|
542
|
+
readonly: boolean;
|
|
470
543
|
disabled: boolean;
|
|
471
|
-
modelValue: string | number | boolean | Record<string, any> | unknown[];
|
|
472
|
-
autocomplete: string;
|
|
473
|
-
suffixIcon: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
474
544
|
loading: boolean;
|
|
545
|
+
multiple: boolean;
|
|
546
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
547
|
+
autocomplete: string;
|
|
548
|
+
clearable: boolean;
|
|
549
|
+
suffixIcon: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
475
550
|
automaticDropdown: boolean;
|
|
476
551
|
effect: string;
|
|
477
552
|
filterable: boolean;
|
|
478
553
|
allowCreate: boolean;
|
|
554
|
+
popperClass: string;
|
|
479
555
|
remote: boolean;
|
|
480
|
-
multiple: boolean;
|
|
481
556
|
multipleLimit: number;
|
|
482
557
|
defaultFirstOption: boolean;
|
|
483
558
|
reserveKeyword: boolean;
|
|
@@ -486,6 +561,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
486
561
|
collapseTagsTooltip: boolean;
|
|
487
562
|
teleported: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
488
563
|
persistent: boolean;
|
|
564
|
+
clearIcon: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
489
565
|
fitInputWidth: boolean;
|
|
490
566
|
tagType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "info" | "danger", unknown>;
|
|
491
567
|
options: import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -501,16 +577,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
501
577
|
};
|
|
502
578
|
}, {
|
|
503
579
|
ns: {
|
|
504
|
-
namespace: ComputedRef<string>;
|
|
505
|
-
b: (blockSuffix?: string) => string;
|
|
506
|
-
e: (element?: string) => string;
|
|
507
|
-
m: (modifier?: string) => string;
|
|
508
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
509
|
-
em: (element?: string, modifier?: string) => string;
|
|
510
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
511
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
580
|
+
namespace: import("vue").ComputedRef<string>;
|
|
581
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
582
|
+
e: (element?: string | undefined) => string;
|
|
583
|
+
m: (modifier?: string | undefined) => string;
|
|
584
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
585
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
586
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
587
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
512
588
|
is: {
|
|
513
|
-
(name: string, state: boolean): string;
|
|
589
|
+
(name: string, state: boolean | undefined): string;
|
|
514
590
|
(name: string): string;
|
|
515
591
|
};
|
|
516
592
|
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
@@ -518,10 +594,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
518
594
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
519
595
|
cssVarBlockName: (name: string) => string;
|
|
520
596
|
};
|
|
521
|
-
currentLabel: ComputedRef<any>;
|
|
522
|
-
itemSelected: ComputedRef<boolean>;
|
|
523
|
-
isDisabled: ComputedRef<any>;
|
|
524
|
-
select: import("element-plus").SelectContext;
|
|
597
|
+
currentLabel: import("vue").ComputedRef<any>;
|
|
598
|
+
itemSelected: import("vue").ComputedRef<boolean>;
|
|
599
|
+
isDisabled: import("vue").ComputedRef<any>;
|
|
600
|
+
select: import("element-plus").SelectContext | undefined;
|
|
525
601
|
hoverItem: () => void;
|
|
526
602
|
visible: import("vue").Ref<boolean>;
|
|
527
603
|
hover: import("vue").Ref<boolean>;
|
|
@@ -548,6 +624,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
548
624
|
disabled: boolean;
|
|
549
625
|
created: boolean;
|
|
550
626
|
}>>>[];
|
|
551
|
-
selectSlots:
|
|
627
|
+
selectSlots: import("./types").SelectSlots;
|
|
628
|
+
optionsUrl: string;
|
|
552
629
|
}>;
|
|
553
630
|
export default _default;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { Func } from '@vunk/core';
|
|
1
|
+
import type { Func, VueComponentPropsType } from '@vunk/core';
|
|
2
|
+
import { BasicSource } from '@vunk/form/shared';
|
|
3
|
+
import VkfSelect from './index.vue';
|
|
2
4
|
export declare type SelectSlots = {
|
|
3
5
|
prefix?: Func;
|
|
4
6
|
empty?: Func;
|
|
5
7
|
};
|
|
8
|
+
export interface Source<P extends string = string> extends VueComponentPropsType<typeof VkfSelect>, BasicSource {
|
|
9
|
+
prop: P;
|
|
10
|
+
templateType: 'VkfSelect';
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
.el-switch.is-readonly{
|
|
3
|
+
--el-readonly-cursor: auto;
|
|
4
|
+
}
|
|
5
|
+
.el-switch.is-readonly.is-readonly{
|
|
6
|
+
opacity: .9;
|
|
7
|
+
}
|
|
8
|
+
.el-switch.is-readonly.is-readonly .el-switch__core,
|
|
9
|
+
.el-switch.is-readonly.is-readonly .el-switch__label{
|
|
10
|
+
cursor: var(--el-readonly-cursor);
|
|
11
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { switchProps, switchEmits, ElSwitch } from 'element-plus';
|
|
2
|
+
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
3
|
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, renderSlot } from 'vue';
|
|
3
|
-
import { VkfFormItem, _VkfFormItemCtx } from '@vunk/form/components/form-item';
|
|
4
4
|
import { createSwitchBindProps, createSwitchOnEmits } from '@vunk/form/shared/element-plus';
|
|
5
|
+
import { useComputedReadonly } from '@vunk/form/composables';
|
|
5
6
|
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __defProps = Object.defineProperties;
|
|
@@ -22,19 +23,25 @@ var __spreadValues = (a, b) => {
|
|
|
22
23
|
return a;
|
|
23
24
|
};
|
|
24
25
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
const props = __spreadProps(__spreadValues(__spreadValues({},
|
|
26
|
+
const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), switchProps), {
|
|
26
27
|
modelValue: {
|
|
27
|
-
type: Boolean,
|
|
28
28
|
default: void 0
|
|
29
29
|
},
|
|
30
30
|
defaultModelValue: {
|
|
31
|
-
type: Boolean,
|
|
32
31
|
default: false
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
const emits = __spreadValues({}, switchEmits);
|
|
36
35
|
|
|
37
|
-
var
|
|
36
|
+
var _export_sfc = (sfc, props) => {
|
|
37
|
+
const target = sfc.__vccOpts || sfc;
|
|
38
|
+
for (const [key, val] of props) {
|
|
39
|
+
target[key] = val;
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const _sfc_main = defineComponent({
|
|
38
45
|
name: "VkfSwitch",
|
|
39
46
|
components: {
|
|
40
47
|
ElSwitch,
|
|
@@ -44,46 +51,50 @@ var script = defineComponent({
|
|
|
44
51
|
props,
|
|
45
52
|
setup(props2, { emit }) {
|
|
46
53
|
const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
|
|
47
|
-
const switchBindProps = createSwitchBindProps(props2, [
|
|
54
|
+
const switchBindProps = createSwitchBindProps(props2, [
|
|
55
|
+
"modelValue",
|
|
56
|
+
"disabled"
|
|
57
|
+
]);
|
|
48
58
|
const switchOnEmits = createSwitchOnEmits(emit);
|
|
59
|
+
const readonly = useComputedReadonly(props2);
|
|
49
60
|
return {
|
|
50
61
|
formItemBindProps,
|
|
51
62
|
switchBindProps,
|
|
52
|
-
switchOnEmits
|
|
63
|
+
switchOnEmits,
|
|
64
|
+
readonly
|
|
53
65
|
};
|
|
54
66
|
}
|
|
55
67
|
});
|
|
56
|
-
|
|
57
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
68
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
69
|
const _component_ElSwitch = resolveComponent("ElSwitch");
|
|
59
70
|
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
60
71
|
return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
|
|
61
|
-
default: withCtx(() =>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
default: withCtx(() => [
|
|
73
|
+
createVNode(_component_ElSwitch, mergeProps({
|
|
74
|
+
class: {
|
|
75
|
+
"is-readonly": _ctx.readonly
|
|
76
|
+
},
|
|
77
|
+
modelValue: _ctx.modelValue ?? _ctx.defaultModelValue
|
|
78
|
+
}, _ctx.switchBindProps, toHandlers(_ctx.switchOnEmits), {
|
|
79
|
+
disabled: _ctx.readonly || _ctx.disabled
|
|
80
|
+
}), {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
renderSlot(_ctx.$slots, "default")
|
|
83
|
+
]),
|
|
84
|
+
_: 3
|
|
85
|
+
}, 16, ["class", "modelValue", "disabled"])
|
|
86
|
+
]),
|
|
74
87
|
_: 3
|
|
75
88
|
}, 16);
|
|
76
89
|
}
|
|
77
|
-
|
|
78
|
-
script.render = render;
|
|
79
|
-
script.__file = "switch/src/index.vue";
|
|
90
|
+
var VkfSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
|
|
80
91
|
|
|
81
92
|
var types = /*#__PURE__*/Object.freeze({
|
|
82
93
|
__proto__: null
|
|
83
94
|
});
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
app.component(
|
|
96
|
+
VkfSwitch.install = (app) => {
|
|
97
|
+
app.component(VkfSwitch.name, VkfSwitch);
|
|
87
98
|
};
|
|
88
99
|
|
|
89
|
-
export {
|
|
100
|
+
export { VkfSwitch, types as __VkfSwitch, VkfSwitch as default };
|