iking-web-ui-pro 0.1.16 → 0.1.19
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 +57 -56
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +17 -16
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/ik.index.es.js +2 -2
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +1142 -419
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +666 -551
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/ik.index.es.js +130 -129
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +22848 -22715
- package/dist/index.umd.js +59 -59
- package/dist/src/components/IKApprovalProcess/index.d.ts +1 -1
- package/dist/src/components/IKApprovalProcess/src/IKApprovalProcess.vue.d.ts +1 -1
- package/dist/src/components/IKApprovalProcessDetail/index.d.ts +9 -0
- package/dist/src/components/IKApprovalProcessDetail/src/IKApprovalProcessDetail.vue.d.ts +9 -0
- package/dist/src/components/IKDetailPreviewFiles/index.d.ts +2 -2
- package/dist/src/components/IKPreviewFile/index.d.ts +2 -2
- package/dist/src/components/IKPreviewFile/src/IKPreviewFile.vue.d.ts +2 -2
- package/dist/src/components/IkUploadFile/src/components/FileIcon.vue.d.ts +29 -5
- package/dist/src/components/IkUploadFile/src/utils.d.ts +2 -2
- package/dist/src/components/IkUploadImage/index.d.ts +3 -3
- package/dist/src/components/IkUploadImage/src/index.vue.d.ts +1 -1
- package/dist/src/utils/math.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as
|
|
1
|
+
import { defineComponent as B, ref as b, computed as U, watch as T, openBlock as s, createBlock as P, unref as C, withCtx as j, createElementBlock as a, createCommentVNode as h, resolveComponent as K, normalizeClass as w, normalizeStyle as k, createElementVNode as g, Fragment as z, renderList as I, createVNode as x, toDisplayString as A, pushScopeId as W, popScopeId as q } from "vue";
|
|
2
2
|
import { ikColor as R, ikUrl as G } from "iking-utils-pro";
|
|
3
3
|
import { ElDialog as X } from "element-plus";
|
|
4
4
|
const F = (l, e) => {
|
|
@@ -17,22 +17,22 @@ const F = (l, e) => {
|
|
|
17
17
|
};
|
|
18
18
|
const H = typeof btoa == "function", S = typeof Buffer == "function";
|
|
19
19
|
typeof TextDecoder == "function" && new TextDecoder();
|
|
20
|
-
const D = typeof TextEncoder == "function" ? new TextEncoder() : void 0, J = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
20
|
+
const D = typeof TextEncoder == "function" ? new TextEncoder() : void 0, J = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _ = Array.prototype.slice.call(J);
|
|
21
21
|
((l) => {
|
|
22
22
|
let e = {};
|
|
23
23
|
return l.forEach((n, t) => e[n] = t), e;
|
|
24
|
-
})(
|
|
24
|
+
})(_);
|
|
25
25
|
const d = String.fromCharCode.bind(String);
|
|
26
26
|
typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array);
|
|
27
27
|
const M = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), Q = (l) => {
|
|
28
|
-
let e, n, t, o,
|
|
28
|
+
let e, n, t, o, c = "";
|
|
29
29
|
const u = l.length % 3;
|
|
30
|
-
for (let
|
|
31
|
-
if ((n = l.charCodeAt(
|
|
30
|
+
for (let p = 0; p < l.length; ) {
|
|
31
|
+
if ((n = l.charCodeAt(p++)) > 255 || (t = l.charCodeAt(p++)) > 255 || (o = l.charCodeAt(p++)) > 255)
|
|
32
32
|
throw new TypeError("invalid character found");
|
|
33
|
-
e = n << 16 | t << 8 | o,
|
|
33
|
+
e = n << 16 | t << 8 | o, c += _[e >> 18 & 63] + _[e >> 12 & 63] + _[e >> 6 & 63] + _[e & 63];
|
|
34
34
|
}
|
|
35
|
-
return u ?
|
|
35
|
+
return u ? c.slice(0, u - 3) + "===".substring(u) : c;
|
|
36
36
|
}, N = H ? (l) => btoa(l) : S ? (l) => Buffer.from(l, "binary").toString("base64") : Q, Z = S ? (l) => Buffer.from(l).toString("base64") : (l) => {
|
|
37
37
|
let n = [];
|
|
38
38
|
for (let t = 0, o = l.length; t < o; t += 4096)
|
|
@@ -77,28 +77,29 @@ const M = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
setup(l) {
|
|
80
|
-
const e = l, n =
|
|
80
|
+
const e = l, n = b(null), t = U(() => {
|
|
81
81
|
if (!e.kkUrl || !e.url)
|
|
82
82
|
return "";
|
|
83
|
-
const
|
|
83
|
+
const c = e.loadUrl ? e.loadUrl : location.href;
|
|
84
84
|
return `${e.kkUrl}/onlinePreview?url=${encodeURIComponent(
|
|
85
|
-
re(`${
|
|
85
|
+
re(`${c}${e.url}${e.fileName ? `&fullfilename=${e.fileName}` : ""}`)
|
|
86
86
|
)}`;
|
|
87
|
-
}), o =
|
|
88
|
-
return T(() => e.modelValue, (
|
|
89
|
-
o.value =
|
|
90
|
-
}), (
|
|
87
|
+
}), o = b(e.modelValue);
|
|
88
|
+
return T(() => e.modelValue, (c) => {
|
|
89
|
+
o.value = c;
|
|
90
|
+
}), (c, u) => (s(), P(C(X), {
|
|
91
91
|
fullscreen: "",
|
|
92
92
|
modelValue: o.value,
|
|
93
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
93
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => o.value = p),
|
|
94
94
|
"destroy-on-close": "",
|
|
95
95
|
"append-to-body": "",
|
|
96
96
|
"modal-class": "ik-file-preview-modal",
|
|
97
|
-
onClose: u[1] || (u[1] = (
|
|
97
|
+
onClose: u[1] || (u[1] = (p) => c.$emit("update:modelValue", !1)),
|
|
98
98
|
class: "ik-file-preview"
|
|
99
99
|
}, {
|
|
100
100
|
default: j(() => [
|
|
101
|
-
|
|
101
|
+
t.value ? (s(), a("iframe", {
|
|
102
|
+
key: 0,
|
|
102
103
|
ref_key: "freamRef",
|
|
103
104
|
ref: n,
|
|
104
105
|
"cross-origin": "",
|
|
@@ -106,7 +107,7 @@ const M = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
|
|
|
106
107
|
frameborder: "0",
|
|
107
108
|
allowfullscreen: "",
|
|
108
109
|
seamless: ""
|
|
109
|
-
}, null, 8, ne)
|
|
110
|
+
}, null, 8, ne)) : h("v-if", !0)
|
|
110
111
|
]),
|
|
111
112
|
_: 1
|
|
112
113
|
/* STABLE */
|
|
@@ -144,8 +145,8 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
144
145
|
},
|
|
145
146
|
setup(l) {
|
|
146
147
|
const e = l, n = U(() => {
|
|
147
|
-
var o,
|
|
148
|
-
return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : (o = e.name) != null && o.startsWith("iksig") ? "iksig" : (
|
|
148
|
+
var o, c;
|
|
149
|
+
return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : (o = e.name) != null && o.startsWith("iksig") ? "iksig" : (c = e.name) != null && c.includes(":") ? "iconify" : "svg";
|
|
149
150
|
}), t = U(() => {
|
|
150
151
|
const o = [];
|
|
151
152
|
if (e.flip)
|
|
@@ -180,10 +181,10 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
180
181
|
} : {}
|
|
181
182
|
};
|
|
182
183
|
});
|
|
183
|
-
return (o,
|
|
184
|
+
return (o, c) => {
|
|
184
185
|
const u = K("el-tooltip");
|
|
185
|
-
return s(),
|
|
186
|
-
o.notip || !o.title ? (s(),
|
|
186
|
+
return s(), a("span", se, [
|
|
187
|
+
o.notip || !o.title ? (s(), a(
|
|
187
188
|
"i",
|
|
188
189
|
{
|
|
189
190
|
key: 0,
|
|
@@ -201,8 +202,8 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
201
202
|
style: k(t.value)
|
|
202
203
|
},
|
|
203
204
|
[
|
|
204
|
-
|
|
205
|
-
n.value === "iksig" ? (s(),
|
|
205
|
+
h(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
206
|
+
n.value === "iksig" ? (s(), a(
|
|
206
207
|
"i",
|
|
207
208
|
{
|
|
208
209
|
key: 0,
|
|
@@ -212,15 +213,15 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
212
213
|
null,
|
|
213
214
|
6
|
|
214
215
|
/* CLASS, STYLE */
|
|
215
|
-
)) : n.value === "svg" ? (s(),
|
|
216
|
-
|
|
216
|
+
)) : n.value === "svg" ? (s(), a("svg", ae, [
|
|
217
|
+
g("use", {
|
|
217
218
|
"xlink:href": `#${o.name}`
|
|
218
219
|
}, null, 8, ce)
|
|
219
|
-
])) : n.value === "img" ? (s(),
|
|
220
|
+
])) : n.value === "img" ? (s(), a("img", {
|
|
220
221
|
key: 2,
|
|
221
222
|
src: o.name,
|
|
222
223
|
class: "h-[1em] w-[1em]"
|
|
223
|
-
}, null, 8, ue)) :
|
|
224
|
+
}, null, 8, ue)) : h("v-if", !0)
|
|
224
225
|
],
|
|
225
226
|
6
|
|
226
227
|
/* CLASS, STYLE */
|
|
@@ -230,7 +231,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
230
231
|
placement: "right"
|
|
231
232
|
}, {
|
|
232
233
|
default: j(() => [
|
|
233
|
-
|
|
234
|
+
g(
|
|
234
235
|
"i",
|
|
235
236
|
{
|
|
236
237
|
class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
@@ -246,7 +247,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
246
247
|
style: k(t.value)
|
|
247
248
|
},
|
|
248
249
|
[
|
|
249
|
-
n.value === "iksig" ? (s(),
|
|
250
|
+
n.value === "iksig" ? (s(), a(
|
|
250
251
|
"i",
|
|
251
252
|
{
|
|
252
253
|
key: 0,
|
|
@@ -256,15 +257,15 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
256
257
|
null,
|
|
257
258
|
6
|
|
258
259
|
/* CLASS, STYLE */
|
|
259
|
-
)) : n.value === "svg" ? (s(),
|
|
260
|
-
|
|
260
|
+
)) : n.value === "svg" ? (s(), a("svg", fe, [
|
|
261
|
+
g("use", {
|
|
261
262
|
"xlink:href": `#${o.name}`
|
|
262
263
|
}, null, 8, de)
|
|
263
|
-
])) : n.value === "img" ? (s(),
|
|
264
|
+
])) : n.value === "img" ? (s(), a("img", {
|
|
264
265
|
key: 2,
|
|
265
266
|
src: o.name,
|
|
266
267
|
class: "h-[1em] w-[1em]"
|
|
267
|
-
}, null, 8, pe)) :
|
|
268
|
+
}, null, 8, pe)) : h("v-if", !0)
|
|
268
269
|
],
|
|
269
270
|
6
|
|
270
271
|
/* CLASS, STYLE */
|
|
@@ -282,7 +283,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
282
283
|
}, ye = {
|
|
283
284
|
class: "flex",
|
|
284
285
|
style: { width: "80%", "align-items": "center" }
|
|
285
|
-
}, ke = ["onClick"], he = ["title"], _e = { style: { color: "#b8c6d9" } }, be = ["onClick"], we = /* @__PURE__ */ ve(() => /* @__PURE__ */
|
|
286
|
+
}, ke = ["onClick"], he = ["title"], _e = { style: { color: "#b8c6d9" } }, be = ["onClick"], we = /* @__PURE__ */ ve(() => /* @__PURE__ */ g(
|
|
286
287
|
"span",
|
|
287
288
|
null,
|
|
288
289
|
"预览",
|
|
@@ -321,7 +322,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
321
322
|
}
|
|
322
323
|
},
|
|
323
324
|
setup(l) {
|
|
324
|
-
const e = l, n =
|
|
325
|
+
const e = l, n = b(e.fileList);
|
|
325
326
|
T(
|
|
326
327
|
() => e.fileList,
|
|
327
328
|
(r) => {
|
|
@@ -329,7 +330,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
329
330
|
},
|
|
330
331
|
{ immediate: !0 }
|
|
331
332
|
);
|
|
332
|
-
const t =
|
|
333
|
+
const t = b(!1), o = b({}), c = (r) => {
|
|
333
334
|
o.value = {
|
|
334
335
|
url: r.url,
|
|
335
336
|
name: r.name
|
|
@@ -338,7 +339,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
338
339
|
}, u = (r) => {
|
|
339
340
|
var f, y, v, m, i;
|
|
340
341
|
return (f = r == null ? void 0 : r.suffix) != null && f.includes("pdf") ? "iksvg_pdf" : (y = r == null ? void 0 : r.suffix) != null && y.includes("doc") ? "iksvg_word" : (v = r == null ? void 0 : r.suffix) != null && v.includes("xls") ? "iksvg_excel" : (m = r == null ? void 0 : r.suffix) != null && m.includes("mov") ? "iksvg_mov" : (i = r == null ? void 0 : r.suffix) != null && i.includes("zip") ? "iksvg_zip" : "icon-jpg";
|
|
341
|
-
},
|
|
342
|
+
}, p = (r) => {
|
|
342
343
|
var f, y, v, m, i;
|
|
343
344
|
return (f = r == null ? void 0 : r.suffix) != null && f.includes("pdf") ? "#FA4E4E" : (y = r == null ? void 0 : r.suffix) != null && y.includes("doc") ? "#2c69e0" : (v = r.suffix) != null && v.includes("xls") ? "#39BFBF" : (m = r.suffix) != null && m.includes("txt") ? "#2c69e0" : (i = r.suffix) != null && i.includes("zip") ? "#FF9000" : "#32CD79";
|
|
344
345
|
}, L = (r) => {
|
|
@@ -348,12 +349,12 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
348
349
|
return (r, f) => {
|
|
349
350
|
var v, m;
|
|
350
351
|
const y = K("el-image");
|
|
351
|
-
return s(),
|
|
352
|
-
e.fileType === "file" ? (s(),
|
|
353
|
-
(s(!0),
|
|
352
|
+
return s(), a("div", null, [
|
|
353
|
+
e.fileType === "file" ? (s(), a("div", me, [
|
|
354
|
+
(s(!0), a(
|
|
354
355
|
z,
|
|
355
356
|
null,
|
|
356
|
-
I(n.value, (i, $) => (s(),
|
|
357
|
+
I(n.value, (i, $) => (s(), a(
|
|
357
358
|
"div",
|
|
358
359
|
{
|
|
359
360
|
key: $,
|
|
@@ -364,20 +365,20 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
364
365
|
})
|
|
365
366
|
},
|
|
366
367
|
[
|
|
367
|
-
|
|
368
|
+
g("div", ye, [
|
|
368
369
|
x(C(E), {
|
|
369
370
|
name: u(i),
|
|
370
|
-
style: k(`color:${
|
|
371
|
+
style: k(`color:${p(i)}`),
|
|
371
372
|
size: 36
|
|
372
373
|
}, null, 8, ["name", "style"]),
|
|
373
|
-
|
|
374
|
+
g("div", {
|
|
374
375
|
class: "file-name",
|
|
375
376
|
onClick: (O) => L(i)
|
|
376
377
|
}, [
|
|
377
|
-
|
|
378
|
+
g("p", {
|
|
378
379
|
title: i.name
|
|
379
380
|
}, A(i.name), 9, he),
|
|
380
|
-
|
|
381
|
+
g(
|
|
381
382
|
"p",
|
|
382
383
|
_e,
|
|
383
384
|
A((i.size / 1024).toFixed(2)) + "KB",
|
|
@@ -386,9 +387,9 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
386
387
|
)
|
|
387
388
|
], 8, ke)
|
|
388
389
|
]),
|
|
389
|
-
|
|
390
|
+
g("div", {
|
|
390
391
|
class: "file-preview",
|
|
391
|
-
onClick: (O) =>
|
|
392
|
+
onClick: (O) => c(i)
|
|
392
393
|
}, [
|
|
393
394
|
x(C(E), { name: "iksvg_yulan" }),
|
|
394
395
|
we
|
|
@@ -400,12 +401,12 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
400
401
|
128
|
|
401
402
|
/* KEYED_FRAGMENT */
|
|
402
403
|
))
|
|
403
|
-
])) :
|
|
404
|
-
e.fileType === "img" ? (s(),
|
|
405
|
-
(s(!0),
|
|
404
|
+
])) : h("v-if", !0),
|
|
405
|
+
e.fileType === "img" ? (s(), a("div", xe, [
|
|
406
|
+
(s(!0), a(
|
|
406
407
|
z,
|
|
407
408
|
null,
|
|
408
|
-
I(n.value, (i, $) => (s(),
|
|
409
|
+
I(n.value, (i, $) => (s(), a("div", {
|
|
409
410
|
key: $,
|
|
410
411
|
class: "preview-img"
|
|
411
412
|
}, [
|
|
@@ -419,7 +420,7 @@ const ie = F(te), se = { class: "ik-svg-icon ik-icon inline-block inline-flex ju
|
|
|
419
420
|
128
|
|
420
421
|
/* KEYED_FRAGMENT */
|
|
421
422
|
))
|
|
422
|
-
])) :
|
|
423
|
+
])) : h("v-if", !0),
|
|
423
424
|
x(C(ie), {
|
|
424
425
|
modelValue: t.value,
|
|
425
426
|
"onUpdate:modelValue": f[0] || (f[0] = (i) => t.value = i),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","element-plus"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["iking-utils-pro"],d["element-plus"]))})(this,function(d,e,w,V){"use strict";const h=(o,l)=>{if(o.install=r=>{for(const i of[o,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))o[r]=i;return o},z=(o,l)=>{const r=o.__vccOpts||o;for(const[i,t]of l)r[i]=t;return r},re="",$=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const b=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(o=>{let l={};return o.forEach((r,i)=>l[r]=i),l})(y);const u=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const U=o=>o.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),x=$?o=>btoa(o):_?o=>Buffer.from(o,"binary").toString("base64"):o=>{let l,r,i,t,a="";const c=o.length%3;for(let p=0;p<o.length;){if((r=o.charCodeAt(p++))>255||(i=o.charCodeAt(p++))>255||(t=o.charCodeAt(p++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|t,a+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return c?a.slice(0,c-3)+"===".substring(c):a},v=_?o=>Buffer.from(o).toString("base64"):o=>{let r=[];for(let i=0,t=o.length;i<t;i+=4096)r.push(u.apply(null,o.subarray(i,i+4096)));return x(r.join(""))},N=o=>{if(o.length<2){var l=o.charCodeAt(0);return l<128?o:l<2048?u(192|l>>>6)+u(128|l&63):u(224|l>>>12&15)+u(128|l>>>6&63)+u(128|l&63)}else{var l=65536+(o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320);return u(240|l>>>18&7)+u(128|l>>>12&63)+u(128|l>>>6&63)+u(128|l&63)}},I=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,D=o=>o.replace(I,N),C=_?o=>Buffer.from(o,"utf8").toString("base64"):b?o=>v(b.encode(o)):o=>x(D(o)),A=(o,l=!1)=>l?U(C(o)):C(o),T=["src"],P=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(o){const l=o,r=e.ref(null),i=e.computed(()=>{if(!l.kkUrl||!l.url)return"";const a=l.loadUrl?l.loadUrl:location.href;return`${l.kkUrl}/onlinePreview?url=${encodeURIComponent(A(`${a}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`}),t=e.ref(l.modelValue);return e.watch(()=>l.modelValue,a=>{t.value=a}),(a,c)=>(e.openBlock(),e.createBlock(e.unref(V.ElDialog),{fullscreen:"",modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:c[1]||(c[1]=p=>a.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,T)]),_:1},8,["modelValue"]))}}),se="",j=h(P),K={class:"ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],E=h(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(o){const l=o,r=e.computed(()=>{var t,a;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(t=l.name)!=null&&t.startsWith("iksig")?"iksig":(a=l.name)!=null&&a.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const t=[];if(l.flip)switch(l.flip){case"horizontal":t.push("rotateY(180deg)");break;case"vertical":t.push("rotateX(180deg)");break;case"both":t.push("rotateX(180deg)"),t.push("rotateY(180deg)");break}return l.rotate&&t.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...t.length&&{transform:t.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":w.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(t,a)=>{const c=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[t.notip||!t.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",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning,primary:t.primary,active:t.active,disabled:t.disabled}]),style:e.normalizeStyle(i.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(c,{key:1,content:t.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",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",primary:t.primary,small:t.size==="small",big:t.size==="big",warning:t.warning,active:t.active}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=o=>(e.pushScopeId("data-v-170abcfc"),o=o(),e.popScopeId(),o),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},oe=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},kkUrl:{required:!0,type:String,default:""}},setup(o){const l=o,r=e.ref(l.fileList);e.watch(()=>l.fileList,n=>{n&&(r.value=n)},{immediate:!0});const i=e.ref(!1),t=e.ref({}),a=n=>{t.value={url:n.url,name:n.name},i.value=!0},c=n=>{var f,g,m,k,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"iksvg_pdf":(g=n==null?void 0:n.suffix)!=null&&g.includes("doc")?"iksvg_word":(m=n==null?void 0:n.suffix)!=null&&m.includes("xls")?"iksvg_excel":(k=n==null?void 0:n.suffix)!=null&&k.includes("mov")?"iksvg_mov":(s=n==null?void 0:n.suffix)!=null&&s.includes("zip")?"iksvg_zip":"icon-jpg"},p=n=>{var f,g,m,k,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"#FA4E4E":(g=n==null?void 0:n.suffix)!=null&&g.includes("doc")?"#2c69e0":(m=n.suffix)!=null&&m.includes("xls")?"#39BFBF":(k=n.suffix)!=null&&k.includes("txt")?"#2c69e0":(s=n.suffix)!=null&&s.includes("zip")?"#FF9000":"#32CD79"},te=n=>{const f=document.createElement("a");f.href=w.ikUrl.assembleUrl(l.loadUrl,n.url),f.download=n.name,f.click()};return(n,f)=>{var m,k;const g=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(E),{name:c(s),style:e.normalizeStyle(`color:${p(s)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:ne=>te(s)},[e.createElementVNode("p",{title:s.name},e.toDisplayString(s.name),9,J),e.createElementVNode("p",Q,e.toDisplayString((s.size/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:ne=>a(s)},[e.createVNode(e.unref(E),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"preview-img"},[e.createVNode(g,{class:"show-img",src:o.loadUrl+s.url,"preview-src-list":[o.loadUrl+s.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=s=>i.value=s),"load-url":l.loadUrl,url:(m=t.value)==null?void 0:m.url,"kk-url":o.kkUrl,"file-name":(k=t.value)==null?void 0:k.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",S=h(z(oe,[["__scopeId","data-v-170abcfc"]]));d.IKDetailPreviewFiles=S,d.default=S,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("iking-utils-pro"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","element-plus"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["iking-utils-pro"],d["element-plus"]))})(this,function(d,e,w,V){"use strict";const h=(o,l)=>{if(o.install=r=>{for(const i of[o,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))o[r]=i;return o},z=(o,l)=>{const r=o.__vccOpts||o;for(const[i,t]of l)r[i]=t;return r},re="",$=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const b=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(o=>{let l={};return o.forEach((r,i)=>l[r]=i),l})(y);const p=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const U=o=>o.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),x=$?o=>btoa(o):_?o=>Buffer.from(o,"binary").toString("base64"):o=>{let l,r,i,t,s="";const c=o.length%3;for(let u=0;u<o.length;){if((r=o.charCodeAt(u++))>255||(i=o.charCodeAt(u++))>255||(t=o.charCodeAt(u++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|t,s+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return c?s.slice(0,c-3)+"===".substring(c):s},v=_?o=>Buffer.from(o).toString("base64"):o=>{let r=[];for(let i=0,t=o.length;i<t;i+=4096)r.push(p.apply(null,o.subarray(i,i+4096)));return x(r.join(""))},N=o=>{if(o.length<2){var l=o.charCodeAt(0);return l<128?o:l<2048?p(192|l>>>6)+p(128|l&63):p(224|l>>>12&15)+p(128|l>>>6&63)+p(128|l&63)}else{var l=65536+(o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320);return p(240|l>>>18&7)+p(128|l>>>12&63)+p(128|l>>>6&63)+p(128|l&63)}},I=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,D=o=>o.replace(I,N),C=_?o=>Buffer.from(o,"utf8").toString("base64"):b?o=>v(b.encode(o)):o=>x(D(o)),A=(o,l=!1)=>l?U(C(o)):C(o),T=["src"],P=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(o){const l=o,r=e.ref(null),i=e.computed(()=>{if(!l.kkUrl||!l.url)return"";const s=l.loadUrl?l.loadUrl:location.href;return`${l.kkUrl}/onlinePreview?url=${encodeURIComponent(A(`${s}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`}),t=e.ref(l.modelValue);return e.watch(()=>l.modelValue,s=>{t.value=s}),(s,c)=>(e.openBlock(),e.createBlock(e.unref(V.ElDialog),{fullscreen:"",modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=u=>t.value=u),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:c[1]||(c[1]=u=>s.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,T)):e.createCommentVNode("v-if",!0)]),_:1},8,["modelValue"]))}}),ae="",j=h(P),K={class:"ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],E=h(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(o){const l=o,r=e.computed(()=>{var t,s;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(t=l.name)!=null&&t.startsWith("iksig")?"iksig":(s=l.name)!=null&&s.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const t=[];if(l.flip)switch(l.flip){case"horizontal":t.push("rotateY(180deg)");break;case"vertical":t.push("rotateX(180deg)");break;case"both":t.push("rotateX(180deg)"),t.push("rotateY(180deg)");break}return l.rotate&&t.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...t.length&&{transform:t.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":w.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(t,s)=>{const c=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[t.notip||!t.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",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning,primary:t.primary,active:t.active,disabled:t.disabled}]),style:e.normalizeStyle(i.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(c,{key:1,content:t.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",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",primary:t.primary,small:t.size==="small",big:t.size==="big",warning:t.warning,active:t.active}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=o=>(e.pushScopeId("data-v-170abcfc"),o=o(),e.popScopeId(),o),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},oe=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},kkUrl:{required:!0,type:String,default:""}},setup(o){const l=o,r=e.ref(l.fileList);e.watch(()=>l.fileList,n=>{n&&(r.value=n)},{immediate:!0});const i=e.ref(!1),t=e.ref({}),s=n=>{t.value={url:n.url,name:n.name},i.value=!0},c=n=>{var f,g,m,k,a;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"iksvg_pdf":(g=n==null?void 0:n.suffix)!=null&&g.includes("doc")?"iksvg_word":(m=n==null?void 0:n.suffix)!=null&&m.includes("xls")?"iksvg_excel":(k=n==null?void 0:n.suffix)!=null&&k.includes("mov")?"iksvg_mov":(a=n==null?void 0:n.suffix)!=null&&a.includes("zip")?"iksvg_zip":"icon-jpg"},u=n=>{var f,g,m,k,a;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"#FA4E4E":(g=n==null?void 0:n.suffix)!=null&&g.includes("doc")?"#2c69e0":(m=n.suffix)!=null&&m.includes("xls")?"#39BFBF":(k=n.suffix)!=null&&k.includes("txt")?"#2c69e0":(a=n.suffix)!=null&&a.includes("zip")?"#FF9000":"#32CD79"},te=n=>{const f=document.createElement("a");f.href=w.ikUrl.assembleUrl(l.loadUrl,n.url),f.download=n.name,f.click()};return(n,f)=>{var m,k;const g=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(a,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(E),{name:c(a),style:e.normalizeStyle(`color:${u(a)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:ne=>te(a)},[e.createElementVNode("p",{title:a.name},e.toDisplayString(a.name),9,J),e.createElementVNode("p",Q,e.toDisplayString((a.size/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:ne=>s(a)},[e.createVNode(e.unref(E),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(a,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"preview-img"},[e.createVNode(g,{class:"show-img",src:o.loadUrl+a.url,"preview-src-list":[o.loadUrl+a.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=a=>i.value=a),"load-url":l.loadUrl,url:(m=t.value)==null?void 0:m.url,"kk-url":o.kkUrl,"file-name":(k=t.value)==null?void 0:k.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",S=h(z(oe,[["__scopeId","data-v-170abcfc"]]));d.IKDetailPreviewFiles=S,d.default=S,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, ref as c, computed as g, watch as _, openBlock as d, createBlock as b, unref as h, withCtx as v, createElementBlock as C, createCommentVNode as k } from "vue";
|
|
2
2
|
import { ElDialog as w } from "element-plus";
|
|
3
3
|
const U = (e, t) => {
|
|
4
4
|
if (e.install = (o) => {
|
|
@@ -8,9 +8,9 @@ const U = (e, t) => {
|
|
|
8
8
|
for (const [o, r] of Object.entries(t))
|
|
9
9
|
e[o] = r;
|
|
10
10
|
return e;
|
|
11
|
-
},
|
|
11
|
+
}, A = typeof btoa == "function", i = typeof Buffer == "function";
|
|
12
12
|
typeof TextDecoder == "function" && new TextDecoder();
|
|
13
|
-
const
|
|
13
|
+
const m = typeof TextEncoder == "function" ? new TextEncoder() : void 0, B = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", u = Array.prototype.slice.call(B);
|
|
14
14
|
((e) => {
|
|
15
15
|
let t = {};
|
|
16
16
|
return e.forEach((o, r) => t[o] = r), t;
|
|
@@ -26,12 +26,12 @@ const F = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "
|
|
|
26
26
|
t = o << 16 | r << 8 | a, n += u[t >> 18 & 63] + u[t >> 12 & 63] + u[t >> 6 & 63] + u[t & 63];
|
|
27
27
|
}
|
|
28
28
|
return f ? n.slice(0, f - 3) + "===".substring(f) : n;
|
|
29
|
-
},
|
|
29
|
+
}, x = A ? (e) => btoa(e) : i ? (e) => Buffer.from(e, "binary").toString("base64") : S, D = i ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
30
30
|
let o = [];
|
|
31
31
|
for (let r = 0, a = e.length; r < a; r += 4096)
|
|
32
32
|
o.push(l.apply(null, e.subarray(r, r + 4096)));
|
|
33
|
-
return
|
|
34
|
-
},
|
|
33
|
+
return x(o.join(""));
|
|
34
|
+
}, V = (e) => {
|
|
35
35
|
if (e.length < 2) {
|
|
36
36
|
var t = e.charCodeAt(0);
|
|
37
37
|
return t < 128 ? e : t < 2048 ? l(192 | t >>> 6) + l(128 | t & 63) : l(224 | t >>> 12 & 15) + l(128 | t >>> 6 & 63) + l(128 | t & 63);
|
|
@@ -39,7 +39,7 @@ const F = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "
|
|
|
39
39
|
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
|
40
40
|
return l(240 | t >>> 18 & 7) + l(128 | t >>> 12 & 63) + l(128 | t >>> 6 & 63) + l(128 | t & 63);
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, E = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, $ = (e) => e.replace(E, V), p = i ? (e) => Buffer.from(e, "utf8").toString("base64") : m ? (e) => D(m.encode(e)) : (e) => x($(e)), T = (e, t = !1) => t ? F(p(e)) : p(e), I = ["src"], P = /* @__PURE__ */ y({
|
|
43
43
|
__name: "IKPreviewFile",
|
|
44
44
|
props: {
|
|
45
45
|
modelValue: {
|
|
@@ -70,17 +70,17 @@ const F = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
setup(e) {
|
|
73
|
-
const t = e, o = c(null), r =
|
|
73
|
+
const t = e, o = c(null), r = g(() => {
|
|
74
74
|
if (!t.kkUrl || !t.url)
|
|
75
75
|
return "";
|
|
76
76
|
const n = t.loadUrl ? t.loadUrl : location.href;
|
|
77
77
|
return `${t.kkUrl}/onlinePreview?url=${encodeURIComponent(
|
|
78
|
-
|
|
78
|
+
T(`${n}${t.url}${t.fileName ? `&fullfilename=${t.fileName}` : ""}`)
|
|
79
79
|
)}`;
|
|
80
80
|
}), a = c(t.modelValue);
|
|
81
|
-
return
|
|
81
|
+
return _(() => t.modelValue, (n) => {
|
|
82
82
|
a.value = n;
|
|
83
|
-
}), (n, f) => (
|
|
83
|
+
}), (n, f) => (d(), b(h(w), {
|
|
84
84
|
fullscreen: "",
|
|
85
85
|
modelValue: a.value,
|
|
86
86
|
"onUpdate:modelValue": f[0] || (f[0] = (s) => a.value = s),
|
|
@@ -91,7 +91,8 @@ const F = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "
|
|
|
91
91
|
class: "ik-file-preview"
|
|
92
92
|
}, {
|
|
93
93
|
default: v(() => [
|
|
94
|
-
C("iframe", {
|
|
94
|
+
r.value ? (d(), C("iframe", {
|
|
95
|
+
key: 0,
|
|
95
96
|
ref_key: "freamRef",
|
|
96
97
|
ref: o,
|
|
97
98
|
"cross-origin": "",
|
|
@@ -99,15 +100,15 @@ const F = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "
|
|
|
99
100
|
frameborder: "0",
|
|
100
101
|
allowfullscreen: "",
|
|
101
102
|
seamless: ""
|
|
102
|
-
}, null, 8,
|
|
103
|
+
}, null, 8, I)) : k("v-if", !0)
|
|
103
104
|
]),
|
|
104
105
|
_: 1
|
|
105
106
|
/* STABLE */
|
|
106
107
|
}, 8, ["modelValue"]));
|
|
107
108
|
}
|
|
108
109
|
});
|
|
109
|
-
const
|
|
110
|
+
const R = U(P);
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
R as IkPreviewFile,
|
|
113
|
+
R as default
|
|
113
114
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],r):(f=typeof globalThis<"u"?globalThis:f||self,r(f.index={},f.Vue,f["element-plus"]))})(this,function(f,r,h){"use strict";const _=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},b=typeof btoa=="function",d=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const p=typeof TextEncoder=="function"?new TextEncoder:void 0,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=Array.prototype.slice.call(g);(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(c);const l=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const
|
|
1
|
+
(function(f,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],r):(f=typeof globalThis<"u"?globalThis:f||self,r(f.index={},f.Vue,f["element-plus"]))})(this,function(f,r,h){"use strict";const _=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},b=typeof btoa=="function",d=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const p=typeof TextEncoder=="function"?new TextEncoder:void 0,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=Array.prototype.slice.call(g);(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(c);const l=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const k=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),m=b?e=>btoa(e):d?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,o,i,a="";const s=e.length%3;for(let u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(o=e.charCodeAt(u++))>255||(i=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|i,a+=c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[t&63]}return s?a.slice(0,s-3)+"===".substring(s):a},C=d?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,i=e.length;o<i;o+=4096)n.push(l.apply(null,e.subarray(o,o+4096)));return m(n.join(""))},w=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?l(192|t>>>6)+l(128|t&63):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|t&63)}},U=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=e=>e.replace(U,w),x=d?e=>Buffer.from(e,"utf8").toString("base64"):p?e=>C(p.encode(e)):e=>m(v(e)),A=(e,t=!1)=>t?k(x(e)):x(e),S=["src"],B=r.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(e){const t=e,n=r.ref(null),o=r.computed(()=>{if(!t.kkUrl||!t.url)return"";const a=t.loadUrl?t.loadUrl:location.href;return`${t.kkUrl}/onlinePreview?url=${encodeURIComponent(A(`${a}${t.url}${t.fileName?`&fullfilename=${t.fileName}`:""}`))}`}),i=r.ref(t.modelValue);return r.watch(()=>t.modelValue,a=>{i.value=a}),(a,s)=>(r.openBlock(),r.createBlock(r.unref(h.ElDialog),{fullscreen:"",modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=u=>i.value=u),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:s[1]||(s[1]=u=>a.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:r.withCtx(()=>[o.value?(r.openBlock(),r.createElementBlock("iframe",{key:0,ref_key:"freamRef",ref:n,"cross-origin":"",src:o.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,S)):r.createCommentVNode("v-if",!0)]),_:1},8,["modelValue"]))}}),D="",y=_(B);f.IkPreviewFile=y,f.default=y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1823,7 +1823,7 @@ const Kl = {
|
|
|
1823
1823
|
};
|
|
1824
1824
|
}
|
|
1825
1825
|
});
|
|
1826
|
-
const fs = $e(cs), hs = (p) => (de("data-v-
|
|
1826
|
+
const fs = $e(cs), hs = (p) => (de("data-v-5b4e3e05"), p = p(), ce(), p), As = {
|
|
1827
1827
|
class: "approveProcess",
|
|
1828
1828
|
id: "approveProcess"
|
|
1829
1829
|
}, vs = { class: "node" }, ys = { class: "nodeBg" }, gs = { class: "info" }, ms = { class: "explain" }, xs = { key: 0 }, Os = { key: 0 }, _s = { key: 1 }, Ps = { key: 0 }, ks = { key: 1 }, Ls = { class: "personlist" }, Ts = { style: { width: "58px" } }, Cs = { class: "avatar" }, Bs = ["src"], Us = {
|
|
@@ -2220,7 +2220,7 @@ const fs = $e(cs), hs = (p) => (de("data-v-3d23efa1"), p = p(), ce(), p), As = {
|
|
|
2220
2220
|
]));
|
|
2221
2221
|
}
|
|
2222
2222
|
});
|
|
2223
|
-
const Rs = /* @__PURE__ */ H(Ns, [["__scopeId", "data-v-
|
|
2223
|
+
const Rs = /* @__PURE__ */ H(Ns, [["__scopeId", "data-v-5b4e3e05"]]), js = $e(Rs);
|
|
2224
2224
|
export {
|
|
2225
2225
|
js as IKApprovalProcess,
|
|
2226
2226
|
js as default
|