@vunk/form 2.14.8 → 2.14.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/fieldset/index.cjs +8 -0
- package/components/fieldset/index.mjs +8 -0
- package/components/fieldset/src/ctx.d.ts +4 -0
- package/components/fieldset/src/index.vue.d.ts +9 -0
- package/components/form-item/index.cjs +8 -5
- package/components/form-item/index.css +1 -7
- package/components/form-item/index.mjs +8 -5
- package/components/form-item/src/core.vue.d.ts +3 -0
- package/components/input-collection/index.cjs +6 -2
- package/components/input-collection/index.mjs +6 -2
- package/index.css +1 -7
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ const props = {
|
|
|
15
15
|
labelPosition: {
|
|
16
16
|
type: String,
|
|
17
17
|
default: void 0
|
|
18
|
+
},
|
|
19
|
+
labelSuffix: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: void 0
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
24
|
const emits = {};
|
|
@@ -84,12 +88,16 @@ var _sfc_main = vue.defineComponent({
|
|
|
84
88
|
const labelPosition = vue.computed(() => {
|
|
85
89
|
return props2.labelPosition ?? formContext.labelPosition;
|
|
86
90
|
});
|
|
91
|
+
const labelSuffix = vue.computed(() => {
|
|
92
|
+
return props2.labelSuffix ?? formContext.labelSuffix;
|
|
93
|
+
});
|
|
87
94
|
vue.provide(
|
|
88
95
|
elementPlus.formContextKey,
|
|
89
96
|
vue.reactive({
|
|
90
97
|
...formContext === backupFormContext ? backupFormContext : vue.toRefs(formContext),
|
|
91
98
|
labelWidth,
|
|
92
99
|
labelPosition,
|
|
100
|
+
labelSuffix,
|
|
93
101
|
...useFormLabelWidth()
|
|
94
102
|
})
|
|
95
103
|
);
|
|
@@ -11,6 +11,10 @@ const props = {
|
|
|
11
11
|
labelPosition: {
|
|
12
12
|
type: String,
|
|
13
13
|
default: void 0
|
|
14
|
+
},
|
|
15
|
+
labelSuffix: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: void 0
|
|
14
18
|
}
|
|
15
19
|
};
|
|
16
20
|
const emits = {};
|
|
@@ -80,12 +84,16 @@ var _sfc_main = defineComponent({
|
|
|
80
84
|
const labelPosition = computed(() => {
|
|
81
85
|
return props2.labelPosition ?? formContext.labelPosition;
|
|
82
86
|
});
|
|
87
|
+
const labelSuffix = computed(() => {
|
|
88
|
+
return props2.labelSuffix ?? formContext.labelSuffix;
|
|
89
|
+
});
|
|
83
90
|
provide(
|
|
84
91
|
formContextKey,
|
|
85
92
|
reactive({
|
|
86
93
|
...formContext === backupFormContext ? backupFormContext : toRefs(formContext),
|
|
87
94
|
labelWidth,
|
|
88
95
|
labelPosition,
|
|
96
|
+
labelSuffix,
|
|
89
97
|
...useFormLabelWidth()
|
|
90
98
|
})
|
|
91
99
|
);
|
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7
7
|
type: import("vue").PropType<"left" | "right" | "top">;
|
|
8
8
|
default: any;
|
|
9
9
|
};
|
|
10
|
+
labelSuffix: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
10
14
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
15
|
labelWidth: {
|
|
12
16
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -16,8 +20,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
20
|
type: import("vue").PropType<"left" | "right" | "top">;
|
|
17
21
|
default: any;
|
|
18
22
|
};
|
|
23
|
+
labelSuffix: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: any;
|
|
26
|
+
};
|
|
19
27
|
}>> & Readonly<{}>, {
|
|
20
28
|
labelWidth: string | number;
|
|
21
29
|
labelPosition: "top" | "left" | "right";
|
|
30
|
+
labelSuffix: string;
|
|
22
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
32
|
export default _default;
|
|
@@ -74,7 +74,8 @@ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
74
|
default: ""
|
|
75
75
|
},
|
|
76
76
|
formItemTipClass: null,
|
|
77
|
-
elRef: null
|
|
77
|
+
elRef: null,
|
|
78
|
+
label: null
|
|
78
79
|
},
|
|
79
80
|
setup(__props, { expose: __expose }) {
|
|
80
81
|
__expose();
|
|
@@ -104,7 +105,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
104
105
|
ref: $props.elRef,
|
|
105
106
|
class: ["vkf-form-item", {
|
|
106
107
|
"has-label-actions": _ctx.$slots.labelActions
|
|
107
|
-
}]
|
|
108
|
+
}],
|
|
109
|
+
label: $props.label
|
|
108
110
|
}), {
|
|
109
111
|
default: vue.withCtx(() => [
|
|
110
112
|
vue.renderSlot(_ctx.$slots, "before"),
|
|
@@ -131,7 +133,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
131
133
|
]),
|
|
132
134
|
label: vue.withCtx((e) => [
|
|
133
135
|
vue.renderSlot(_ctx.$slots, "label", vue.normalizeProps(vue.guardReactiveProps(e)), () => [
|
|
134
|
-
|
|
136
|
+
$props.label ? (vue.openBlock(), vue.createElementBlock(
|
|
135
137
|
"span",
|
|
136
138
|
_hoisted_1,
|
|
137
139
|
vue.toDisplayString(e.label),
|
|
@@ -173,7 +175,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
173
175
|
]),
|
|
174
176
|
_: 3
|
|
175
177
|
/* FORWARDED */
|
|
176
|
-
}, 16, ["class"]);
|
|
178
|
+
}, 16, ["class", "label"]);
|
|
177
179
|
}
|
|
178
180
|
var FormItemCore = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/form-item/src/core.vue"]]);
|
|
179
181
|
|
|
@@ -245,7 +247,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
245
247
|
rules: rules$1.value,
|
|
246
248
|
formItemTip: props2.formItemTip,
|
|
247
249
|
formItemTipClass: props2.formItemTipClass,
|
|
248
|
-
labelTip: props2.labelTip
|
|
250
|
+
labelTip: props2.labelTip,
|
|
251
|
+
label: props2.label
|
|
249
252
|
}, {
|
|
250
253
|
...slots,
|
|
251
254
|
...props2.formItemSlots
|
|
@@ -27,12 +27,6 @@
|
|
|
27
27
|
.vkf-form-item--inline{
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
}
|
|
30
|
-
.vkf-form-item.is-empty-label .el-form-item__label
|
|
31
|
-
display: none;
|
|
32
|
-
}
|
|
33
|
-
.vkf-form-item.is-empty-label .el-form-item__label::after{
|
|
34
|
-
display: none;
|
|
35
|
-
}
|
|
36
|
-
.vkf-form-item .el-form-item__label:empty{
|
|
30
|
+
.vkf-form-item.is-empty-label .el-form-item__label{
|
|
37
31
|
display: none;
|
|
38
32
|
}
|
|
@@ -70,7 +70,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
default: ""
|
|
71
71
|
},
|
|
72
72
|
formItemTipClass: null,
|
|
73
|
-
elRef: null
|
|
73
|
+
elRef: null,
|
|
74
|
+
label: null
|
|
74
75
|
},
|
|
75
76
|
setup(__props, { expose: __expose }) {
|
|
76
77
|
__expose();
|
|
@@ -100,7 +101,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
101
|
ref: $props.elRef,
|
|
101
102
|
class: ["vkf-form-item", {
|
|
102
103
|
"has-label-actions": _ctx.$slots.labelActions
|
|
103
|
-
}]
|
|
104
|
+
}],
|
|
105
|
+
label: $props.label
|
|
104
106
|
}), {
|
|
105
107
|
default: withCtx(() => [
|
|
106
108
|
renderSlot(_ctx.$slots, "before"),
|
|
@@ -127,7 +129,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
127
129
|
]),
|
|
128
130
|
label: withCtx((e) => [
|
|
129
131
|
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(e)), () => [
|
|
130
|
-
|
|
132
|
+
$props.label ? (openBlock(), createElementBlock(
|
|
131
133
|
"span",
|
|
132
134
|
_hoisted_1,
|
|
133
135
|
toDisplayString(e.label),
|
|
@@ -169,7 +171,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
171
|
]),
|
|
170
172
|
_: 3
|
|
171
173
|
/* FORWARDED */
|
|
172
|
-
}, 16, ["class"]);
|
|
174
|
+
}, 16, ["class", "label"]);
|
|
173
175
|
}
|
|
174
176
|
var FormItemCore = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/form-item/src/core.vue"]]);
|
|
175
177
|
|
|
@@ -241,7 +243,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
241
243
|
rules: rules.value,
|
|
242
244
|
formItemTip: props2.formItemTip,
|
|
243
245
|
formItemTipClass: props2.formItemTipClass,
|
|
244
|
-
labelTip: props2.labelTip
|
|
246
|
+
labelTip: props2.labelTip,
|
|
247
|
+
label: props2.label
|
|
245
248
|
}, {
|
|
246
249
|
...slots,
|
|
247
250
|
...props2.formItemSlots
|
|
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9
9
|
};
|
|
10
10
|
formItemTipClass: any;
|
|
11
11
|
elRef: any;
|
|
12
|
+
label: any;
|
|
12
13
|
}>, {
|
|
13
14
|
readonly ElFormItem: {
|
|
14
15
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1841,10 +1842,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1841
1842
|
};
|
|
1842
1843
|
formItemTipClass: any;
|
|
1843
1844
|
elRef: any;
|
|
1845
|
+
label: any;
|
|
1844
1846
|
}>> & Readonly<{}>, {
|
|
1845
1847
|
elRef: any;
|
|
1846
1848
|
formItemTip: string;
|
|
1847
1849
|
formItemTipClass: any;
|
|
1848
1850
|
labelTip: string;
|
|
1851
|
+
label: any;
|
|
1849
1852
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1850
1853
|
export default _default;
|
|
@@ -69,7 +69,8 @@ const emits = {
|
|
|
69
69
|
const ROW_KEY = "_row_key";
|
|
70
70
|
var _sfc_main = /* @__PURE__ */vue.defineComponent({
|
|
71
71
|
...{
|
|
72
|
-
name: "VkfInputCollection"
|
|
72
|
+
name: "VkfInputCollection",
|
|
73
|
+
inheritAttrs: false
|
|
73
74
|
},
|
|
74
75
|
__name: "index",
|
|
75
76
|
props: props,
|
|
@@ -314,7 +315,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
314
315
|
default: vue.withCtx(() => [
|
|
315
316
|
vue.createVNode(
|
|
316
317
|
$setup["VkfFormItem"],
|
|
317
|
-
vue.normalizeProps(vue.guardReactiveProps(
|
|
318
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
319
|
+
...$setup.formItemBindProps,
|
|
320
|
+
..._ctx.$attrs
|
|
321
|
+
})),
|
|
318
322
|
vue.createSlots({
|
|
319
323
|
default: vue.withCtx(() => [
|
|
320
324
|
!$setup.readonly && _ctx.splicable && !_ctx.labelActions ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -65,7 +65,8 @@ const emits = {
|
|
|
65
65
|
const ROW_KEY = "_row_key";
|
|
66
66
|
var _sfc_main = /* @__PURE__ */defineComponent({
|
|
67
67
|
...{
|
|
68
|
-
name: "VkfInputCollection"
|
|
68
|
+
name: "VkfInputCollection",
|
|
69
|
+
inheritAttrs: false
|
|
69
70
|
},
|
|
70
71
|
__name: "index",
|
|
71
72
|
props: props,
|
|
@@ -310,7 +311,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
310
311
|
default: withCtx(() => [
|
|
311
312
|
createVNode(
|
|
312
313
|
$setup["VkfFormItem"],
|
|
313
|
-
normalizeProps(guardReactiveProps(
|
|
314
|
+
normalizeProps(guardReactiveProps({
|
|
315
|
+
...$setup.formItemBindProps,
|
|
316
|
+
..._ctx.$attrs
|
|
317
|
+
})),
|
|
314
318
|
createSlots({
|
|
315
319
|
default: withCtx(() => [
|
|
316
320
|
!$setup.readonly && _ctx.splicable && !_ctx.labelActions ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
package/index.css
CHANGED
|
@@ -249,13 +249,7 @@
|
|
|
249
249
|
.vkf-form-item--inline{
|
|
250
250
|
display: inline-flex;
|
|
251
251
|
}
|
|
252
|
-
.vkf-form-item.is-empty-label .el-form-item__label
|
|
253
|
-
display: none;
|
|
254
|
-
}
|
|
255
|
-
.vkf-form-item.is-empty-label .el-form-item__label::after{
|
|
256
|
-
display: none;
|
|
257
|
-
}
|
|
258
|
-
.vkf-form-item .el-form-item__label:empty{
|
|
252
|
+
.vkf-form-item.is-empty-label .el-form-item__label{
|
|
259
253
|
display: none;
|
|
260
254
|
}
|
|
261
255
|
|