@vunk/form 2.19.19 → 2.19.21
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/ai-provider/index.cjs +1 -0
- package/components/ai-provider/index.d.ts +7 -0
- package/components/ai-provider/index.mjs +61 -0
- package/components/ai-provider/src/ctx.d.ts +8 -0
- package/components/ai-provider/src/index.vue.d.ts +23 -0
- package/components/ai-provider/src/types.d.ts +56 -0
- package/components/ai-provider/src/use.d.ts +3 -0
- package/components/api-tables-select/index.cjs +1 -1
- package/components/api-tables-select/index.mjs +1 -1
- package/components/api-tables-select/src/ctx.d.ts +57 -57
- package/components/api-tables-select/src/index.vue.d.ts +46 -419
- package/components/button/index.cjs +1 -1
- package/components/button/index.mjs +12 -12
- package/components/button/src/ctx.d.ts +7 -2
- package/components/button/src/index.vue.d.ts +36 -14
- package/components/card-input-collection/index.cjs +1 -1
- package/components/card-input-collection/index.mjs +136 -141
- package/components/card-input-collection/src/core.vue.d.ts +18 -7
- package/components/card-input-collection/src/ctx.d.ts +7 -2
- package/components/card-input-collection/src/index.vue.d.ts +18 -7
- package/components/cascader/index.cjs +1 -1
- package/components/cascader/index.mjs +38 -39
- package/components/cascader/src/ctx.d.ts +8 -3
- package/components/cascader/src/index.vue.d.ts +19 -8
- package/components/checkbox/src/ctx.d.ts +8 -3
- package/components/checkbox/src/index.vue.d.ts +43 -21
- package/components/{cloneDeep-DE0l40hv.mjs → cloneDeep-2YeQ7w2t.mjs} +10 -10
- package/components/cloneDeep-Btpy0oPF.js +1 -0
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.mjs +19 -22
- package/components/collapse-item/index.cjs +1 -1
- package/components/collapse-item/index.mjs +21 -21
- package/components/collapse-item/src/index.vue.d.ts +2 -2
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.mjs +26 -27
- package/components/color-picker/src/ctx.d.ts +7 -2
- package/components/color-picker/src/index.vue.d.ts +17 -6
- package/components/{style.css → components.css} +1 -1
- package/components/date-picker/index.cjs +1 -1
- package/components/date-picker/index.mjs +40 -41
- package/components/date-picker/src/ctx.d.ts +8 -3
- package/components/date-picker/src/index.vue.d.ts +17 -6
- package/components/date-picker-range/index.cjs +1 -1
- package/components/date-picker-range/index.mjs +17 -17
- package/components/date-picker-range/src/ctx.d.ts +14 -9
- package/components/date-picker-range/src/index.vue.d.ts +48 -26
- package/components/dialog/index.cjs +1 -1
- package/components/dialog/index.mjs +41 -52
- package/components/dialog/src/ctx.d.ts +1 -1
- package/components/dialog/src/index.vue.d.ts +1 -1
- package/components/dialog-input-collection/index.cjs +1 -1
- package/components/dialog-input-collection/index.mjs +124 -122
- package/components/dialog-input-collection/src/ctx.d.ts +7 -2
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
- package/components/dialog-input-collection/src/index.vue.d.ts +17 -6
- package/components/download-plus/index.cjs +1 -1
- package/components/download-plus/index.mjs +193 -202
- package/components/download-plus/src/ctx.d.ts +7 -2
- package/components/download-plus/src/index.vue.d.ts +32 -10
- package/components/editable-text/index.cjs +1 -1
- package/components/editable-text/index.mjs +72 -75
- package/components/editable-text/src/ctx.d.ts +7 -2
- package/components/editable-text/src/index.vue.d.ts +18 -7
- package/components/el-slider/index.cjs +1 -1
- package/components/el-slider/index.mjs +230 -233
- package/components/el-slider/src/composables/index.cjs +1 -1
- package/components/el-slider/src/composables/index.mjs +1 -1
- package/components/el-slider/src/slider-core.vue.d.ts +3 -3
- package/components/esri-input-geojson/index.cjs +1 -5
- package/components/esri-input-geojson/index.mjs +59 -68
- package/components/esri-input-geojson/src/append.vue.d.ts +2 -2
- package/components/esri-input-geojson/src/ctx.d.ts +9 -4
- package/components/esri-input-geojson/src/index.vue.d.ts +65 -30
- package/components/fieldset/src/index.vue.d.ts +1 -1
- package/components/form/index.cjs +1 -1
- package/components/form/index.mjs +96 -101
- package/components/form/src/ctx.d.ts +2 -2
- package/components/form/src/index.vue.d.ts +4 -4
- package/components/form/src/use.d.ts +2 -2
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +179 -107
- package/components/form-item/src/core.vue.d.ts +7 -3
- package/components/form-item/src/ctx.d.ts +7 -1
- package/components/form-item/src/index.vue.d.ts +13 -2
- package/components/form-item/src/use.d.ts +11 -0
- package/components/form-item-renderer/index.cjs +1 -1
- package/components/form-item-renderer/index.d.ts +1 -0
- package/components/form-item-renderer/index.mjs +85 -78
- package/components/form-item-renderer/src/use.d.ts +3 -0
- package/components/forms-provider/index.cjs +1 -1
- package/components/forms-provider/index.mjs +18 -21
- package/components/index-BIo_4rr_.mjs +18620 -0
- package/components/index-Bc7UifHG.js +1 -0
- package/components/index-D0D9ABpH.js +108 -0
- package/components/{index-CeHbpfCD.mjs → index-DCNYT7Wv.mjs} +0 -1
- package/components/information-collection/index.cjs +1 -1
- package/components/information-collection/index.mjs +32 -38
- package/components/information-collection/src/ctx.d.ts +7 -2
- package/components/information-collection/src/index.vue.d.ts +17 -6
- package/components/information-tag/index.cjs +1 -1
- package/components/information-tag/index.mjs +9 -12
- package/components/information-tag/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -1
- package/components/input/index.mjs +27 -27
- package/components/input/src/ctx.d.ts +9 -4
- package/components/input/src/index.vue.d.ts +35 -13
- package/components/input-array/index.cjs +1 -1
- package/components/input-array/index.mjs +71 -74
- package/components/input-array/src/ctx.d.ts +7 -2
- package/components/input-array/src/index.vue.d.ts +18 -7
- package/components/input-collection/index.cjs +1 -1
- package/components/input-collection/index.mjs +121 -126
- package/components/input-collection/src/core.vue.d.ts +17 -6
- package/components/input-collection/src/ctx.d.ts +7 -2
- package/components/input-collection/src/index.vue.d.ts +17 -6
- package/components/input-file/src/index.vue.d.ts +19 -8
- package/components/input-link/index.cjs +1 -1
- package/components/input-link/index.mjs +1 -1
- package/components/input-link/src/ctx.d.ts +7 -2
- package/components/input-link/src/index.vue.d.ts +54 -21
- package/components/input-number/index.cjs +1 -1
- package/components/input-number/index.mjs +30 -33
- package/components/input-number/src/ctx.d.ts +8 -3
- package/components/input-number/src/index.vue.d.ts +33 -11
- package/components/input-tag/index.cjs +1 -1
- package/components/input-tag/index.mjs +24 -24
- package/components/input-tag/src/ctx.d.ts +9 -4
- package/components/input-tag/src/index.vue.d.ts +33 -11
- package/components/monaco-editor/src/ctx.d.ts +8 -3
- package/components/monaco-editor/src/index.vue.d.ts +38 -16
- package/components/radio/src/ctx.d.ts +7 -2
- package/components/radio/src/index.vue.d.ts +40 -18
- package/components/radio/src/wraper.vue.d.ts +22 -11
- package/components/renderer-data/index.cjs +1 -1
- package/components/renderer-data/index.mjs +14 -17
- package/components/select/index.cjs +1 -1
- package/components/select/index.mjs +165 -112
- package/components/select/src/core.vue.d.ts +107 -70
- package/components/select/src/ctx.d.ts +16 -4
- package/components/select/src/index.vue.d.ts +62 -42
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.mjs +30 -31
- package/components/slider/src/ctx.d.ts +7 -2
- package/components/slider/src/index.vue.d.ts +18 -7
- package/components/switch/src/ctx.d.ts +7 -2
- package/components/switch/src/index.vue.d.ts +18 -7
- package/components/tables-select/index.cjs +1 -1
- package/components/tables-select/index.mjs +4 -4
- package/components/tables-select/src/ctx.d.ts +68 -68
- package/components/tables-select/src/index.vue.d.ts +52 -420
- package/components/template-instances-provider/index.cjs +1 -1
- package/components/template-instances-provider/index.mjs +11 -17
- package/components/templates-default/src/index.vue.d.ts +413 -185
- package/components/templates-esri/src/index.vue.d.ts +65 -30
- package/components/templates-variant/src/index.vue.d.ts +48 -26
- package/components/time-picker/index.cjs +1 -1
- package/components/time-picker/index.mjs +38 -39
- package/components/time-picker/src/ctx.d.ts +8 -3
- package/components/time-picker/src/index.vue.d.ts +17 -6
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.mjs +244 -253
- package/components/upload/src/ctx.d.ts +8 -3
- package/components/upload/src/file.vue.d.ts +3 -3
- package/components/upload/src/index.vue.d.ts +37 -15
- package/components/upload/src/wraper.vue.d.ts +19 -8
- package/components/upload-plus/index.cjs +7 -15
- package/components/upload-plus/index.mjs +1879 -1897
- package/components/upload-plus/src/ctx.d.ts +7 -2
- package/components/upload-plus/src/index.vue.d.ts +18 -7
- package/components/use-watch-C3iIa2DX.js +1 -0
- package/components/use-watch-Dp64x0si.mjs +411 -0
- package/components/van-cascader/src/ctx.d.ts +7 -2
- package/components/van-cascader/src/index.vue.d.ts +19 -8
- package/components/var-datetime-picker/src/ctx.d.ts +7 -2
- package/components/var-datetime-picker/src/index.vue.d.ts +30 -8
- package/components/vditor/src/ctx.d.ts +7 -2
- package/components/vditor/src/index.vue.d.ts +41 -19
- package/composables/element-plus/index.cjs +1 -1
- package/composables/element-plus/index.mjs +10 -10
- package/composables/form-mitt/index.mjs +1 -1
- package/composables/index.cjs +1 -1
- package/composables/index.mjs +53 -53
- package/index.css +1 -1
- package/locale/index.cjs +1 -1
- package/locale/index.mjs +8 -5
- package/locale/lang/ar.d.ts +1 -0
- package/locale/lang/en.d.ts +1 -0
- package/locale/lang/zh-cn.d.ts +1 -0
- package/package.json +9 -1
- package/shared/element-plus/ctx.d.ts +16 -16
- package/shared/types/source/index.d.ts +5 -0
- package/shared/upload/index.cjs +1 -1
- package/shared/upload/index.mjs +166 -165
- package/components/cloneDeep-DaYwfXwD.js +0 -1
- package/components/index-BBriTmQP.js +0 -1
- package/components/use-watch-Bfrz9pv_.js +0 -1
- package/components/use-watch-t49wP7jy.mjs +0 -414
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _VkfFormItemCtx as
|
|
3
|
-
import { bindPropsFactory as
|
|
4
|
-
import { uploadProps as
|
|
5
|
-
import { pickObject as
|
|
6
|
-
import { createUploadBindProps as
|
|
7
|
-
import { f as
|
|
8
|
-
import { RestFetch as
|
|
9
|
-
import { NOOP as
|
|
10
|
-
import { isCallable as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { useComputedReadonly as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
...
|
|
17
|
-
...
|
|
1
|
+
import { defineComponent as T, computed as D, resolveComponent as d, openBlock as r, createElementBlock as w, Fragment as S, normalizeClass as l, createBlock as C, createCommentVNode as v, createElementVNode as E, withModifiers as F, createVNode as s, withCtx as i, toDisplayString as I, createTextVNode as B, normalizeStyle as N, shallowRef as M, normalizeProps as Z, guardReactiveProps as G, mergeProps as q, createSlots as A, renderSlot as H, h as J } from "vue";
|
|
2
|
+
import { _VkfFormItemCtx as V, VkfFormItem as K } from "@vunk/form/components/form-item";
|
|
3
|
+
import { bindPropsFactory as Q, onEmitsFactory as W, vOn as X } from "@vunk/core/shared/utils-vue";
|
|
4
|
+
import { uploadProps as Y, ElButton as _, ElIcon as x, ElProgress as ee, useNamespace as R, ElLink as oe, ElUpload as le, ElMessageBox as ne, genFileId as se } from "element-plus";
|
|
5
|
+
import { pickObject as te } from "@vunk/core/shared/utils-object";
|
|
6
|
+
import { createUploadBindProps as ae } from "@vunk/form/shared/element-plus";
|
|
7
|
+
import { f as ie, h as re, i as de, j as pe, d as ue, z as me, k as ce } from "../index-DCNYT7Wv.mjs";
|
|
8
|
+
import { RestFetch as fe } from "@vunk/core/shared/utils-fetch";
|
|
9
|
+
import { NOOP as ve } from "@vunk/core/shared/utils-function";
|
|
10
|
+
import { isCallable as ye } from "@vunk/shared/function";
|
|
11
|
+
import { useLocale as O } from "@vunk/form/composables/element-plus";
|
|
12
|
+
import { _ as j } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
13
|
+
import { useComputedReadonly as be } from "@vunk/form/composables";
|
|
14
|
+
import we from "@vunk/form/shared/progress-it";
|
|
15
|
+
const $ = {
|
|
16
|
+
...V.props,
|
|
17
|
+
...Y,
|
|
18
18
|
tip: {
|
|
19
19
|
type: String,
|
|
20
20
|
default: ""
|
|
@@ -54,29 +54,29 @@ const L = {
|
|
|
54
54
|
* @description 同 el-upload 的 slots
|
|
55
55
|
*/
|
|
56
56
|
slots: null
|
|
57
|
-
},
|
|
57
|
+
}, ke = Q($), L = {
|
|
58
58
|
"update:fileList": null,
|
|
59
59
|
remove: (e) => e
|
|
60
|
-
},
|
|
60
|
+
}, z = W(L), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
61
61
|
__proto__: null,
|
|
62
|
-
createBindProps:
|
|
63
|
-
createOnEmits:
|
|
64
|
-
emits:
|
|
65
|
-
props:
|
|
66
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
62
|
+
createBindProps: ke,
|
|
63
|
+
createOnEmits: z,
|
|
64
|
+
emits: L,
|
|
65
|
+
props: $
|
|
66
|
+
}, Symbol.toStringTag, { value: "Module" })), ge = new fe({
|
|
67
67
|
baseURL: ""
|
|
68
|
-
}),
|
|
68
|
+
}), Ue = T({
|
|
69
69
|
components: {
|
|
70
|
-
ElProgress:
|
|
71
|
-
ElIcon:
|
|
72
|
-
Check:
|
|
73
|
-
ZoomIn:
|
|
74
|
-
Delete:
|
|
70
|
+
ElProgress: ee,
|
|
71
|
+
ElIcon: x,
|
|
72
|
+
Check: ce,
|
|
73
|
+
ZoomIn: me,
|
|
74
|
+
Delete: ue,
|
|
75
75
|
Close: pe,
|
|
76
|
-
CircleCheck:
|
|
76
|
+
CircleCheck: de,
|
|
77
77
|
Document: re,
|
|
78
|
-
Download:
|
|
79
|
-
ElButton:
|
|
78
|
+
Download: ie,
|
|
79
|
+
ElButton: _
|
|
80
80
|
},
|
|
81
81
|
props: {
|
|
82
82
|
listType: {
|
|
@@ -93,7 +93,7 @@ const L = {
|
|
|
93
93
|
},
|
|
94
94
|
onPreview: {
|
|
95
95
|
type: Function,
|
|
96
|
-
default: () =>
|
|
96
|
+
default: () => ve
|
|
97
97
|
},
|
|
98
98
|
onDownload: {
|
|
99
99
|
type: Function,
|
|
@@ -112,351 +112,342 @@ const L = {
|
|
|
112
112
|
remove: (e) => e
|
|
113
113
|
},
|
|
114
114
|
setup(e, { emit: o }) {
|
|
115
|
-
const
|
|
116
|
-
o("remove",
|
|
117
|
-
},
|
|
115
|
+
const k = R("upload"), p = R("icon"), { tr: U } = O(), u = (t = e.file) => {
|
|
116
|
+
o("remove", t);
|
|
117
|
+
}, y = (t = e.file) => {
|
|
118
118
|
if (e.onDownload) {
|
|
119
|
-
e.onDownload(
|
|
119
|
+
e.onDownload(t);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
let
|
|
123
|
-
|
|
124
|
-
url:
|
|
125
|
-
fileName:
|
|
122
|
+
let n = "";
|
|
123
|
+
t.url ? n = t.url : t.raw && (n = window.URL.createObjectURL(t.raw)), n && ge.download({
|
|
124
|
+
url: n,
|
|
125
|
+
fileName: t.name
|
|
126
126
|
}, {
|
|
127
127
|
method: "GET"
|
|
128
128
|
});
|
|
129
|
-
},
|
|
129
|
+
}, a = D(() => ye(e.preview) ? e.preview(e.file) : e.preview), b = D(() => e.previewLabel || U("el.upload.preview", "预览"));
|
|
130
130
|
return {
|
|
131
|
-
handleRemove:
|
|
132
|
-
nsIcon:
|
|
133
|
-
nsUpload:
|
|
134
|
-
handleDownload:
|
|
135
|
-
handlePreview: (
|
|
136
|
-
|
|
131
|
+
handleRemove: u,
|
|
132
|
+
nsIcon: p,
|
|
133
|
+
nsUpload: k,
|
|
134
|
+
handleDownload: y,
|
|
135
|
+
handlePreview: (t = e.file) => {
|
|
136
|
+
a.value && e.onPreview(t);
|
|
137
137
|
},
|
|
138
|
-
previewText:
|
|
139
|
-
previewable:
|
|
140
|
-
tr:
|
|
138
|
+
previewText: b,
|
|
139
|
+
previewable: a,
|
|
140
|
+
tr: U
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
}),
|
|
144
|
-
function
|
|
145
|
-
const
|
|
146
|
-
return
|
|
147
|
-
e.listType === "picture" || e.file.status !== "uploading" && e.listType === "picture-card" ? (
|
|
148
|
-
/\.(svg|png|jpg|jpeg)$/.test(e.file.name) ? (
|
|
143
|
+
}), he = ["src"];
|
|
144
|
+
function Ce(e, o, k, p, U, u) {
|
|
145
|
+
const y = d("Document"), a = d("ElIcon"), b = d("Download"), h = d("ElButton"), t = d("ElProgress"), n = d("CircleCheck"), m = d("Check"), c = d("Close"), g = d("ZoomIn"), P = d("Delete");
|
|
146
|
+
return r(), w(S, null, [
|
|
147
|
+
e.listType === "picture" || e.file.status !== "uploading" && e.listType === "picture-card" ? (r(), w(S, { key: 0 }, [
|
|
148
|
+
/\.(svg|png|jpg|jpeg)$/.test(e.file.name) ? (r(), w("img", {
|
|
149
149
|
key: 0,
|
|
150
|
-
class:
|
|
150
|
+
class: l(e.nsUpload.be("list", "item-thumbnail")),
|
|
151
151
|
src: e.file.url,
|
|
152
152
|
alt: ""
|
|
153
|
-
}, null, 10,
|
|
153
|
+
}, null, 10, he)) : (r(), C(y, {
|
|
154
154
|
key: 1,
|
|
155
|
-
class:
|
|
155
|
+
class: l([
|
|
156
156
|
e.nsUpload.be("list", "item-thumbnail"),
|
|
157
157
|
e.nsIcon.m("document")
|
|
158
158
|
])
|
|
159
159
|
}, null, 8, ["class"]))
|
|
160
|
-
], 64)) :
|
|
161
|
-
e.listType !== "picture-card" || e.file.status === "uploading" ? (
|
|
160
|
+
], 64)) : v("", !0),
|
|
161
|
+
e.listType !== "picture-card" || e.file.status === "uploading" ? (r(), w("div", {
|
|
162
162
|
key: 1,
|
|
163
|
-
class:
|
|
163
|
+
class: l(e.nsUpload.be("list", "item-info"))
|
|
164
164
|
}, [
|
|
165
|
-
|
|
166
|
-
class:
|
|
167
|
-
onClick: o[1] || (o[1] =
|
|
165
|
+
E("a", {
|
|
166
|
+
class: l(e.nsUpload.be("list", "item-name")),
|
|
167
|
+
onClick: o[1] || (o[1] = F((f) => e.handlePreview(e.file), ["prevent"]))
|
|
168
168
|
}, [
|
|
169
|
-
s(
|
|
170
|
-
class:
|
|
169
|
+
s(a, {
|
|
170
|
+
class: l(e.nsIcon.m("document"))
|
|
171
171
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
s(
|
|
172
|
+
default: i(() => [
|
|
173
|
+
s(y)
|
|
174
174
|
]),
|
|
175
175
|
_: 1
|
|
176
176
|
}, 8, ["class"]),
|
|
177
|
-
s(
|
|
178
|
-
class:
|
|
177
|
+
s(a, {
|
|
178
|
+
class: l([
|
|
179
179
|
e.nsIcon.m("download"),
|
|
180
180
|
e.nsIcon.m("download-primary")
|
|
181
181
|
]),
|
|
182
|
-
onClick: o[0] || (o[0] =
|
|
182
|
+
onClick: o[0] || (o[0] = F((f) => e.handleDownload(e.file), ["stop"]))
|
|
183
183
|
}, {
|
|
184
|
-
default:
|
|
185
|
-
s(
|
|
184
|
+
default: i(() => [
|
|
185
|
+
s(b)
|
|
186
186
|
]),
|
|
187
187
|
_: 1
|
|
188
188
|
}, 8, ["class"]),
|
|
189
|
-
|
|
190
|
-
class:
|
|
191
|
-
},
|
|
189
|
+
E("span", {
|
|
190
|
+
class: l(e.nsUpload.be("list", "item-file-name"))
|
|
191
|
+
}, I(e.file.name), 3)
|
|
192
192
|
], 2),
|
|
193
|
-
e.listType === "picture" ? (
|
|
193
|
+
e.listType === "picture" ? (r(), w("div", {
|
|
194
194
|
key: 0,
|
|
195
|
-
class:
|
|
195
|
+
class: l(e.nsUpload.be("list", "item-file-actions"))
|
|
196
196
|
}, [
|
|
197
|
-
s(
|
|
197
|
+
s(h, {
|
|
198
198
|
disabled: !e.previewable,
|
|
199
|
-
class:
|
|
199
|
+
class: l(e.nsUpload.be("list", "item-file-action-preview")),
|
|
200
200
|
plain: "",
|
|
201
201
|
size: "small",
|
|
202
202
|
round: "",
|
|
203
|
-
onClick: o[2] || (o[2] = (
|
|
203
|
+
onClick: o[2] || (o[2] = (f) => e.handlePreview(e.file))
|
|
204
204
|
}, {
|
|
205
|
-
default:
|
|
206
|
-
|
|
205
|
+
default: i(() => [
|
|
206
|
+
B(I(e.previewText), 1)
|
|
207
207
|
]),
|
|
208
208
|
_: 1
|
|
209
209
|
}, 8, ["disabled", "class"]),
|
|
210
|
-
s(
|
|
210
|
+
s(h, {
|
|
211
211
|
plain: "",
|
|
212
212
|
size: "small",
|
|
213
213
|
round: "",
|
|
214
214
|
type: "primary",
|
|
215
|
-
onClick: o[3] || (o[3] = (
|
|
215
|
+
onClick: o[3] || (o[3] = (f) => e.handleDownload(e.file))
|
|
216
216
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
217
|
+
default: i(() => [
|
|
218
|
+
B(I(e.tr("vkf.common.download", "下载")), 1)
|
|
219
219
|
]),
|
|
220
220
|
_: 1
|
|
221
221
|
})
|
|
222
|
-
], 2)) :
|
|
223
|
-
e.file.status === "uploading" ? (
|
|
222
|
+
], 2)) : v("", !0),
|
|
223
|
+
e.file.status === "uploading" ? (r(), C(t, {
|
|
224
224
|
key: 1,
|
|
225
225
|
type: e.listType === "picture-card" ? "circle" : "line",
|
|
226
226
|
"stroke-width": e.listType === "picture-card" ? 6 : 2,
|
|
227
227
|
percentage: Number(e.file.percentage),
|
|
228
|
-
style:
|
|
229
|
-
}, null, 8, ["type", "stroke-width", "percentage", "style"])) :
|
|
230
|
-
], 2)) :
|
|
231
|
-
|
|
232
|
-
class:
|
|
228
|
+
style: N(e.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
229
|
+
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : v("", !0)
|
|
230
|
+
], 2)) : v("", !0),
|
|
231
|
+
E("label", {
|
|
232
|
+
class: l(e.nsUpload.be("list", "item-status-label"))
|
|
233
233
|
}, [
|
|
234
|
-
e.listType === "text" ? (
|
|
234
|
+
e.listType === "text" ? (r(), C(a, {
|
|
235
235
|
key: 0,
|
|
236
|
-
class:
|
|
236
|
+
class: l([
|
|
237
237
|
e.nsIcon.m("upload-success"),
|
|
238
238
|
e.nsIcon.m("circle-check")
|
|
239
239
|
])
|
|
240
240
|
}, {
|
|
241
|
-
default:
|
|
242
|
-
s(
|
|
241
|
+
default: i(() => [
|
|
242
|
+
s(n)
|
|
243
243
|
]),
|
|
244
244
|
_: 1
|
|
245
|
-
}, 8, ["class"])) : ["picture-card", "picture"].includes(e.listType) ? (
|
|
245
|
+
}, 8, ["class"])) : ["picture-card", "picture"].includes(e.listType) ? (r(), C(a, {
|
|
246
246
|
key: 1,
|
|
247
|
-
class:
|
|
247
|
+
class: l([e.nsIcon.m("upload-success"), e.nsIcon.m("check")])
|
|
248
248
|
}, {
|
|
249
|
-
default:
|
|
250
|
-
s(
|
|
249
|
+
default: i(() => [
|
|
250
|
+
s(m)
|
|
251
251
|
]),
|
|
252
252
|
_: 1
|
|
253
|
-
}, 8, ["class"])) :
|
|
253
|
+
}, 8, ["class"])) : v("", !0)
|
|
254
254
|
], 2),
|
|
255
|
-
e.disabled ?
|
|
255
|
+
e.disabled ? v("", !0) : (r(), C(a, {
|
|
256
256
|
key: 2,
|
|
257
|
-
class:
|
|
258
|
-
onClick: o[4] || (o[4] = (
|
|
257
|
+
class: l(e.nsIcon.m("close")),
|
|
258
|
+
onClick: o[4] || (o[4] = (f) => e.handleRemove(e.file))
|
|
259
259
|
}, {
|
|
260
|
-
default:
|
|
261
|
-
s(
|
|
260
|
+
default: i(() => [
|
|
261
|
+
s(c)
|
|
262
262
|
]),
|
|
263
263
|
_: 1
|
|
264
264
|
}, 8, ["class"])),
|
|
265
|
-
e.listType === "picture-card" ? (
|
|
265
|
+
e.listType === "picture-card" ? (r(), w("span", {
|
|
266
266
|
key: 3,
|
|
267
|
-
class:
|
|
267
|
+
class: l(e.nsUpload.be("list", "item-actions"))
|
|
268
268
|
}, [
|
|
269
|
-
e.previewable ? (
|
|
269
|
+
e.previewable ? (r(), w("span", {
|
|
270
270
|
key: 0,
|
|
271
|
-
class:
|
|
272
|
-
onClick: o[5] || (o[5] = (
|
|
271
|
+
class: l(e.nsUpload.be("list", "item-preview")),
|
|
272
|
+
onClick: o[5] || (o[5] = (f) => e.handlePreview(e.file))
|
|
273
273
|
}, [
|
|
274
|
-
s(
|
|
275
|
-
class:
|
|
274
|
+
s(a, {
|
|
275
|
+
class: l(e.nsIcon.m("zoom-in"))
|
|
276
276
|
}, {
|
|
277
|
-
default:
|
|
278
|
-
s(
|
|
277
|
+
default: i(() => [
|
|
278
|
+
s(g)
|
|
279
279
|
]),
|
|
280
280
|
_: 1
|
|
281
281
|
}, 8, ["class"])
|
|
282
|
-
], 2)) :
|
|
283
|
-
|
|
284
|
-
class:
|
|
285
|
-
onClick: o[6] || (o[6] = (
|
|
282
|
+
], 2)) : v("", !0),
|
|
283
|
+
E("span", {
|
|
284
|
+
class: l(e.nsUpload.be("list", "item-download")),
|
|
285
|
+
onClick: o[6] || (o[6] = (f) => e.handleDownload(e.file))
|
|
286
286
|
}, [
|
|
287
|
-
s(
|
|
288
|
-
class:
|
|
287
|
+
s(a, {
|
|
288
|
+
class: l(e.nsIcon.m("download"))
|
|
289
289
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
s(
|
|
290
|
+
default: i(() => [
|
|
291
|
+
s(b)
|
|
292
292
|
]),
|
|
293
293
|
_: 1
|
|
294
294
|
}, 8, ["class"])
|
|
295
295
|
], 2),
|
|
296
|
-
e.disabled ?
|
|
296
|
+
e.disabled ? v("", !0) : (r(), w("span", {
|
|
297
297
|
key: 1,
|
|
298
|
-
class:
|
|
299
|
-
onClick: o[7] || (o[7] = (
|
|
298
|
+
class: l(e.nsUpload.be("list", "item-delete")),
|
|
299
|
+
onClick: o[7] || (o[7] = (f) => e.handleRemove(e.file))
|
|
300
300
|
}, [
|
|
301
|
-
s(
|
|
302
|
-
class:
|
|
301
|
+
s(a, {
|
|
302
|
+
class: l(e.nsIcon.m("delete"))
|
|
303
303
|
}, {
|
|
304
|
-
default:
|
|
305
|
-
s(
|
|
304
|
+
default: i(() => [
|
|
305
|
+
s(P)
|
|
306
306
|
]),
|
|
307
307
|
_: 1
|
|
308
308
|
}, 8, ["class"])
|
|
309
309
|
], 2))
|
|
310
|
-
], 2)) :
|
|
310
|
+
], 2)) : v("", !0)
|
|
311
311
|
], 64);
|
|
312
312
|
}
|
|
313
|
-
const
|
|
313
|
+
const Ee = /* @__PURE__ */ j(Ue, [["render", Ce]]), Ie = T({
|
|
314
314
|
components: {
|
|
315
|
-
VkfFormItem:
|
|
316
|
-
ElUpload:
|
|
317
|
-
FileVue:
|
|
318
|
-
ElLink:
|
|
315
|
+
VkfFormItem: K,
|
|
316
|
+
ElUpload: le,
|
|
317
|
+
FileVue: Ee,
|
|
318
|
+
ElLink: oe
|
|
319
319
|
},
|
|
320
|
-
props:
|
|
321
|
-
emits:
|
|
320
|
+
props: $,
|
|
321
|
+
emits: L,
|
|
322
322
|
setup(e, { emit: o }) {
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}, r = (l, i) => {
|
|
323
|
+
const k = V.createBindProps(e), { tr: p } = O(), U = ae(e, ["disabled", "fileList", "beforeUpload", "onSuccess"]), u = M(), y = (n) => {
|
|
324
|
+
u.value?.handleRemove(n), u.value?.abort(n), o("update:fileList", e.fileList);
|
|
325
|
+
}, a = (n, m) => {
|
|
327
326
|
if (e.onExceed) {
|
|
328
|
-
e.onExceed(
|
|
327
|
+
e.onExceed(n, m);
|
|
329
328
|
return;
|
|
330
329
|
}
|
|
331
330
|
if (e.exceedable) {
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
t.uid = te(), ($ = v.value) == null || $.handleStart(t);
|
|
337
|
-
}), (y = v.value) == null || y.submit();
|
|
331
|
+
const c = () => {
|
|
332
|
+
u.value?.clearFiles(), n.forEach((g) => {
|
|
333
|
+
g.uid = se(), u.value?.handleStart(g);
|
|
334
|
+
}), u.value?.submit();
|
|
338
335
|
};
|
|
339
|
-
e.confirmExceed ?
|
|
340
|
-
|
|
341
|
-
|
|
336
|
+
e.confirmExceed ? ne.confirm(
|
|
337
|
+
p("vkf.upload.exceedConfirm", "已超过最大上传数量限制,是否使用新文件重新上传?"),
|
|
338
|
+
p("el.messagebox.title", "提示"),
|
|
342
339
|
{
|
|
343
|
-
confirmButtonText:
|
|
344
|
-
cancelButtonText:
|
|
340
|
+
confirmButtonText: p("el.upload.continue", "继续"),
|
|
341
|
+
cancelButtonText: p("el.messagebox.cancel", "取消"),
|
|
345
342
|
type: "warning"
|
|
346
343
|
}
|
|
347
|
-
).then(
|
|
344
|
+
).then(c) : c();
|
|
348
345
|
}
|
|
349
|
-
},
|
|
346
|
+
}, b = be(e);
|
|
350
347
|
return {
|
|
351
|
-
formItemBindProps:
|
|
352
|
-
pickObject:
|
|
353
|
-
coreBindProps:
|
|
354
|
-
uploadRef:
|
|
355
|
-
handleRemove:
|
|
356
|
-
readonly:
|
|
357
|
-
onSuccess: (
|
|
358
|
-
|
|
359
|
-
const f = i.raw;
|
|
360
|
-
(y = f.progress) == null || y.call(f, !0), i.percentage = 100, i.status = "success", (t = e.onSuccess) == null || t.call(e, l, i, d);
|
|
348
|
+
formItemBindProps: k,
|
|
349
|
+
pickObject: te,
|
|
350
|
+
coreBindProps: U,
|
|
351
|
+
uploadRef: u,
|
|
352
|
+
handleRemove: y,
|
|
353
|
+
readonly: b,
|
|
354
|
+
onSuccess: (n, m, c) => {
|
|
355
|
+
m.raw.progress?.(!0), m.percentage = 100, m.status = "success", e.onSuccess?.(n, m, c);
|
|
361
356
|
},
|
|
362
357
|
// onProgress,
|
|
363
|
-
beforeUpload: async (
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
t && (t.percentage = Number((f * 100).toFixed(2)), y === !1 && (t.status = "uploading"));
|
|
358
|
+
beforeUpload: async (n) => {
|
|
359
|
+
const m = (c, g) => {
|
|
360
|
+
const P = e.fileList.find((f) => f.uid === n.uid);
|
|
361
|
+
P && (P.percentage = Number((c * 100).toFixed(2)), g === !1 && (P.status = "uploading"));
|
|
368
362
|
};
|
|
369
|
-
return
|
|
363
|
+
return n.progress = we(m)(!1), e.beforeUpload ? await e.beforeUpload?.(n) : !0;
|
|
370
364
|
},
|
|
371
|
-
handleExceed:
|
|
372
|
-
tr:
|
|
365
|
+
handleExceed: a,
|
|
366
|
+
tr: p
|
|
373
367
|
};
|
|
374
368
|
}
|
|
375
|
-
}),
|
|
376
|
-
function
|
|
377
|
-
const
|
|
378
|
-
return
|
|
379
|
-
default:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
369
|
+
}), Pe = { class: "el-upload__tip" };
|
|
370
|
+
function $e(e, o, k, p, U, u) {
|
|
371
|
+
const y = d("ElLink"), a = d("FileVue"), b = d("ElUpload"), h = d("VkfFormItem");
|
|
372
|
+
return r(), C(h, Z(G(e.formItemBindProps)), {
|
|
373
|
+
default: i(() => [
|
|
374
|
+
s(b, q(e.coreBindProps, {
|
|
375
|
+
ref: "uploadRef",
|
|
376
|
+
class: ["vkf-upload", {
|
|
377
|
+
"is-readonly": e.readonly,
|
|
378
|
+
"is-empty": e.fileList?.length === 0,
|
|
379
|
+
"is-limit": e.limit && e.fileList?.length >= e.limit,
|
|
380
|
+
"is-exceedable": e.exceedable
|
|
381
|
+
}],
|
|
382
|
+
"file-list": e.fileList ?? [],
|
|
383
|
+
"on-success": e.onSuccess,
|
|
384
|
+
"before-upload": e.beforeUpload,
|
|
385
|
+
disabled: e.readonly || e.disabled,
|
|
386
|
+
"on-exceed": e.handleExceed,
|
|
387
|
+
"onUpdate:fileList": o[0] || (o[0] = (t) => e.$emit("update:fileList", t))
|
|
388
|
+
}), A({
|
|
389
|
+
file: i(({ file: t }) => [
|
|
390
|
+
s(a, {
|
|
391
|
+
file: t,
|
|
392
|
+
"list-type": e.listType,
|
|
393
|
+
disabled: e.readonly || e.disabled,
|
|
394
|
+
"on-preview": e.onPreview,
|
|
395
|
+
preview: e.preview,
|
|
396
|
+
"on-download": e.onDownload,
|
|
397
|
+
"preview-label": e.previewLabel,
|
|
398
|
+
onRemove: e.handleRemove
|
|
399
|
+
}, null, 8, ["file", "list-type", "disabled", "on-preview", "preview", "on-download", "preview-label", "onRemove"])
|
|
400
|
+
]),
|
|
401
|
+
default: i(() => [
|
|
402
|
+
H(e.$slots, "default", {}, () => [
|
|
403
|
+
s(y, { type: "primary" }, {
|
|
404
|
+
default: i(() => [
|
|
405
|
+
B(" + " + I(e.tr("vkf.upload.selectFile", "选择文件")), 1)
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
})
|
|
409
|
+
])
|
|
410
|
+
]),
|
|
411
|
+
_: 2
|
|
412
|
+
}, [
|
|
413
|
+
e.tip ? {
|
|
414
|
+
name: "tip",
|
|
415
|
+
fn: i(() => [
|
|
416
|
+
E("div", Pe, I(e.tip), 1)
|
|
418
417
|
]),
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
I("span", {
|
|
430
|
-
class: n(["vkf-upload-empty-tip", {
|
|
431
|
-
"is-readonly": e.readonly,
|
|
432
|
-
"is-empty": ((i = e.fileList) == null ? void 0 : i.length) === 0
|
|
433
|
-
}])
|
|
434
|
-
}, P(e.tr("vkf.upload.empty", "暂无")), 3)
|
|
435
|
-
];
|
|
436
|
-
}),
|
|
418
|
+
key: "0"
|
|
419
|
+
} : void 0
|
|
420
|
+
]), 1040, ["class", "file-list", "on-success", "before-upload", "disabled", "on-exceed"]),
|
|
421
|
+
E("span", {
|
|
422
|
+
class: l(["vkf-upload-empty-tip", {
|
|
423
|
+
"is-readonly": e.readonly,
|
|
424
|
+
"is-empty": e.fileList?.length === 0
|
|
425
|
+
}])
|
|
426
|
+
}, I(e.tr("vkf.upload.empty", "暂无")), 3)
|
|
427
|
+
]),
|
|
437
428
|
_: 3
|
|
438
429
|
}, 16);
|
|
439
430
|
}
|
|
440
|
-
const
|
|
431
|
+
const Le = /* @__PURE__ */ j(Ie, [["render", $e]]), Ae = T({
|
|
441
432
|
name: "VkfUpload",
|
|
442
|
-
props:
|
|
443
|
-
emits:
|
|
444
|
-
setup(e, { emit: o, slots:
|
|
445
|
-
const
|
|
446
|
-
return () =>
|
|
433
|
+
props: $,
|
|
434
|
+
emits: L,
|
|
435
|
+
setup(e, { emit: o, slots: k }) {
|
|
436
|
+
const p = z(o);
|
|
437
|
+
return () => J(Le, {
|
|
447
438
|
...e,
|
|
448
|
-
...
|
|
439
|
+
...X(p)
|
|
449
440
|
}, {
|
|
450
441
|
...e.slots,
|
|
451
|
-
...
|
|
442
|
+
...k
|
|
452
443
|
});
|
|
453
444
|
}
|
|
454
|
-
}),
|
|
445
|
+
}), He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
455
446
|
__proto__: null
|
|
456
447
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
457
448
|
export {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
449
|
+
Ae as VkfUpload,
|
|
450
|
+
qe as _VkfUploadCtx,
|
|
451
|
+
He as __VkfUpload,
|
|
452
|
+
Ae as default
|
|
462
453
|
};
|