@vunk/form 2.10.0 → 2.10.3
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/api-tables-select/index.cjs +37 -36
- package/components/api-tables-select/index.mjs +37 -36
- package/components/api-tables-select/src/ctx.d.ts +48 -13
- package/components/api-tables-select/src/index.vue.d.ts +568 -80
- package/components/button/src/ctx.d.ts +101 -17
- package/components/button/src/index.vue.d.ts +437 -101
- package/components/card-input-collection/index.cjs +67 -70
- package/components/card-input-collection/index.mjs +68 -71
- package/components/card-input-collection/src/ctx.d.ts +43 -8
- package/components/card-input-collection/src/index.vue.d.ts +718 -226
- package/components/cascader/src/ctx.d.ts +192 -46
- package/components/cascader/src/index.vue.d.ts +393 -118
- package/components/checkbox/index.cjs +2 -3
- package/components/checkbox/index.mjs +2 -3
- package/components/checkbox/src/ctx.d.ts +65 -13
- package/components/checkbox/src/index.vue.d.ts +339 -115
- package/components/color-picker/src/ctx.d.ts +76 -13
- package/components/color-picker/src/index.vue.d.ts +160 -34
- package/components/date-picker/src/ctx.d.ts +185 -36
- package/components/date-picker/src/index.vue.d.ts +974 -202
- package/components/date-picker-range/src/ctx.d.ts +168 -35
- package/components/date-picker-range/src/index.vue.d.ts +347 -82
- package/components/download-plus/index.cjs +4 -4
- package/components/download-plus/index.mjs +4 -4
- package/components/download-plus/src/ctx.d.ts +43 -8
- package/components/download-plus/src/index.vue.d.ts +618 -165
- package/components/editable-text/index.cjs +29 -15
- package/components/editable-text/index.mjs +29 -15
- package/components/editable-text/src/ctx.d.ts +51 -8
- package/components/editable-text/src/index.vue.d.ts +2827 -251
- package/components/esri-input-geojson/src/append.vue.d.ts +769 -418
- package/components/esri-input-geojson/src/ctx.d.ts +133 -32
- package/components/esri-input-geojson/src/index.vue.d.ts +262 -92
- package/components/esri-input-geojson/src/viewer.vue.d.ts +1 -1
- package/components/form/src/ctx.d.ts +59 -11
- package/components/form/src/index.vue.d.ts +3456 -186
- package/components/form-item/src/ctx.d.ts +45 -10
- package/components/form-item/src/index.vue.d.ts +484 -141
- package/components/information-collection/src/ctx.d.ts +45 -10
- package/components/information-collection/src/index.vue.d.ts +96 -26
- package/components/information-tag/src/ctx.d.ts +17 -3
- package/components/information-tag/src/index.vue.d.ts +38 -10
- package/components/input/src/ctx.d.ts +138 -33
- package/components/input/src/index.vue.d.ts +528 -152
- package/components/input-collection/index.cjs +105 -74
- package/components/input-collection/index.mjs +107 -76
- package/components/input-collection/src/ctx.d.ts +43 -8
- package/components/input-collection/src/index.vue.d.ts +756 -793
- package/components/input-link/src/ctx.d.ts +103 -25
- package/components/input-link/src/index.vue.d.ts +219 -63
- package/components/input-number/src/ctx.d.ts +123 -21
- package/components/input-number/src/index.vue.d.ts +468 -93
- package/components/input-tag/src/ctx.d.ts +141 -25
- package/components/input-tag/src/index.vue.d.ts +566 -126
- package/components/monaco-editor/src/ctx.d.ts +43 -8
- package/components/monaco-editor/src/index.vue.d.ts +91 -21
- package/components/radio/index.cjs +2 -3
- package/components/radio/index.mjs +2 -3
- package/components/radio/src/ctx.d.ts +84 -14
- package/components/radio/src/index.vue.d.ts +812 -168
- package/components/select/src/ctx.d.ts +63 -13
- package/components/select/src/index.vue.d.ts +549 -108
- package/components/slider/src/ctx.d.ts +170 -54
- package/components/slider/src/index.vue.d.ts +362 -137
- package/components/switch/src/ctx.d.ts +105 -21
- package/components/switch/src/index.vue.d.ts +453 -117
- package/components/tables-select/src/ctx.d.ts +72 -9
- package/components/tables-select/src/index.vue.d.ts +386 -82
- package/components/templates-element-plus/src/index.vue.d.ts +187 -40
- package/components/templates-layout/src/index.vue.d.ts +337 -64
- package/components/upload/index.cjs +2 -2
- package/components/upload/index.mjs +2 -2
- package/components/upload/src/ctx.d.ts +183 -89
- package/components/upload/src/file.vue.d.ts +269 -83
- package/components/upload/src/index.vue.d.ts +1246 -632
- package/components/upload-plus/index.cjs +79 -86
- package/components/upload-plus/index.mjs +79 -86
- package/components/upload-plus/src/ctx.d.ts +43 -8
- package/components/upload-plus/src/index.vue.d.ts +1008 -283
- package/components/van-cascader/src/ctx.d.ts +181 -44
- package/components/van-cascader/src/index.vue.d.ts +1532 -324
- package/components/var-datetime-picker/src/ctx.d.ts +43 -8
- package/components/var-datetime-picker/src/index.vue.d.ts +932 -190
- package/components/vditor/src/ctx.d.ts +43 -8
- package/components/vditor/src/index.vue.d.ts +91 -21
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +111 -30
- package/shared/element-plus/instances.d.ts +140 -28
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var formItem = require('@vunk/form/components/form-item');
|
|
6
5
|
var vue = require('vue');
|
|
6
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
7
7
|
var composables = require('@vunk/form/composables');
|
|
8
8
|
var elementPlus = require('element-plus');
|
|
9
9
|
var core = require('@vunk/core');
|
|
@@ -43,124 +43,121 @@ const props = {
|
|
|
43
43
|
};
|
|
44
44
|
const emits = {};
|
|
45
45
|
|
|
46
|
-
var _sfc_main = vue.defineComponent({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
VkfFormItem: formItem.VkfFormItem,
|
|
50
|
-
ElCard: elementPlus.ElCard,
|
|
51
|
-
ElButton: elementPlus.ElButton,
|
|
52
|
-
ElEmpty: elementPlus.ElEmpty,
|
|
53
|
-
VkfTemplateInstancesProvider: templateInstancesProvider.VkfTemplateInstancesProvider,
|
|
54
|
-
VkfTemplatesDefault: templatesDefault.VkfTemplatesDefault,
|
|
55
|
-
VkfRendererData: rendererData.VkfRendererData,
|
|
56
|
-
VkfFormItemRenderer: formItemRenderer.VkfFormItemRenderer
|
|
46
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
47
|
+
...{
|
|
48
|
+
name: "VkfCardInputCollection"
|
|
57
49
|
},
|
|
58
|
-
|
|
50
|
+
__name: "index",
|
|
51
|
+
props: props,
|
|
59
52
|
emits,
|
|
60
|
-
setup(
|
|
61
|
-
|
|
62
|
-
const
|
|
53
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
54
|
+
__expose();
|
|
55
|
+
const props = __props;
|
|
56
|
+
const emit = __emit;
|
|
57
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
|
|
58
|
+
const readonly = composables.useComputedReadonly(props);
|
|
63
59
|
const formData = vue.computed(() => {
|
|
64
|
-
if (!
|
|
65
|
-
return
|
|
60
|
+
if (!props.prop || props.prop.length === 0) {
|
|
61
|
+
return props.modelValue;
|
|
66
62
|
}
|
|
67
63
|
const data = {};
|
|
68
64
|
core.ensetData(data, {
|
|
69
|
-
k:
|
|
70
|
-
v:
|
|
65
|
+
k: props.prop,
|
|
66
|
+
v: props.modelValue
|
|
71
67
|
});
|
|
72
68
|
return data;
|
|
73
69
|
});
|
|
74
70
|
function handlePlus(index) {
|
|
75
|
-
const data = cloneDeep.cloneDeep(
|
|
71
|
+
const data = cloneDeep.cloneDeep(props.modelValue);
|
|
76
72
|
data.splice(index + 1, 0, {});
|
|
77
73
|
emit("update:modelValue", data);
|
|
78
74
|
}
|
|
79
75
|
function handleMinus(index) {
|
|
80
|
-
const data = cloneDeep.cloneDeep(
|
|
76
|
+
const data = cloneDeep.cloneDeep(props.modelValue);
|
|
81
77
|
data.splice(index, 1);
|
|
82
78
|
emit("update:modelValue", data);
|
|
83
79
|
}
|
|
84
80
|
const addToFirst = () => {
|
|
85
81
|
emit("update:modelValue", [
|
|
86
82
|
{},
|
|
87
|
-
...
|
|
83
|
+
...props.modelValue ?? []
|
|
88
84
|
]);
|
|
89
85
|
};
|
|
90
86
|
const handleFormSetData = (e) => {
|
|
91
87
|
const data = cloneDeep.cloneDeep(formData.value);
|
|
92
88
|
core.ensetData(data, e);
|
|
93
|
-
emit("update:modelValue", core.getValue(data,
|
|
89
|
+
emit("update:modelValue", core.getValue(data, props.prop));
|
|
94
90
|
};
|
|
95
91
|
function createTheFormItems(index) {
|
|
96
|
-
return
|
|
92
|
+
return props.formItems.map((formItem) => {
|
|
97
93
|
return {
|
|
98
94
|
readonly: readonly.value,
|
|
99
95
|
...formItem,
|
|
100
96
|
prop: [
|
|
101
|
-
|
|
97
|
+
props.prop ?? [],
|
|
102
98
|
index,
|
|
103
99
|
formItem.prop
|
|
104
100
|
].flat()
|
|
105
101
|
};
|
|
106
102
|
});
|
|
107
103
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
const __returned__ = { props, emit, formItemBindProps, readonly, formData, handlePlus, handleMinus, addToFirst, handleFormSetData, createTheFormItems, get VkfFormItem() {
|
|
105
|
+
return formItem.VkfFormItem;
|
|
106
|
+
}, get ElButton() {
|
|
107
|
+
return elementPlus.ElButton;
|
|
108
|
+
}, get ElCard() {
|
|
109
|
+
return elementPlus.ElCard;
|
|
110
|
+
}, get ElEmpty() {
|
|
111
|
+
return elementPlus.ElEmpty;
|
|
112
|
+
}, get VkfTemplatesDefault() {
|
|
113
|
+
return templatesDefault.VkfTemplatesDefault;
|
|
114
|
+
}, get VkfTemplateInstancesProvider() {
|
|
115
|
+
return templateInstancesProvider.VkfTemplateInstancesProvider;
|
|
116
|
+
}, get VkfFormItemRenderer() {
|
|
117
|
+
return formItemRenderer.VkfFormItemRenderer;
|
|
118
|
+
}, get VkfRendererData() {
|
|
119
|
+
return rendererData.VkfRendererData;
|
|
120
|
+
} };
|
|
121
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
122
|
+
return __returned__;
|
|
118
123
|
}
|
|
119
124
|
});
|
|
120
125
|
|
|
121
126
|
const _hoisted_1 = { class: "vkf-card-input-collection-options" };
|
|
122
127
|
const _hoisted_2 = { class: "vkf-card-input-collection-card__footer" };
|
|
123
128
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
124
|
-
|
|
125
|
-
const _component_ElButton = vue.resolveComponent("ElButton");
|
|
126
|
-
const _component_ElEmpty = vue.resolveComponent("ElEmpty");
|
|
127
|
-
const _component_VkfFormItemRenderer = vue.resolveComponent("VkfFormItemRenderer");
|
|
128
|
-
const _component_ElCard = vue.resolveComponent("ElCard");
|
|
129
|
-
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
130
|
-
const _component_VkfRendererData = vue.resolveComponent("VkfRendererData");
|
|
131
|
-
const _component_VkfTemplateInstancesProvider = vue.resolveComponent("VkfTemplateInstancesProvider");
|
|
132
|
-
return vue.openBlock(), vue.createBlock(_component_VkfTemplateInstancesProvider, null, {
|
|
129
|
+
return vue.openBlock(), vue.createBlock($setup["VkfTemplateInstancesProvider"], null, {
|
|
133
130
|
placeholder: vue.withCtx(() => [
|
|
134
|
-
vue.createVNode(
|
|
131
|
+
vue.createVNode($setup["VkfTemplatesDefault"])
|
|
135
132
|
]),
|
|
136
133
|
default: vue.withCtx(() => [
|
|
137
|
-
vue.createVNode(
|
|
138
|
-
data:
|
|
139
|
-
onSetData:
|
|
134
|
+
vue.createVNode($setup["VkfRendererData"], {
|
|
135
|
+
data: $setup.formData,
|
|
136
|
+
onSetData: $setup.handleFormSetData
|
|
140
137
|
}, {
|
|
141
138
|
default: vue.withCtx(() => [
|
|
142
139
|
vue.createVNode(
|
|
143
|
-
|
|
144
|
-
vue.mergeProps(
|
|
140
|
+
$setup["VkfFormItem"],
|
|
141
|
+
vue.mergeProps($setup.formItemBindProps, { class: "vkf-card-input-collection" }),
|
|
145
142
|
{
|
|
146
143
|
default: vue.withCtx(() => [
|
|
147
144
|
vue.createElementVNode("div", _hoisted_1, [
|
|
148
145
|
vue.renderSlot(_ctx.$slots, "options", {}, () => [
|
|
149
146
|
_ctx.slots.options ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.slots.options), { key: 0 })) : vue.createCommentVNode("v-if", true)
|
|
150
147
|
]),
|
|
151
|
-
|
|
148
|
+
!$setup.readonly && _ctx.splicable ? (vue.openBlock(), vue.createBlock($setup["ElButton"], {
|
|
152
149
|
key: 0,
|
|
153
150
|
type: "primary",
|
|
154
|
-
onClick:
|
|
151
|
+
onClick: $setup.addToFirst
|
|
155
152
|
}, {
|
|
156
153
|
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
157
154
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
158
155
|
])),
|
|
159
|
-
_: 1
|
|
160
|
-
|
|
161
|
-
}
|
|
156
|
+
_: 1,
|
|
157
|
+
__: [0]
|
|
158
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
162
159
|
]),
|
|
163
|
-
!_ctx.modelValue?.length ? (vue.openBlock(), vue.createBlock(
|
|
160
|
+
!_ctx.modelValue?.length ? (vue.openBlock(), vue.createBlock($setup["ElEmpty"], {
|
|
164
161
|
key: 0,
|
|
165
162
|
class: "vkf-card-input-collection-empty"
|
|
166
163
|
}, {
|
|
@@ -175,7 +172,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
175
172
|
null,
|
|
176
173
|
vue.renderList(_ctx.modelValue, (item, index) => {
|
|
177
174
|
return vue.openBlock(), vue.createBlock(
|
|
178
|
-
|
|
175
|
+
$setup["ElCard"],
|
|
179
176
|
{
|
|
180
177
|
key: index,
|
|
181
178
|
class: "vkf-card-input-collection-card",
|
|
@@ -183,36 +180,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
183
180
|
},
|
|
184
181
|
vue.createSlots({
|
|
185
182
|
default: vue.withCtx(() => [
|
|
186
|
-
vue.createVNode(
|
|
187
|
-
source:
|
|
183
|
+
vue.createVNode($setup["VkfFormItemRenderer"], {
|
|
184
|
+
source: $setup.createTheFormItems(index)
|
|
188
185
|
}, null, 8, ["source"])
|
|
189
186
|
]),
|
|
190
187
|
_: 2
|
|
191
188
|
/* DYNAMIC */
|
|
192
189
|
}, [
|
|
193
|
-
|
|
190
|
+
!$setup.readonly && _ctx.splicable ? {
|
|
194
191
|
name: "footer",
|
|
195
192
|
fn: vue.withCtx(() => [
|
|
196
193
|
vue.createElementVNode("div", _hoisted_2, [
|
|
197
|
-
vue.createVNode(
|
|
194
|
+
vue.createVNode($setup["ElButton"], {
|
|
198
195
|
type: "primary",
|
|
199
|
-
onClick: () =>
|
|
196
|
+
onClick: () => $setup.handlePlus(index)
|
|
200
197
|
}, {
|
|
201
198
|
default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
202
199
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
203
200
|
])]),
|
|
204
|
-
_: 2
|
|
205
|
-
|
|
201
|
+
_: 2,
|
|
202
|
+
__: [2]
|
|
206
203
|
}, 1032, ["onClick"]),
|
|
207
|
-
vue.createVNode(
|
|
204
|
+
vue.createVNode($setup["ElButton"], {
|
|
208
205
|
type: "danger",
|
|
209
|
-
onClick: () =>
|
|
206
|
+
onClick: () => $setup.handleMinus(index)
|
|
210
207
|
}, {
|
|
211
208
|
default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
212
209
|
vue.createTextVNode(" \u5220\u9664 ")
|
|
213
210
|
])]),
|
|
214
|
-
_: 2
|
|
215
|
-
|
|
211
|
+
_: 2,
|
|
212
|
+
__: [3]
|
|
216
213
|
}, 1032, ["onClick"])
|
|
217
214
|
])
|
|
218
215
|
]),
|
|
@@ -236,7 +233,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
236
233
|
]),
|
|
237
234
|
_: 3
|
|
238
235
|
/* FORWARDED */
|
|
239
|
-
}, 8, ["data"
|
|
236
|
+
}, 8, ["data"])
|
|
240
237
|
]),
|
|
241
238
|
_: 3
|
|
242
239
|
/* FORWARDED */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, createVNode, mergeProps, createElementVNode, renderSlot, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, createSlots } from 'vue';
|
|
1
2
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
|
-
import { defineComponent, computed, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, createElementVNode, renderSlot, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, createSlots } from 'vue';
|
|
3
3
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
4
|
-
import {
|
|
4
|
+
import { ElButton, ElCard, ElEmpty } from 'element-plus';
|
|
5
5
|
import { ensetData, getValue } from '@vunk/core';
|
|
6
6
|
import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
|
|
7
7
|
import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
|
|
@@ -39,124 +39,121 @@ const props = {
|
|
|
39
39
|
};
|
|
40
40
|
const emits = {};
|
|
41
41
|
|
|
42
|
-
var _sfc_main = defineComponent({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
VkfFormItem,
|
|
46
|
-
ElCard,
|
|
47
|
-
ElButton,
|
|
48
|
-
ElEmpty,
|
|
49
|
-
VkfTemplateInstancesProvider,
|
|
50
|
-
VkfTemplatesDefault,
|
|
51
|
-
VkfRendererData,
|
|
52
|
-
VkfFormItemRenderer
|
|
42
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
|
+
...{
|
|
44
|
+
name: "VkfCardInputCollection"
|
|
53
45
|
},
|
|
54
|
-
|
|
46
|
+
__name: "index",
|
|
47
|
+
props: props,
|
|
55
48
|
emits,
|
|
56
|
-
setup(
|
|
57
|
-
|
|
58
|
-
const
|
|
49
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
50
|
+
__expose();
|
|
51
|
+
const props = __props;
|
|
52
|
+
const emit = __emit;
|
|
53
|
+
const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
|
|
54
|
+
const readonly = useComputedReadonly(props);
|
|
59
55
|
const formData = computed(() => {
|
|
60
|
-
if (!
|
|
61
|
-
return
|
|
56
|
+
if (!props.prop || props.prop.length === 0) {
|
|
57
|
+
return props.modelValue;
|
|
62
58
|
}
|
|
63
59
|
const data = {};
|
|
64
60
|
ensetData(data, {
|
|
65
|
-
k:
|
|
66
|
-
v:
|
|
61
|
+
k: props.prop,
|
|
62
|
+
v: props.modelValue
|
|
67
63
|
});
|
|
68
64
|
return data;
|
|
69
65
|
});
|
|
70
66
|
function handlePlus(index) {
|
|
71
|
-
const data = cloneDeep(
|
|
67
|
+
const data = cloneDeep(props.modelValue);
|
|
72
68
|
data.splice(index + 1, 0, {});
|
|
73
69
|
emit("update:modelValue", data);
|
|
74
70
|
}
|
|
75
71
|
function handleMinus(index) {
|
|
76
|
-
const data = cloneDeep(
|
|
72
|
+
const data = cloneDeep(props.modelValue);
|
|
77
73
|
data.splice(index, 1);
|
|
78
74
|
emit("update:modelValue", data);
|
|
79
75
|
}
|
|
80
76
|
const addToFirst = () => {
|
|
81
77
|
emit("update:modelValue", [
|
|
82
78
|
{},
|
|
83
|
-
...
|
|
79
|
+
...props.modelValue ?? []
|
|
84
80
|
]);
|
|
85
81
|
};
|
|
86
82
|
const handleFormSetData = (e) => {
|
|
87
83
|
const data = cloneDeep(formData.value);
|
|
88
84
|
ensetData(data, e);
|
|
89
|
-
emit("update:modelValue", getValue(data,
|
|
85
|
+
emit("update:modelValue", getValue(data, props.prop));
|
|
90
86
|
};
|
|
91
87
|
function createTheFormItems(index) {
|
|
92
|
-
return
|
|
88
|
+
return props.formItems.map((formItem) => {
|
|
93
89
|
return {
|
|
94
90
|
readonly: readonly.value,
|
|
95
91
|
...formItem,
|
|
96
92
|
prop: [
|
|
97
|
-
|
|
93
|
+
props.prop ?? [],
|
|
98
94
|
index,
|
|
99
95
|
formItem.prop
|
|
100
96
|
].flat()
|
|
101
97
|
};
|
|
102
98
|
});
|
|
103
99
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
const __returned__ = { props, emit, formItemBindProps, readonly, formData, handlePlus, handleMinus, addToFirst, handleFormSetData, createTheFormItems, get VkfFormItem() {
|
|
101
|
+
return VkfFormItem;
|
|
102
|
+
}, get ElButton() {
|
|
103
|
+
return ElButton;
|
|
104
|
+
}, get ElCard() {
|
|
105
|
+
return ElCard;
|
|
106
|
+
}, get ElEmpty() {
|
|
107
|
+
return ElEmpty;
|
|
108
|
+
}, get VkfTemplatesDefault() {
|
|
109
|
+
return VkfTemplatesDefault;
|
|
110
|
+
}, get VkfTemplateInstancesProvider() {
|
|
111
|
+
return VkfTemplateInstancesProvider;
|
|
112
|
+
}, get VkfFormItemRenderer() {
|
|
113
|
+
return VkfFormItemRenderer;
|
|
114
|
+
}, get VkfRendererData() {
|
|
115
|
+
return VkfRendererData;
|
|
116
|
+
} };
|
|
117
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
118
|
+
return __returned__;
|
|
114
119
|
}
|
|
115
120
|
});
|
|
116
121
|
|
|
117
122
|
const _hoisted_1 = { class: "vkf-card-input-collection-options" };
|
|
118
123
|
const _hoisted_2 = { class: "vkf-card-input-collection-card__footer" };
|
|
119
124
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
120
|
-
|
|
121
|
-
const _component_ElButton = resolveComponent("ElButton");
|
|
122
|
-
const _component_ElEmpty = resolveComponent("ElEmpty");
|
|
123
|
-
const _component_VkfFormItemRenderer = resolveComponent("VkfFormItemRenderer");
|
|
124
|
-
const _component_ElCard = resolveComponent("ElCard");
|
|
125
|
-
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
126
|
-
const _component_VkfRendererData = resolveComponent("VkfRendererData");
|
|
127
|
-
const _component_VkfTemplateInstancesProvider = resolveComponent("VkfTemplateInstancesProvider");
|
|
128
|
-
return openBlock(), createBlock(_component_VkfTemplateInstancesProvider, null, {
|
|
125
|
+
return openBlock(), createBlock($setup["VkfTemplateInstancesProvider"], null, {
|
|
129
126
|
placeholder: withCtx(() => [
|
|
130
|
-
createVNode(
|
|
127
|
+
createVNode($setup["VkfTemplatesDefault"])
|
|
131
128
|
]),
|
|
132
129
|
default: withCtx(() => [
|
|
133
|
-
createVNode(
|
|
134
|
-
data:
|
|
135
|
-
onSetData:
|
|
130
|
+
createVNode($setup["VkfRendererData"], {
|
|
131
|
+
data: $setup.formData,
|
|
132
|
+
onSetData: $setup.handleFormSetData
|
|
136
133
|
}, {
|
|
137
134
|
default: withCtx(() => [
|
|
138
135
|
createVNode(
|
|
139
|
-
|
|
140
|
-
mergeProps(
|
|
136
|
+
$setup["VkfFormItem"],
|
|
137
|
+
mergeProps($setup.formItemBindProps, { class: "vkf-card-input-collection" }),
|
|
141
138
|
{
|
|
142
139
|
default: withCtx(() => [
|
|
143
140
|
createElementVNode("div", _hoisted_1, [
|
|
144
141
|
renderSlot(_ctx.$slots, "options", {}, () => [
|
|
145
142
|
_ctx.slots.options ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.slots.options), { key: 0 })) : createCommentVNode("v-if", true)
|
|
146
143
|
]),
|
|
147
|
-
|
|
144
|
+
!$setup.readonly && _ctx.splicable ? (openBlock(), createBlock($setup["ElButton"], {
|
|
148
145
|
key: 0,
|
|
149
146
|
type: "primary",
|
|
150
|
-
onClick:
|
|
147
|
+
onClick: $setup.addToFirst
|
|
151
148
|
}, {
|
|
152
149
|
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
153
150
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
154
151
|
])),
|
|
155
|
-
_: 1
|
|
156
|
-
|
|
157
|
-
}
|
|
152
|
+
_: 1,
|
|
153
|
+
__: [0]
|
|
154
|
+
})) : createCommentVNode("v-if", true)
|
|
158
155
|
]),
|
|
159
|
-
!_ctx.modelValue?.length ? (openBlock(), createBlock(
|
|
156
|
+
!_ctx.modelValue?.length ? (openBlock(), createBlock($setup["ElEmpty"], {
|
|
160
157
|
key: 0,
|
|
161
158
|
class: "vkf-card-input-collection-empty"
|
|
162
159
|
}, {
|
|
@@ -171,7 +168,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
168
|
null,
|
|
172
169
|
renderList(_ctx.modelValue, (item, index) => {
|
|
173
170
|
return openBlock(), createBlock(
|
|
174
|
-
|
|
171
|
+
$setup["ElCard"],
|
|
175
172
|
{
|
|
176
173
|
key: index,
|
|
177
174
|
class: "vkf-card-input-collection-card",
|
|
@@ -179,36 +176,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
179
176
|
},
|
|
180
177
|
createSlots({
|
|
181
178
|
default: withCtx(() => [
|
|
182
|
-
createVNode(
|
|
183
|
-
source:
|
|
179
|
+
createVNode($setup["VkfFormItemRenderer"], {
|
|
180
|
+
source: $setup.createTheFormItems(index)
|
|
184
181
|
}, null, 8, ["source"])
|
|
185
182
|
]),
|
|
186
183
|
_: 2
|
|
187
184
|
/* DYNAMIC */
|
|
188
185
|
}, [
|
|
189
|
-
|
|
186
|
+
!$setup.readonly && _ctx.splicable ? {
|
|
190
187
|
name: "footer",
|
|
191
188
|
fn: withCtx(() => [
|
|
192
189
|
createElementVNode("div", _hoisted_2, [
|
|
193
|
-
createVNode(
|
|
190
|
+
createVNode($setup["ElButton"], {
|
|
194
191
|
type: "primary",
|
|
195
|
-
onClick: () =>
|
|
192
|
+
onClick: () => $setup.handlePlus(index)
|
|
196
193
|
}, {
|
|
197
194
|
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
198
195
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
199
196
|
])]),
|
|
200
|
-
_: 2
|
|
201
|
-
|
|
197
|
+
_: 2,
|
|
198
|
+
__: [2]
|
|
202
199
|
}, 1032, ["onClick"]),
|
|
203
|
-
createVNode(
|
|
200
|
+
createVNode($setup["ElButton"], {
|
|
204
201
|
type: "danger",
|
|
205
|
-
onClick: () =>
|
|
202
|
+
onClick: () => $setup.handleMinus(index)
|
|
206
203
|
}, {
|
|
207
204
|
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
208
205
|
createTextVNode(" \u5220\u9664 ")
|
|
209
206
|
])]),
|
|
210
|
-
_: 2
|
|
211
|
-
|
|
207
|
+
_: 2,
|
|
208
|
+
__: [3]
|
|
212
209
|
}, 1032, ["onClick"])
|
|
213
210
|
])
|
|
214
211
|
]),
|
|
@@ -232,7 +229,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
232
229
|
]),
|
|
233
230
|
_: 3
|
|
234
231
|
/* FORWARDED */
|
|
235
|
-
}, 8, ["data"
|
|
232
|
+
}, 8, ["data"])
|
|
236
233
|
]),
|
|
237
234
|
_: 3
|
|
238
235
|
/* FORWARDED */
|
|
@@ -25,7 +25,14 @@ export declare const props: {
|
|
|
25
25
|
type: PropType<Slots>;
|
|
26
26
|
default: () => {};
|
|
27
27
|
};
|
|
28
|
-
required:
|
|
28
|
+
required: {
|
|
29
|
+
readonly type: PropType<boolean>;
|
|
30
|
+
readonly required: false;
|
|
31
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
32
|
+
__epPropKey: true;
|
|
33
|
+
} & {
|
|
34
|
+
readonly default: undefined;
|
|
35
|
+
};
|
|
29
36
|
formItemSize: {
|
|
30
37
|
type: PropType<"default" | "small" | "large">;
|
|
31
38
|
default: "default" | "small" | "large";
|
|
@@ -56,29 +63,57 @@ export declare const props: {
|
|
|
56
63
|
default: boolean;
|
|
57
64
|
};
|
|
58
65
|
label: StringConstructor;
|
|
59
|
-
labelWidth:
|
|
60
|
-
|
|
66
|
+
labelWidth: {
|
|
67
|
+
readonly type: PropType<string | number>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
} & {
|
|
72
|
+
readonly default: "";
|
|
73
|
+
};
|
|
74
|
+
labelPosition: {
|
|
75
|
+
readonly type: PropType<"" | "top" | "left" | "right">;
|
|
76
|
+
readonly required: false;
|
|
77
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
|
+
__epPropKey: true;
|
|
79
|
+
} & {
|
|
80
|
+
readonly default: "";
|
|
81
|
+
};
|
|
61
82
|
prop: {
|
|
62
|
-
readonly type:
|
|
83
|
+
readonly type: PropType<import("element-plus").FormItemProp>;
|
|
63
84
|
readonly required: false;
|
|
64
85
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
65
86
|
__epPropKey: true;
|
|
66
87
|
};
|
|
67
88
|
rules: {
|
|
68
|
-
readonly type:
|
|
89
|
+
readonly type: PropType<unknown>;
|
|
69
90
|
readonly required: false;
|
|
70
91
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
92
|
__epPropKey: true;
|
|
72
93
|
};
|
|
73
94
|
error: StringConstructor;
|
|
74
95
|
validateStatus: {
|
|
75
|
-
readonly type:
|
|
96
|
+
readonly type: PropType<"" | "error" | "success" | "validating">;
|
|
76
97
|
readonly required: false;
|
|
77
98
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
99
|
__epPropKey: true;
|
|
79
100
|
};
|
|
80
101
|
for: StringConstructor;
|
|
81
|
-
inlineMessage:
|
|
82
|
-
|
|
102
|
+
inlineMessage: {
|
|
103
|
+
readonly type: PropType<string | boolean>;
|
|
104
|
+
readonly required: false;
|
|
105
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
106
|
+
__epPropKey: true;
|
|
107
|
+
} & {
|
|
108
|
+
readonly default: "";
|
|
109
|
+
};
|
|
110
|
+
showMessage: {
|
|
111
|
+
readonly type: PropType<boolean>;
|
|
112
|
+
readonly required: false;
|
|
113
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
114
|
+
__epPropKey: true;
|
|
115
|
+
} & {
|
|
116
|
+
readonly default: true;
|
|
117
|
+
};
|
|
83
118
|
};
|
|
84
119
|
export declare const emits: {};
|