iking-web-ui-pro 0.1.21 → 0.1.22
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/dist/IKDetailPreviewFiles/ik.index.es.js +80 -80
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +56 -56
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +158 -157
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +248 -236
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +104 -104
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +990 -978
- package/dist/index.umd.js +25 -25
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElUpload as re, ElIcon as
|
|
1
|
+
import { defineComponent as f, openBlock as r, createElementBlock as u, createElementVNode as i, computed as $, resolveComponent as ee, normalizeClass as _, normalizeStyle as z, createCommentVNode as v, createBlock as A, withCtx as m, mergeModels as U, useModel as te, ref as C, Fragment as j, createVNode as d, unref as p, createSlots as le, renderSlot as ae, toDisplayString as S, withDirectives as x, createTextVNode as oe, vShow as E, renderList as ie, pushScopeId as ne, popScopeId as se } from "vue";
|
|
2
|
+
import { ElUpload as re, ElIcon as w, ElImage as ce, ElImageViewer as ue } from "element-plus";
|
|
3
3
|
import { ikColor as de, ikFile as pe } from "iking-utils-pro";
|
|
4
4
|
const H = (a, l) => {
|
|
5
|
-
if (a.install = (
|
|
6
|
-
for (const
|
|
7
|
-
|
|
5
|
+
if (a.install = (n) => {
|
|
6
|
+
for (const c of [a, ...Object.values(l ?? {})])
|
|
7
|
+
n.component(c.name, c);
|
|
8
8
|
}, l)
|
|
9
|
-
for (const [
|
|
10
|
-
a[
|
|
9
|
+
for (const [n, c] of Object.entries(l))
|
|
10
|
+
a[n] = c;
|
|
11
11
|
return a;
|
|
12
12
|
};
|
|
13
13
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
14
|
-
var he = /* @__PURE__ */
|
|
14
|
+
var he = /* @__PURE__ */ f({
|
|
15
15
|
name: "Close",
|
|
16
16
|
__name: "close",
|
|
17
17
|
setup(a) {
|
|
18
|
-
return (l,
|
|
18
|
+
return (l, n) => (r(), u("svg", {
|
|
19
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
20
|
viewBox: "0 0 1024 1024"
|
|
21
21
|
}, [
|
|
@@ -25,11 +25,11 @@ var he = /* @__PURE__ */ y({
|
|
|
25
25
|
})
|
|
26
26
|
]));
|
|
27
27
|
}
|
|
28
|
-
}), me = he, ge = /* @__PURE__ */
|
|
28
|
+
}), me = he, ge = /* @__PURE__ */ f({
|
|
29
29
|
name: "Delete",
|
|
30
30
|
__name: "delete",
|
|
31
31
|
setup(a) {
|
|
32
|
-
return (l,
|
|
32
|
+
return (l, n) => (r(), u("svg", {
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
34
|
viewBox: "0 0 1024 1024"
|
|
35
35
|
}, [
|
|
@@ -39,11 +39,11 @@ var he = /* @__PURE__ */ y({
|
|
|
39
39
|
})
|
|
40
40
|
]));
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), _e = ge, ve = /* @__PURE__ */ f({
|
|
43
43
|
name: "Download",
|
|
44
44
|
__name: "download",
|
|
45
45
|
setup(a) {
|
|
46
|
-
return (l,
|
|
46
|
+
return (l, n) => (r(), u("svg", {
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
48
|
viewBox: "0 0 1024 1024"
|
|
49
49
|
}, [
|
|
@@ -53,11 +53,11 @@ var he = /* @__PURE__ */ y({
|
|
|
53
53
|
})
|
|
54
54
|
]));
|
|
55
55
|
}
|
|
56
|
-
}), fe =
|
|
56
|
+
}), fe = ve, ye = /* @__PURE__ */ f({
|
|
57
57
|
name: "Refresh",
|
|
58
58
|
__name: "refresh",
|
|
59
59
|
setup(a) {
|
|
60
|
-
return (l,
|
|
60
|
+
return (l, n) => (r(), u("svg", {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 1024 1024"
|
|
63
63
|
}, [
|
|
@@ -67,11 +67,11 @@ var he = /* @__PURE__ */ y({
|
|
|
67
67
|
})
|
|
68
68
|
]));
|
|
69
69
|
}
|
|
70
|
-
}), ke = ye, we = /* @__PURE__ */
|
|
70
|
+
}), ke = ye, we = /* @__PURE__ */ f({
|
|
71
71
|
name: "ZoomIn",
|
|
72
72
|
__name: "zoom-in",
|
|
73
73
|
setup(a) {
|
|
74
|
-
return (l,
|
|
74
|
+
return (l, n) => (r(), u("svg", {
|
|
75
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
76
|
viewBox: "0 0 1024 1024"
|
|
77
77
|
}, [
|
|
@@ -83,10 +83,10 @@ var he = /* @__PURE__ */ y({
|
|
|
83
83
|
}
|
|
84
84
|
}), be = we;
|
|
85
85
|
const O = (a, l) => {
|
|
86
|
-
const
|
|
87
|
-
for (const [
|
|
88
|
-
|
|
89
|
-
return
|
|
86
|
+
const n = a.__vccOpts || a;
|
|
87
|
+
for (const [c, t] of l)
|
|
88
|
+
n[c] = t;
|
|
89
|
+
return n;
|
|
90
90
|
}, ze = {}, $e = {
|
|
91
91
|
t: "1686214149488",
|
|
92
92
|
class: "icon",
|
|
@@ -179,7 +179,7 @@ const O = (a, l) => {
|
|
|
179
179
|
Ue
|
|
180
180
|
];
|
|
181
181
|
function xe(a, l) {
|
|
182
|
-
return
|
|
182
|
+
return r(), u("svg", $e, je);
|
|
183
183
|
}
|
|
184
184
|
const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]" }, He = {
|
|
185
185
|
key: 1,
|
|
@@ -189,7 +189,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
189
189
|
key: 1,
|
|
190
190
|
class: "h-[1em] w-[1em]",
|
|
191
191
|
"aria-hidden": "true"
|
|
192
|
-
}, Fe = ["xlink:href"], Te = ["src"], We = /* @__PURE__ */
|
|
192
|
+
}, Fe = ["xlink:href"], Te = ["src"], We = /* @__PURE__ */ f({
|
|
193
193
|
name: "IkSvgIcon",
|
|
194
194
|
__name: "index",
|
|
195
195
|
props: {
|
|
@@ -211,10 +211,10 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
211
211
|
disabled: { type: Boolean, default: !1 }
|
|
212
212
|
},
|
|
213
213
|
setup(a) {
|
|
214
|
-
const l = a,
|
|
215
|
-
var t,
|
|
216
|
-
return /^http?:\/\//.test(l.name) ? "img" : /i-[^:]+:[^:]+/.test(l.name) ? "unocss" : (t = l.name) != null && t.startsWith("iksig") ? "iksig" : (
|
|
217
|
-
}),
|
|
214
|
+
const l = a, n = $(() => {
|
|
215
|
+
var t, y;
|
|
216
|
+
return /^http?:\/\//.test(l.name) ? "img" : /i-[^:]+:[^:]+/.test(l.name) ? "unocss" : (t = l.name) != null && t.startsWith("iksig") ? "iksig" : (y = l.name) != null && y.includes(":") ? "iconify" : "svg";
|
|
217
|
+
}), c = $(() => {
|
|
218
218
|
const t = [];
|
|
219
219
|
if (l.flip)
|
|
220
220
|
switch (l.flip) {
|
|
@@ -233,7 +233,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
233
233
|
...l.size && { fontSize: typeof l.size == "number" ? `${l.size}px` : l.size },
|
|
234
234
|
...t.length && { transform: t.join(" ") },
|
|
235
235
|
padding: l.padding,
|
|
236
|
-
...l.color &&
|
|
236
|
+
...l.color && n.value !== "iksig" ? {
|
|
237
237
|
"--ik-color-icon-dark": l.color,
|
|
238
238
|
"--ik-color-icon-light": de.setOpacity(l.color, l.opacity || 0.4)
|
|
239
239
|
} : {},
|
|
@@ -248,15 +248,15 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
248
248
|
} : {}
|
|
249
249
|
};
|
|
250
250
|
});
|
|
251
|
-
return (t,
|
|
251
|
+
return (t, y) => {
|
|
252
252
|
const B = ee("el-tooltip");
|
|
253
|
-
return
|
|
254
|
-
t.notip || !t.title ? (
|
|
253
|
+
return r(), u("span", Ae, [
|
|
254
|
+
t.notip || !t.title ? (r(), u(
|
|
255
255
|
"i",
|
|
256
256
|
{
|
|
257
257
|
key: 0,
|
|
258
258
|
class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
259
|
-
[t.name]:
|
|
259
|
+
[t.name]: n.value === "unocss",
|
|
260
260
|
"show-bg": t.showBg || t.bg,
|
|
261
261
|
default: t.size === "default",
|
|
262
262
|
small: t.size === "small",
|
|
@@ -266,33 +266,33 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
266
266
|
active: t.active,
|
|
267
267
|
disabled: t.disabled
|
|
268
268
|
}]),
|
|
269
|
-
style: z(
|
|
269
|
+
style: z(c.value)
|
|
270
270
|
},
|
|
271
271
|
[
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
v(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
273
|
+
n.value === "iksig" ? (r(), u(
|
|
274
274
|
"i",
|
|
275
275
|
{
|
|
276
276
|
key: 0,
|
|
277
277
|
class: _(`iksig ${t.name}`),
|
|
278
|
-
style: z(
|
|
278
|
+
style: z(c.value)
|
|
279
279
|
},
|
|
280
280
|
null,
|
|
281
281
|
6
|
|
282
282
|
/* CLASS, STYLE */
|
|
283
|
-
)) :
|
|
283
|
+
)) : n.value === "svg" ? (r(), u("svg", He, [
|
|
284
284
|
i("use", {
|
|
285
285
|
"xlink:href": `#${t.name}`
|
|
286
286
|
}, null, 8, Oe)
|
|
287
|
-
])) :
|
|
287
|
+
])) : n.value === "img" ? (r(), u("img", {
|
|
288
288
|
key: 2,
|
|
289
289
|
src: t.name,
|
|
290
290
|
class: "h-[1em] w-[1em]"
|
|
291
|
-
}, null, 8, De)) :
|
|
291
|
+
}, null, 8, De)) : v("v-if", !0)
|
|
292
292
|
],
|
|
293
293
|
6
|
|
294
294
|
/* CLASS, STYLE */
|
|
295
|
-
)) : (
|
|
295
|
+
)) : (r(), A(B, {
|
|
296
296
|
key: 1,
|
|
297
297
|
content: t.title,
|
|
298
298
|
placement: "right"
|
|
@@ -302,7 +302,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
302
302
|
"i",
|
|
303
303
|
{
|
|
304
304
|
class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
305
|
-
[t.name]:
|
|
305
|
+
[t.name]: n.value === "unocss",
|
|
306
306
|
"show-bg": t.showBg || t.bg,
|
|
307
307
|
default: t.size === "default",
|
|
308
308
|
primary: t.primary,
|
|
@@ -311,28 +311,28 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
311
311
|
warning: t.warning,
|
|
312
312
|
active: t.active
|
|
313
313
|
}]),
|
|
314
|
-
style: z(
|
|
314
|
+
style: z(c.value)
|
|
315
315
|
},
|
|
316
316
|
[
|
|
317
|
-
|
|
317
|
+
n.value === "iksig" ? (r(), u(
|
|
318
318
|
"i",
|
|
319
319
|
{
|
|
320
320
|
key: 0,
|
|
321
321
|
class: _(`iksig ${t.name}`),
|
|
322
|
-
style: z(
|
|
322
|
+
style: z(c.value)
|
|
323
323
|
},
|
|
324
324
|
null,
|
|
325
325
|
6
|
|
326
326
|
/* CLASS, STYLE */
|
|
327
|
-
)) :
|
|
327
|
+
)) : n.value === "svg" ? (r(), u("svg", Ne, [
|
|
328
328
|
i("use", {
|
|
329
329
|
"xlink:href": `#${t.name}`
|
|
330
330
|
}, null, 8, Fe)
|
|
331
|
-
])) :
|
|
331
|
+
])) : n.value === "img" ? (r(), u("img", {
|
|
332
332
|
key: 2,
|
|
333
333
|
src: t.name,
|
|
334
334
|
class: "h-[1em] w-[1em]"
|
|
335
|
-
}, null, 8, Te)) :
|
|
335
|
+
}, null, 8, Te)) : v("v-if", !0)
|
|
336
336
|
],
|
|
337
337
|
6
|
|
338
338
|
/* CLASS, STYLE */
|
|
@@ -344,7 +344,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
344
344
|
]);
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
}), Re = H(We), D = (a) => (
|
|
347
|
+
}), Re = H(We), D = (a) => (ne("data-v-038e6320"), a = a(), se(), a), Pe = {
|
|
348
348
|
key: 1,
|
|
349
349
|
class: "upload-btn"
|
|
350
350
|
}, Ge = { class: "tip" }, Je = { class: "loading-statu" }, Xe = { class: "operate-btn" }, Ye = { key: 0 }, Ze = {
|
|
@@ -362,7 +362,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
362
362
|
"点击重新上传",
|
|
363
363
|
-1
|
|
364
364
|
/* HOISTED */
|
|
365
|
-
)), et = ["src"], tt = { class: "demo-image__preview" }, lt = /* @__PURE__ */
|
|
365
|
+
)), et = ["src"], tt = { class: "demo-image__preview" }, lt = /* @__PURE__ */ f({
|
|
366
366
|
__name: "index",
|
|
367
367
|
props: /* @__PURE__ */ U({
|
|
368
368
|
// 显示的文字
|
|
@@ -442,59 +442,59 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
442
442
|
}),
|
|
443
443
|
emits: /* @__PURE__ */ U(["delete", "success"], ["update:modelValue"]),
|
|
444
444
|
setup(a, { emit: l }) {
|
|
445
|
-
const
|
|
445
|
+
const n = a, c = te(a, "modelValue"), t = (e) => Array.isArray(e) ? e.map((s) => {
|
|
446
446
|
var h, g;
|
|
447
|
-
const
|
|
447
|
+
const o = ((h = s.url) == null ? void 0 : h.startsWith("http")) || ((g = s.url) == null ? void 0 : g.startsWith("blob"));
|
|
448
448
|
return {
|
|
449
449
|
...s,
|
|
450
|
-
__url:
|
|
450
|
+
__url: o ? s.url : `${n.loadUrl}${s.url}`
|
|
451
451
|
};
|
|
452
|
-
}) : e ? [{ url: e, __url: e != null && e.startsWith("http") || e != null && e.startsWith("blob") ? e : `${
|
|
453
|
-
() =>
|
|
452
|
+
}) : e ? [{ url: e, __url: e != null && e.startsWith("http") || e != null && e.startsWith("blob") ? e : `${n.loadUrl}${e}` }] : [], y = l, B = $(() => n.size), k = C(null), b = C([]), L = C(!1), I = C(0), N = $(
|
|
453
|
+
() => n.tipText || `最多可上传${n.limit}张图片, 每张图片不能超过${n.size}MB`
|
|
454
454
|
), F = (e, s) => {
|
|
455
455
|
}, T = (e) => !(!(e.type === "image/jpeg" || e.type === "image/png") || !(e.size / 1024 / 1024 < B.value)), W = () => !1, R = (e, s) => {
|
|
456
|
-
var
|
|
457
|
-
e.status = "ready", s !== void 0 &&
|
|
456
|
+
var o, h;
|
|
457
|
+
e.status = "ready", s !== void 0 && b.value.splice(s, 1), (o = k.value) == null || o.handleStart(e.raw), (h = k.value) == null || h.submit();
|
|
458
458
|
}, P = (e, s) => {
|
|
459
459
|
var M, V;
|
|
460
|
-
const
|
|
460
|
+
const o = c.value.length, h = n.limit - o;
|
|
461
461
|
let g = 0;
|
|
462
462
|
for (; g < h && g < (e == null ? void 0 : e.length); )
|
|
463
|
-
(M =
|
|
464
|
-
}, G = (e, s,
|
|
465
|
-
|
|
466
|
-
}, J = (e, s,
|
|
467
|
-
|
|
463
|
+
(M = k.value) == null || M.handleStart(e == null ? void 0 : e[g]), (V = k.value) == null || V.submit(), g++;
|
|
464
|
+
}, G = (e, s, o) => {
|
|
465
|
+
y("success", e, s, o);
|
|
466
|
+
}, J = (e, s, o) => {
|
|
467
|
+
b.value.push({
|
|
468
468
|
...s,
|
|
469
469
|
__url: s.url
|
|
470
470
|
});
|
|
471
471
|
}, X = (e) => {
|
|
472
|
-
L.value = !0, I.value =
|
|
472
|
+
L.value = !0, I.value = c.value.findIndex((s) => s.url === e.url);
|
|
473
473
|
}, Y = (e) => {
|
|
474
474
|
pe.downloadByOnlineUrl(e.__url || e.url, e.name);
|
|
475
475
|
}, Z = (e) => {
|
|
476
476
|
var s;
|
|
477
|
-
(s =
|
|
477
|
+
(s = k.value) == null || s.abort(e);
|
|
478
478
|
}, q = (e) => {
|
|
479
|
-
e.status !== "success" && Z(e),
|
|
479
|
+
e.status !== "success" && Z(e), c.value = c.value.filter((s) => s.uid !== e.uid), y("delete", e);
|
|
480
480
|
}, K = (e, s) => {
|
|
481
|
-
|
|
482
|
-
}, Q = $(() =>
|
|
483
|
-
return (e, s) => (
|
|
481
|
+
b.value.splice(s, 1);
|
|
482
|
+
}, Q = $(() => c.value.length + b.value.length < n.limit);
|
|
483
|
+
return (e, s) => (r(), u(
|
|
484
484
|
j,
|
|
485
485
|
null,
|
|
486
486
|
[
|
|
487
487
|
d(p(re), {
|
|
488
488
|
class: _(["ik-image-upload", { preview: a.preview, "hide-upload": !Q.value }]),
|
|
489
489
|
ref_key: "refUpload",
|
|
490
|
-
ref:
|
|
490
|
+
ref: k,
|
|
491
491
|
"list-type": "picture-card",
|
|
492
492
|
accept: a.accept,
|
|
493
493
|
action: a.action,
|
|
494
494
|
headers: a.headers,
|
|
495
495
|
data: a.data,
|
|
496
|
-
"file-list":
|
|
497
|
-
"onUpdate:fileList": s[0] || (s[0] = (
|
|
496
|
+
"file-list": c.value,
|
|
497
|
+
"onUpdate:fileList": s[0] || (s[0] = (o) => c.value = o),
|
|
498
498
|
multiple: a.multiple,
|
|
499
499
|
limit: a.limit,
|
|
500
500
|
"on-change": F,
|
|
@@ -506,8 +506,8 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
506
506
|
drag: ""
|
|
507
507
|
}, le({
|
|
508
508
|
trigger: m(() => [
|
|
509
|
-
e.$slots.trigger ? ae(e.$slots, "trigger", { key: 0 }, void 0, !0) : (
|
|
510
|
-
d(p(
|
|
509
|
+
e.$slots.trigger ? ae(e.$slots, "trigger", { key: 0 }, void 0, !0) : (r(), u("div", Pe, [
|
|
510
|
+
d(p(w), { size: 20 }, {
|
|
511
511
|
default: m(() => [
|
|
512
512
|
d(p(Re), { name: "iksvg_guanbibeifen" })
|
|
513
513
|
]),
|
|
@@ -523,11 +523,11 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
523
523
|
)
|
|
524
524
|
]))
|
|
525
525
|
]),
|
|
526
|
-
file: m(({ file:
|
|
526
|
+
file: m(({ file: o }) => [
|
|
527
527
|
i(
|
|
528
528
|
"div",
|
|
529
529
|
{
|
|
530
|
-
class: _(["load-list", { loading:
|
|
530
|
+
class: _(["load-list", { loading: o.status === "uploading" }]),
|
|
531
531
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
532
532
|
},
|
|
533
533
|
[
|
|
@@ -537,7 +537,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
537
537
|
[
|
|
538
538
|
d(Ee),
|
|
539
539
|
oe(
|
|
540
|
-
" 上传" + S(
|
|
540
|
+
" 上传" + S(o.percentage) + "% ",
|
|
541
541
|
1
|
|
542
542
|
/* TEXT */
|
|
543
543
|
)
|
|
@@ -545,20 +545,20 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
545
545
|
512
|
|
546
546
|
/* NEED_PATCH */
|
|
547
547
|
), [
|
|
548
|
-
[E,
|
|
548
|
+
[E, o.status === "uploading"]
|
|
549
549
|
]),
|
|
550
|
-
|
|
551
|
-
d(p(
|
|
550
|
+
v(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
|
|
551
|
+
d(p(ce), {
|
|
552
552
|
style: { width: "100%", height: "100%" },
|
|
553
|
-
src:
|
|
553
|
+
src: o.__url || o.url,
|
|
554
554
|
"zoom-rate": 1.2,
|
|
555
555
|
"initial-index": 0,
|
|
556
556
|
fit: "contain"
|
|
557
557
|
}, null, 8, ["src"]),
|
|
558
558
|
i("span", Xe, [
|
|
559
559
|
i("span", null, [
|
|
560
|
-
d(p(
|
|
561
|
-
onClick: (h) => X(
|
|
560
|
+
d(p(w), {
|
|
561
|
+
onClick: (h) => X(o)
|
|
562
562
|
}, {
|
|
563
563
|
default: m(() => [
|
|
564
564
|
d(p(be))
|
|
@@ -568,8 +568,8 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
568
568
|
}, 1032, ["onClick"])
|
|
569
569
|
]),
|
|
570
570
|
i("span", null, [
|
|
571
|
-
d(p(
|
|
572
|
-
onClick: (h) => Y(
|
|
571
|
+
d(p(w), {
|
|
572
|
+
onClick: (h) => Y(o)
|
|
573
573
|
}, {
|
|
574
574
|
default: m(() => [
|
|
575
575
|
d(p(fe))
|
|
@@ -578,13 +578,13 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
578
578
|
/* DYNAMIC */
|
|
579
579
|
}, 1032, ["onClick"])
|
|
580
580
|
]),
|
|
581
|
-
a.preview ?
|
|
582
|
-
d(p(
|
|
581
|
+
a.preview ? v("v-if", !0) : (r(), u("span", Ye, [
|
|
582
|
+
d(p(w), {
|
|
583
583
|
type: "warning",
|
|
584
|
-
onClick: (h) => q(
|
|
584
|
+
onClick: (h) => q(o)
|
|
585
585
|
}, {
|
|
586
586
|
default: m(() => [
|
|
587
|
-
d(p(
|
|
587
|
+
d(p(_e))
|
|
588
588
|
]),
|
|
589
589
|
_: 2
|
|
590
590
|
/* DYNAMIC */
|
|
@@ -598,16 +598,16 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
598
598
|
]),
|
|
599
599
|
default: m(() => [
|
|
600
600
|
i("ul", Ze, [
|
|
601
|
-
(
|
|
601
|
+
(r(!0), u(
|
|
602
602
|
j,
|
|
603
603
|
null,
|
|
604
|
-
|
|
604
|
+
ie(b.value, (o, h) => (r(), u("li", {
|
|
605
605
|
class: "el-upload-list__item",
|
|
606
|
-
key:
|
|
606
|
+
key: o.uid
|
|
607
607
|
}, [
|
|
608
608
|
i("span", null, [
|
|
609
|
-
d(p(
|
|
610
|
-
onClick: (g) => K(
|
|
609
|
+
d(p(w), {
|
|
610
|
+
onClick: (g) => K(o, h)
|
|
611
611
|
}, {
|
|
612
612
|
default: m(() => [
|
|
613
613
|
d(p(me))
|
|
@@ -620,17 +620,17 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
620
620
|
"div",
|
|
621
621
|
{
|
|
622
622
|
class: _(["load-list", {
|
|
623
|
-
loading:
|
|
624
|
-
fail:
|
|
623
|
+
loading: o.status === "uploading",
|
|
624
|
+
fail: o.status === "fail"
|
|
625
625
|
}]),
|
|
626
626
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
627
627
|
},
|
|
628
628
|
[
|
|
629
629
|
x(i("div", {
|
|
630
630
|
class: "loading-statu",
|
|
631
|
-
onClick: (g) => R(
|
|
631
|
+
onClick: (g) => R(o, h)
|
|
632
632
|
}, [
|
|
633
|
-
d(p(
|
|
633
|
+
d(p(w), { size: 24 }, {
|
|
634
634
|
default: m(() => [
|
|
635
635
|
d(p(ke))
|
|
636
636
|
]),
|
|
@@ -640,10 +640,10 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
640
640
|
Ke,
|
|
641
641
|
Qe
|
|
642
642
|
], 8, qe), [
|
|
643
|
-
[E,
|
|
643
|
+
[E, o.status === "fail"]
|
|
644
644
|
]),
|
|
645
645
|
i("img", {
|
|
646
|
-
src:
|
|
646
|
+
src: o.__url,
|
|
647
647
|
alt: "",
|
|
648
648
|
style: z({ "object-fit": a.fit })
|
|
649
649
|
}, null, 12, et)
|
|
@@ -674,18 +674,18 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
674
674
|
key: "0"
|
|
675
675
|
} : void 0
|
|
676
676
|
]), 1032, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit"]),
|
|
677
|
-
|
|
677
|
+
v(" 文件预览 "),
|
|
678
678
|
i("div", tt, [
|
|
679
|
-
L.value ? (
|
|
679
|
+
L.value ? (r(), A(p(ue), {
|
|
680
680
|
key: 0,
|
|
681
681
|
"lock-scroll": "",
|
|
682
682
|
"hide-on-click-modal": "",
|
|
683
683
|
onClose: s[1] || (s[1] = () => {
|
|
684
684
|
L.value = !1;
|
|
685
685
|
}),
|
|
686
|
-
"url-list": t(e.fileList).map((
|
|
686
|
+
"url-list": t(e.fileList).map((o) => o.__url),
|
|
687
687
|
"initial-index": I.value
|
|
688
|
-
}, null, 8, ["url-list", "initial-index"])) :
|
|
688
|
+
}, null, 8, ["url-list", "initial-index"])) : v("v-if", !0)
|
|
689
689
|
])
|
|
690
690
|
],
|
|
691
691
|
64
|
|
@@ -693,7 +693,7 @@ const Ee = /* @__PURE__ */ O(ze, [["render", xe]]), Ae = { class: "ik-svg-icon i
|
|
|
693
693
|
));
|
|
694
694
|
}
|
|
695
695
|
});
|
|
696
|
-
const at = /* @__PURE__ */ O(lt, [["__scopeId", "data-v-
|
|
696
|
+
const at = /* @__PURE__ */ O(lt, [["__scopeId", "data-v-038e6320"]]), st = H(at);
|
|
697
697
|
export {
|
|
698
698
|
st as IkUploadImage,
|
|
699
699
|
st as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["element-plus"],d["iking-utils-pro"]))})(this,function(d,e,p,k){"use strict";const y=(n,l)=>{if(n.install=a=>{for(const s of[n,...Object.values(l??{})])a.component(s.name,s)},l)for(const[a,s]of Object.entries(l))n[a]=s;return n};/*! Element Plus Icons Vue v2.3.1 */var z=e.defineComponent({name:"Close",__name:"close",setup(n){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),b=z,$=e.defineComponent({name:"Delete",__name:"delete",setup(n){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),S=$,I=e.defineComponent({name:"Download",__name:"download",setup(n){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),L=I,M=e.defineComponent({name:"Refresh",__name:"refresh",setup(n){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),x=M,U=e.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(n){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),j=U;const w=(n,l)=>{const a=n.__vccOpts||n;for(const[s,o]of l)a[s]=o;return a},D={},O={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},T=[e.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),e.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),e.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),e.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),e.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),e.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),e.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),e.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function A(n,l){return e.openBlock(),e.createElementBlock("svg",O,T)}const H=w(D,[["render",A]]),F={class:"ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]"},W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],q=["src"],G={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},J=["xlink:href"],X=["src"],Y=y(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},primary:{type:Boolean},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(n){const l=n,a=e.computed(()=>{var o,f;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(o=l.name)!=null&&o.startsWith("iksig")?"iksig":(f=l.name)!=null&&f.includes(":")?"iconify":"svg"}),s=e.computed(()=>{const o=[];if(l.flip)switch(l.flip){case"horizontal":o.push("rotateY(180deg)");break;case"vertical":o.push("rotateX(180deg)");break;case"both":o.push("rotateX(180deg)"),o.push("rotateY(180deg)");break}return l.rotate&&o.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...o.length&&{transform:o.join(" ")},padding:l.padding,...l.color&&a.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":k.ikColor.setOpacity(l.color,l.opacity||.4)}:{},...l.type==="primary"||l.primary?{"--ik-color-icon-dark":"var(--ik-theme-color)","--ik-color-icon-light":"var(--ik-color-icon-light-hover)","--ik-color-bg-icon":"var(--ik-color-bg-button-secondary)"}:l.type==="warning"?{"--ik-color-icon-dark":"var(--ik-color-error)","--ik-color-icon-light":"var(--ik-color-icon-error-light)","--ik-color-bg-icon":"var(--ik-color-icon-error-bg)"}:{}}});return(o,f)=>{const u=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",F,[o.notip||!o.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[o.name]:a.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",small:o.size==="small",big:o.size==="big",warning:o.warning,primary:o.primary,active:o.active,disabled:o.disabled}]),style:e.normalizeStyle(s.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),a.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(s.value)},null,6)):a.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,R)])):a.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,q)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(u,{key:1,content:o.title,placement:"right"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[o.name]:a.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",primary:o.primary,small:o.size==="small",big:o.size==="big",warning:o.warning,active:o.active}]),style:e.normalizeStyle(s.value)},[a.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(s.value)},null,6)):a.value==="svg"?(e.openBlock(),e.createElementBlock("svg",G,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,J)])):a.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,X)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),V=n=>(e.pushScopeId("data-v-add26920"),n=n(),e.popScopeId(),n),Z={key:1,class:"upload-btn"},K={class:"tip"},Q={class:"loading-statu"},P={class:"operate-btn"},v={key:0},ee={class:"el-upload-list el-upload-list--picture-card",style:{float:"left"}},te=["onClick"],oe=V(()=>e.createElementVNode("span",{class:"error"},"上传错误",-1)),le=V(()=>e.createElementVNode("p",null,"点击重新上传",-1)),ne=["src"],ae={class:"demo-image__preview"},ie=e.defineComponent({__name:"index",props:e.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["delete","success"],["update:modelValue"]),setup(n,{emit:l}){const a=n,s=e.useModel(n,"modelValue"),o=t=>Array.isArray(t)?t.map(r=>{var c,m;const i=((c=r.url)==null?void 0:c.startsWith("http"))||((m=r.url)==null?void 0:m.startsWith("blob"));return{...r,__url:i?r.url:`${a.loadUrl}${r.url}`}}):t?[{url:t,__url:t!=null&&t.startsWith("http")||t!=null&&t.startsWith("blob")?t:`${a.loadUrl}${t}`}]:[],f=l,u=e.computed(()=>a.size),_=e.ref(null),h=e.ref([]),g=e.ref(!1),E=e.ref(0),re=e.computed(()=>a.tipText||`最多可上传${a.limit}张图片, 每张图片不能超过${a.size}MB`),se=(t,r)=>{},ce=t=>!(!(t.type==="image/jpeg"||t.type==="image/png")||!(t.size/1024/1024<u.value)),de=()=>!1,pe=(t,r)=>{var i,c;t.status="ready",r!==void 0&&h.value.splice(r,1),(i=_.value)==null||i.handleStart(t.raw),(c=_.value)==null||c.submit()},me=(t,r)=>{var C,N;const i=s.value.length,c=a.limit-i;let m=0;for(;m<c&&m<(t==null?void 0:t.length);)(C=_.value)==null||C.handleStart(t==null?void 0:t[m]),(N=_.value)==null||N.submit(),m++},he=(t,r,i)=>{f("success",t,r,i)},fe=(t,r,i)=>{h.value.push({...r,__url:r.url})},_e=t=>{g.value=!0,E.value=s.value.findIndex(r=>r.url===t.url)},ue=t=>{k.ikFile.downloadByOnlineUrl(t.__url||t.url,t.name)},ge=t=>{var r;(r=_.value)==null||r.abort(t)},ke=t=>{t.status!=="success"&&ge(t),s.value=s.value.filter(r=>r.uid!==t.uid),f("delete",t)},ye=(t,r)=>{h.value.splice(r,1)},we=e.computed(()=>(console.log(s.value,h.value),a.multiple?s.value.length+h.value.length<a.limit:s.value.length+h.value.length===0));return(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(p.ElUpload),{class:e.normalizeClass(["ik-image-upload",{preview:n.preview,"hide-upload":!we.value}]),ref_key:"refUpload",ref:_,"list-type":"picture-card",accept:n.accept,action:n.action,headers:n.headers,data:n.data,"file-list":s.value,"onUpdate:fileList":r[0]||(r[0]=i=>s.value=i),multiple:n.multiple,limit:n.limit,"on-change":se,"before-upload":ce,"before-remove":de,"on-exceed":me,"on-success":he,"on-error":fe,drag:""},e.createSlots({trigger:e.withCtx(()=>[t.$slots.trigger?e.renderSlot(t.$slots,"trigger",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(e.unref(p.ElIcon),{size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Y),{name:"iksvg_guanbibeifen"})]),_:1}),e.createElementVNode("span",null,e.toDisplayString(n.title),1)]))]),file:e.withCtx(({file:i})=>[e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:i.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",Q,[e.createVNode(H),e.createTextVNode(" 上传"+e.toDisplayString(i.percentage)+"% ",1)],512),[[e.vShow,i.status==="uploading"]]),e.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),e.createVNode(e.unref(p.ElImage),{style:{width:"100%",height:"100%"},src:i.__url||i.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),e.createElementVNode("span",P,[e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:c=>_e(i)},{default:e.withCtx(()=>[e.createVNode(e.unref(j))]),_:2},1032,["onClick"])]),e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:c=>ue(i)},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:2},1032,["onClick"])]),n.preview?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",v,[e.createVNode(e.unref(p.ElIcon),{type:"warning",onClick:c=>ke(i)},{default:e.withCtx(()=>[e.createVNode(e.unref(S))]),_:2},1032,["onClick"])]))])],2)]),default:e.withCtx(()=>[e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(i,c)=>(e.openBlock(),e.createElementBlock("li",{class:"el-upload-list__item",key:i.uid},[e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:m=>ye(i,c)},{default:e.withCtx(()=>[e.createVNode(e.unref(b))]),_:2},1032,["onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:i.status==="uploading",fail:i.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",{class:"loading-statu",onClick:m=>pe(i,c)},[e.createVNode(e.unref(p.ElIcon),{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(x))]),_:1}),oe,le],8,te),[[e.vShow,i.status==="fail"]]),e.createElementVNode("img",{src:i.__url,alt:"",style:e.normalizeStyle({"object-fit":n.fit})},null,12,ne)],2)]))),128))])]),_:2},[n.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("span",K,e.toDisplayString(re.value),1)]),key:"0"}:void 0]),1032,["class","accept","action","headers","data","file-list","multiple","limit"]),e.createCommentVNode(" 文件预览 "),e.createElementVNode("div",ae,[g.value?(e.openBlock(),e.createBlock(e.unref(p.ElImageViewer),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:r[1]||(r[1]=()=>{g.value=!1}),"url-list":o(t.fileList).map(i=>i.__url),"initial-index":E.value},null,8,["url-list","initial-index"])):e.createCommentVNode("v-if",!0)])],64))}}),Ie="",B=y(w(ie,[["__scopeId","data-v-add26920"]]));d.IkUploadImage=B,d.default=B,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["element-plus"],d["iking-utils-pro"]))})(this,function(d,e,p,k){"use strict";const y=(n,l)=>{if(n.install=i=>{for(const s of[n,...Object.values(l??{})])i.component(s.name,s)},l)for(const[i,s]of Object.entries(l))n[i]=s;return n};/*! Element Plus Icons Vue v2.3.1 */var z=e.defineComponent({name:"Close",__name:"close",setup(n){return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),b=z,$=e.defineComponent({name:"Delete",__name:"delete",setup(n){return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),S=$,I=e.defineComponent({name:"Download",__name:"download",setup(n){return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),L=I,M=e.defineComponent({name:"Refresh",__name:"refresh",setup(n){return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),x=M,U=e.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(n){return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),j=U;const w=(n,l)=>{const i=n.__vccOpts||n;for(const[s,o]of l)i[s]=o;return i},D={},O={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},T=[e.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),e.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),e.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),e.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),e.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),e.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),e.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),e.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function A(n,l){return e.openBlock(),e.createElementBlock("svg",O,T)}const H=w(D,[["render",A]]),F={class:"ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]"},W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],q=["src"],G={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},J=["xlink:href"],X=["src"],Y=y(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},primary:{type:Boolean},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(n){const l=n,i=e.computed(()=>{var o,h;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(o=l.name)!=null&&o.startsWith("iksig")?"iksig":(h=l.name)!=null&&h.includes(":")?"iconify":"svg"}),s=e.computed(()=>{const o=[];if(l.flip)switch(l.flip){case"horizontal":o.push("rotateY(180deg)");break;case"vertical":o.push("rotateX(180deg)");break;case"both":o.push("rotateX(180deg)"),o.push("rotateY(180deg)");break}return l.rotate&&o.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...o.length&&{transform:o.join(" ")},padding:l.padding,...l.color&&i.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":k.ikColor.setOpacity(l.color,l.opacity||.4)}:{},...l.type==="primary"||l.primary?{"--ik-color-icon-dark":"var(--ik-theme-color)","--ik-color-icon-light":"var(--ik-color-icon-light-hover)","--ik-color-bg-icon":"var(--ik-color-bg-button-secondary)"}:l.type==="warning"?{"--ik-color-icon-dark":"var(--ik-color-error)","--ik-color-icon-light":"var(--ik-color-icon-error-light)","--ik-color-bg-icon":"var(--ik-color-icon-error-bg)"}:{}}});return(o,h)=>{const g=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",F,[o.notip||!o.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[o.name]:i.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",small:o.size==="small",big:o.size==="big",warning:o.warning,primary:o.primary,active:o.active,disabled:o.disabled}]),style:e.normalizeStyle(s.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(s.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,R)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,q)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(g,{key:1,content:o.title,placement:"right"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[o.name]:i.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",primary:o.primary,small:o.size==="small",big:o.size==="big",warning:o.warning,active:o.active}]),style:e.normalizeStyle(s.value)},[i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(s.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",G,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,J)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,X)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),V=n=>(e.pushScopeId("data-v-038e6320"),n=n(),e.popScopeId(),n),Z={key:1,class:"upload-btn"},K={class:"tip"},Q={class:"loading-statu"},P={class:"operate-btn"},v={key:0},ee={class:"el-upload-list el-upload-list--picture-card",style:{float:"left"}},te=["onClick"],oe=V(()=>e.createElementVNode("span",{class:"error"},"上传错误",-1)),le=V(()=>e.createElementVNode("p",null,"点击重新上传",-1)),ne=["src"],ae={class:"demo-image__preview"},ie=e.defineComponent({__name:"index",props:e.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["delete","success"],["update:modelValue"]),setup(n,{emit:l}){const i=n,s=e.useModel(n,"modelValue"),o=t=>Array.isArray(t)?t.map(r=>{var c,m;const a=((c=r.url)==null?void 0:c.startsWith("http"))||((m=r.url)==null?void 0:m.startsWith("blob"));return{...r,__url:a?r.url:`${i.loadUrl}${r.url}`}}):t?[{url:t,__url:t!=null&&t.startsWith("http")||t!=null&&t.startsWith("blob")?t:`${i.loadUrl}${t}`}]:[],h=l,g=e.computed(()=>i.size),f=e.ref(null),_=e.ref([]),u=e.ref(!1),E=e.ref(0),re=e.computed(()=>i.tipText||`最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`),se=(t,r)=>{},ce=t=>!(!(t.type==="image/jpeg"||t.type==="image/png")||!(t.size/1024/1024<g.value)),de=()=>!1,pe=(t,r)=>{var a,c;t.status="ready",r!==void 0&&_.value.splice(r,1),(a=f.value)==null||a.handleStart(t.raw),(c=f.value)==null||c.submit()},me=(t,r)=>{var C,N;const a=s.value.length,c=i.limit-a;let m=0;for(;m<c&&m<(t==null?void 0:t.length);)(C=f.value)==null||C.handleStart(t==null?void 0:t[m]),(N=f.value)==null||N.submit(),m++},he=(t,r,a)=>{h("success",t,r,a)},fe=(t,r,a)=>{_.value.push({...r,__url:r.url})},_e=t=>{u.value=!0,E.value=s.value.findIndex(r=>r.url===t.url)},ge=t=>{k.ikFile.downloadByOnlineUrl(t.__url||t.url,t.name)},ue=t=>{var r;(r=f.value)==null||r.abort(t)},ke=t=>{t.status!=="success"&&ue(t),s.value=s.value.filter(r=>r.uid!==t.uid),h("delete",t)},ye=(t,r)=>{_.value.splice(r,1)},we=e.computed(()=>s.value.length+_.value.length<i.limit);return(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(p.ElUpload),{class:e.normalizeClass(["ik-image-upload",{preview:n.preview,"hide-upload":!we.value}]),ref_key:"refUpload",ref:f,"list-type":"picture-card",accept:n.accept,action:n.action,headers:n.headers,data:n.data,"file-list":s.value,"onUpdate:fileList":r[0]||(r[0]=a=>s.value=a),multiple:n.multiple,limit:n.limit,"on-change":se,"before-upload":ce,"before-remove":de,"on-exceed":me,"on-success":he,"on-error":fe,drag:""},e.createSlots({trigger:e.withCtx(()=>[t.$slots.trigger?e.renderSlot(t.$slots,"trigger",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(e.unref(p.ElIcon),{size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Y),{name:"iksvg_guanbibeifen"})]),_:1}),e.createElementVNode("span",null,e.toDisplayString(n.title),1)]))]),file:e.withCtx(({file:a})=>[e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:a.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",Q,[e.createVNode(H),e.createTextVNode(" 上传"+e.toDisplayString(a.percentage)+"% ",1)],512),[[e.vShow,a.status==="uploading"]]),e.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),e.createVNode(e.unref(p.ElImage),{style:{width:"100%",height:"100%"},src:a.__url||a.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),e.createElementVNode("span",P,[e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:c=>_e(a)},{default:e.withCtx(()=>[e.createVNode(e.unref(j))]),_:2},1032,["onClick"])]),e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:c=>ge(a)},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:2},1032,["onClick"])]),n.preview?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",v,[e.createVNode(e.unref(p.ElIcon),{type:"warning",onClick:c=>ke(a)},{default:e.withCtx(()=>[e.createVNode(e.unref(S))]),_:2},1032,["onClick"])]))])],2)]),default:e.withCtx(()=>[e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,c)=>(e.openBlock(),e.createElementBlock("li",{class:"el-upload-list__item",key:a.uid},[e.createElementVNode("span",null,[e.createVNode(e.unref(p.ElIcon),{onClick:m=>ye(a,c)},{default:e.withCtx(()=>[e.createVNode(e.unref(b))]),_:2},1032,["onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:a.status==="uploading",fail:a.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",{class:"loading-statu",onClick:m=>pe(a,c)},[e.createVNode(e.unref(p.ElIcon),{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(x))]),_:1}),oe,le],8,te),[[e.vShow,a.status==="fail"]]),e.createElementVNode("img",{src:a.__url,alt:"",style:e.normalizeStyle({"object-fit":n.fit})},null,12,ne)],2)]))),128))])]),_:2},[n.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("span",K,e.toDisplayString(re.value),1)]),key:"0"}:void 0]),1032,["class","accept","action","headers","data","file-list","multiple","limit"]),e.createCommentVNode(" 文件预览 "),e.createElementVNode("div",ae,[u.value?(e.openBlock(),e.createBlock(e.unref(p.ElImageViewer),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:r[1]||(r[1]=()=>{u.value=!1}),"url-list":o(t.fileList).map(a=>a.__url),"initial-index":E.value},null,8,["url-list","initial-index"])):e.createCommentVNode("v-if",!0)])],64))}}),Ie="",B=y(w(ie,[["__scopeId","data-v-038e6320"]]));d.IkUploadImage=B,d.default=B,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ik-image-upload[data-v-
|
|
1
|
+
@charset "UTF-8";.ik-image-upload[data-v-038e6320]{display:inline-flex;position:relative}.ik-image-upload.hide-upload[data-v-038e6320] .el-upload{display:none}.ik-image-upload .tip[data-v-038e6320]{position:absolute;bottom:-19px;font-size:14px;color:var(--el-color-info)}.ik-image-upload.preview[data-v-038e6320] .el-upload{display:none}.ik-image-upload[data-v-038e6320] .el-upload--picture-card{--el-upload-picture-card-size: 106px;--el-fill-color-lighter: var(--ik-color-bg-page);border-color:transparent;border-style:solid;transition:all .3s}.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload{--el-upload-dragger-padding-horizontal: 36px;margin:0 8px 8px 0}.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload .el-upload-dragger{border:none;background-color:transparent}.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload .el-upload-dragger .el-icon{margin-bottom:5px}.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload:hover .upload-btn,.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload:hover .upload-btn i{color:var(--el-color-primary)}.ik-image-upload[data-v-038e6320] .el-upload--picture-card.el-upload .upload-btn{display:flex;flex-direction:column;align-items:center;font-size:14px;color:var(--el-text-color-secondary)}.ik-image-upload[data-v-038e6320] .el-upload--picture-card:hover{--el-fill-color-lighter: var(--ik-color-font-reverse);--ik-color-icon-dark: var(--ik-color-tag-primary);--ik-color-icon-light: var(--ik-color-icon-light-hover);border-color:var(--el-color-primary)}.ik-image-upload[data-v-038e6320] .el-upload-list--picture-card{--el-upload-list-picture-card-size: 106px;flex-direction:row-reverse}.ik-image-upload[data-v-038e6320] .el-upload-list--picture-card .el-upload-list__item{border:none;background-color:var(--el-bg-color-page);overflow:hidden}.ik-image-upload[data-v-038e6320] .el-upload-list--picture-card .el-upload-list__item>span{position:absolute;right:2px;top:3px;z-index:2;background:var(--el-color-error);display:flex;border-radius:50%;padding:3px;font-size:11px;color:#fff;font-weight:600;cursor:pointer;transition:transform .35s}.ik-image-upload[data-v-038e6320] .el-upload-list--picture-card .el-upload-list__item>span:hover{transform:rotate(180deg);opacity:.9}.ik-image-upload .load-list[data-v-038e6320]{--el-upload-picture-card-size: 106px;width:var(--el-upload-picture-card-size);height:var(--el-upload-picture-card-size);overflow:hidden}.ik-image-upload .load-list .loading-statu[data-v-038e6320]{position:absolute;top:0;left:0;color:#fff;width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:0 0 140px 140px var(--el-overlay-color-lighter) inset;z-index:1;border-radius:6px}.ik-image-upload .load-list .loading-statu svg[data-v-038e6320]{width:26px;height:26px;fill:var(--el-color-primary);animation:rotate-038e6320 2s linear infinite}.ik-image-upload .load-list .operate-btn[data-v-038e6320]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:0;height:0;display:flex;align-items:center;justify-content:center;transition:all .35s;border-radius:4px;overflow:hidden}.ik-image-upload .load-list:hover .operate-btn[data-v-038e6320]{box-shadow:0 0 150px 150px var(--el-overlay-color-lighter) inset;color:#fff;font-size:18px;z-index:1;width:100%;height:100%}.ik-image-upload .load-list:hover .operate-btn i[data-v-038e6320]{cursor:pointer;margin:0 5px}.ik-image-upload .load-list:hover .operate-btn i[data-v-038e6320]:hover{color:var(--el-color-primary)}.ik-image-upload .load-list:hover img[data-v-038e6320],.ik-image-upload .load-list.loading img[data-v-038e6320]{filter:blur(2px)}.ik-image-upload .load-list.loading .loading-statu[data-v-038e6320]{box-shadow:0 0 140px 140px var(--el-overlay-color-lighter) inset}.ik-image-upload .load-list.loading .loading-statu svg[data-v-038e6320]{fill:var(--el-color-primary)}.ik-image-upload .load-list.fail img[data-v-038e6320]{filter:blur(0)}.ik-image-upload .load-list.fail .loading-statu[data-v-038e6320]{box-shadow:0 0 140px 140px var(--ik-error-shadow-bg) inset;line-height:2;color:var(--ik-color-font-reverse);border-radius:6px;background:rgba(241,65,109,.3411764706);border:1px dashed #F1416C;cursor:pointer;transition:all .25s}.ik-image-upload .load-list.fail .loading-statu[data-v-038e6320]:hover{background:rgba(241,65,109,.4196078431)}.ik-image-upload .load-list.fail .loading-statu svg[data-v-038e6320]{animation:none}.ik-image-upload .load-list.fail .loading-statu p[data-v-038e6320]{margin:0;padding:0}.ik-image-upload .load-list.fail .loading-statu .el-button.is-link[data-v-038e6320]{color:var(--ik-color-font-reverse)}.ik-image-upload .load-list.fail .loading-statu .el-button.is-link[data-v-038e6320]:hover{color:var(--color-primary)}@keyframes rotate-038e6320{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ik-image-upload .load-list img[data-v-038e6320]{width:100%;height:100%}
|