@vunk/form 1.4.8 → 1.4.10
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/src/ctx.d.ts +9 -3
- package/components/button/src/index.vue.d.ts +22 -7
- package/components/cascader/src/ctx.d.ts +10 -4
- package/components/cascader/src/index.vue.d.ts +22 -7
- package/components/checkbox/src/ctx.d.ts +10 -4
- package/components/checkbox/src/index.vue.d.ts +22 -7
- package/components/color-picker/src/ctx.d.ts +9 -3
- package/components/color-picker/src/index.vue.d.ts +22 -7
- package/components/date-picker/src/ctx.d.ts +10 -4
- package/components/date-picker/src/index.vue.d.ts +22 -7
- package/components/date-picker-range/src/ctx.d.ts +9 -3
- package/components/date-picker-range/src/index.vue.d.ts +22 -7
- package/components/download-plus/src/ctx.d.ts +9 -3
- package/components/download-plus/src/index.vue.d.ts +22 -7
- package/components/esri-input-geojson/src/ctx.d.ts +10 -4
- package/components/esri-input-geojson/src/index.vue.d.ts +26 -8
- package/components/form/src/ctx.d.ts +1 -1
- package/components/form/src/index.vue.d.ts +5 -5
- package/components/form-item/index.cjs +80 -18
- package/components/form-item/index.css +11 -10
- package/components/form-item/index.mjs +82 -20
- package/components/form-item/src/ctx.d.ts +10 -4
- package/components/form-item/src/index.vue.d.ts +311 -8
- package/components/geoinput/src/ctx.d.ts +9 -3
- package/components/geoinput/src/index.vue.d.ts +22 -7
- package/components/geoinput-read/src/core.vue.d.ts +26 -8
- package/components/geoinput-read/src/ctx.d.ts +10 -4
- package/components/geoinput-read/src/index.vue.d.ts +48 -15
- package/components/geoinput-update/src/ctx.d.ts +10 -4
- package/components/geoinput-update/src/index.vue.d.ts +26 -8
- package/components/index2.cjs +19 -0
- package/components/index2.mjs +19 -1
- package/components/input/src/ctx.d.ts +10 -4
- package/components/input/src/index.vue.d.ts +22 -7
- package/components/input-collection/src/ctx.d.ts +9 -3
- package/components/input-collection/src/index.vue.d.ts +22 -7
- package/components/input-link/src/ctx.d.ts +9 -3
- package/components/input-link/src/index.vue.d.ts +22 -7
- package/components/input-number/src/ctx.d.ts +10 -4
- package/components/input-number/src/index.vue.d.ts +22 -7
- package/components/monaco-editor/src/ctx.d.ts +9 -3
- package/components/monaco-editor/src/index.vue.d.ts +22 -7
- package/components/radio/src/ctx.d.ts +9 -3
- package/components/radio/src/index.vue.d.ts +22 -7
- package/components/select/index.cjs +38 -5
- package/components/select/index.mjs +40 -7
- package/components/select/src/ctx.d.ts +16 -3
- package/components/select/src/index.vue.d.ts +40 -8
- package/components/slider/src/ctx.d.ts +9 -3
- package/components/slider/src/index.vue.d.ts +22 -7
- package/components/switch/src/ctx.d.ts +9 -3
- package/components/switch/src/index.vue.d.ts +22 -7
- package/components/upload/src/ctx.d.ts +10 -4
- package/components/upload/src/index.vue.d.ts +22 -7
- package/components/upload-plus/src/ctx.d.ts +9 -3
- package/components/upload-plus/src/index.vue.d.ts +22 -7
- package/components/van-cascader/src/ctx.d.ts +9 -3
- package/components/van-cascader/src/index.vue.d.ts +22 -7
- package/components/var-datetime-picker/src/ctx.d.ts +9 -3
- package/components/var-datetime-picker/src/index.vue.d.ts +22 -7
- package/components/vditor/src/ctx.d.ts +9 -3
- package/components/vditor/src/index.vue.d.ts +22 -7
- package/index.css +11 -10
- package/package.json +1 -1
- package/shared/element-plus/index.cjs +0 -1
- package/shared/element-plus/index.mjs +0 -1
|
@@ -56,12 +56,18 @@ export declare const props: {
|
|
|
56
56
|
type: BooleanConstructor;
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
type:
|
|
61
|
-
default:
|
|
59
|
+
formItemTip: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: any;
|
|
62
|
+
};
|
|
63
|
+
formItemTipClass: any;
|
|
64
|
+
labelTip: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: any;
|
|
62
67
|
};
|
|
63
68
|
label: StringConstructor;
|
|
64
69
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
70
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
65
71
|
prop: {
|
|
66
72
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
67
73
|
readonly required: false;
|
|
@@ -85,7 +91,7 @@ export declare const props: {
|
|
|
85
91
|
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
86
92
|
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
87
93
|
};
|
|
88
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"required", keyof T2> | Extract<"name", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"
|
|
94
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"required", keyof T2> | Extract<"name", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"min", keyof T2> | Extract<"max", keyof T2> | Extract<"id", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"step", keyof T2> | Extract<"controls", keyof T2> | Extract<"stepStrictly", keyof T2> | Extract<"controlsPosition", keyof T2> | Extract<"precision", keyof T2> | Extract<"unit", keyof T2> | Extract<"inputNumberSlots", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size" | "disabled" | "required" | "name" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "min" | "max" | "id" | "valueOnClear" | "placeholder" | "validateEvent" | "modelValue" | "ariaLabel" | "step" | "controls" | "stepStrictly" | "controlsPosition" | "precision" | "unit" | "inputNumberSlots", keyof T2>, KE> : Extract<"size" | "disabled" | "required" | "name" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "min" | "max" | "id" | "valueOnClear" | "placeholder" | "validateEvent" | "modelValue" | "ariaLabel" | "step" | "controls" | "stepStrictly" | "controlsPosition" | "precision" | "unit" | "inputNumberSlots", keyof T2>]: { [k in Extract<"size" | "disabled" | "required" | "name" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "min" | "max" | "id" | "valueOnClear" | "placeholder" | "validateEvent" | "modelValue" | "ariaLabel" | "step" | "controls" | "stepStrictly" | "controlsPosition" | "precision" | "unit" | "inputNumberSlots", keyof T2>]: T2[k]; }[P]; }>;
|
|
89
95
|
export declare const emits: {
|
|
90
96
|
change: (cur: number | undefined, prev: number | undefined) => boolean;
|
|
91
97
|
blur: (e: FocusEvent) => boolean;
|
|
@@ -54,12 +54,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
54
54
|
type: BooleanConstructor;
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
type:
|
|
59
|
-
default:
|
|
57
|
+
formItemTip: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: any;
|
|
60
|
+
};
|
|
61
|
+
formItemTipClass: any;
|
|
62
|
+
labelTip: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: any;
|
|
60
65
|
};
|
|
61
66
|
label: StringConstructor;
|
|
62
67
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
68
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
63
69
|
prop: {
|
|
64
70
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
65
71
|
readonly required: false;
|
|
@@ -166,12 +172,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
166
172
|
type: BooleanConstructor;
|
|
167
173
|
default: boolean;
|
|
168
174
|
};
|
|
169
|
-
|
|
170
|
-
type:
|
|
171
|
-
default:
|
|
175
|
+
formItemTip: {
|
|
176
|
+
type: StringConstructor;
|
|
177
|
+
default: any;
|
|
178
|
+
};
|
|
179
|
+
formItemTipClass: any;
|
|
180
|
+
labelTip: {
|
|
181
|
+
type: StringConstructor;
|
|
182
|
+
default: any;
|
|
172
183
|
};
|
|
173
184
|
label: StringConstructor;
|
|
174
185
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
186
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
175
187
|
prop: {
|
|
176
188
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
177
189
|
readonly required: false;
|
|
@@ -207,8 +219,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
207
219
|
formItemSlots: import("@vunk/form/components/form-item/src/types").FormItemSlots;
|
|
208
220
|
inline: boolean;
|
|
209
221
|
readonly: boolean;
|
|
210
|
-
|
|
222
|
+
formItemTip: string;
|
|
223
|
+
formItemTipClass: any;
|
|
224
|
+
labelTip: string;
|
|
211
225
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
226
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
212
227
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
213
228
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
214
229
|
min: number;
|
|
@@ -36,12 +36,18 @@ export declare const props: {
|
|
|
36
36
|
type: BooleanConstructor;
|
|
37
37
|
default: boolean;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
default:
|
|
39
|
+
formItemTip: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: any;
|
|
42
|
+
};
|
|
43
|
+
formItemTipClass: any;
|
|
44
|
+
labelTip: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: any;
|
|
42
47
|
};
|
|
43
48
|
label: StringConstructor;
|
|
44
49
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
50
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
45
51
|
prop: {
|
|
46
52
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
47
53
|
readonly required: false;
|
|
@@ -36,12 +36,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
36
36
|
type: BooleanConstructor;
|
|
37
37
|
default: boolean;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
default:
|
|
39
|
+
formItemTip: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: any;
|
|
42
|
+
};
|
|
43
|
+
formItemTipClass: any;
|
|
44
|
+
labelTip: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: any;
|
|
42
47
|
};
|
|
43
48
|
label: StringConstructor;
|
|
44
49
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
50
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
45
51
|
prop: {
|
|
46
52
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
47
53
|
readonly required: false;
|
|
@@ -112,12 +118,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
112
118
|
type: BooleanConstructor;
|
|
113
119
|
default: boolean;
|
|
114
120
|
};
|
|
115
|
-
|
|
116
|
-
type:
|
|
117
|
-
default:
|
|
121
|
+
formItemTip: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
default: any;
|
|
124
|
+
};
|
|
125
|
+
formItemTipClass: any;
|
|
126
|
+
labelTip: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: any;
|
|
118
129
|
};
|
|
119
130
|
label: StringConstructor;
|
|
120
131
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
132
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
121
133
|
prop: {
|
|
122
134
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
123
135
|
readonly required: false;
|
|
@@ -148,8 +160,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
148
160
|
formItemSlots: import("@vunk/form/components/form-item/src/types").FormItemSlots;
|
|
149
161
|
inline: boolean;
|
|
150
162
|
readonly: boolean;
|
|
151
|
-
|
|
163
|
+
formItemTip: string;
|
|
164
|
+
formItemTipClass: any;
|
|
165
|
+
labelTip: string;
|
|
152
166
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
167
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
153
168
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
154
169
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
155
170
|
modelValue: string;
|
|
@@ -47,12 +47,18 @@ export declare const props: {
|
|
|
47
47
|
type: BooleanConstructor;
|
|
48
48
|
default: any;
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
type:
|
|
52
|
-
default:
|
|
50
|
+
formItemTip: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
formItemTipClass: any;
|
|
55
|
+
labelTip: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: any;
|
|
53
58
|
};
|
|
54
59
|
label: StringConstructor;
|
|
55
60
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
61
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
56
62
|
prop: {
|
|
57
63
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
58
64
|
readonly required: false;
|
|
@@ -46,12 +46,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
46
46
|
type: BooleanConstructor;
|
|
47
47
|
default: any;
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
type:
|
|
51
|
-
default:
|
|
49
|
+
formItemTip: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: any;
|
|
52
|
+
};
|
|
53
|
+
formItemTipClass: any;
|
|
54
|
+
labelTip: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: any;
|
|
52
57
|
};
|
|
53
58
|
label: StringConstructor;
|
|
54
59
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
60
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
55
61
|
prop: {
|
|
56
62
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
57
63
|
readonly required: false;
|
|
@@ -140,12 +146,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
140
146
|
type: BooleanConstructor;
|
|
141
147
|
default: any;
|
|
142
148
|
};
|
|
143
|
-
|
|
144
|
-
type:
|
|
145
|
-
default:
|
|
149
|
+
formItemTip: {
|
|
150
|
+
type: StringConstructor;
|
|
151
|
+
default: any;
|
|
152
|
+
};
|
|
153
|
+
formItemTipClass: any;
|
|
154
|
+
labelTip: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: any;
|
|
146
157
|
};
|
|
147
158
|
label: StringConstructor;
|
|
148
159
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
160
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
149
161
|
prop: {
|
|
150
162
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
151
163
|
readonly required: false;
|
|
@@ -181,8 +193,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
181
193
|
formItemSlots: import("@vunk/form/components/form-item/src/types").FormItemSlots;
|
|
182
194
|
inline: boolean;
|
|
183
195
|
readonly: boolean;
|
|
184
|
-
|
|
196
|
+
formItemTip: string;
|
|
197
|
+
formItemTipClass: any;
|
|
198
|
+
labelTip: string;
|
|
185
199
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
200
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
186
201
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
187
202
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
188
203
|
options: RadioProps[];
|
|
@@ -25,7 +25,14 @@ const props = {
|
|
|
25
25
|
type: String,
|
|
26
26
|
default: ""
|
|
27
27
|
},
|
|
28
|
-
defaultModelValue: null
|
|
28
|
+
defaultModelValue: null,
|
|
29
|
+
/**
|
|
30
|
+
* multiple模式下,是否将选中的值转为字符串
|
|
31
|
+
*/
|
|
32
|
+
stringify: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
29
36
|
};
|
|
30
37
|
const emits = {
|
|
31
38
|
...elementPlus.selectEmits
|
|
@@ -43,8 +50,32 @@ var _sfc_main = vue.defineComponent({
|
|
|
43
50
|
setup(props2, { emit }) {
|
|
44
51
|
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
45
52
|
const selectBindProps = elementPlus.createSelectBindProps(props2, ["disabled", "modelValue"]);
|
|
46
|
-
const selectOnEmits = elementPlus.createSelectOnEmits(emit);
|
|
53
|
+
const selectOnEmits = elementPlus.createSelectOnEmits(emit, ["update:modelValue"]);
|
|
47
54
|
const readonly = composables.useComputedReadonly(props2);
|
|
55
|
+
const theModelValue = vue.computed({
|
|
56
|
+
get: () => {
|
|
57
|
+
if (props2.multiple && props2.stringify && typeof props2.modelValue === "string") {
|
|
58
|
+
return props2.modelValue ? props2.modelValue.split(",") : [];
|
|
59
|
+
}
|
|
60
|
+
return props2.modelValue ?? props2.defaultModelValue;
|
|
61
|
+
},
|
|
62
|
+
set: (modelValue) => {
|
|
63
|
+
if (props2.multiple && props2.stringify && Array.isArray(modelValue)) {
|
|
64
|
+
const value = modelValue.reduce((a, v) => {
|
|
65
|
+
if (typeof v === "string") {
|
|
66
|
+
a.push(v);
|
|
67
|
+
} else if (utilsObject.isNotEmptyObject(v) && v[props2.valueKey] !== void 0) {
|
|
68
|
+
a.push(v[props2.valueKey]);
|
|
69
|
+
}
|
|
70
|
+
return a;
|
|
71
|
+
}, []).join(",");
|
|
72
|
+
emit("update:modelValue", value);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
emit("update:modelValue", modelValue);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
props2.modelValue === void 0 && props2.defaultModelValue && theModelValue.value === props2.defaultModelValue;
|
|
48
79
|
const optionsFromUrl = vue.ref([]);
|
|
49
80
|
const rUrlOptions = (url) => {
|
|
50
81
|
if (url) {
|
|
@@ -89,7 +120,8 @@ var _sfc_main = vue.defineComponent({
|
|
|
89
120
|
selectOnEmits,
|
|
90
121
|
selectOptions,
|
|
91
122
|
reshow,
|
|
92
|
-
readonly
|
|
123
|
+
readonly,
|
|
124
|
+
theModelValue
|
|
93
125
|
};
|
|
94
126
|
}
|
|
95
127
|
});
|
|
@@ -104,7 +136,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
104
136
|
{
|
|
105
137
|
default: vue.withCtx(() => [
|
|
106
138
|
_ctx.reshow ? (vue.openBlock(), vue.createBlock(_component_ElSelect, vue.mergeProps({ key: 0 }, _ctx.selectBindProps, {
|
|
107
|
-
|
|
139
|
+
modelValue: _ctx.theModelValue,
|
|
140
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.theModelValue = $event),
|
|
108
141
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
109
142
|
class: {
|
|
110
143
|
"is-readonly": _ctx.readonly
|
|
@@ -140,7 +173,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
140
173
|
])
|
|
141
174
|
};
|
|
142
175
|
})
|
|
143
|
-
]), 1040, ["
|
|
176
|
+
]), 1040, ["modelValue", "disabled", "class"])) : vue.createCommentVNode("v-if", true),
|
|
144
177
|
vue.renderSlot(_ctx.$slots, "default")
|
|
145
178
|
]),
|
|
146
179
|
_: 3
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { selectProps, selectEmits, createSelectBindProps, createSelectOnEmits } from '@vunk/form/shared/element-plus';
|
|
3
|
-
import { defineComponent, ref, watch,
|
|
3
|
+
import { defineComponent, computed, ref, watch, nextTick, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, mergeProps, toHandlers, createSlots, createElementBlock, Fragment, renderList, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
|
|
4
4
|
import { ElSelect, ElOption } from 'element-plus';
|
|
5
|
-
import { isPlainObject } from '@vunk/core/shared/utils-object';
|
|
5
|
+
import { isNotEmptyObject, isPlainObject } from '@vunk/core/shared/utils-object';
|
|
6
6
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
7
7
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
8
8
|
|
|
@@ -21,7 +21,14 @@ const props = {
|
|
|
21
21
|
type: String,
|
|
22
22
|
default: ""
|
|
23
23
|
},
|
|
24
|
-
defaultModelValue: null
|
|
24
|
+
defaultModelValue: null,
|
|
25
|
+
/**
|
|
26
|
+
* multiple模式下,是否将选中的值转为字符串
|
|
27
|
+
*/
|
|
28
|
+
stringify: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
}
|
|
25
32
|
};
|
|
26
33
|
const emits = {
|
|
27
34
|
...selectEmits
|
|
@@ -39,8 +46,32 @@ var _sfc_main = defineComponent({
|
|
|
39
46
|
setup(props2, { emit }) {
|
|
40
47
|
const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
|
|
41
48
|
const selectBindProps = createSelectBindProps(props2, ["disabled", "modelValue"]);
|
|
42
|
-
const selectOnEmits = createSelectOnEmits(emit);
|
|
49
|
+
const selectOnEmits = createSelectOnEmits(emit, ["update:modelValue"]);
|
|
43
50
|
const readonly = useComputedReadonly(props2);
|
|
51
|
+
const theModelValue = computed({
|
|
52
|
+
get: () => {
|
|
53
|
+
if (props2.multiple && props2.stringify && typeof props2.modelValue === "string") {
|
|
54
|
+
return props2.modelValue ? props2.modelValue.split(",") : [];
|
|
55
|
+
}
|
|
56
|
+
return props2.modelValue ?? props2.defaultModelValue;
|
|
57
|
+
},
|
|
58
|
+
set: (modelValue) => {
|
|
59
|
+
if (props2.multiple && props2.stringify && Array.isArray(modelValue)) {
|
|
60
|
+
const value = modelValue.reduce((a, v) => {
|
|
61
|
+
if (typeof v === "string") {
|
|
62
|
+
a.push(v);
|
|
63
|
+
} else if (isNotEmptyObject(v) && v[props2.valueKey] !== void 0) {
|
|
64
|
+
a.push(v[props2.valueKey]);
|
|
65
|
+
}
|
|
66
|
+
return a;
|
|
67
|
+
}, []).join(",");
|
|
68
|
+
emit("update:modelValue", value);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
emit("update:modelValue", modelValue);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
props2.modelValue === void 0 && props2.defaultModelValue && theModelValue.value === props2.defaultModelValue;
|
|
44
75
|
const optionsFromUrl = ref([]);
|
|
45
76
|
const rUrlOptions = (url) => {
|
|
46
77
|
if (url) {
|
|
@@ -85,7 +116,8 @@ var _sfc_main = defineComponent({
|
|
|
85
116
|
selectOnEmits,
|
|
86
117
|
selectOptions,
|
|
87
118
|
reshow,
|
|
88
|
-
readonly
|
|
119
|
+
readonly,
|
|
120
|
+
theModelValue
|
|
89
121
|
};
|
|
90
122
|
}
|
|
91
123
|
});
|
|
@@ -100,7 +132,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
132
|
{
|
|
101
133
|
default: withCtx(() => [
|
|
102
134
|
_ctx.reshow ? (openBlock(), createBlock(_component_ElSelect, mergeProps({ key: 0 }, _ctx.selectBindProps, {
|
|
103
|
-
|
|
135
|
+
modelValue: _ctx.theModelValue,
|
|
136
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.theModelValue = $event),
|
|
104
137
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
105
138
|
class: {
|
|
106
139
|
"is-readonly": _ctx.readonly
|
|
@@ -136,7 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
136
169
|
])
|
|
137
170
|
};
|
|
138
171
|
})
|
|
139
|
-
]), 1040, ["
|
|
172
|
+
]), 1040, ["modelValue", "disabled", "class"])) : createCommentVNode("v-if", true),
|
|
140
173
|
renderSlot(_ctx.$slots, "default")
|
|
141
174
|
]),
|
|
142
175
|
_: 3
|
|
@@ -16,6 +16,13 @@ export declare const props: {
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
defaultModelValue: any;
|
|
19
|
+
/**
|
|
20
|
+
* multiple模式下,是否将选中的值转为字符串
|
|
21
|
+
*/
|
|
22
|
+
stringify: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
19
26
|
name: StringConstructor;
|
|
20
27
|
id: StringConstructor;
|
|
21
28
|
modelValue: {
|
|
@@ -116,12 +123,18 @@ export declare const props: {
|
|
|
116
123
|
type: BooleanConstructor;
|
|
117
124
|
default: any;
|
|
118
125
|
};
|
|
119
|
-
|
|
120
|
-
type:
|
|
121
|
-
default:
|
|
126
|
+
formItemTip: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: any;
|
|
129
|
+
};
|
|
130
|
+
formItemTipClass: any;
|
|
131
|
+
labelTip: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: any;
|
|
122
134
|
};
|
|
123
135
|
label: StringConstructor;
|
|
124
136
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
137
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
125
138
|
prop: {
|
|
126
139
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
127
140
|
readonly required: false;
|
|
@@ -13,6 +13,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
13
13
|
default: string;
|
|
14
14
|
};
|
|
15
15
|
defaultModelValue: any;
|
|
16
|
+
stringify: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
name: StringConstructor;
|
|
17
21
|
id: StringConstructor;
|
|
18
22
|
modelValue: {
|
|
@@ -113,12 +117,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
117
|
type: BooleanConstructor;
|
|
114
118
|
default: any;
|
|
115
119
|
};
|
|
116
|
-
|
|
117
|
-
type:
|
|
118
|
-
default:
|
|
120
|
+
formItemTip: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: any;
|
|
123
|
+
};
|
|
124
|
+
formItemTipClass: any;
|
|
125
|
+
labelTip: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: any;
|
|
119
128
|
};
|
|
120
129
|
label: StringConstructor;
|
|
121
130
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
131
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
122
132
|
prop: {
|
|
123
133
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
124
134
|
readonly required: false;
|
|
@@ -176,7 +186,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
176
186
|
valueKey: string;
|
|
177
187
|
fitInputWidth: boolean;
|
|
178
188
|
}>;
|
|
179
|
-
selectOnEmits: {
|
|
189
|
+
selectOnEmits: {
|
|
190
|
+
clear: (...e: any[]) => void;
|
|
191
|
+
change: (...e: any[]) => void;
|
|
192
|
+
focus: (...e: any[]) => void;
|
|
193
|
+
blur: (...e: any[]) => void;
|
|
194
|
+
"visible-change": (...e: any[]) => void;
|
|
195
|
+
"remove-tag": (...e: any[]) => void;
|
|
196
|
+
};
|
|
180
197
|
selectOptions: import("vue").ComputedRef<(import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
181
198
|
value: {
|
|
182
199
|
required: true;
|
|
@@ -237,6 +254,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
237
254
|
})[]>;
|
|
238
255
|
reshow: import("vue").Ref<boolean, boolean>;
|
|
239
256
|
readonly: import("vue").ComputedRef<boolean>;
|
|
257
|
+
theModelValue: import("vue").WritableComputedRef<any, any>;
|
|
240
258
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
241
259
|
'update:modelValue': any;
|
|
242
260
|
change: any;
|
|
@@ -259,6 +277,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
259
277
|
default: string;
|
|
260
278
|
};
|
|
261
279
|
defaultModelValue: any;
|
|
280
|
+
stringify: {
|
|
281
|
+
type: BooleanConstructor;
|
|
282
|
+
default: boolean;
|
|
283
|
+
};
|
|
262
284
|
name: StringConstructor;
|
|
263
285
|
id: StringConstructor;
|
|
264
286
|
modelValue: {
|
|
@@ -359,12 +381,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
359
381
|
type: BooleanConstructor;
|
|
360
382
|
default: any;
|
|
361
383
|
};
|
|
362
|
-
|
|
363
|
-
type:
|
|
364
|
-
default:
|
|
384
|
+
formItemTip: {
|
|
385
|
+
type: StringConstructor;
|
|
386
|
+
default: any;
|
|
387
|
+
};
|
|
388
|
+
formItemTipClass: any;
|
|
389
|
+
labelTip: {
|
|
390
|
+
type: StringConstructor;
|
|
391
|
+
default: any;
|
|
365
392
|
};
|
|
366
393
|
label: StringConstructor;
|
|
367
394
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
395
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
368
396
|
prop: {
|
|
369
397
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
370
398
|
readonly required: false;
|
|
@@ -403,8 +431,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
403
431
|
formItemSlots: import("@vunk/form/components/form-item/src/types").FormItemSlots;
|
|
404
432
|
inline: boolean;
|
|
405
433
|
readonly: boolean;
|
|
406
|
-
|
|
434
|
+
formItemTip: string;
|
|
435
|
+
formItemTipClass: any;
|
|
436
|
+
labelTip: string;
|
|
407
437
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
438
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
408
439
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
409
440
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
410
441
|
options: import("@vunk/core").VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -488,6 +519,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
488
519
|
valueKey: string;
|
|
489
520
|
fitInputWidth: boolean;
|
|
490
521
|
selectSlots: import("./types").SelectSlots;
|
|
522
|
+
stringify: boolean;
|
|
491
523
|
}, {}, {
|
|
492
524
|
VkfFormItem: {
|
|
493
525
|
new (...args: any[]): any;
|
|
@@ -91,12 +91,18 @@ export declare const props: {
|
|
|
91
91
|
type: BooleanConstructor;
|
|
92
92
|
default: any;
|
|
93
93
|
};
|
|
94
|
-
|
|
95
|
-
type:
|
|
96
|
-
default:
|
|
94
|
+
formItemTip: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: any;
|
|
97
|
+
};
|
|
98
|
+
formItemTipClass: any;
|
|
99
|
+
labelTip: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
default: any;
|
|
97
102
|
};
|
|
98
103
|
label: StringConstructor;
|
|
99
104
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
105
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
100
106
|
prop: {
|
|
101
107
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
102
108
|
readonly required: false;
|