iking-web-ui-pro 0.2.13 → 0.2.15
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 +1 -1
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +123 -123
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/ik.index.es.js +930 -917
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +54 -50
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +249 -249
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +124 -124
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/ik.index.es.js +1 -1
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/index.es.js +10883 -10879
- package/dist/index.umd.js +59 -59
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as y, inject as Y, computed as C, resolveComponent as D, openBlock as r, createElementBlock as f, normalizeClass as _, normalizeStyle as m, createCommentVNode as k, createElementVNode as I, createBlock as b, withCtx as h, createTextVNode as B, toDisplayString as O, createVNode as z, unref as w, mergeModels as W, useModel as N, ref as q, h as G, mergeProps as K, createSlots as J, renderSlot as S, reactive as Q, watch as Z, nextTick as ee, Fragment as te } from "vue";
|
|
2
2
|
import { ikColor as ne, buildUUID as oe } from "iking-utils-pro";
|
|
3
3
|
const E = (n, t) => {
|
|
4
|
-
if (n.install = (
|
|
4
|
+
if (n.install = (o) => {
|
|
5
5
|
for (const e of [n, ...Object.values(t ?? {})])
|
|
6
|
-
|
|
6
|
+
o.component(e.name, e);
|
|
7
7
|
}, t)
|
|
8
|
-
for (const [
|
|
9
|
-
n[
|
|
8
|
+
for (const [o, e] of Object.entries(t))
|
|
9
|
+
n[o] = e;
|
|
10
10
|
return n;
|
|
11
11
|
}, M = (n, t) => t ? t.startsWith("http") ? t : `${n || location.origin}${t}` : "", V = (n, t) => {
|
|
12
|
-
const
|
|
12
|
+
const o = n.__vccOpts || n;
|
|
13
13
|
for (const [e, a] of t)
|
|
14
|
-
|
|
15
|
-
return
|
|
14
|
+
o[e] = a;
|
|
15
|
+
return o;
|
|
16
16
|
}, L = (n, t) => {
|
|
17
|
-
var
|
|
18
|
-
const
|
|
17
|
+
var i, s, c, d;
|
|
18
|
+
const o = (i = n == null ? void 0 : n.response) != null && i.data ? U((c = (s = n == null ? void 0 : n.response) == null ? void 0 : s.data) == null ? void 0 : c.suffix) : ((d = n.raw) == null ? void 0 : d.type) || U(n[t.suffix]), e = o == null ? void 0 : o.toLowerCase(), a = {
|
|
19
19
|
sheet: "excel",
|
|
20
20
|
excel: "excel",
|
|
21
21
|
zip: "zip",
|
|
@@ -121,11 +121,11 @@ const E = (n, t) => {
|
|
|
121
121
|
".txt": "txt",
|
|
122
122
|
".pdf": "pdf"
|
|
123
123
|
}, U = (n) => {
|
|
124
|
-
const t = n == null ? void 0 : n.toLocaleLowerCase(),
|
|
125
|
-
return
|
|
124
|
+
const t = n == null ? void 0 : n.toLocaleLowerCase(), o = t != null && t.startsWith(".") ? t : `.${t}`;
|
|
125
|
+
return o && ie[o] || "unknow";
|
|
126
126
|
}, se = (n) => {
|
|
127
|
-
let t = "",
|
|
128
|
-
return
|
|
127
|
+
let t = "", o = ["doc", "docx"], e = ["xls", "xlsx"], a = ["ppt", "pptx"], i = ["pdf"];
|
|
128
|
+
return o.includes(n) && (t = "word"), e.includes(n) && (t = "cell"), a.includes(n) && (t = "slide"), i.includes(n) && (t = "text-pdf"), t;
|
|
129
129
|
}, le = {
|
|
130
130
|
key: 0,
|
|
131
131
|
class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
|
|
@@ -164,31 +164,31 @@ const E = (n, t) => {
|
|
|
164
164
|
tableIconType: {}
|
|
165
165
|
},
|
|
166
166
|
setup(n) {
|
|
167
|
-
const t = n,
|
|
168
|
-
...(
|
|
167
|
+
const t = n, o = Y("iconConfig"), e = C(() => ({
|
|
168
|
+
...(o == null ? void 0 : o.value) || {},
|
|
169
169
|
...t
|
|
170
170
|
})), a = C(() => {
|
|
171
|
-
const { name:
|
|
172
|
-
return /^http?:\/\//.test(
|
|
173
|
-
}),
|
|
174
|
-
const
|
|
171
|
+
const { name: s } = e.value;
|
|
172
|
+
return /^http?:\/\//.test(s) ? "img" : /i-[^:]+:[^:]+/.test(s) ? "unocss" : s != null && s.startsWith("iksig") ? "iksig" : s != null && s.includes(":") ? "iconify" : s != null && s.startsWith("iksvg") ? "svg" : "i";
|
|
173
|
+
}), i = C(() => {
|
|
174
|
+
const s = [];
|
|
175
175
|
if (e.value.flip)
|
|
176
176
|
switch (e.value.flip) {
|
|
177
177
|
case "horizontal":
|
|
178
|
-
|
|
178
|
+
s.push("rotateY(180deg)");
|
|
179
179
|
break;
|
|
180
180
|
case "vertical":
|
|
181
|
-
|
|
181
|
+
s.push("rotateX(180deg)");
|
|
182
182
|
break;
|
|
183
183
|
case "both":
|
|
184
|
-
|
|
184
|
+
s.push("rotateX(180deg)"), s.push("rotateY(180deg)");
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
|
-
e.value.rotate &&
|
|
187
|
+
e.value.rotate && s.push(`rotate(${e.value.rotate % 360}deg)`);
|
|
188
188
|
const c = {
|
|
189
189
|
...e.value.color && { color: e.value.color },
|
|
190
190
|
...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
|
|
191
|
-
...
|
|
191
|
+
...s.length && { transform: s.join(" ") },
|
|
192
192
|
padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
|
|
193
193
|
...e.value.color && a.value !== "iksig" ? {
|
|
194
194
|
"--ik-color-icon-dark": e.value.color,
|
|
@@ -197,7 +197,7 @@ const E = (n, t) => {
|
|
|
197
197
|
};
|
|
198
198
|
return e.value.width && (c.width = c.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), c;
|
|
199
199
|
});
|
|
200
|
-
return (
|
|
200
|
+
return (s, c) => {
|
|
201
201
|
const d = D("el-tooltip"), l = D("el-button");
|
|
202
202
|
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (r(), f("span", le, [
|
|
203
203
|
e.value.notip || !e.value.title ? (r(), f(
|
|
@@ -205,19 +205,19 @@ const E = (n, t) => {
|
|
|
205
205
|
{
|
|
206
206
|
key: 0,
|
|
207
207
|
class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
208
|
-
[
|
|
208
|
+
[s.name]: a.value === "unocss",
|
|
209
209
|
"show-bg": e.value.showBg || e.value.bg,
|
|
210
210
|
default: e.value.size === "default",
|
|
211
211
|
small: e.value.size === "small",
|
|
212
212
|
big: e.value.size === "big",
|
|
213
213
|
warning: e.value.warning || e.value.type === "warning",
|
|
214
214
|
primary: e.value.primary || e.value.type === "primary",
|
|
215
|
-
success:
|
|
215
|
+
success: s.success || e.value.type === "success",
|
|
216
216
|
error: e.value.error || e.value.type === "error",
|
|
217
217
|
active: e.value.active,
|
|
218
218
|
disabled: e.value.disabled
|
|
219
219
|
}]),
|
|
220
|
-
style: m(
|
|
220
|
+
style: m(i.value)
|
|
221
221
|
},
|
|
222
222
|
[
|
|
223
223
|
k(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
@@ -226,7 +226,7 @@ const E = (n, t) => {
|
|
|
226
226
|
{
|
|
227
227
|
key: 0,
|
|
228
228
|
class: _(`iksig ${e.value.name}`),
|
|
229
|
-
style: m(
|
|
229
|
+
style: m(i.value)
|
|
230
230
|
},
|
|
231
231
|
null,
|
|
232
232
|
6
|
|
@@ -244,7 +244,7 @@ const E = (n, t) => {
|
|
|
244
244
|
{
|
|
245
245
|
key: 3,
|
|
246
246
|
class: _(e.value.name),
|
|
247
|
-
style: m(
|
|
247
|
+
style: m(i.value)
|
|
248
248
|
},
|
|
249
249
|
null,
|
|
250
250
|
6
|
|
@@ -263,18 +263,18 @@ const E = (n, t) => {
|
|
|
263
263
|
"i",
|
|
264
264
|
{
|
|
265
265
|
class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
266
|
-
[
|
|
266
|
+
[s.name]: a.value === "unocss",
|
|
267
267
|
"show-bg": e.value.showBg || e.value.bg,
|
|
268
268
|
default: e.value.size === "default",
|
|
269
269
|
small: e.value.size === "small",
|
|
270
270
|
big: e.value.size === "big",
|
|
271
271
|
warning: e.value.warning || e.value.type === "warning",
|
|
272
|
-
primary:
|
|
273
|
-
success:
|
|
272
|
+
primary: s.primary || e.value.type === "primary",
|
|
273
|
+
success: s.success || e.value.type === "success",
|
|
274
274
|
error: e.value.error || e.value.type === "error",
|
|
275
275
|
active: e.value.active
|
|
276
276
|
}]),
|
|
277
|
-
style: m(
|
|
277
|
+
style: m(i.value)
|
|
278
278
|
},
|
|
279
279
|
[
|
|
280
280
|
a.value === "iksig" ? (r(), f(
|
|
@@ -282,7 +282,7 @@ const E = (n, t) => {
|
|
|
282
282
|
{
|
|
283
283
|
key: 0,
|
|
284
284
|
class: _(`iksig ${e.value.name}`),
|
|
285
|
-
style: m(
|
|
285
|
+
style: m(i.value)
|
|
286
286
|
},
|
|
287
287
|
null,
|
|
288
288
|
6
|
|
@@ -300,7 +300,7 @@ const E = (n, t) => {
|
|
|
300
300
|
{
|
|
301
301
|
key: 3,
|
|
302
302
|
class: _(e.value.name),
|
|
303
|
-
style: m(
|
|
303
|
+
style: m(i.value)
|
|
304
304
|
},
|
|
305
305
|
null,
|
|
306
306
|
6
|
|
@@ -347,7 +347,7 @@ const ve = /* @__PURE__ */ V(fe, [["__scopeId", "data-v-76d7e119"]]), $ = E(ve),
|
|
|
347
347
|
}
|
|
348
348
|
},
|
|
349
349
|
setup(n) {
|
|
350
|
-
return (t,
|
|
350
|
+
return (t, o) => (r(), f("div", null, [
|
|
351
351
|
n.showBg && n.fullscreen ? (r(), f("div", ge, [
|
|
352
352
|
z(w($), {
|
|
353
353
|
name: "iksvg_guanbidanchuang",
|
|
@@ -386,9 +386,9 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
|
|
|
386
386
|
}),
|
|
387
387
|
emits: ["update:modelValue"],
|
|
388
388
|
setup(n) {
|
|
389
|
-
const t = n,
|
|
389
|
+
const t = n, o = N(n, "modelValue"), e = q(t.fullscreen), a = () => {
|
|
390
390
|
e.value = !e.value;
|
|
391
|
-
},
|
|
391
|
+
}, i = y({
|
|
392
392
|
setup() {
|
|
393
393
|
return () => G(he, {
|
|
394
394
|
showBg: t.showCloseBg,
|
|
@@ -396,21 +396,21 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
|
-
return (
|
|
399
|
+
return (s, c) => {
|
|
400
400
|
const d = D("el-dialog");
|
|
401
401
|
return r(), b(d, K({
|
|
402
|
-
modelValue:
|
|
403
|
-
"onUpdate:modelValue": c[0] || (c[0] = (l) =>
|
|
404
|
-
},
|
|
405
|
-
"close-icon": w(
|
|
406
|
-
class: `ik-base-dialog ${
|
|
402
|
+
modelValue: o.value,
|
|
403
|
+
"onUpdate:modelValue": c[0] || (c[0] = (l) => o.value = l)
|
|
404
|
+
}, s.$attrs, {
|
|
405
|
+
"close-icon": w(i),
|
|
406
|
+
class: `ik-base-dialog ${s.noHeader ? "no-header" : ""} ${s.noFooter ? "no-footer" : ""}`,
|
|
407
407
|
fullscreen: e.value,
|
|
408
408
|
"modal-class": "baseDialog"
|
|
409
409
|
}), J({
|
|
410
410
|
icon: h(() => [
|
|
411
|
-
S(
|
|
411
|
+
S(s.$slots, "title", {}, () => [
|
|
412
412
|
B(
|
|
413
|
-
O(
|
|
413
|
+
O(s.title),
|
|
414
414
|
1
|
|
415
415
|
/* TEXT */
|
|
416
416
|
)
|
|
@@ -418,15 +418,15 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
|
|
|
418
418
|
]),
|
|
419
419
|
header: h(() => [
|
|
420
420
|
I("div", ye, [
|
|
421
|
-
S(
|
|
421
|
+
S(s.$slots, "header", {}, () => [
|
|
422
422
|
B(
|
|
423
|
-
O(
|
|
423
|
+
O(s.title),
|
|
424
424
|
1
|
|
425
425
|
/* TEXT */
|
|
426
426
|
)
|
|
427
427
|
])
|
|
428
428
|
]),
|
|
429
|
-
|
|
429
|
+
s.$attrs.showClose ? (r(), b(w($), {
|
|
430
430
|
key: 0,
|
|
431
431
|
onClick: a,
|
|
432
432
|
name: e.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
|
|
@@ -435,15 +435,15 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
|
|
|
435
435
|
}, null, 8, ["name", "title"])) : k("v-if", !0)
|
|
436
436
|
]),
|
|
437
437
|
default: h(() => [
|
|
438
|
-
S(
|
|
438
|
+
S(s.$slots, "default")
|
|
439
439
|
]),
|
|
440
440
|
_: 2
|
|
441
441
|
/* DYNAMIC */
|
|
442
442
|
}, [
|
|
443
|
-
|
|
443
|
+
s.$slots.footer ? {
|
|
444
444
|
name: "footer",
|
|
445
445
|
fn: h(() => [
|
|
446
|
-
S(
|
|
446
|
+
S(s.$slots, "footer")
|
|
447
447
|
]),
|
|
448
448
|
key: "0"
|
|
449
449
|
} : void 0
|
|
@@ -452,42 +452,42 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
const _e = E(we);
|
|
455
|
-
function ke(n, t,
|
|
456
|
-
function a(
|
|
457
|
-
return
|
|
458
|
-
|
|
455
|
+
function ke(n, t, o, e) {
|
|
456
|
+
function a(i) {
|
|
457
|
+
return i instanceof o ? i : new o(function(s) {
|
|
458
|
+
s(i);
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
|
-
return new (
|
|
461
|
+
return new (o || (o = Promise))(function(i, s) {
|
|
462
462
|
function c(u) {
|
|
463
463
|
try {
|
|
464
464
|
l(e.next(u));
|
|
465
465
|
} catch (v) {
|
|
466
|
-
|
|
466
|
+
s(v);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
function d(u) {
|
|
470
470
|
try {
|
|
471
471
|
l(e.throw(u));
|
|
472
472
|
} catch (v) {
|
|
473
|
-
|
|
473
|
+
s(v);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
function l(u) {
|
|
477
|
-
u.done ?
|
|
477
|
+
u.done ? i(u.value) : a(u.value).then(c, d);
|
|
478
478
|
}
|
|
479
479
|
l((e = e.apply(n, t || [])).next());
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
function be(n, t) {
|
|
483
|
-
var
|
|
484
|
-
if (
|
|
485
|
-
throw
|
|
486
|
-
return
|
|
487
|
-
}, trys: [], ops: [] }, e, a,
|
|
488
|
-
return
|
|
483
|
+
var o = { label: 0, sent: function() {
|
|
484
|
+
if (i[0] & 1)
|
|
485
|
+
throw i[1];
|
|
486
|
+
return i[1];
|
|
487
|
+
}, trys: [], ops: [] }, e, a, i, s;
|
|
488
|
+
return s = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
489
489
|
return this;
|
|
490
|
-
}),
|
|
490
|
+
}), s;
|
|
491
491
|
function c(l) {
|
|
492
492
|
return function(u) {
|
|
493
493
|
return d([l, u]);
|
|
@@ -496,48 +496,48 @@ function be(n, t) {
|
|
|
496
496
|
function d(l) {
|
|
497
497
|
if (e)
|
|
498
498
|
throw new TypeError("Generator is already executing.");
|
|
499
|
-
for (;
|
|
499
|
+
for (; s && (s = 0, l[0] && (o = 0)), o; )
|
|
500
500
|
try {
|
|
501
|
-
if (e = 1, a && (
|
|
502
|
-
return
|
|
503
|
-
switch (a = 0,
|
|
501
|
+
if (e = 1, a && (i = l[0] & 2 ? a.return : l[0] ? a.throw || ((i = a.return) && i.call(a), 0) : a.next) && !(i = i.call(a, l[1])).done)
|
|
502
|
+
return i;
|
|
503
|
+
switch (a = 0, i && (l = [l[0] & 2, i.value]), l[0]) {
|
|
504
504
|
case 0:
|
|
505
505
|
case 1:
|
|
506
|
-
|
|
506
|
+
i = l;
|
|
507
507
|
break;
|
|
508
508
|
case 4:
|
|
509
|
-
return
|
|
509
|
+
return o.label++, { value: l[1], done: !1 };
|
|
510
510
|
case 5:
|
|
511
|
-
|
|
511
|
+
o.label++, a = l[1], l = [0];
|
|
512
512
|
continue;
|
|
513
513
|
case 7:
|
|
514
|
-
l =
|
|
514
|
+
l = o.ops.pop(), o.trys.pop();
|
|
515
515
|
continue;
|
|
516
516
|
default:
|
|
517
|
-
if (
|
|
518
|
-
|
|
517
|
+
if (i = o.trys, !(i = i.length > 0 && i[i.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
518
|
+
o = 0;
|
|
519
519
|
continue;
|
|
520
520
|
}
|
|
521
|
-
if (l[0] === 3 && (!
|
|
522
|
-
|
|
521
|
+
if (l[0] === 3 && (!i || l[1] > i[0] && l[1] < i[3])) {
|
|
522
|
+
o.label = l[1];
|
|
523
523
|
break;
|
|
524
524
|
}
|
|
525
|
-
if (l[0] === 6 &&
|
|
526
|
-
|
|
525
|
+
if (l[0] === 6 && o.label < i[1]) {
|
|
526
|
+
o.label = i[1], i = l;
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
|
-
if (
|
|
530
|
-
|
|
529
|
+
if (i && o.label < i[2]) {
|
|
530
|
+
o.label = i[2], o.ops.push(l);
|
|
531
531
|
break;
|
|
532
532
|
}
|
|
533
|
-
|
|
533
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
534
534
|
continue;
|
|
535
535
|
}
|
|
536
|
-
l = t.call(n,
|
|
536
|
+
l = t.call(n, o);
|
|
537
537
|
} catch (u) {
|
|
538
538
|
l = [6, u], a = 0;
|
|
539
539
|
} finally {
|
|
540
|
-
e =
|
|
540
|
+
e = i = 0;
|
|
541
541
|
}
|
|
542
542
|
if (l[0] & 5)
|
|
543
543
|
throw l[1];
|
|
@@ -546,20 +546,20 @@ function be(n, t) {
|
|
|
546
546
|
}
|
|
547
547
|
var xe = function(n, t) {
|
|
548
548
|
return ke(void 0, void 0, void 0, function() {
|
|
549
|
-
return be(this, function(
|
|
549
|
+
return be(this, function(o) {
|
|
550
550
|
return [2, new Promise(function(e, a) {
|
|
551
551
|
try {
|
|
552
552
|
if (window.DocsAPI)
|
|
553
553
|
return e(null);
|
|
554
|
-
var
|
|
555
|
-
if (
|
|
556
|
-
var
|
|
557
|
-
var d =
|
|
554
|
+
var i = document.getElementById(t);
|
|
555
|
+
if (i)
|
|
556
|
+
var s = setInterval(function() {
|
|
557
|
+
var d = i.getAttribute("loading");
|
|
558
558
|
if (!d) {
|
|
559
|
-
if (clearInterval(
|
|
559
|
+
if (clearInterval(s), window.DocsAPI)
|
|
560
560
|
return e(null);
|
|
561
561
|
var l = H(t, n, e, a);
|
|
562
|
-
|
|
562
|
+
i.remove(), document.body.appendChild(l);
|
|
563
563
|
}
|
|
564
564
|
}, 500);
|
|
565
565
|
else {
|
|
@@ -572,12 +572,12 @@ var xe = function(n, t) {
|
|
|
572
572
|
})];
|
|
573
573
|
});
|
|
574
574
|
});
|
|
575
|
-
}, H = function(n, t,
|
|
575
|
+
}, H = function(n, t, o, e) {
|
|
576
576
|
var a = document.createElement("script");
|
|
577
577
|
return a.id = n, a.type = "text/javascript", a.src = t, a.async = !0, a.onload = function() {
|
|
578
|
-
a.removeAttribute("loading"),
|
|
579
|
-
}, a.onerror = function(
|
|
580
|
-
a.removeAttribute("loading"), e(
|
|
578
|
+
a.removeAttribute("loading"), o(null);
|
|
579
|
+
}, a.onerror = function(i) {
|
|
580
|
+
a.removeAttribute("loading"), e(i);
|
|
581
581
|
}, a.setAttribute("loading", ""), a;
|
|
582
582
|
}, T = y({
|
|
583
583
|
name: "DocumentEditor",
|
|
@@ -633,8 +633,8 @@ var xe = function(n, t) {
|
|
|
633
633
|
mounted: function() {
|
|
634
634
|
var n = this, t = this.documentServerUrl;
|
|
635
635
|
t.endsWith("/") || (t += "/");
|
|
636
|
-
var
|
|
637
|
-
xe(
|
|
636
|
+
var o = "".concat(t, "web-apps/apps/api/documents/api.js");
|
|
637
|
+
xe(o, "onlyoffice-api-script").then(function() {
|
|
638
638
|
return n.onLoad();
|
|
639
639
|
}).catch(function() {
|
|
640
640
|
n.onError(-2);
|
|
@@ -677,9 +677,9 @@ var xe = function(n, t) {
|
|
|
677
677
|
onLoad: function() {
|
|
678
678
|
var n, t;
|
|
679
679
|
try {
|
|
680
|
-
var
|
|
681
|
-
if (window.DocsAPI || this.onError(-3), !((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[
|
|
682
|
-
console.log("Skip loading. Instance already exists",
|
|
680
|
+
var o = this.id || "";
|
|
681
|
+
if (window.DocsAPI || this.onError(-3), !((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[o]) {
|
|
682
|
+
console.log("Skip loading. Instance already exists", o);
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
685
|
!((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances || (window.DocEditor = { instances: {} });
|
|
@@ -718,10 +718,10 @@ var xe = function(n, t) {
|
|
|
718
718
|
height: this.height,
|
|
719
719
|
type: this.type,
|
|
720
720
|
width: this.width
|
|
721
|
-
}, this.config || {}), a = window.DocsAPI.DocEditor(
|
|
722
|
-
window.DocEditor.instances[
|
|
723
|
-
} catch (
|
|
724
|
-
console.error(
|
|
721
|
+
}, this.config || {}), a = window.DocsAPI.DocEditor(o, e);
|
|
722
|
+
window.DocEditor.instances[o] = a;
|
|
723
|
+
} catch (i) {
|
|
724
|
+
console.error(i), this.onError(-1);
|
|
725
725
|
}
|
|
726
726
|
},
|
|
727
727
|
onError: function(n) {
|
|
@@ -749,7 +749,7 @@ var xe = function(n, t) {
|
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
751
|
const Re = ["id"];
|
|
752
|
-
function Se(n, t,
|
|
752
|
+
function Se(n, t, o, e, a, i) {
|
|
753
753
|
return r(), f("div", { id: n.id }, null, 8, Re);
|
|
754
754
|
}
|
|
755
755
|
T.render = Se;
|
|
@@ -775,7 +775,7 @@ const Ce = /* @__PURE__ */ y({
|
|
|
775
775
|
}
|
|
776
776
|
},
|
|
777
777
|
setup(n) {
|
|
778
|
-
const t = n,
|
|
778
|
+
const t = n, o = q({
|
|
779
779
|
width: "100%",
|
|
780
780
|
height: "100%",
|
|
781
781
|
...t.configOptions || {},
|
|
@@ -783,7 +783,7 @@ const Ce = /* @__PURE__ */ y({
|
|
|
783
783
|
}), e = () => {
|
|
784
784
|
console.info("文档加载完成", t.configOptions);
|
|
785
785
|
};
|
|
786
|
-
return (a,
|
|
786
|
+
return (a, i) => (r(), f(
|
|
787
787
|
"div",
|
|
788
788
|
{
|
|
789
789
|
style: m({ height: t.officeHeight })
|
|
@@ -793,7 +793,7 @@ const Ce = /* @__PURE__ */ y({
|
|
|
793
793
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
794
794
|
ref: "editorRef",
|
|
795
795
|
"document-server-url": n.documentServerUrl,
|
|
796
|
-
config:
|
|
796
|
+
config: o.value,
|
|
797
797
|
events_onDocumentReady: e
|
|
798
798
|
}, null, 8, ["id", "document-server-url", "config"])
|
|
799
799
|
],
|
|
@@ -839,13 +839,13 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), De = E(Ie)
|
|
|
839
839
|
}),
|
|
840
840
|
emits: ["update:show"],
|
|
841
841
|
setup(n) {
|
|
842
|
-
const t = n,
|
|
842
|
+
const t = n, o = N(n, "show"), e = C(() => ({
|
|
843
843
|
name: "name",
|
|
844
844
|
url: "url",
|
|
845
845
|
suffix: "suffix",
|
|
846
846
|
size: "fileSize",
|
|
847
847
|
...t.field
|
|
848
|
-
})), a = q(null),
|
|
848
|
+
})), a = q(null), i = q(null), s = Q({
|
|
849
849
|
image: !1,
|
|
850
850
|
office: !1,
|
|
851
851
|
video: !1
|
|
@@ -853,18 +853,18 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), De = E(Ie)
|
|
|
853
853
|
var u, v, x, R, g, A, P;
|
|
854
854
|
try {
|
|
855
855
|
const p = ((u = l == null ? void 0 : l.response) == null ? void 0 : u.data) || l, j = p[e.value.url] || (p == null ? void 0 : p.id) || p.attachmentId, F = (v = p[e.value.suffix] || p.attachmentSuffix) == null ? void 0 : v.toLowerCase(), X = p[e.value.name] || (p == null ? void 0 : p.attachmentName) || (p == null ? void 0 : p.originName);
|
|
856
|
-
if (
|
|
856
|
+
if (i.value = {
|
|
857
857
|
...l,
|
|
858
858
|
name: l[e.value.name],
|
|
859
859
|
url: M(t.loadUrl, j)
|
|
860
860
|
}, l && L(l, e.value) === "image") {
|
|
861
|
-
|
|
861
|
+
s.image = !0;
|
|
862
862
|
return;
|
|
863
863
|
} else if (l && L(l, e.value) === "video") {
|
|
864
|
-
|
|
864
|
+
s.video = !0;
|
|
865
865
|
return;
|
|
866
866
|
} else if ((((x = t.onlyOfficeConfig) == null ? void 0 : x.accept) || t.onlyOfficeAccept).includes(F)) {
|
|
867
|
-
|
|
867
|
+
s.office = !0, a.value = {
|
|
868
868
|
...t.onlyOfficeConfig,
|
|
869
869
|
editorConfig: {
|
|
870
870
|
...((R = t.onlyOfficeConfig) == null ? void 0 : R.editorConfig) || {},
|
|
@@ -890,33 +890,33 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), De = E(Ie)
|
|
|
890
890
|
console.info("预览错误: ", p);
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
|
-
Z([
|
|
893
|
+
Z([o, t.file], ([l, u]) => {
|
|
894
894
|
l && ee(() => {
|
|
895
895
|
c(t.file);
|
|
896
896
|
});
|
|
897
897
|
});
|
|
898
898
|
const d = () => {
|
|
899
|
-
|
|
899
|
+
o.value = !1, s.office = !1, s.image = !1, s.video = !1, i.value = null;
|
|
900
900
|
};
|
|
901
901
|
return (l, u) => {
|
|
902
902
|
var x, R;
|
|
903
903
|
const v = D("el-image-viewer");
|
|
904
|
-
return
|
|
904
|
+
return o.value ? (r(), f(
|
|
905
905
|
te,
|
|
906
906
|
{ key: 0 },
|
|
907
907
|
[
|
|
908
|
-
(x =
|
|
908
|
+
(x = i.value) != null && x.url && s.image ? (r(), b(v, {
|
|
909
909
|
key: 0,
|
|
910
910
|
onClose: u[0] || (u[0] = (g) => d()),
|
|
911
911
|
ref: "previewImgRef",
|
|
912
|
-
"url-list": [(R =
|
|
912
|
+
"url-list": [(R = i.value) == null ? void 0 : R.url],
|
|
913
913
|
teleported: ""
|
|
914
914
|
}, null, 8, ["url-list"])) : k("v-if", !0),
|
|
915
915
|
k(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),
|
|
916
916
|
k(" 文档类 "),
|
|
917
917
|
z(w(_e), {
|
|
918
|
-
modelValue:
|
|
919
|
-
"onUpdate:modelValue": u[1] || (u[1] = (g) =>
|
|
918
|
+
modelValue: s.office,
|
|
919
|
+
"onUpdate:modelValue": u[1] || (u[1] = (g) => s.office = g),
|
|
920
920
|
draggable: "",
|
|
921
921
|
"no-footer": "",
|
|
922
922
|
"no-header": "",
|