@vunk/form 1.1.14 → 1.1.16
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 +4 -0
- package/components/button/src/index.vue.d.ts +10 -0
- package/components/cascader/index.css +10 -0
- package/components/cascader/index.js +6 -2
- package/components/cascader/src/ctx.d.ts +5 -1
- package/components/cascader/src/index.vue.d.ts +10 -0
- package/components/checkbox/src/ctx.d.ts +4 -0
- package/components/checkbox/src/index.vue.d.ts +10 -0
- package/components/color-picker/src/ctx.d.ts +4 -0
- package/components/color-picker/src/index.vue.d.ts +10 -0
- package/components/date-picker/src/ctx.d.ts +4 -0
- package/components/date-picker/src/index.vue.d.ts +10 -0
- package/components/form/src/ctx.d.ts +2 -2
- package/components/form/src/index.vue.d.ts +5 -5
- package/components/form-item/index.css +17 -0
- package/components/form-item/index.js +57 -11
- package/components/form-item/src/ctx.d.ts +5 -1
- package/components/form-item/src/ctx.js +4 -0
- package/components/form-item/src/index.vue.d.ts +14 -3
- package/components/geoinput/src/ctx.d.ts +4 -0
- package/components/geoinput/src/index.vue.d.ts +11 -0
- package/components/geoinput-read/src/core.vue.d.ts +10 -0
- package/components/geoinput-read/src/ctx.d.ts +5 -1
- package/components/geoinput-read/src/index.vue.d.ts +10 -0
- package/components/geoinput-update/src/ctx.d.ts +5 -1
- package/components/geoinput-update/src/index.vue.d.ts +10 -0
- package/components/input/src/ctx.d.ts +5 -1
- package/components/input/src/index.vue.d.ts +10 -0
- package/components/input-link/src/ctx.d.ts +4 -0
- package/components/input-link/src/index.vue.d.ts +10 -0
- package/components/input-number/src/ctx.d.ts +4 -0
- package/components/input-number/src/index.vue.d.ts +10 -0
- package/components/radio/src/ctx.d.ts +4 -0
- package/components/radio/src/index.vue.d.ts +10 -0
- package/components/select/src/ctx.d.ts +4 -0
- package/components/select/src/index.vue.d.ts +10 -0
- package/components/switch/src/ctx.d.ts +4 -0
- package/components/switch/src/index.vue.d.ts +10 -0
- package/components/upload/index.css +3 -0
- package/components/upload/src/ctx.d.ts +5 -1
- package/components/upload/src/index.vue.d.ts +10 -0
- package/components/upload-plus/src/ctx.d.ts +4 -0
- package/components/upload-plus/src/index.vue.d.ts +10 -0
- package/components/van-cascader/src/ctx.d.ts +4 -0
- package/components/van-cascader/src/index.vue.d.ts +10 -0
- package/index.css +31 -0
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +1 -1
|
@@ -84,6 +84,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
84
|
type: BooleanConstructor;
|
|
85
85
|
default: undefined;
|
|
86
86
|
};
|
|
87
|
+
labelPosition: {
|
|
88
|
+
type: import("vue").PropType<"right">;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
87
91
|
}, {
|
|
88
92
|
formBindProps: import("vue").ComputedRef<{
|
|
89
93
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
@@ -101,6 +105,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
105
|
elRef: any;
|
|
102
106
|
inline: boolean;
|
|
103
107
|
readonly: boolean | undefined;
|
|
108
|
+
labelPosition: "right";
|
|
104
109
|
}>;
|
|
105
110
|
coreBindProps: import("vue").ComputedRef<{
|
|
106
111
|
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "success" | "text" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
@@ -212,6 +217,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
212
217
|
type: BooleanConstructor;
|
|
213
218
|
default: undefined;
|
|
214
219
|
};
|
|
220
|
+
labelPosition: {
|
|
221
|
+
type: import("vue").PropType<"right">;
|
|
222
|
+
default: string;
|
|
223
|
+
};
|
|
215
224
|
}>> & {
|
|
216
225
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
217
226
|
}, {
|
|
@@ -224,6 +233,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
224
233
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
225
234
|
inline: boolean;
|
|
226
235
|
readonly: boolean;
|
|
236
|
+
labelPosition: "right";
|
|
227
237
|
link: boolean;
|
|
228
238
|
disabled: boolean;
|
|
229
239
|
nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
.el-cascader.is-readonly{
|
|
3
|
+
--el-readonly-cursor: text;
|
|
4
|
+
--el-disabled-bg-color: initial;
|
|
5
|
+
--el-disabled-text-color: var(--el-input-text-color);
|
|
6
|
+
}
|
|
7
|
+
.el-cascader.is-readonly .el-input.is-disabled .el-input__inner,
|
|
8
|
+
.el-cascader.is-readonly .el-input.is-disabled{
|
|
9
|
+
cursor: var(--el-readonly-cursor);
|
|
10
|
+
}
|
|
@@ -114,8 +114,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
114
114
|
default: withCtx(() => [
|
|
115
115
|
createVNode(_component_ElCascader, mergeProps(_ctx.coreBindProps, toHandlers(_ctx.coreOnEmits), {
|
|
116
116
|
readonly: _ctx.readonly,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
118
|
+
options: _ctx.options,
|
|
119
|
+
class: {
|
|
120
|
+
"is-readonly": _ctx.readonly
|
|
121
|
+
}
|
|
122
|
+
}), null, 16, ["readonly", "disabled", "options", "class"])
|
|
119
123
|
]),
|
|
120
124
|
_: 1
|
|
121
125
|
}, 16);
|
|
@@ -48,6 +48,10 @@ export declare const props: {
|
|
|
48
48
|
type: BooleanConstructor;
|
|
49
49
|
default: boolean;
|
|
50
50
|
};
|
|
51
|
+
labelPosition: {
|
|
52
|
+
type: import("vue").PropType<"right">;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
51
55
|
size: {
|
|
52
56
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
53
57
|
readonly required: false;
|
|
@@ -100,7 +104,7 @@ export declare const props: {
|
|
|
100
104
|
options: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[]) | ((new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[]))[], unknown, unknown, () => import("element-plus").CascaderOption[], boolean>;
|
|
101
105
|
props: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps) | ((new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps))[], unknown, unknown, () => import("element-plus").CascaderProps, boolean>;
|
|
102
106
|
};
|
|
103
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"props", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"popperClass", keyof T2>, KE> | Exclude<Extract<"filterable", keyof T2>, KE> | Exclude<Extract<"filterMethod", keyof T2>, KE> | Exclude<Extract<"collapseTags", keyof T2>, KE> | Exclude<Extract<"collapseTagsTooltip", keyof T2>, KE> | Exclude<Extract<"teleported", keyof T2>, KE> | Exclude<Extract<"tagType", keyof T2>, KE> | Exclude<Extract<"options", keyof T2>, KE> | Exclude<Extract<"optionsUrl", keyof T2>, KE> | Exclude<Extract<"separator", keyof T2>, KE> | Exclude<Extract<"showAllLevels", keyof T2>, KE> | Exclude<Extract<"debounce", keyof T2>, KE> | Exclude<Extract<"beforeFilter", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>]: T2[k]; }[P]; }>;
|
|
107
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"props", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"popperClass", keyof T2>, KE> | Exclude<Extract<"filterable", keyof T2>, KE> | Exclude<Extract<"filterMethod", keyof T2>, KE> | Exclude<Extract<"collapseTags", keyof T2>, KE> | Exclude<Extract<"collapseTagsTooltip", keyof T2>, KE> | Exclude<Extract<"teleported", keyof T2>, KE> | Exclude<Extract<"tagType", keyof T2>, KE> | Exclude<Extract<"options", keyof T2>, KE> | Exclude<Extract<"optionsUrl", keyof T2>, KE> | Exclude<Extract<"separator", keyof T2>, KE> | Exclude<Extract<"showAllLevels", keyof T2>, KE> | Exclude<Extract<"debounce", keyof T2>, KE> | Exclude<Extract<"beforeFilter", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"props", keyof T2> | Extract<"disabled", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"filterable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"teleported", keyof T2> | Extract<"tagType", keyof T2> | Extract<"options", keyof T2> | Extract<"optionsUrl", keyof T2> | Extract<"separator", keyof T2> | Extract<"showAllLevels", keyof T2> | Extract<"debounce", keyof T2> | Extract<"beforeFilter", keyof T2>]: T2[k]; }[P]; }>;
|
|
104
108
|
export declare const emits: {
|
|
105
109
|
"update:modelValue": (val: import("element-plus").CascaderValue) => boolean;
|
|
106
110
|
change: (val: import("element-plus").CascaderValue) => boolean;
|
|
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
type: BooleanConstructor;
|
|
49
49
|
default: boolean;
|
|
50
50
|
};
|
|
51
|
+
labelPosition: {
|
|
52
|
+
type: import("vue").PropType<"right">;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
51
55
|
size: {
|
|
52
56
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
53
57
|
readonly required: false;
|
|
@@ -145,6 +149,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
145
149
|
elRef: any;
|
|
146
150
|
inline: boolean;
|
|
147
151
|
readonly: boolean | undefined;
|
|
152
|
+
labelPosition: "right";
|
|
148
153
|
}>;
|
|
149
154
|
readonly: import("vue").ComputedRef<boolean>;
|
|
150
155
|
options: import("vue").ComputedRef<import("element-plus").CascaderOption[] | undefined>;
|
|
@@ -206,6 +211,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
211
|
type: BooleanConstructor;
|
|
207
212
|
default: boolean;
|
|
208
213
|
};
|
|
214
|
+
labelPosition: {
|
|
215
|
+
type: import("vue").PropType<"right">;
|
|
216
|
+
default: string;
|
|
217
|
+
};
|
|
209
218
|
size: {
|
|
210
219
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
211
220
|
readonly required: false;
|
|
@@ -274,6 +283,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
274
283
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
275
284
|
inline: boolean;
|
|
276
285
|
readonly: boolean;
|
|
286
|
+
labelPosition: "right";
|
|
277
287
|
props: import("element-plus").CascaderProps;
|
|
278
288
|
disabled: boolean;
|
|
279
289
|
clearable: boolean;
|
|
@@ -75,6 +75,10 @@ export declare const props: {
|
|
|
75
75
|
type: BooleanConstructor;
|
|
76
76
|
default: undefined;
|
|
77
77
|
};
|
|
78
|
+
labelPosition: {
|
|
79
|
+
type: PropType<"right">;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
78
82
|
};
|
|
79
83
|
export declare const emits: {
|
|
80
84
|
"update:modelValue": (val: import("element-plus").CheckboxGroupValueType) => boolean;
|
|
@@ -73,6 +73,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
type: BooleanConstructor;
|
|
74
74
|
default: undefined;
|
|
75
75
|
};
|
|
76
|
+
labelPosition: {
|
|
77
|
+
type: import("vue").PropType<"right">;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
76
80
|
}, {
|
|
77
81
|
formItemBindProps: import("vue").ComputedRef<{
|
|
78
82
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
@@ -90,6 +94,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
94
|
elRef: any;
|
|
91
95
|
inline: boolean;
|
|
92
96
|
readonly: boolean | undefined;
|
|
97
|
+
labelPosition: "right";
|
|
93
98
|
}>;
|
|
94
99
|
coreBindProps: import("vue").ComputedRef<{
|
|
95
100
|
label: string | undefined;
|
|
@@ -190,6 +195,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
195
|
type: BooleanConstructor;
|
|
191
196
|
default: undefined;
|
|
192
197
|
};
|
|
198
|
+
labelPosition: {
|
|
199
|
+
type: import("vue").PropType<"right">;
|
|
200
|
+
default: string;
|
|
201
|
+
};
|
|
193
202
|
}>> & {
|
|
194
203
|
onChange?: ((val: import("element-plus").CheckboxValueType[]) => any) | undefined;
|
|
195
204
|
"onUpdate:modelValue"?: ((val: import("element-plus").CheckboxGroupValueType) => any) | undefined;
|
|
@@ -203,6 +212,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
203
212
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
204
213
|
inline: boolean;
|
|
205
214
|
readonly: boolean;
|
|
215
|
+
labelPosition: "right";
|
|
206
216
|
disabled: boolean;
|
|
207
217
|
tag: string;
|
|
208
218
|
modelValue: (string | number)[];
|
|
@@ -64,6 +64,10 @@ export declare const props: {
|
|
|
64
64
|
type: BooleanConstructor;
|
|
65
65
|
default: undefined;
|
|
66
66
|
};
|
|
67
|
+
labelPosition: {
|
|
68
|
+
type: import("vue").PropType<"right">;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
67
71
|
};
|
|
68
72
|
export declare const emits: {
|
|
69
73
|
"update:modelValue": (val: string | null) => boolean;
|
|
@@ -64,6 +64,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
64
|
type: BooleanConstructor;
|
|
65
65
|
default: undefined;
|
|
66
66
|
};
|
|
67
|
+
labelPosition: {
|
|
68
|
+
type: import("vue").PropType<"right">;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
67
71
|
}, {
|
|
68
72
|
formItemBindProps: import("vue").ComputedRef<{
|
|
69
73
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
@@ -81,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
85
|
elRef: any;
|
|
82
86
|
inline: boolean;
|
|
83
87
|
readonly: boolean | undefined;
|
|
88
|
+
labelPosition: "right";
|
|
84
89
|
}>;
|
|
85
90
|
coreBindProps: import("vue").ComputedRef<{
|
|
86
91
|
label: string | undefined;
|
|
@@ -170,6 +175,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
170
175
|
type: BooleanConstructor;
|
|
171
176
|
default: undefined;
|
|
172
177
|
};
|
|
178
|
+
labelPosition: {
|
|
179
|
+
type: import("vue").PropType<"right">;
|
|
180
|
+
default: string;
|
|
181
|
+
};
|
|
173
182
|
}>> & {
|
|
174
183
|
onChange?: ((val: string | null) => any) | undefined;
|
|
175
184
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
@@ -184,6 +193,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
184
193
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
185
194
|
inline: boolean;
|
|
186
195
|
readonly: boolean;
|
|
196
|
+
labelPosition: "right";
|
|
187
197
|
disabled: boolean;
|
|
188
198
|
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
189
199
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -50,6 +50,10 @@ export declare const props: {
|
|
|
50
50
|
type: BooleanConstructor;
|
|
51
51
|
default: undefined;
|
|
52
52
|
};
|
|
53
|
+
labelPosition: {
|
|
54
|
+
type: PropType<"right">;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
53
57
|
type: {
|
|
54
58
|
type: PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
|
|
55
59
|
default: string;
|
|
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
type: BooleanConstructor;
|
|
49
49
|
default: undefined;
|
|
50
50
|
};
|
|
51
|
+
labelPosition: {
|
|
52
|
+
type: import("vue").PropType<"right">;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
51
55
|
type: {
|
|
52
56
|
type: import("vue").PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
|
|
53
57
|
default: string;
|
|
@@ -144,6 +148,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
144
148
|
elRef: any;
|
|
145
149
|
inline: boolean;
|
|
146
150
|
readonly: boolean | undefined;
|
|
151
|
+
labelPosition: "right";
|
|
147
152
|
}>;
|
|
148
153
|
datePickerBindProps: import("vue").ComputedRef<{
|
|
149
154
|
label: string | undefined;
|
|
@@ -248,6 +253,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
248
253
|
type: BooleanConstructor;
|
|
249
254
|
default: undefined;
|
|
250
255
|
};
|
|
256
|
+
labelPosition: {
|
|
257
|
+
type: import("vue").PropType<"right">;
|
|
258
|
+
default: string;
|
|
259
|
+
};
|
|
251
260
|
type: {
|
|
252
261
|
type: import("vue").PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
|
|
253
262
|
default: string;
|
|
@@ -346,6 +355,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
346
355
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
347
356
|
inline: boolean;
|
|
348
357
|
readonly: boolean;
|
|
358
|
+
labelPosition: "right";
|
|
349
359
|
name: 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>;
|
|
350
360
|
disabled: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
351
361
|
modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType))[], unknown, unknown>;
|
|
@@ -64,7 +64,7 @@ export declare const props: {
|
|
|
64
64
|
readonly disabled: BooleanConstructor;
|
|
65
65
|
}>> & {
|
|
66
66
|
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
67
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "
|
|
67
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "labelPosition" | "disabled" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
68
68
|
$attrs: {
|
|
69
69
|
[x: string]: unknown;
|
|
70
70
|
};
|
|
@@ -383,7 +383,7 @@ export declare const props: {
|
|
|
383
383
|
};
|
|
384
384
|
disabled: BooleanConstructor;
|
|
385
385
|
};
|
|
386
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"
|
|
386
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"model", keyof T2>, KE> | Exclude<Extract<"requireAsteriskPosition", keyof T2>, KE> | Exclude<Extract<"labelSuffix", keyof T2>, KE> | Exclude<Extract<"statusIcon", keyof T2>, KE> | Exclude<Extract<"validateOnRuleChange", keyof T2>, KE> | Exclude<Extract<"hideRequiredAsterisk", keyof T2>, KE> | Exclude<Extract<"scrollToError", keyof T2>, KE> | Exclude<Extract<"scrollIntoViewOptions", keyof T2>, KE> | Exclude<Extract<"formItems", keyof T2>, KE> | Exclude<Extract<"layout", keyof T2>, KE> | Exclude<Extract<"rowSource", keyof T2>, KE> | Exclude<Extract<"colSource", keyof T2>, KE> : Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>]: { [k in Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>]: T2[k]; }[P]; }>;
|
|
387
387
|
export declare const emits: {
|
|
388
388
|
setData: (e: SetDataEvent) => SetDataEvent<any>;
|
|
389
389
|
validate: null;
|
|
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
readonly disabled: BooleanConstructor;
|
|
64
64
|
}>> & {
|
|
65
65
|
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
66
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "
|
|
66
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "labelPosition" | "disabled" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
67
67
|
$attrs: {
|
|
68
68
|
[x: string]: unknown;
|
|
69
69
|
};
|
|
@@ -376,8 +376,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
376
376
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
377
377
|
size: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown> | undefined;
|
|
378
378
|
inline: boolean;
|
|
379
|
-
disabled: boolean;
|
|
380
379
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "top" | "left", unknown>;
|
|
380
|
+
disabled: boolean;
|
|
381
381
|
requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "left", unknown>;
|
|
382
382
|
labelSuffix: string;
|
|
383
383
|
statusIcon: boolean;
|
|
@@ -459,7 +459,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
459
459
|
readonly disabled: BooleanConstructor;
|
|
460
460
|
}>> & {
|
|
461
461
|
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
462
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "
|
|
462
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "labelPosition" | "disabled" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
463
463
|
$attrs: {
|
|
464
464
|
[x: string]: unknown;
|
|
465
465
|
};
|
|
@@ -821,7 +821,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
821
821
|
readonly disabled: BooleanConstructor;
|
|
822
822
|
}>> & {
|
|
823
823
|
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
824
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "
|
|
824
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "labelWidth" | "inlineMessage" | "showMessage" | "inline" | "labelPosition" | "disabled" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
825
825
|
$attrs: {
|
|
826
826
|
[x: string]: unknown;
|
|
827
827
|
};
|
|
@@ -1083,9 +1083,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1083
1083
|
}> & {} & import("vue").ComponentCustomProperties & {}) => any;
|
|
1084
1084
|
inline: boolean;
|
|
1085
1085
|
readonly: boolean;
|
|
1086
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "top" | "left", unknown>;
|
|
1086
1087
|
data: Record<string, any>;
|
|
1087
1088
|
disabled: boolean;
|
|
1088
|
-
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "top" | "left", unknown>;
|
|
1089
1089
|
requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "left", unknown>;
|
|
1090
1090
|
labelSuffix: string;
|
|
1091
1091
|
statusIcon: boolean;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
.vkf-form-item.vkf-form-item--label-right.el-form-item{
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
.vkf-form-item.vkf-form-item--label-right.el-form-item .el-form-item__label{
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
.vkf-form-item.vkf-form-item--label-right.el-form-item.el-form-item--default .el-form-item__label{
|
|
12
|
+
height: 32px;
|
|
13
|
+
line-height: 32px;
|
|
14
|
+
margin-bottom: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
2
19
|
.vkf-form-item--inline{
|
|
3
20
|
display: inline-flex;
|
|
4
21
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { formItemProps, ElFormItem } from 'element-plus';
|
|
1
|
+
import { formItemProps, ElFormItem, useGlobalConfig } from 'element-plus';
|
|
2
2
|
import { bindPropsFactory } from '@vunk/core/shared/utils-vue';
|
|
3
3
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, mergeProps, createSlots, withCtx, renderSlot, renderList, resolveDynamicComponent } from 'vue';
|
|
4
4
|
import { createFormItemBindProps } from '@vunk/form/shared/element-plus';
|
|
5
5
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
6
|
-
import { isNotEmptyObject } from '@vunk/core/shared/utils-object';
|
|
6
|
+
import { isPlainObject, isNotEmptyObject } from '@vunk/core/shared/utils-object';
|
|
7
|
+
import { PATTERN_OPTIONS } from '@vunk/form/shared/rules';
|
|
7
8
|
|
|
8
9
|
var __defProp = Object.defineProperty;
|
|
9
10
|
var __defProps = Object.defineProperties;
|
|
@@ -44,6 +45,10 @@ const _props = __spreadProps(__spreadValues({}, formItemProps), {
|
|
|
44
45
|
readonly: {
|
|
45
46
|
type: Boolean,
|
|
46
47
|
default: void 0
|
|
48
|
+
},
|
|
49
|
+
labelPosition: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
47
52
|
}
|
|
48
53
|
});
|
|
49
54
|
Reflect.deleteProperty(_props, "size");
|
|
@@ -73,29 +78,70 @@ const _sfc_main = defineComponent({
|
|
|
73
78
|
setup(props2) {
|
|
74
79
|
const formItemBindProps = createFormItemBindProps(props2, ["rules"]);
|
|
75
80
|
const readonly = useComputedReadonly(props2);
|
|
81
|
+
const globalConfig = useGlobalConfig();
|
|
82
|
+
const localeName = computed(() => {
|
|
83
|
+
return globalConfig.value?.locale?.name;
|
|
84
|
+
});
|
|
85
|
+
const requiredMessage = `${props2.label || "\u8BE5\u5B57\u6BB5"}\u4E0D\u80FD\u4E3A\u7A7A`;
|
|
86
|
+
const setDefaultMessage = (rule) => {
|
|
87
|
+
if (localeName.value === "zh-cn") {
|
|
88
|
+
if (rule.message)
|
|
89
|
+
return;
|
|
90
|
+
if (rule.required) {
|
|
91
|
+
rule.message = requiredMessage;
|
|
92
|
+
}
|
|
93
|
+
const ruleInfo = PATTERN_OPTIONS.find((i) => i.value === rule.pattern);
|
|
94
|
+
if (ruleInfo) {
|
|
95
|
+
rule.message = `\u8F93\u5165 ${props2.label || "\u8BE5\u5B57\u6BB5"} ${ruleInfo.title}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
76
99
|
const rules = computed(() => {
|
|
77
|
-
let data =
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
let data = [];
|
|
101
|
+
if (!props2.rules) {
|
|
102
|
+
if (props2.required) {
|
|
103
|
+
data.push({
|
|
104
|
+
required: true
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (isPlainObject(props2.rules)) {
|
|
109
|
+
data = [props2.rules];
|
|
82
110
|
}
|
|
111
|
+
if (Array.isArray(props2.rules)) {
|
|
112
|
+
data = props2.rules;
|
|
113
|
+
if (props2.required) {
|
|
114
|
+
if (!props2.rules.find((item) => item.required)) {
|
|
115
|
+
data.push({
|
|
116
|
+
required: true
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
data = data.filter((rule) => {
|
|
122
|
+
return isNotEmptyObject(rule);
|
|
123
|
+
});
|
|
124
|
+
data.forEach((rule) => {
|
|
125
|
+
setDefaultMessage(rule);
|
|
126
|
+
});
|
|
83
127
|
return data;
|
|
84
128
|
});
|
|
85
129
|
return {
|
|
86
130
|
formItemBindProps,
|
|
87
131
|
readonly,
|
|
88
|
-
rules
|
|
132
|
+
rules,
|
|
133
|
+
localeName
|
|
89
134
|
};
|
|
90
135
|
}
|
|
91
136
|
});
|
|
92
137
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
138
|
const _component_ElFormItem = resolveComponent("ElFormItem");
|
|
94
139
|
return openBlock(), createBlock(_component_ElFormItem, mergeProps({
|
|
95
|
-
class: {
|
|
140
|
+
class: ["vkf-form-item", {
|
|
96
141
|
"is-readonly": _ctx.readonly,
|
|
97
|
-
"vkf-form-item--inline": _ctx.inline
|
|
98
|
-
|
|
142
|
+
"vkf-form-item--inline": _ctx.inline,
|
|
143
|
+
"vkf-form-item--label-right": _ctx.labelPosition === "right"
|
|
144
|
+
}]
|
|
99
145
|
}, _ctx.formItemBindProps, {
|
|
100
146
|
size: _ctx.formItemSize,
|
|
101
147
|
ref: _ctx.elRef,
|
|
@@ -21,6 +21,10 @@ export declare const props: Omit<{
|
|
|
21
21
|
type: BooleanConstructor;
|
|
22
22
|
default: undefined;
|
|
23
23
|
};
|
|
24
|
+
labelPosition: {
|
|
25
|
+
type: PropType<"right">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
24
28
|
label: StringConstructor;
|
|
25
29
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
26
30
|
prop: {
|
|
@@ -53,4 +57,4 @@ export declare const props: Omit<{
|
|
|
53
57
|
__epPropKey: true;
|
|
54
58
|
};
|
|
55
59
|
}, "size">;
|
|
56
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2>]: T2[k]; }[P]; }>;
|
|
60
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2>]: T2[k]; }[P]; }>;
|