ik-next-ui 0.0.13 → 0.0.14
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/IkApprovalProcess/ik-next-ui.css +1 -1
- package/dist/IkApprovalProcess/ik.index.es.js +1 -1
- package/dist/IkApprovalProcessDetail/ik-next-ui.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +694 -656
- package/dist/IkBaseDialog/ik-next-ui.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +154 -116
- package/dist/IkCollapseCard/ik-next-ui.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +163 -125
- package/dist/IkDescription/ik-next-ui.css +1 -1
- package/dist/IkDescription/ik.index.es.js +506 -468
- package/dist/IkDetailPreviewFiles/ik-next-ui.css +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +709 -671
- package/dist/IkIconPicker/ik-next-ui.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +180 -142
- package/dist/IkMonacoEditor/ik-next-ui.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +418 -380
- package/dist/IkPickerUser/ik-next-ui.css +1 -1
- package/dist/IkPreviewFile/ik-next-ui.css +1 -1
- package/dist/IkPreviewFile/ik.index.es.js +644 -606
- package/dist/IkPreviewFileDialog/ik-next-ui.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +658 -620
- package/dist/IkRadioGroup/ik-next-ui.css +1 -1
- package/dist/IkRadioGroup/ik.index.es.js +140 -102
- package/dist/IkSideText/ik-next-ui.css +1 -1
- package/dist/IkSideText/ik.index.es.js +131 -93
- package/dist/IkSvgIcon/ik-next-ui.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +139 -101
- package/dist/IkUploadFile/ik-next-ui.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +776 -736
- package/dist/IkUploadImage/ik-next-ui.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +261 -223
- package/dist/IkVerticalStepBar/ik-next-ui.css +1 -1
- package/dist/IkVerticalStepBar/ik.index.es.js +140 -102
- package/dist/Provider/ik.index.es.js +1 -1
- package/dist/build/version.json.d.ts +1 -1
- package/dist/ik-next-ui.css +2 -2
- package/dist/index.es.js +3044 -3043
- package/dist/index.umd.js +67 -67
- package/dist/src/components/IkUploadFile/src/hooks/useFileInfo.d.ts +1 -0
- package/dist/src/iking-ui/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
import { useLocale as Xe, useNamespace as Ye, useZIndex as He, ElIcon as N, EVENT_CODE as D, useFormItem as Ze, ElUpload as Ge, ElImage as Je, ElMessage as
|
|
3
|
-
import { ScaleToOriginal as Ke, FullScreen as qe, Close as Qe, ArrowLeft as et, ArrowRight as tt, ZoomOut as
|
|
4
|
-
import { paramType as
|
|
5
|
-
import { Icon as
|
|
1
|
+
import { openBlock as v, createElementBlock as z, createElementVNode as s, inject as W, computed as p, defineComponent as Q, resolveComponent as Oe, createBlock as R, withCtx as b, renderSlot as ge, normalizeStyle as j, normalizeClass as C, unref as a, createCommentVNode as B, Fragment as X, markRaw as we, ref as O, effectScope as Be, shallowRef as Te, watch as ve, nextTick as Ae, onMounted as Ee, Teleport as Re, createVNode as m, Transition as Ue, withModifiers as je, resolveDynamicComponent as _e, renderList as Le, withDirectives as pe, vShow as he, useCssVars as De, useModel as Fe, mergeProps as Ve, createSlots as Pe, createTextVNode as We, toDisplayString as fe, mergeModels as xe } from "vue";
|
|
2
|
+
import { useLocale as Xe, useNamespace as Ye, useZIndex as He, ElIcon as N, EVENT_CODE as D, useFormItem as Ze, ElUpload as Ge, ElImage as Je, ElMessage as ze } from "element-plus";
|
|
3
|
+
import { ScaleToOriginal as Ke, FullScreen as qe, Close as Qe, ArrowLeft as et, ArrowRight as tt, ZoomOut as nt, ZoomIn as Me, RefreshLeft as lt, RefreshRight as ot, Download as at, Delete as it } from "@element-plus/icons-vue";
|
|
4
|
+
import { paramType as Ce, _ as q, ikFile as st } from "iking-utils-pro";
|
|
5
|
+
import { Icon as $e } from "@iconify/vue";
|
|
6
6
|
import { UseImage as Ie } from "@vueuse/components";
|
|
7
7
|
import { useEventListener as K } from "@vueuse/core";
|
|
8
|
-
const
|
|
8
|
+
const ee = (n, k) => (n.install = (t) => {
|
|
9
9
|
for (const r of [n, ...Object.values({})])
|
|
10
10
|
t.component(r.name, r);
|
|
11
11
|
}, n);
|
|
12
12
|
function Ne(...n) {
|
|
13
|
-
const
|
|
13
|
+
const k = [];
|
|
14
14
|
for (const t of n)
|
|
15
15
|
if (t) {
|
|
16
16
|
if (typeof t == "string")
|
|
17
|
-
|
|
17
|
+
k.push(t);
|
|
18
18
|
else if (Array.isArray(t)) {
|
|
19
19
|
const r = Ne(...t);
|
|
20
|
-
r &&
|
|
20
|
+
r && k.push(r);
|
|
21
21
|
} else if (typeof t == "object")
|
|
22
|
-
for (const [r,
|
|
23
|
-
|
|
22
|
+
for (const [r, h] of Object.entries(t))
|
|
23
|
+
h && k.push(r);
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return k.join(" ");
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const ke = (n, k) => {
|
|
28
28
|
const t = n.__vccOpts || n;
|
|
29
|
-
for (const [r,
|
|
30
|
-
t[r] =
|
|
29
|
+
for (const [r, h] of k)
|
|
30
|
+
t[r] = h;
|
|
31
31
|
return t;
|
|
32
32
|
}, rt = {}, ct = {
|
|
33
33
|
t: "1686214149488",
|
|
@@ -39,8 +39,8 @@ const ge = (n, w) => {
|
|
|
39
39
|
width: "200",
|
|
40
40
|
height: "200"
|
|
41
41
|
};
|
|
42
|
-
function ut(n,
|
|
43
|
-
return
|
|
42
|
+
function ut(n, k) {
|
|
43
|
+
return v(), z("svg", ct, [...k[0] || (k[0] = [
|
|
44
44
|
s(
|
|
45
45
|
"path",
|
|
46
46
|
{
|
|
@@ -123,7 +123,7 @@ function ut(n, w) {
|
|
|
123
123
|
)
|
|
124
124
|
])]);
|
|
125
125
|
}
|
|
126
|
-
const dt = /* @__PURE__ */
|
|
126
|
+
const dt = /* @__PURE__ */ ke(rt, [["render", ut]]), Se = [
|
|
127
127
|
"csv",
|
|
128
128
|
"djvu",
|
|
129
129
|
"doc",
|
|
@@ -179,23 +179,62 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
179
179
|
"flv",
|
|
180
180
|
"tls"
|
|
181
181
|
], ft = (n) => {
|
|
182
|
-
const
|
|
182
|
+
const k = W("loadUrl"), t = p(() => n.loadUrl || n.fileUrl || (k == null ? void 0 : k.value)), r = W("uploadUrl"), h = p(() => n.action || n.uploadUrl || (r == null ? void 0 : r.value)), c = W("token"), I = p(() => n.token || (c == null ? void 0 : c.value)), L = W("onlyofficeConfig"), g = p(() => n.onlyofficeConfig || (L == null ? void 0 : L.value)), A = W("userInfo"), E = p(() => n.userInfo || (A == null ? void 0 : A.value)), M = [...Se, ...Se.map((f) => f.toLocaleUpperCase())];
|
|
183
183
|
return {
|
|
184
184
|
cLoadUrl: t,
|
|
185
|
-
cUploadUrl:
|
|
186
|
-
cToken:
|
|
187
|
-
cOnlyofficeConfig:
|
|
185
|
+
cUploadUrl: h,
|
|
186
|
+
cToken: I,
|
|
187
|
+
cOnlyofficeConfig: g,
|
|
188
188
|
cUserInfo: E,
|
|
189
189
|
cOnlyofficePreviewType: M,
|
|
190
190
|
cHeaders: {
|
|
191
|
-
Authorization:
|
|
191
|
+
Authorization: I.value
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
|
-
}, mt = {
|
|
194
|
+
}, mt = /* @__PURE__ */ Q({
|
|
195
|
+
__name: "index",
|
|
196
|
+
props: {
|
|
197
|
+
effect: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: "dark"
|
|
200
|
+
},
|
|
201
|
+
content: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: ""
|
|
204
|
+
},
|
|
205
|
+
text: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: ""
|
|
208
|
+
},
|
|
209
|
+
placement: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: "top"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
setup(n) {
|
|
215
|
+
const k = n, t = p(() => k.effect);
|
|
216
|
+
return (r, h) => {
|
|
217
|
+
const c = Oe("el-tooltip");
|
|
218
|
+
return v(), R(c, {
|
|
219
|
+
class: "gl-tooltip",
|
|
220
|
+
effect: t.value,
|
|
221
|
+
content: n.text || n.content,
|
|
222
|
+
placement: n.placement,
|
|
223
|
+
enterable: !1
|
|
224
|
+
}, {
|
|
225
|
+
default: b(() => [
|
|
226
|
+
ge(r.$slots, "default")
|
|
227
|
+
]),
|
|
228
|
+
_: 3
|
|
229
|
+
/* FORWARDED */
|
|
230
|
+
}, 8, ["effect", "content", "placement"]);
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}), vt = ee(mt), pt = {
|
|
195
234
|
key: 2,
|
|
196
235
|
class: "shrink-0 size-inherit",
|
|
197
236
|
"aria-hidden": "true"
|
|
198
|
-
},
|
|
237
|
+
}, ht = ["xlink:href"], gt = ["xlink:href"], kt = ["size"], yt = ["xlink:href"], bt = ["xlink:href"], wt = /* @__PURE__ */ Q({
|
|
199
238
|
name: "IkSvgIcon",
|
|
200
239
|
__name: "index",
|
|
201
240
|
props: {
|
|
@@ -217,29 +256,29 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
217
256
|
hover: { type: Boolean, default: !1 }
|
|
218
257
|
},
|
|
219
258
|
emits: ["click"],
|
|
220
|
-
setup(n, { emit:
|
|
221
|
-
const t = n, r =
|
|
259
|
+
setup(n, { emit: k }) {
|
|
260
|
+
const t = n, r = k, h = p(() => t.danger ? "danger" : t.error ? "error" : t.type), c = p(() => {
|
|
222
261
|
if (!t.name)
|
|
223
262
|
return;
|
|
224
263
|
const f = (d) => /^\.{1,2}\//.test(d) || d.startsWith("/") || d.includes("/");
|
|
225
264
|
return /^https?:\/\//.test(t.name) || f(t.name) ? "img" : t.name.startsWith("iksvg_") ? "two-color-svg" : /i-[^:]+:[^:]+/.test(t.name) || t.name.startsWith("ik") ? "unocss" : t.name.includes(":") ? "iconify" : "svg";
|
|
226
|
-
}),
|
|
265
|
+
}), I = {
|
|
227
266
|
big: 24,
|
|
228
267
|
default: 22,
|
|
229
268
|
small: 20
|
|
230
269
|
};
|
|
231
|
-
function
|
|
232
|
-
return t.size ?
|
|
270
|
+
function L() {
|
|
271
|
+
return t.size ? I[t.size] || t.size : 18;
|
|
233
272
|
}
|
|
234
|
-
const
|
|
235
|
-
const f =
|
|
273
|
+
const g = p(() => {
|
|
274
|
+
const f = L(), d = typeof f == "number" ? `${f}px` : f;
|
|
236
275
|
return {
|
|
237
276
|
width: d,
|
|
238
277
|
height: d,
|
|
239
278
|
fontSize: d
|
|
240
279
|
};
|
|
241
|
-
}), A =
|
|
242
|
-
const d = `${Number.parseInt(
|
|
280
|
+
}), A = p(() => {
|
|
281
|
+
const d = `${Number.parseInt(L()) + 8}px`;
|
|
243
282
|
return {
|
|
244
283
|
width: d,
|
|
245
284
|
height: d
|
|
@@ -248,7 +287,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
248
287
|
function E(f) {
|
|
249
288
|
t.onClick ? t.onClick(f) : r("click", f);
|
|
250
289
|
}
|
|
251
|
-
const M =
|
|
290
|
+
const M = p(() => {
|
|
252
291
|
if (c.value !== "two-color-svg")
|
|
253
292
|
return {};
|
|
254
293
|
const f = {};
|
|
@@ -266,12 +305,11 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
266
305
|
t.deepColor || (f["--ik-icon-deep-color"] = f["--ik-icon-shallow-color"] || t.shallowColor || "var(--ik-icon-shallow-color)");
|
|
267
306
|
break;
|
|
268
307
|
}
|
|
269
|
-
return t.active &&
|
|
308
|
+
return t.active && h.value !== "default" && !t.deepColor && !t.shallowColor && t.colorMode === "auto" && (f["--ik-icon-deep-color"] = `var(--ik-icon-${h.value}-deep-active)`, f["--ik-icon-shallow-color"] = `var(--ik-icon-${h.value}-shallow-active)`), f;
|
|
270
309
|
});
|
|
271
310
|
return (f, d) => {
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
return p(), z(
|
|
311
|
+
var y;
|
|
312
|
+
return v(), z(
|
|
275
313
|
"i",
|
|
276
314
|
{
|
|
277
315
|
class: C(a(Ne)(
|
|
@@ -280,55 +318,55 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
280
318
|
n.showBg ? "bg" : "",
|
|
281
319
|
n.disabled ? "is-disabled" : "",
|
|
282
320
|
n.active ? "is-active" : "",
|
|
283
|
-
|
|
321
|
+
h.value !== "default" ? `is-${h.value}` : "",
|
|
284
322
|
n.unMargin ? "un-margin" : "margin",
|
|
285
323
|
n.hover ? "is-hover" : ""
|
|
286
324
|
)),
|
|
287
|
-
style:
|
|
325
|
+
style: j(n.showBg ? A.value : g.value),
|
|
288
326
|
onClick: E
|
|
289
327
|
},
|
|
290
328
|
[
|
|
291
|
-
n.title ? (
|
|
329
|
+
n.title ? (v(), R(a(vt), {
|
|
292
330
|
key: 0,
|
|
293
331
|
text: n.title
|
|
294
332
|
}, {
|
|
295
333
|
default: b(() => {
|
|
296
|
-
var
|
|
334
|
+
var $;
|
|
297
335
|
return [
|
|
298
|
-
c.value === "unocss" ? (
|
|
336
|
+
c.value === "unocss" ? (v(), z(
|
|
299
337
|
"i",
|
|
300
338
|
{
|
|
301
339
|
key: 0,
|
|
302
|
-
class: C(["iconfont shrink-0 size-inherit", `${n.name} ${(
|
|
303
|
-
style:
|
|
340
|
+
class: C(["iconfont shrink-0 size-inherit", `${n.name} ${($ = n.name) == null ? void 0 : $.split("_")[0]}`]),
|
|
341
|
+
style: j({ ...M.value, ...n.showBg ? g.value : {} })
|
|
304
342
|
},
|
|
305
343
|
null,
|
|
306
344
|
6
|
|
307
345
|
/* CLASS, STYLE */
|
|
308
|
-
)) : c.value === "iconify" ? (
|
|
346
|
+
)) : c.value === "iconify" ? (v(), R(a($e), {
|
|
309
347
|
key: 1,
|
|
310
348
|
icon: n.name,
|
|
311
349
|
class: "shrink-0 size-inherit"
|
|
312
|
-
}, null, 8, ["icon"])) : c.value === "svg" ? (
|
|
350
|
+
}, null, 8, ["icon"])) : c.value === "svg" ? (v(), z("svg", pt, [
|
|
313
351
|
s("use", {
|
|
314
352
|
"xlink:href": `#icon-${n.name}`
|
|
315
|
-
}, null, 8,
|
|
316
|
-
])) : c.value === "two-color-svg" ? (
|
|
353
|
+
}, null, 8, ht)
|
|
354
|
+
])) : c.value === "two-color-svg" ? (v(), z(
|
|
317
355
|
"svg",
|
|
318
356
|
{
|
|
319
357
|
key: 3,
|
|
320
358
|
class: "two-color-icon shrink-0 size-inherit",
|
|
321
|
-
style:
|
|
359
|
+
style: j(M.value),
|
|
322
360
|
"aria-hidden": "true"
|
|
323
361
|
},
|
|
324
362
|
[
|
|
325
363
|
s("use", {
|
|
326
364
|
"xlink:href": `#${n.name}`
|
|
327
|
-
}, null, 8,
|
|
365
|
+
}, null, 8, gt)
|
|
328
366
|
],
|
|
329
367
|
4
|
|
330
368
|
/* STYLE */
|
|
331
|
-
)) : c.value === "img" ? (
|
|
369
|
+
)) : c.value === "img" ? (v(), R(a(Ie), {
|
|
332
370
|
key: 4,
|
|
333
371
|
src: n.name,
|
|
334
372
|
class: "shrink-0"
|
|
@@ -358,25 +396,25 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
358
396
|
}),
|
|
359
397
|
_: 1
|
|
360
398
|
/* STABLE */
|
|
361
|
-
}, 8, ["text"])) : (
|
|
399
|
+
}, 8, ["text"])) : (v(), z(
|
|
362
400
|
X,
|
|
363
401
|
{ key: 1 },
|
|
364
402
|
[
|
|
365
|
-
c.value === "unocss" ? (
|
|
403
|
+
c.value === "unocss" ? (v(), z(
|
|
366
404
|
"i",
|
|
367
405
|
{
|
|
368
406
|
key: 0,
|
|
369
|
-
class: C(["iconfont shrink-0 size-inherit", `${n.name} ${(
|
|
370
|
-
style:
|
|
407
|
+
class: C(["iconfont shrink-0 size-inherit", `${n.name} ${(y = n.name) == null ? void 0 : y.split("_")[0]}`]),
|
|
408
|
+
style: j({ ...M.value, ...n.showBg ? g.value : {} })
|
|
371
409
|
},
|
|
372
410
|
null,
|
|
373
411
|
6
|
|
374
412
|
/* CLASS, STYLE */
|
|
375
|
-
)) : c.value === "iconify" ? (
|
|
413
|
+
)) : c.value === "iconify" ? (v(), R(a($e), {
|
|
376
414
|
key: 1,
|
|
377
415
|
icon: n.name,
|
|
378
416
|
class: "shrink-0 size-inherit"
|
|
379
|
-
}, null, 8, ["icon"])) : c.value === "svg" ? (
|
|
417
|
+
}, null, 8, ["icon"])) : c.value === "svg" ? (v(), z("svg", {
|
|
380
418
|
key: 2,
|
|
381
419
|
class: "shrink-0 size-inherit",
|
|
382
420
|
size: n.size,
|
|
@@ -384,23 +422,23 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
384
422
|
}, [
|
|
385
423
|
s("use", {
|
|
386
424
|
"xlink:href": `#icon-${n.name}`
|
|
387
|
-
}, null, 8,
|
|
388
|
-
], 8,
|
|
425
|
+
}, null, 8, yt)
|
|
426
|
+
], 8, kt)) : c.value === "two-color-svg" ? (v(), z(
|
|
389
427
|
"svg",
|
|
390
428
|
{
|
|
391
429
|
key: 3,
|
|
392
430
|
class: "two-color-icon shrink-0 size-inherit",
|
|
393
|
-
style:
|
|
431
|
+
style: j(M.value),
|
|
394
432
|
"aria-hidden": "true"
|
|
395
433
|
},
|
|
396
434
|
[
|
|
397
435
|
s("use", {
|
|
398
436
|
"xlink:href": `#${n.name}`
|
|
399
|
-
}, null, 8,
|
|
437
|
+
}, null, 8, bt)
|
|
400
438
|
],
|
|
401
439
|
4
|
|
402
440
|
/* STYLE */
|
|
403
|
-
)) : c.value === "img" ? (
|
|
441
|
+
)) : c.value === "img" ? (v(), R(a(Ie), {
|
|
404
442
|
key: 4,
|
|
405
443
|
src: n.name,
|
|
406
444
|
class: "shrink-0"
|
|
@@ -436,7 +474,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
436
474
|
);
|
|
437
475
|
};
|
|
438
476
|
}
|
|
439
|
-
}),
|
|
477
|
+
}), xt = /* @__PURE__ */ ke(wt, [["__scopeId", "data-v-c202da9d"]]), me = ee(xt), zt = {
|
|
440
478
|
/**
|
|
441
479
|
* @description preview link list.
|
|
442
480
|
*/
|
|
@@ -506,57 +544,57 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
506
544
|
crossorigin: {
|
|
507
545
|
type: ["anonymous", "use-credentials", ""]
|
|
508
546
|
}
|
|
509
|
-
},
|
|
547
|
+
}, Ct = {
|
|
510
548
|
close: () => !0,
|
|
511
|
-
switch: (n) =>
|
|
512
|
-
rotate: (n) =>
|
|
513
|
-
},
|
|
549
|
+
switch: (n) => Ce.isNumber(n),
|
|
550
|
+
rotate: (n) => Ce.isNumber(n)
|
|
551
|
+
}, $t = ["src", "crossorigin"], It = /* @__PURE__ */ Q({
|
|
514
552
|
name: "ElImageViewer",
|
|
515
553
|
__name: "IkImageViewer",
|
|
516
|
-
props:
|
|
517
|
-
emits:
|
|
518
|
-
setup(n, { expose:
|
|
519
|
-
const r = (e) => Object.keys(e),
|
|
554
|
+
props: zt,
|
|
555
|
+
emits: Ct,
|
|
556
|
+
setup(n, { expose: k, emit: t }) {
|
|
557
|
+
const r = (e) => Object.keys(e), h = {
|
|
520
558
|
CONTAIN: {
|
|
521
559
|
name: "contain",
|
|
522
|
-
icon:
|
|
560
|
+
icon: we(qe)
|
|
523
561
|
},
|
|
524
562
|
ORIGINAL: {
|
|
525
563
|
name: "original",
|
|
526
|
-
icon:
|
|
564
|
+
icon: we(Ke)
|
|
527
565
|
}
|
|
528
|
-
}, c = n,
|
|
566
|
+
}, c = n, I = t, { t: L } = Xe(), g = Ye("image-viewer"), { nextZIndex: A } = He(), E = O(), M = O([]), f = Be(), d = O(!0), y = O(c.initialIndex), $ = Te(h.CONTAIN), w = O({
|
|
529
567
|
scale: 1,
|
|
530
568
|
deg: 0,
|
|
531
569
|
offsetX: 0,
|
|
532
570
|
offsetY: 0,
|
|
533
571
|
enableTransition: !1
|
|
534
|
-
}), Y = O(c.zIndex ?? A()),
|
|
572
|
+
}), Y = O(c.zIndex ?? A()), te = p(() => {
|
|
535
573
|
const { urlList: e } = c;
|
|
536
574
|
return e.length <= 1;
|
|
537
|
-
}), H =
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
]),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
]),
|
|
546
|
-
const { scale: e, deg: i, offsetX: u, offsetY: x, enableTransition:
|
|
547
|
-
let T = u / e,
|
|
548
|
-
const P = i * Math.PI / 180,
|
|
549
|
-
T = T *
|
|
550
|
-
const
|
|
551
|
-
transform: `scale(${e}) rotate(${i}deg) translate(${T}px, ${
|
|
552
|
-
transition:
|
|
575
|
+
}), H = p(() => y.value === 0), Z = p(() => y.value === c.urlList.length - 1), ne = p(() => c.urlList[y.value]), le = p(() => [
|
|
576
|
+
g.e("btn"),
|
|
577
|
+
g.e("prev"),
|
|
578
|
+
g.is("disabled", !c.infinite && H.value)
|
|
579
|
+
]), oe = p(() => [
|
|
580
|
+
g.e("btn"),
|
|
581
|
+
g.e("next"),
|
|
582
|
+
g.is("disabled", !c.infinite && Z.value)
|
|
583
|
+
]), ae = p(() => {
|
|
584
|
+
const { scale: e, deg: i, offsetX: u, offsetY: x, enableTransition: S } = w.value;
|
|
585
|
+
let T = u / e, U = x / e;
|
|
586
|
+
const P = i * Math.PI / 180, ye = Math.cos(P), be = Math.sin(P);
|
|
587
|
+
T = T * ye + U * be, U = U * ye - u / e * be;
|
|
588
|
+
const de = {
|
|
589
|
+
transform: `scale(${e}) rotate(${i}deg) translate(${T}px, ${U}px)`,
|
|
590
|
+
transition: S ? "transform .3s" : ""
|
|
553
591
|
};
|
|
554
|
-
return
|
|
592
|
+
return $.value.name === h.CONTAIN.name && (de.maxWidth = de.maxHeight = "100%"), de;
|
|
555
593
|
});
|
|
556
594
|
function F() {
|
|
557
|
-
|
|
595
|
+
se(), I("close");
|
|
558
596
|
}
|
|
559
|
-
function
|
|
597
|
+
function ie() {
|
|
560
598
|
const e = q.throttle((u) => {
|
|
561
599
|
switch (u.code) {
|
|
562
600
|
// ESC
|
|
@@ -595,31 +633,31 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
595
633
|
K(document, "keydown", e), K(document, "wheel", i);
|
|
596
634
|
});
|
|
597
635
|
}
|
|
598
|
-
function
|
|
636
|
+
function se() {
|
|
599
637
|
f.stop();
|
|
600
638
|
}
|
|
601
|
-
function
|
|
639
|
+
function re() {
|
|
602
640
|
d.value = !1;
|
|
603
641
|
}
|
|
604
|
-
function
|
|
605
|
-
d.value = !1, e.target.alt =
|
|
642
|
+
function ce(e) {
|
|
643
|
+
d.value = !1, e.target.alt = L("el.image.error");
|
|
606
644
|
}
|
|
607
|
-
function
|
|
645
|
+
function ue(e) {
|
|
608
646
|
if (d.value || e.button !== 0 || !E.value) return;
|
|
609
|
-
|
|
610
|
-
const { offsetX: i, offsetY: u } =
|
|
611
|
-
|
|
612
|
-
...
|
|
647
|
+
w.value.enableTransition = !1;
|
|
648
|
+
const { offsetX: i, offsetY: u } = w.value, x = e.pageX, S = e.pageY, T = q.throttle((P) => {
|
|
649
|
+
w.value = {
|
|
650
|
+
...w.value,
|
|
613
651
|
offsetX: i + P.pageX - x,
|
|
614
|
-
offsetY: u + P.pageY -
|
|
652
|
+
offsetY: u + P.pageY - S
|
|
615
653
|
};
|
|
616
|
-
}),
|
|
654
|
+
}), U = K(document, "mousemove", T);
|
|
617
655
|
K(document, "mouseup", () => {
|
|
618
|
-
|
|
656
|
+
U();
|
|
619
657
|
}), e.preventDefault();
|
|
620
658
|
}
|
|
621
659
|
function G() {
|
|
622
|
-
|
|
660
|
+
w.value = {
|
|
623
661
|
scale: 1,
|
|
624
662
|
deg: 0,
|
|
625
663
|
offsetX: 0,
|
|
@@ -629,8 +667,8 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
629
667
|
}
|
|
630
668
|
function _() {
|
|
631
669
|
if (d.value) return;
|
|
632
|
-
const e = r(
|
|
633
|
-
|
|
670
|
+
const e = r(h), i = Object.values(h), u = $.value.name, S = ((i == null ? void 0 : i.findIndex((T) => T.name === u)) + 1) % e.length;
|
|
671
|
+
$.value = h[e[S]], G();
|
|
634
672
|
}
|
|
635
673
|
function V(e) {
|
|
636
674
|
const i = c.urlList.length;
|
|
@@ -644,7 +682,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
644
682
|
}
|
|
645
683
|
function o(e, i = {}) {
|
|
646
684
|
if (d.value) return;
|
|
647
|
-
const { minScale: u, maxScale: x } = c, { zoomRate:
|
|
685
|
+
const { minScale: u, maxScale: x } = c, { zoomRate: S, rotateDeg: T, enableTransition: U } = {
|
|
648
686
|
zoomRate: c.zoomRate,
|
|
649
687
|
rotateDeg: 90,
|
|
650
688
|
enableTransition: !0,
|
|
@@ -652,40 +690,40 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
652
690
|
};
|
|
653
691
|
switch (e) {
|
|
654
692
|
case "zoomOut":
|
|
655
|
-
|
|
656
|
-
(
|
|
693
|
+
w.value.scale > u && (w.value.scale = Number.parseFloat(
|
|
694
|
+
(w.value.scale / S).toFixed(3)
|
|
657
695
|
));
|
|
658
696
|
break;
|
|
659
697
|
case "zoomIn":
|
|
660
|
-
|
|
661
|
-
(
|
|
698
|
+
w.value.scale < x && (w.value.scale = Number.parseFloat(
|
|
699
|
+
(w.value.scale * S).toFixed(3)
|
|
662
700
|
));
|
|
663
701
|
break;
|
|
664
702
|
case "clockwise":
|
|
665
|
-
|
|
703
|
+
w.value.deg += T, I("rotate", w.value.deg);
|
|
666
704
|
break;
|
|
667
705
|
case "anticlockwise":
|
|
668
|
-
|
|
706
|
+
w.value.deg -= T, I("rotate", w.value.deg);
|
|
669
707
|
break;
|
|
670
708
|
}
|
|
671
|
-
|
|
709
|
+
w.value.enableTransition = U;
|
|
672
710
|
}
|
|
673
|
-
return
|
|
711
|
+
return ve(ne, () => {
|
|
674
712
|
Ae(() => {
|
|
675
713
|
const e = M.value[0];
|
|
676
714
|
e != null && e.complete || (d.value = !0);
|
|
677
715
|
});
|
|
678
|
-
}),
|
|
679
|
-
G(),
|
|
716
|
+
}), ve(y, (e) => {
|
|
717
|
+
G(), I("switch", e);
|
|
680
718
|
}), Ee(() => {
|
|
681
719
|
var e, i;
|
|
682
|
-
|
|
683
|
-
}),
|
|
720
|
+
ie(), (i = (e = E.value) == null ? void 0 : e.focus) == null || i.call(e);
|
|
721
|
+
}), k({
|
|
684
722
|
/**
|
|
685
723
|
* @description manually switch image
|
|
686
724
|
*/
|
|
687
725
|
setActiveItem: V
|
|
688
|
-
}), (e, i) => (
|
|
726
|
+
}), (e, i) => (v(), R(Re, { to: "body" }, [
|
|
689
727
|
m(Ue, {
|
|
690
728
|
name: "viewer-fade",
|
|
691
729
|
appear: ""
|
|
@@ -697,14 +735,14 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
697
735
|
ref_key: "wrapper",
|
|
698
736
|
ref: E,
|
|
699
737
|
tabindex: -1,
|
|
700
|
-
class: C(a(
|
|
701
|
-
style:
|
|
738
|
+
class: C(a(g).e("wrapper")),
|
|
739
|
+
style: j({ zIndex: Y.value })
|
|
702
740
|
},
|
|
703
741
|
[
|
|
704
742
|
s(
|
|
705
743
|
"div",
|
|
706
744
|
{
|
|
707
|
-
class: C(a(
|
|
745
|
+
class: C(a(g).e("mask")),
|
|
708
746
|
onClick: i[0] || (i[0] = je((u) => e.hideOnClickModal && F(), ["self"]))
|
|
709
747
|
},
|
|
710
748
|
null,
|
|
@@ -715,7 +753,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
715
753
|
s(
|
|
716
754
|
"span",
|
|
717
755
|
{
|
|
718
|
-
class: C([a(
|
|
756
|
+
class: C([a(g).e("btn"), a(g).e("close")]),
|
|
719
757
|
onClick: F
|
|
720
758
|
},
|
|
721
759
|
[
|
|
@@ -731,14 +769,14 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
731
769
|
/* CLASS */
|
|
732
770
|
),
|
|
733
771
|
B(" ARROW "),
|
|
734
|
-
|
|
772
|
+
te.value ? B("v-if", !0) : (v(), z(
|
|
735
773
|
X,
|
|
736
774
|
{ key: 0 },
|
|
737
775
|
[
|
|
738
776
|
s(
|
|
739
777
|
"span",
|
|
740
778
|
{
|
|
741
|
-
class: C(
|
|
779
|
+
class: C(le.value),
|
|
742
780
|
onClick: J
|
|
743
781
|
},
|
|
744
782
|
[
|
|
@@ -756,7 +794,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
756
794
|
s(
|
|
757
795
|
"span",
|
|
758
796
|
{
|
|
759
|
-
class: C(
|
|
797
|
+
class: C(oe.value),
|
|
760
798
|
onClick: l
|
|
761
799
|
},
|
|
762
800
|
[
|
|
@@ -779,20 +817,20 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
779
817
|
s(
|
|
780
818
|
"div",
|
|
781
819
|
{
|
|
782
|
-
class: C([a(
|
|
820
|
+
class: C([a(g).e("btn"), a(g).e("actions")])
|
|
783
821
|
},
|
|
784
822
|
[
|
|
785
823
|
s(
|
|
786
824
|
"div",
|
|
787
825
|
{
|
|
788
|
-
class: C(a(
|
|
826
|
+
class: C(a(g).e("actions__inner"))
|
|
789
827
|
},
|
|
790
828
|
[
|
|
791
829
|
m(a(N), {
|
|
792
830
|
onClick: i[1] || (i[1] = (u) => o("zoomOut"))
|
|
793
831
|
}, {
|
|
794
832
|
default: b(() => [
|
|
795
|
-
m(a(
|
|
833
|
+
m(a(nt))
|
|
796
834
|
]),
|
|
797
835
|
_: 1
|
|
798
836
|
/* STABLE */
|
|
@@ -809,7 +847,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
809
847
|
s(
|
|
810
848
|
"i",
|
|
811
849
|
{
|
|
812
|
-
class: C(a(
|
|
850
|
+
class: C(a(g).e("actions__divider"))
|
|
813
851
|
},
|
|
814
852
|
null,
|
|
815
853
|
2
|
|
@@ -817,7 +855,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
817
855
|
),
|
|
818
856
|
m(a(N), { onClick: _ }, {
|
|
819
857
|
default: b(() => [
|
|
820
|
-
(
|
|
858
|
+
(v(), R(_e($.value.icon)))
|
|
821
859
|
]),
|
|
822
860
|
_: 1
|
|
823
861
|
/* STABLE */
|
|
@@ -825,7 +863,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
825
863
|
s(
|
|
826
864
|
"i",
|
|
827
865
|
{
|
|
828
|
-
class: C(a(
|
|
866
|
+
class: C(a(g).e("actions__divider"))
|
|
829
867
|
},
|
|
830
868
|
null,
|
|
831
869
|
2
|
|
@@ -835,7 +873,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
835
873
|
onClick: i[3] || (i[3] = (u) => o("anticlockwise"))
|
|
836
874
|
}, {
|
|
837
875
|
default: b(() => [
|
|
838
|
-
m(a(
|
|
876
|
+
m(a(lt))
|
|
839
877
|
]),
|
|
840
878
|
_: 1
|
|
841
879
|
/* STABLE */
|
|
@@ -861,25 +899,25 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
861
899
|
s(
|
|
862
900
|
"div",
|
|
863
901
|
{
|
|
864
|
-
class: C(a(
|
|
902
|
+
class: C(a(g).e("canvas"))
|
|
865
903
|
},
|
|
866
904
|
[
|
|
867
|
-
(
|
|
905
|
+
(v(!0), z(
|
|
868
906
|
X,
|
|
869
907
|
null,
|
|
870
|
-
Le(e.urlList, (u, x) =>
|
|
908
|
+
Le(e.urlList, (u, x) => pe((v(), z("img", {
|
|
871
909
|
ref_for: !0,
|
|
872
|
-
ref: (
|
|
910
|
+
ref: (S) => M.value[x] = S,
|
|
873
911
|
key: u,
|
|
874
912
|
src: u,
|
|
875
|
-
style:
|
|
876
|
-
class: C(a(
|
|
913
|
+
style: j(ae.value),
|
|
914
|
+
class: C(a(g).e("img")),
|
|
877
915
|
crossorigin: e.crossorigin,
|
|
878
|
-
onLoad:
|
|
879
|
-
onError:
|
|
880
|
-
onMousedown:
|
|
881
|
-
}, null, 46,
|
|
882
|
-
[
|
|
916
|
+
onLoad: re,
|
|
917
|
+
onError: ce,
|
|
918
|
+
onMousedown: ue
|
|
919
|
+
}, null, 46, $t)), [
|
|
920
|
+
[he, x === y.value]
|
|
883
921
|
])),
|
|
884
922
|
128
|
|
885
923
|
/* KEYED_FRAGMENT */
|
|
@@ -888,7 +926,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
888
926
|
2
|
|
889
927
|
/* CLASS */
|
|
890
928
|
),
|
|
891
|
-
|
|
929
|
+
ge(e.$slots, "default")
|
|
892
930
|
],
|
|
893
931
|
6
|
|
894
932
|
/* CLASS, STYLE */
|
|
@@ -899,12 +937,12 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
899
937
|
})
|
|
900
938
|
]));
|
|
901
939
|
}
|
|
902
|
-
}),
|
|
940
|
+
}), St = ee(It), Lt = {
|
|
903
941
|
key: 1,
|
|
904
942
|
class: "upload-btn"
|
|
905
|
-
},
|
|
943
|
+
}, Mt = { class: "tip" }, Nt = { class: "loading-statu" }, Ot = { class: "operate-btn" }, Bt = { key: 0 }, Tt = { class: "el-upload-list el-upload-list--picture-card" }, At = ["onClick"], Et = ["src"], Rt = { class: "demo-image__preview" }, Ut = /* @__PURE__ */ Q({
|
|
906
944
|
__name: "index",
|
|
907
|
-
props: /* @__PURE__ */
|
|
945
|
+
props: /* @__PURE__ */ xe({
|
|
908
946
|
// 显示的文字
|
|
909
947
|
title: {
|
|
910
948
|
type: String,
|
|
@@ -995,41 +1033,41 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
995
1033
|
},
|
|
996
1034
|
modelModifiers: {}
|
|
997
1035
|
}),
|
|
998
|
-
emits: /* @__PURE__ */
|
|
999
|
-
setup(n, { emit:
|
|
1036
|
+
emits: /* @__PURE__ */ xe(["delete", "success", "change"], ["update:modelValue"]),
|
|
1037
|
+
setup(n, { emit: k }) {
|
|
1000
1038
|
De((l) => ({
|
|
1001
1039
|
v03c4de28: E.value,
|
|
1002
1040
|
v5b07ed05: M.value,
|
|
1003
1041
|
v6d7e0626: J.value,
|
|
1004
1042
|
v7397abe6: V.value
|
|
1005
1043
|
}));
|
|
1006
|
-
const t = n, r = Fe(n, "modelValue"), { formItem:
|
|
1044
|
+
const t = n, r = Fe(n, "modelValue"), { formItem: h } = Ze(), c = (l) => Array.isArray(l) ? l.map((o) => {
|
|
1007
1045
|
var u, x;
|
|
1008
1046
|
const e = ((u = o.url) == null ? void 0 : u.startsWith("http")) || ((x = o.url) == null ? void 0 : x.startsWith("blob")), i = (o == null ? void 0 : o.url) || o;
|
|
1009
1047
|
return {
|
|
1010
1048
|
...o.url ? o : { url: i },
|
|
1011
|
-
__url: e ? i : `${
|
|
1049
|
+
__url: e ? i : `${L.value}${i}`
|
|
1012
1050
|
};
|
|
1013
1051
|
}) : l ? [
|
|
1014
1052
|
{
|
|
1015
1053
|
url: l,
|
|
1016
|
-
__url: l != null && l.startsWith("http") || l != null && l.startsWith("blob") ? l : `${
|
|
1054
|
+
__url: l != null && l.startsWith("http") || l != null && l.startsWith("blob") ? l : `${L.value}${l}`
|
|
1017
1055
|
}
|
|
1018
1056
|
] : [];
|
|
1019
|
-
|
|
1057
|
+
ve(
|
|
1020
1058
|
() => r.value,
|
|
1021
1059
|
(l) => {
|
|
1022
|
-
!l || !l.length ? y.value = [] : y.value = q.cloneDeep(c(l)),
|
|
1060
|
+
!l || !l.length ? y.value = [] : y.value = q.cloneDeep(c(l)), h == null || h.validate("change");
|
|
1023
1061
|
},
|
|
1024
1062
|
{ deep: !0 }
|
|
1025
1063
|
);
|
|
1026
|
-
const
|
|
1064
|
+
const I = k, { cLoadUrl: L, cUploadUrl: g, cHeaders: A } = ft(t), E = p(() => `${t.width}px`), M = p(() => `${t.height}px`), f = p(() => t.size), d = O(null), y = O(c(r.value)), $ = O([]), w = O(!1), Y = O(0), te = p(
|
|
1027
1065
|
() => t.tipText || `最多可上传${t.limit}张图片, 每张图片不能超过${t.size}MB`
|
|
1028
1066
|
), H = (l, o) => {
|
|
1029
|
-
|
|
1067
|
+
I("change", l);
|
|
1030
1068
|
}, Z = (l) => {
|
|
1031
1069
|
if (!l.type.includes("image")) {
|
|
1032
|
-
|
|
1070
|
+
ze.warning("只允许上传图片!");
|
|
1033
1071
|
try {
|
|
1034
1072
|
y.value.pop();
|
|
1035
1073
|
} catch {
|
|
@@ -1037,7 +1075,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1037
1075
|
return !1;
|
|
1038
1076
|
}
|
|
1039
1077
|
if (!(l.size / 1024 / 1024 < f.value)) {
|
|
1040
|
-
|
|
1078
|
+
ze.warning(`图片大小超出系统限制的${t.size}MB!`);
|
|
1041
1079
|
try {
|
|
1042
1080
|
y.value.pop();
|
|
1043
1081
|
} catch {
|
|
@@ -1045,45 +1083,45 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1045
1083
|
return !1;
|
|
1046
1084
|
}
|
|
1047
1085
|
return !0;
|
|
1048
|
-
},
|
|
1086
|
+
}, ne = () => !1, le = (l, o) => {
|
|
1049
1087
|
var e, i;
|
|
1050
|
-
l.status = "ready", o !== void 0 &&
|
|
1051
|
-
},
|
|
1052
|
-
var x,
|
|
1088
|
+
l.status = "ready", o !== void 0 && $.value.splice(o, 1), (e = d.value) == null || e.handleStart(l.raw), (i = d.value) == null || i.submit();
|
|
1089
|
+
}, oe = (l, o) => {
|
|
1090
|
+
var x, S;
|
|
1053
1091
|
const e = r.value.length, i = t.limit - e;
|
|
1054
1092
|
let u = 0;
|
|
1055
1093
|
for (; u < i && u < (l == null ? void 0 : l.length); )
|
|
1056
|
-
(x = d.value) == null || x.handleStart(l == null ? void 0 : l[u]), (
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1094
|
+
(x = d.value) == null || x.handleStart(l == null ? void 0 : l[u]), (S = d.value) == null || S.submit(), u++;
|
|
1095
|
+
}, ae = (l, o, e) => {
|
|
1096
|
+
I("success", l, o, e), r.value = y.value, h == null || h.validate("change");
|
|
1059
1097
|
}, F = (l, o, e) => {
|
|
1060
|
-
|
|
1098
|
+
$.value.push({
|
|
1061
1099
|
...o,
|
|
1062
1100
|
__url: o.url
|
|
1063
1101
|
});
|
|
1064
|
-
},
|
|
1102
|
+
}, ie = (l) => {
|
|
1065
1103
|
var o;
|
|
1066
|
-
|
|
1067
|
-
},
|
|
1104
|
+
w.value = !0, Y.value = Array.isArray(r == null ? void 0 : r.value) ? (o = r == null ? void 0 : r.value) == null ? void 0 : o.findIndex((e) => e.url === l.url) : 0;
|
|
1105
|
+
}, se = (l) => {
|
|
1068
1106
|
st.downloadFile(l.__url || l.url, l.name || l.url);
|
|
1069
|
-
},
|
|
1107
|
+
}, re = (l) => {
|
|
1070
1108
|
var o;
|
|
1071
1109
|
(o = d.value) == null || o.abort(l);
|
|
1072
|
-
},
|
|
1110
|
+
}, ce = (l) => {
|
|
1073
1111
|
var o;
|
|
1074
|
-
l.status !== "success" &&
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1077
|
-
}, G =
|
|
1112
|
+
l.status !== "success" && re(l), r.value = (o = y.value) == null ? void 0 : o.filter((e) => e.uid !== l.uid), I("delete", l);
|
|
1113
|
+
}, ue = (l, o) => {
|
|
1114
|
+
$.value.splice(o, 1);
|
|
1115
|
+
}, G = p(() => y.value.length + $.value.length < t.limit), _ = p(
|
|
1078
1116
|
() => r.value.length >= t.limit || t.disabled
|
|
1079
|
-
), V =
|
|
1117
|
+
), V = p(() => {
|
|
1080
1118
|
var l;
|
|
1081
|
-
return !((l = r.value) != null && l.length) &&
|
|
1082
|
-
}), J =
|
|
1119
|
+
return !((l = r.value) != null && l.length) && !$.value.length || t.limit === 1 || typeof r.value == "string" ? "0" : `${t.width + 8}px`;
|
|
1120
|
+
}), J = p(() => {
|
|
1083
1121
|
var l;
|
|
1084
|
-
return !((l = r.value) != null && l.length) &&
|
|
1122
|
+
return !((l = r.value) != null && l.length) && !$.value.length && typeof r.value != "string" || t.limit === 1 ? "none" : "absolute";
|
|
1085
1123
|
});
|
|
1086
|
-
return (l, o) => (
|
|
1124
|
+
return (l, o) => (v(), z(
|
|
1087
1125
|
X,
|
|
1088
1126
|
null,
|
|
1089
1127
|
[
|
|
@@ -1093,7 +1131,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1093
1131
|
ref: d,
|
|
1094
1132
|
"list-type": "picture-card",
|
|
1095
1133
|
accept: n.accept,
|
|
1096
|
-
action: a(
|
|
1134
|
+
action: a(g),
|
|
1097
1135
|
headers: n.headers || a(A),
|
|
1098
1136
|
data: n.data,
|
|
1099
1137
|
"file-list": y.value,
|
|
@@ -1102,15 +1140,15 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1102
1140
|
limit: n.limit,
|
|
1103
1141
|
"on-change": H,
|
|
1104
1142
|
"before-upload": Z,
|
|
1105
|
-
"before-remove":
|
|
1106
|
-
"on-exceed":
|
|
1107
|
-
"on-success":
|
|
1143
|
+
"before-remove": ne,
|
|
1144
|
+
"on-exceed": oe,
|
|
1145
|
+
"on-success": ae,
|
|
1108
1146
|
"on-error": F,
|
|
1109
1147
|
drag: ""
|
|
1110
1148
|
}, l.$attrs, { disabled: _.value }), Pe({
|
|
1111
1149
|
trigger: b(() => [
|
|
1112
|
-
l.$slots.trigger ?
|
|
1113
|
-
m(a(
|
|
1150
|
+
l.$slots.trigger ? ge(l.$slots, "trigger", { key: 0 }, void 0, !0) : (v(), z("div", Lt, [
|
|
1151
|
+
m(a(me), {
|
|
1114
1152
|
size: 20,
|
|
1115
1153
|
name: "iksvg_guanbibeifen",
|
|
1116
1154
|
disabled: _.value
|
|
@@ -1118,7 +1156,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1118
1156
|
s(
|
|
1119
1157
|
"span",
|
|
1120
1158
|
null,
|
|
1121
|
-
|
|
1159
|
+
fe(n.title),
|
|
1122
1160
|
1
|
|
1123
1161
|
/* TEXT */
|
|
1124
1162
|
)
|
|
@@ -1132,13 +1170,13 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1132
1170
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
1133
1171
|
},
|
|
1134
1172
|
[
|
|
1135
|
-
|
|
1173
|
+
pe(s(
|
|
1136
1174
|
"div",
|
|
1137
|
-
|
|
1175
|
+
Nt,
|
|
1138
1176
|
[
|
|
1139
1177
|
m(dt),
|
|
1140
1178
|
We(
|
|
1141
|
-
" 上传" +
|
|
1179
|
+
" 上传" + fe(e.percentage) + "% ",
|
|
1142
1180
|
1
|
|
1143
1181
|
/* TEXT */
|
|
1144
1182
|
)
|
|
@@ -1146,7 +1184,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1146
1184
|
512
|
|
1147
1185
|
/* NEED_PATCH */
|
|
1148
1186
|
), [
|
|
1149
|
-
[
|
|
1187
|
+
[he, e.status === "uploading"]
|
|
1150
1188
|
]),
|
|
1151
1189
|
B(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
|
|
1152
1190
|
m(a(Je), {
|
|
@@ -1156,10 +1194,10 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1156
1194
|
"initial-index": 0,
|
|
1157
1195
|
fit: "contain"
|
|
1158
1196
|
}, null, 8, ["src"]),
|
|
1159
|
-
s("span",
|
|
1197
|
+
s("span", Ot, [
|
|
1160
1198
|
s("span", null, [
|
|
1161
1199
|
m(a(N), {
|
|
1162
|
-
onClick: (u) =>
|
|
1200
|
+
onClick: (u) => ie(e)
|
|
1163
1201
|
}, {
|
|
1164
1202
|
default: b(() => [
|
|
1165
1203
|
m(a(Me))
|
|
@@ -1170,7 +1208,7 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1170
1208
|
]),
|
|
1171
1209
|
s("span", null, [
|
|
1172
1210
|
m(a(N), {
|
|
1173
|
-
onClick: (u) =>
|
|
1211
|
+
onClick: (u) => se(e)
|
|
1174
1212
|
}, {
|
|
1175
1213
|
default: b(() => [
|
|
1176
1214
|
m(a(at))
|
|
@@ -1179,10 +1217,10 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1179
1217
|
/* STABLE */
|
|
1180
1218
|
}, 8, ["onClick"])
|
|
1181
1219
|
]),
|
|
1182
|
-
n.preview ? B("v-if", !0) : (
|
|
1220
|
+
n.preview ? B("v-if", !0) : (v(), z("span", Bt, [
|
|
1183
1221
|
m(a(N), {
|
|
1184
1222
|
type: "warning",
|
|
1185
|
-
onClick: (u) =>
|
|
1223
|
+
onClick: (u) => ce(e)
|
|
1186
1224
|
}, {
|
|
1187
1225
|
default: b(() => [
|
|
1188
1226
|
m(a(it))
|
|
@@ -1198,20 +1236,20 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1198
1236
|
)
|
|
1199
1237
|
]),
|
|
1200
1238
|
default: b(() => [
|
|
1201
|
-
s("ul",
|
|
1202
|
-
(
|
|
1239
|
+
s("ul", Tt, [
|
|
1240
|
+
(v(!0), z(
|
|
1203
1241
|
X,
|
|
1204
1242
|
null,
|
|
1205
|
-
Le(
|
|
1243
|
+
Le($.value, (e, i) => (v(), z("li", {
|
|
1206
1244
|
class: "el-upload-list__item",
|
|
1207
1245
|
key: e.uid
|
|
1208
1246
|
}, [
|
|
1209
1247
|
s("span", null, [
|
|
1210
|
-
m(a(
|
|
1248
|
+
m(a(me), {
|
|
1211
1249
|
name: "iksvg_guanbi",
|
|
1212
1250
|
size: 12,
|
|
1213
1251
|
error: "",
|
|
1214
|
-
onClick: (u) =>
|
|
1252
|
+
onClick: (u) => ue(e, i)
|
|
1215
1253
|
}, null, 8, ["onClick"])
|
|
1216
1254
|
]),
|
|
1217
1255
|
s(
|
|
@@ -1224,11 +1262,11 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1224
1262
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
1225
1263
|
},
|
|
1226
1264
|
[
|
|
1227
|
-
|
|
1265
|
+
pe(s("div", {
|
|
1228
1266
|
class: "loading-statu",
|
|
1229
|
-
onClick: (u) =>
|
|
1267
|
+
onClick: (u) => le(e, i)
|
|
1230
1268
|
}, [
|
|
1231
|
-
m(a(
|
|
1269
|
+
m(a(me), {
|
|
1232
1270
|
name: "iksvg_shuaxin-daohang",
|
|
1233
1271
|
size: 24
|
|
1234
1272
|
}),
|
|
@@ -1246,14 +1284,14 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1246
1284
|
-1
|
|
1247
1285
|
/* CACHED */
|
|
1248
1286
|
))
|
|
1249
|
-
], 8,
|
|
1250
|
-
[
|
|
1287
|
+
], 8, At), [
|
|
1288
|
+
[he, e.status === "fail"]
|
|
1251
1289
|
]),
|
|
1252
1290
|
s("img", {
|
|
1253
1291
|
src: e.__url,
|
|
1254
1292
|
alt: "",
|
|
1255
|
-
style:
|
|
1256
|
-
}, null, 12,
|
|
1293
|
+
style: j({ "object-fit": n.fit })
|
|
1294
|
+
}, null, 12, Et)
|
|
1257
1295
|
],
|
|
1258
1296
|
2
|
|
1259
1297
|
/* CLASS */
|
|
@@ -1272,8 +1310,8 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1272
1310
|
fn: b(() => [
|
|
1273
1311
|
s(
|
|
1274
1312
|
"span",
|
|
1275
|
-
|
|
1276
|
-
|
|
1313
|
+
Mt,
|
|
1314
|
+
fe(te.value),
|
|
1277
1315
|
1
|
|
1278
1316
|
/* TEXT */
|
|
1279
1317
|
)
|
|
@@ -1282,13 +1320,13 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1282
1320
|
} : void 0
|
|
1283
1321
|
]), 1040, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit", "disabled"]),
|
|
1284
1322
|
B(" 文件预览 "),
|
|
1285
|
-
s("div",
|
|
1286
|
-
|
|
1323
|
+
s("div", Rt, [
|
|
1324
|
+
w.value ? (v(), R(a(St), {
|
|
1287
1325
|
key: 0,
|
|
1288
1326
|
"lock-scroll": "",
|
|
1289
1327
|
"hide-on-click-modal": "",
|
|
1290
1328
|
onClose: o[1] || (o[1] = () => {
|
|
1291
|
-
|
|
1329
|
+
w.value = !1;
|
|
1292
1330
|
}),
|
|
1293
1331
|
"url-list": c(y.value).map((e) => e.__url),
|
|
1294
1332
|
"initial-index": Y.value
|
|
@@ -1299,8 +1337,8 @@ const dt = /* @__PURE__ */ ge(rt, [["render", ut]]), $e = [
|
|
|
1299
1337
|
/* STABLE_FRAGMENT */
|
|
1300
1338
|
));
|
|
1301
1339
|
}
|
|
1302
|
-
}),
|
|
1340
|
+
}), jt = /* @__PURE__ */ ke(Ut, [["__scopeId", "data-v-fadfd185"]]), Yt = ee(jt);
|
|
1303
1341
|
export {
|
|
1304
|
-
|
|
1305
|
-
|
|
1342
|
+
Yt as IkUploadImage,
|
|
1343
|
+
Yt as default
|
|
1306
1344
|
};
|