@vunk/form 2.5.0 → 2.5.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/components/fieldset/index.cjs +8 -0
- package/components/fieldset/index.mjs +8 -0
- package/components/fieldset/src/ctx.d.ts +5 -0
- package/components/fieldset/src/index.vue.d.ts +9 -0
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +1 -1
- package/components/input-collection/index.cjs +2 -1
- package/components/input-collection/index.mjs +2 -1
- package/package.json +1 -1
|
@@ -10,6 +10,10 @@ const props = {
|
|
|
10
10
|
labelWidth: {
|
|
11
11
|
type: [String, Number],
|
|
12
12
|
default: void 0
|
|
13
|
+
},
|
|
14
|
+
labelPosition: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: void 0
|
|
13
17
|
}
|
|
14
18
|
};
|
|
15
19
|
const emits = {};
|
|
@@ -73,11 +77,15 @@ var _sfc_main = vue.defineComponent({
|
|
|
73
77
|
const labelWidth = vue.computed(() => {
|
|
74
78
|
return props2.labelWidth ?? formContext.labelWidth;
|
|
75
79
|
});
|
|
80
|
+
const labelPosition = vue.computed(() => {
|
|
81
|
+
return props2.labelPosition ?? formContext.labelPosition;
|
|
82
|
+
});
|
|
76
83
|
vue.provide(
|
|
77
84
|
elementPlus.formContextKey,
|
|
78
85
|
vue.reactive({
|
|
79
86
|
...vue.toRefs(formContext),
|
|
80
87
|
labelWidth,
|
|
88
|
+
labelPosition,
|
|
81
89
|
...useFormLabelWidth()
|
|
82
90
|
})
|
|
83
91
|
);
|
|
@@ -6,6 +6,10 @@ const props = {
|
|
|
6
6
|
labelWidth: {
|
|
7
7
|
type: [String, Number],
|
|
8
8
|
default: void 0
|
|
9
|
+
},
|
|
10
|
+
labelPosition: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: void 0
|
|
9
13
|
}
|
|
10
14
|
};
|
|
11
15
|
const emits = {};
|
|
@@ -69,11 +73,15 @@ var _sfc_main = defineComponent({
|
|
|
69
73
|
const labelWidth = computed(() => {
|
|
70
74
|
return props2.labelWidth ?? formContext.labelWidth;
|
|
71
75
|
});
|
|
76
|
+
const labelPosition = computed(() => {
|
|
77
|
+
return props2.labelPosition ?? formContext.labelPosition;
|
|
78
|
+
});
|
|
72
79
|
provide(
|
|
73
80
|
formContextKey,
|
|
74
81
|
reactive({
|
|
75
82
|
...toRefs(formContext),
|
|
76
83
|
labelWidth,
|
|
84
|
+
labelPosition,
|
|
77
85
|
...useFormLabelWidth()
|
|
78
86
|
})
|
|
79
87
|
);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
export declare const props: {
|
|
2
3
|
labelWidth: {
|
|
3
4
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
5
|
default: any;
|
|
5
6
|
};
|
|
7
|
+
labelPosition: {
|
|
8
|
+
type: PropType<"left" | "right" | "top">;
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
6
11
|
};
|
|
7
12
|
export declare const emits: {};
|
|
@@ -3,12 +3,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3
3
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
4
|
default: any;
|
|
5
5
|
};
|
|
6
|
+
labelPosition: {
|
|
7
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
8
|
+
default: any;
|
|
9
|
+
};
|
|
6
10
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
11
|
labelWidth: {
|
|
8
12
|
type: (StringConstructor | NumberConstructor)[];
|
|
9
13
|
default: any;
|
|
10
14
|
};
|
|
15
|
+
labelPosition: {
|
|
16
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
17
|
+
default: any;
|
|
18
|
+
};
|
|
11
19
|
}>> & Readonly<{}>, {
|
|
12
20
|
labelWidth: string | number;
|
|
21
|
+
labelPosition: "top" | "left" | "right";
|
|
13
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
23
|
export default _default;
|
|
@@ -137,7 +137,7 @@ var _sfc_main = vue.defineComponent({
|
|
|
137
137
|
};
|
|
138
138
|
const keys = ["labelActions"];
|
|
139
139
|
const formItemSlots = props2.formItemSlots;
|
|
140
|
-
formItemSlots && Object.keys(formItemSlots).filter(keys.includes).forEach((key) => {
|
|
140
|
+
formItemSlots && Object.keys(formItemSlots).filter((key) => keys.includes(key)).forEach((key) => {
|
|
141
141
|
const slot = formItemSlots?.[key];
|
|
142
142
|
if (slot) {
|
|
143
143
|
theSlots[key] = slot;
|
|
@@ -133,7 +133,7 @@ var _sfc_main = defineComponent({
|
|
|
133
133
|
};
|
|
134
134
|
const keys = ["labelActions"];
|
|
135
135
|
const formItemSlots = props2.formItemSlots;
|
|
136
|
-
formItemSlots && Object.keys(formItemSlots).filter(keys.includes).forEach((key) => {
|
|
136
|
+
formItemSlots && Object.keys(formItemSlots).filter((key) => keys.includes(key)).forEach((key) => {
|
|
137
137
|
const slot = formItemSlots?.[key];
|
|
138
138
|
if (slot) {
|
|
139
139
|
theSlots[key] = slot;
|
|
@@ -122,7 +122,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
122
122
|
});
|
|
123
123
|
return vue.createVNode(fieldset.VkfFieldset, {
|
|
124
124
|
"class": "vk-input-collection__expand-fieldset",
|
|
125
|
-
"label-width": "auto"
|
|
125
|
+
"label-width": "auto",
|
|
126
|
+
"label-position": "right"
|
|
126
127
|
}, {
|
|
127
128
|
default: () => [vue.createVNode(formItemRenderer.VkfFormItemRenderer, {
|
|
128
129
|
"source": source
|
|
@@ -118,7 +118,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
118
|
});
|
|
119
119
|
return createVNode(VkfFieldset, {
|
|
120
120
|
"class": "vk-input-collection__expand-fieldset",
|
|
121
|
-
"label-width": "auto"
|
|
121
|
+
"label-width": "auto",
|
|
122
|
+
"label-position": "right"
|
|
122
123
|
}, {
|
|
123
124
|
default: () => [createVNode(VkfFormItemRenderer, {
|
|
124
125
|
"source": source
|