@vunk/form 2.14.18 → 2.14.20
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 +8 -1
- package/components/button/src/index.vue.d.ts +43 -8
- package/components/card-input-collection/src/core.vue.d.ts +30 -9
- package/components/cascader/src/ctx.d.ts +63 -6
- package/components/cascader/src/index.vue.d.ts +155 -10
- package/components/color-picker/src/ctx.d.ts +14 -0
- package/components/color-picker/src/index.vue.d.ts +29 -0
- package/components/date-picker/src/ctx.d.ts +46 -4
- package/components/date-picker/src/index.vue.d.ts +266 -27
- package/components/date-picker-range/src/ctx.d.ts +48 -6
- package/components/date-picker-range/src/index.vue.d.ts +98 -13
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +4696 -48
- package/components/dialog-input-collection/src/index.vue.d.ts +4723 -54
- package/components/download-plus/src/index.vue.d.ts +45 -6
- package/components/esri-input-geojson/src/append.vue.d.ts +27 -6
- package/components/esri-input-geojson/src/ctx.d.ts +7 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +13 -0
- package/components/fieldset/index.cjs +1 -17
- package/components/fieldset/index.mjs +1 -17
- package/components/form/src/ctx.d.ts +1 -1
- package/components/form/src/index.vue.d.ts +2867 -22
- package/components/form-item/src/core.vue.d.ts +27 -6
- package/components/input/src/ctx.d.ts +7 -1
- package/components/input/src/index.vue.d.ts +31 -0
- package/components/input-array/src/form-template.vue.d.ts +27 -6
- package/components/input-array/src/index.vue.d.ts +27 -6
- package/components/input-collection/src/core.vue.d.ts +27 -6
- package/components/input-link/src/ctx.d.ts +6 -0
- package/components/input-link/src/index.vue.d.ts +12 -0
- package/components/input-number/src/ctx.d.ts +10 -1
- package/components/input-number/src/index.vue.d.ts +55 -0
- package/components/input-tag/src/ctx.d.ts +17 -1
- package/components/input-tag/src/index.vue.d.ts +103 -3
- package/components/select/src/core.vue.d.ts +2 -2
- package/components/select/src/ctx.d.ts +1 -1
- package/components/select/src/index.vue.d.ts +1 -1
- package/components/tables-select/src/index.vue.d.ts +108 -12
- package/components/upload/index.cjs +93 -35
- package/components/upload/index.css +3 -0
- package/components/upload/index.mjs +95 -37
- package/components/upload/src/ctx.d.ts +1 -4
- package/components/upload/src/file.vue.d.ts +427 -6
- package/components/upload/src/index.vue.d.ts +427 -12
- package/components/upload-plus/src/index.vue.d.ts +45 -6
- package/components/van-cascader/index.cjs +40 -43
- package/components/van-cascader/index.mjs +41 -44
- package/components/van-cascader/src/ctx.d.ts +62 -5
- package/components/van-cascader/src/index.vue.d.ts +825 -1681
- package/components/var-datetime-picker/src/index.vue.d.ts +159 -25
- package/index.css +3 -0
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +7 -7
- package/shared/element-plus/instances.d.ts +45 -3
- package/shared/progress-it/index.cjs +3 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
3
|
-
import { uploadProps, ElProgress, ElIcon, useNamespace, useLocale, ElUpload, ElLink, ElMessageBox, genFileId } from 'element-plus';
|
|
4
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, normalizeClass, createBlock, createElementVNode, withModifiers, createVNode, withCtx, toDisplayString, normalizeStyle, shallowRef, normalizeProps, guardReactiveProps, mergeProps, createSlots, renderSlot
|
|
3
|
+
import { uploadProps, ElProgress, ElIcon, ElButton, useNamespace, useLocale, ElUpload, ElLink, ElMessageBox, genFileId } from 'element-plus';
|
|
4
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, normalizeClass, createBlock, createElementVNode, withModifiers, createVNode, withCtx, toDisplayString, createTextVNode, normalizeStyle, shallowRef, normalizeProps, guardReactiveProps, mergeProps, createSlots, renderSlot } from 'vue';
|
|
5
5
|
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
6
6
|
import { createUploadBindProps } from '@vunk/form/shared/element-plus';
|
|
7
7
|
import { h as check_default, z as zoom_in_default, d as delete_default, i as close_default, j as circle_check_default, k as document_default, a as download_default } from '../index.mjs';
|
|
8
|
-
import { NOOP } from '@vunk/core/shared/utils-function';
|
|
9
8
|
import { RestFetch } from '@vunk/core/shared/utils-fetch';
|
|
9
|
+
import { NOOP } from '@vunk/core/shared/utils-function';
|
|
10
|
+
import { isCallable } from '@vunk/shared/function';
|
|
10
11
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
11
12
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
12
13
|
import progress from '@vunk/form/shared/progress-it';
|
|
@@ -18,10 +19,7 @@ const props = {
|
|
|
18
19
|
type: String,
|
|
19
20
|
default: ""
|
|
20
21
|
},
|
|
21
|
-
preview:
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
},
|
|
22
|
+
preview: null,
|
|
25
23
|
beforeUpload: {
|
|
26
24
|
type: Function,
|
|
27
25
|
default: void 0
|
|
@@ -77,7 +75,8 @@ var _sfc_main$1 = defineComponent({
|
|
|
77
75
|
Close: close_default,
|
|
78
76
|
CircleCheck: circle_check_default,
|
|
79
77
|
Document: document_default,
|
|
80
|
-
Download: download_default
|
|
78
|
+
Download: download_default,
|
|
79
|
+
ElButton
|
|
81
80
|
},
|
|
82
81
|
props: {
|
|
83
82
|
listType: {
|
|
@@ -101,12 +100,12 @@ var _sfc_main$1 = defineComponent({
|
|
|
101
100
|
default: void 0
|
|
102
101
|
},
|
|
103
102
|
preview: {
|
|
104
|
-
type: Boolean,
|
|
103
|
+
type: [Boolean, Function],
|
|
105
104
|
default: false
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
107
|
emits: {
|
|
109
|
-
|
|
108
|
+
remove: (e) => e
|
|
110
109
|
},
|
|
111
110
|
setup(props, { emit }) {
|
|
112
111
|
const nsUpload = useNamespace("upload");
|
|
@@ -133,12 +132,23 @@ var _sfc_main$1 = defineComponent({
|
|
|
133
132
|
method: "GET"
|
|
134
133
|
});
|
|
135
134
|
};
|
|
135
|
+
const previewable = computed(() => {
|
|
136
|
+
if (isCallable(props.preview)) {
|
|
137
|
+
return props.preview(props.file);
|
|
138
|
+
}
|
|
139
|
+
return props.preview;
|
|
140
|
+
});
|
|
141
|
+
const handlePreview = (file = props.file) => {
|
|
142
|
+
previewable.value && props.onPreview(file);
|
|
143
|
+
};
|
|
136
144
|
return {
|
|
137
145
|
handleRemove,
|
|
138
146
|
t,
|
|
139
147
|
nsIcon,
|
|
140
148
|
nsUpload,
|
|
141
|
-
handleDownload
|
|
149
|
+
handleDownload,
|
|
150
|
+
handlePreview,
|
|
151
|
+
previewable
|
|
142
152
|
};
|
|
143
153
|
}
|
|
144
154
|
});
|
|
@@ -146,13 +156,14 @@ var _sfc_main$1 = defineComponent({
|
|
|
146
156
|
const _hoisted_1$1 = ["src"];
|
|
147
157
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
148
158
|
const _component_Document = resolveComponent("Document");
|
|
149
|
-
const
|
|
159
|
+
const _component_ElIcon = resolveComponent("ElIcon");
|
|
150
160
|
const _component_Download = resolveComponent("Download");
|
|
151
|
-
const
|
|
152
|
-
const
|
|
161
|
+
const _component_ElButton = resolveComponent("ElButton");
|
|
162
|
+
const _component_ElProgress = resolveComponent("ElProgress");
|
|
163
|
+
const _component_CircleCheck = resolveComponent("CircleCheck");
|
|
153
164
|
const _component_Check = resolveComponent("Check");
|
|
154
165
|
const _component_Close = resolveComponent("Close");
|
|
155
|
-
const
|
|
166
|
+
const _component_ZoomIn = resolveComponent("ZoomIn");
|
|
156
167
|
const _component_Delete = resolveComponent("Delete");
|
|
157
168
|
return openBlock(), createElementBlock(
|
|
158
169
|
Fragment,
|
|
@@ -168,13 +179,19 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
168
179
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-thumbnail")),
|
|
169
180
|
src: _ctx.file.url,
|
|
170
181
|
alt: ""
|
|
171
|
-
}, null, 10, _hoisted_1$1)) : (openBlock(), createBlock(_component_Document, {
|
|
182
|
+
}, null, 10, _hoisted_1$1)) : (openBlock(), createBlock(_component_Document, {
|
|
183
|
+
key: 1,
|
|
184
|
+
class: normalizeClass([
|
|
185
|
+
_ctx.nsUpload.be("list", "item-thumbnail"),
|
|
186
|
+
_ctx.nsIcon.m("document")
|
|
187
|
+
])
|
|
188
|
+
}, null, 8, ["class"]))
|
|
172
189
|
],
|
|
173
190
|
64
|
|
174
191
|
/* STABLE_FRAGMENT */
|
|
175
192
|
)) : createCommentVNode("v-if", true),
|
|
176
193
|
createCommentVNode(" text "),
|
|
177
|
-
_ctx.listType !== "picture"
|
|
194
|
+
_ctx.listType !== "picture-card" || _ctx.file.status === "uploading" ? (openBlock(), createElementBlock(
|
|
178
195
|
"div",
|
|
179
196
|
{
|
|
180
197
|
key: 1,
|
|
@@ -185,10 +202,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
185
202
|
"a",
|
|
186
203
|
{
|
|
187
204
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-name")),
|
|
188
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.
|
|
205
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.handlePreview(_ctx.file), ["prevent"]))
|
|
189
206
|
},
|
|
190
207
|
[
|
|
191
|
-
createVNode(
|
|
208
|
+
createVNode(_component_ElIcon, {
|
|
192
209
|
class: normalizeClass(_ctx.nsIcon.m("document"))
|
|
193
210
|
}, {
|
|
194
211
|
default: withCtx(() => [
|
|
@@ -197,12 +214,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
197
214
|
_: 1
|
|
198
215
|
/* STABLE */
|
|
199
216
|
}, 8, ["class"]),
|
|
200
|
-
createVNode(
|
|
217
|
+
createVNode(_component_ElIcon, {
|
|
201
218
|
class: normalizeClass([
|
|
202
219
|
_ctx.nsIcon.m("download"),
|
|
203
220
|
_ctx.nsIcon.m("download-primary")
|
|
204
221
|
]),
|
|
205
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleDownload(_ctx.file))
|
|
222
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.handleDownload(_ctx.file), ["stop"]))
|
|
206
223
|
}, {
|
|
207
224
|
default: withCtx(() => [
|
|
208
225
|
createVNode(_component_Download)
|
|
@@ -223,8 +240,47 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
223
240
|
2
|
|
224
241
|
/* CLASS */
|
|
225
242
|
),
|
|
226
|
-
_ctx.
|
|
227
|
-
|
|
243
|
+
_ctx.listType === "picture" ? (openBlock(), createElementBlock(
|
|
244
|
+
"div",
|
|
245
|
+
{
|
|
246
|
+
key: 0,
|
|
247
|
+
class: normalizeClass(_ctx.nsUpload.be("list", "item-file-actions"))
|
|
248
|
+
},
|
|
249
|
+
[
|
|
250
|
+
createCommentVNode(" \u9884\u89C8 "),
|
|
251
|
+
createVNode(_component_ElButton, {
|
|
252
|
+
disabled: !_ctx.previewable,
|
|
253
|
+
plain: "",
|
|
254
|
+
size: "small",
|
|
255
|
+
round: "",
|
|
256
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handlePreview(_ctx.file))
|
|
257
|
+
}, {
|
|
258
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
259
|
+
createTextVNode(" \u9884\u89C8 ")
|
|
260
|
+
])),
|
|
261
|
+
_: 1,
|
|
262
|
+
__: [8]
|
|
263
|
+
}, 8, ["disabled"]),
|
|
264
|
+
createCommentVNode(" \u4E0B\u8F7D "),
|
|
265
|
+
createVNode(_component_ElButton, {
|
|
266
|
+
plain: "",
|
|
267
|
+
size: "small",
|
|
268
|
+
round: "",
|
|
269
|
+
type: "primary",
|
|
270
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleDownload(_ctx.file))
|
|
271
|
+
}, {
|
|
272
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
|
273
|
+
createTextVNode(" \u4E0B\u8F7D ")
|
|
274
|
+
])),
|
|
275
|
+
_: 1,
|
|
276
|
+
__: [9]
|
|
277
|
+
})
|
|
278
|
+
],
|
|
279
|
+
2
|
|
280
|
+
/* CLASS */
|
|
281
|
+
)) : createCommentVNode("v-if", true),
|
|
282
|
+
_ctx.file.status === "uploading" ? (openBlock(), createBlock(_component_ElProgress, {
|
|
283
|
+
key: 1,
|
|
228
284
|
type: _ctx.listType === "picture-card" ? "circle" : "line",
|
|
229
285
|
"stroke-width": _ctx.listType === "picture-card" ? 6 : 2,
|
|
230
286
|
percentage: Number(_ctx.file.percentage),
|
|
@@ -234,13 +290,14 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
234
290
|
2
|
|
235
291
|
/* CLASS */
|
|
236
292
|
)) : createCommentVNode("v-if", true),
|
|
293
|
+
createCommentVNode(" label "),
|
|
237
294
|
createElementVNode(
|
|
238
295
|
"label",
|
|
239
296
|
{
|
|
240
297
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-status-label"))
|
|
241
298
|
},
|
|
242
299
|
[
|
|
243
|
-
_ctx.listType === "text" ? (openBlock(), createBlock(
|
|
300
|
+
_ctx.listType === "text" ? (openBlock(), createBlock(_component_ElIcon, {
|
|
244
301
|
key: 0,
|
|
245
302
|
class: normalizeClass([
|
|
246
303
|
_ctx.nsIcon.m("upload-success"),
|
|
@@ -248,11 +305,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
248
305
|
])
|
|
249
306
|
}, {
|
|
250
307
|
default: withCtx(() => [
|
|
251
|
-
createVNode(
|
|
308
|
+
createVNode(_component_CircleCheck)
|
|
252
309
|
]),
|
|
253
310
|
_: 1
|
|
254
311
|
/* STABLE */
|
|
255
|
-
}, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(
|
|
312
|
+
}, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(_component_ElIcon, {
|
|
256
313
|
key: 1,
|
|
257
314
|
class: normalizeClass([_ctx.nsIcon.m("upload-success"), _ctx.nsIcon.m("check")])
|
|
258
315
|
}, {
|
|
@@ -266,10 +323,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
266
323
|
2
|
|
267
324
|
/* CLASS */
|
|
268
325
|
),
|
|
269
|
-
!_ctx.disabled ? (openBlock(), createBlock(
|
|
326
|
+
!_ctx.disabled ? (openBlock(), createBlock(_component_ElIcon, {
|
|
270
327
|
key: 2,
|
|
271
328
|
class: normalizeClass(_ctx.nsIcon.m("close")),
|
|
272
|
-
onClick: _cache[
|
|
329
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleRemove(_ctx.file))
|
|
273
330
|
}, {
|
|
274
331
|
default: withCtx(() => [
|
|
275
332
|
createVNode(_component_Close)
|
|
@@ -277,7 +334,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
277
334
|
_: 1
|
|
278
335
|
/* STABLE */
|
|
279
336
|
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
280
|
-
createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
|
|
337
|
+
createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn "),
|
|
281
338
|
createCommentVNode(" This is a bug which needs to be fixed "),
|
|
282
339
|
createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
|
|
283
340
|
createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{
|
|
@@ -291,19 +348,20 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
291
348
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-actions"))
|
|
292
349
|
},
|
|
293
350
|
[
|
|
294
|
-
|
|
351
|
+
createCommentVNode(" \u9884\u89C8 "),
|
|
352
|
+
_ctx.previewable ? (openBlock(), createElementBlock(
|
|
295
353
|
"span",
|
|
296
354
|
{
|
|
297
355
|
key: 0,
|
|
298
356
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-preview")),
|
|
299
|
-
onClick: _cache[
|
|
357
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handlePreview(_ctx.file))
|
|
300
358
|
},
|
|
301
359
|
[
|
|
302
|
-
createVNode(
|
|
360
|
+
createVNode(_component_ElIcon, {
|
|
303
361
|
class: normalizeClass(_ctx.nsIcon.m("zoom-in"))
|
|
304
362
|
}, {
|
|
305
363
|
default: withCtx(() => [
|
|
306
|
-
createVNode(
|
|
364
|
+
createVNode(_component_ZoomIn)
|
|
307
365
|
]),
|
|
308
366
|
_: 1
|
|
309
367
|
/* STABLE */
|
|
@@ -317,10 +375,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
317
375
|
"span",
|
|
318
376
|
{
|
|
319
377
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-download")),
|
|
320
|
-
onClick: _cache[
|
|
378
|
+
onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleDownload(_ctx.file))
|
|
321
379
|
},
|
|
322
380
|
[
|
|
323
|
-
createVNode(
|
|
381
|
+
createVNode(_component_ElIcon, {
|
|
324
382
|
class: normalizeClass(_ctx.nsIcon.m("download"))
|
|
325
383
|
}, {
|
|
326
384
|
default: withCtx(() => [
|
|
@@ -338,10 +396,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
338
396
|
{
|
|
339
397
|
key: 1,
|
|
340
398
|
class: normalizeClass(_ctx.nsUpload.be("list", "item-delete")),
|
|
341
|
-
onClick: _cache[
|
|
399
|
+
onClick: _cache[7] || (_cache[7] = ($event) => _ctx.handleRemove(_ctx.file))
|
|
342
400
|
},
|
|
343
401
|
[
|
|
344
|
-
createVNode(
|
|
402
|
+
createVNode(_component_ElIcon, {
|
|
345
403
|
class: normalizeClass(_ctx.nsIcon.m("delete"))
|
|
346
404
|
}, {
|
|
347
405
|
default: withCtx(() => [
|