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,39 +1,39 @@
|
|
|
1
|
-
import { inject as D, computed as m, defineComponent as F, openBlock as c, createElementBlock as u, createElementVNode as r, ref as q, resolveComponent as $, Fragment as M, renderList as L, normalizeStyle as z, toDisplayString as V, normalizeClass as S, createVNode as k, unref as g, withModifiers as G, renderSlot as C, createBlock as b, withCtx as y, createCommentVNode as I, mergeModels as Z, useModel as J, reactive as Q, watch as e3, nextTick as t3, createTextVNode as H, h as
|
|
1
|
+
import { inject as D, computed as m, defineComponent as F, openBlock as c, createElementBlock as u, createElementVNode as r, ref as q, resolveComponent as $, Fragment as M, renderList as L, normalizeStyle as z, toDisplayString as V, normalizeClass as S, createVNode as k, unref as g, withModifiers as G, renderSlot as C, createBlock as b, withCtx as y, createCommentVNode as I, mergeModels as Z, useModel as J, reactive as Q, watch as e3, nextTick as t3, createTextVNode as H, h as n3, mergeProps as N, createSlots as o3, useCssVars as i3 } from "vue";
|
|
2
2
|
import { ElTag as l3 } from "element-plus";
|
|
3
3
|
import { paramType as s3, ikFile as a3, buildUUID as c3, ikColor as r3 } from "iking-utils-pro";
|
|
4
|
-
const E = (t,
|
|
5
|
-
if (t.install = (
|
|
6
|
-
for (const e of [t, ...Object.values(
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
for (const [
|
|
10
|
-
t[
|
|
4
|
+
const E = (t, n) => {
|
|
5
|
+
if (t.install = (o) => {
|
|
6
|
+
for (const e of [t, ...Object.values(n ?? {})])
|
|
7
|
+
o.component(e.name, e);
|
|
8
|
+
}, n)
|
|
9
|
+
for (const [o, e] of Object.entries(n))
|
|
10
|
+
t[o] = e;
|
|
11
11
|
return t;
|
|
12
|
-
}, U = (t,
|
|
13
|
-
const
|
|
14
|
-
for (const [e,
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
}, d3 = (t,
|
|
12
|
+
}, U = (t, n) => {
|
|
13
|
+
const o = t.__vccOpts || t;
|
|
14
|
+
for (const [e, l] of n)
|
|
15
|
+
o[e] = l;
|
|
16
|
+
return o;
|
|
17
|
+
}, d3 = (t, n = 2) => {
|
|
18
18
|
if (t === void 0)
|
|
19
19
|
return "";
|
|
20
20
|
if (t === 0)
|
|
21
21
|
return "0 B";
|
|
22
|
-
const
|
|
23
|
-
let
|
|
24
|
-
return (
|
|
25
|
-
}, T = (t,
|
|
26
|
-
const
|
|
22
|
+
const o = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(t) / Math.log(1024));
|
|
23
|
+
let l = t / Math.pow(1024, e);
|
|
24
|
+
return (l % 1 === 0 ? l.toFixed(n || 0) : l.toFixed(n)) + " " + o[e];
|
|
25
|
+
}, T = (t, n) => n ? n.startsWith("http") ? n : `${t || location.origin}${n}` : "", u3 = (t) => {
|
|
26
|
+
const n = D("loadUrl"), o = m(() => t.loadUrl || t.fileUrl || (n == null ? void 0 : n.value)), e = D("uploadUrl"), l = m(() => t.action || t.uploadUrl || (e == null ? void 0 : e.value)), i = D("token"), s = m(() => t.token || (i == null ? void 0 : i.value)), v = D("onlyofficeConfig"), f = m(() => t.onlyofficeConfig || (v == null ? void 0 : v.value)), a = D("userInfo"), h = m(() => t.userInfo || (a == null ? void 0 : a.value));
|
|
27
27
|
return {
|
|
28
|
-
cLoadUrl:
|
|
29
|
-
cUploadUrl:
|
|
30
|
-
cToken:
|
|
28
|
+
cLoadUrl: o,
|
|
29
|
+
cUploadUrl: l,
|
|
30
|
+
cToken: s,
|
|
31
31
|
cOnlyofficeConfig: f,
|
|
32
32
|
cUserInfo: h
|
|
33
33
|
};
|
|
34
|
-
}, f3 = u3, W = (t,
|
|
35
|
-
var i,
|
|
36
|
-
const
|
|
34
|
+
}, f3 = u3, W = (t, n) => {
|
|
35
|
+
var i, s, v, f;
|
|
36
|
+
const o = (i = t == null ? void 0 : t.response) != null && i.data ? X((v = (s = t == null ? void 0 : t.response) == null ? void 0 : s.data) == null ? void 0 : v.suffix) : ((f = t.raw) == null ? void 0 : f.type) || X(t[n.suffix]), e = o == null ? void 0 : o.toLowerCase(), l = {
|
|
37
37
|
sheet: "excel",
|
|
38
38
|
excel: "excel",
|
|
39
39
|
zip: "zip",
|
|
@@ -49,11 +49,11 @@ const E = (t, o) => {
|
|
|
49
49
|
exe: "exe",
|
|
50
50
|
json: "json"
|
|
51
51
|
};
|
|
52
|
-
for (let a in
|
|
52
|
+
for (let a in l)
|
|
53
53
|
if (typeof e == "string" && (e.includes(a) || e === a))
|
|
54
|
-
return
|
|
54
|
+
return l[a];
|
|
55
55
|
return "unknown";
|
|
56
|
-
},
|
|
56
|
+
}, p3 = {
|
|
57
57
|
".doc": "word",
|
|
58
58
|
".docx": "word",
|
|
59
59
|
".docxf": "word",
|
|
@@ -139,11 +139,11 @@ const E = (t, o) => {
|
|
|
139
139
|
".txt": "txt",
|
|
140
140
|
".pdf": "pdf"
|
|
141
141
|
}, X = (t) => {
|
|
142
|
-
const
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
let
|
|
146
|
-
return
|
|
142
|
+
const n = t == null ? void 0 : t.toLocaleLowerCase(), o = n != null && n.startsWith(".") ? n : `.${n}`;
|
|
143
|
+
return o && p3[o] || "unknow";
|
|
144
|
+
}, v3 = (t) => {
|
|
145
|
+
let n = "", o = ["doc", "docx"], e = ["xls", "xlsx"], l = ["ppt", "pptx"], i = ["pdf"];
|
|
146
|
+
return o.includes(t) && (n = "word"), e.includes(t) && (n = "cell"), l.includes(t) && (n = "slide"), i.includes(t) && (n = "text-pdf"), n;
|
|
147
147
|
}, h3 = {
|
|
148
148
|
key: 0,
|
|
149
149
|
t: "1686300059786",
|
|
@@ -495,7 +495,7 @@ const E = (t, o) => {
|
|
|
495
495
|
null,
|
|
496
496
|
-1
|
|
497
497
|
/* HOISTED */
|
|
498
|
-
),
|
|
498
|
+
), n6 = /* @__PURE__ */ r(
|
|
499
499
|
"path",
|
|
500
500
|
{
|
|
501
501
|
d: "M960 326.4v16H755.2s-100.8-20.8-99.2-107.2c0 0 3.2 91.2 96 91.2h208z",
|
|
@@ -505,7 +505,7 @@ const E = (t, o) => {
|
|
|
505
505
|
null,
|
|
506
506
|
-1
|
|
507
507
|
/* HOISTED */
|
|
508
|
-
),
|
|
508
|
+
), o6 = /* @__PURE__ */ r(
|
|
509
509
|
"path",
|
|
510
510
|
{
|
|
511
511
|
d: "M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",
|
|
@@ -528,8 +528,8 @@ const E = (t, o) => {
|
|
|
528
528
|
/* HOISTED */
|
|
529
529
|
), l6 = [
|
|
530
530
|
t6,
|
|
531
|
-
o6,
|
|
532
531
|
n6,
|
|
532
|
+
o6,
|
|
533
533
|
i6
|
|
534
534
|
], s6 = {
|
|
535
535
|
key: 10,
|
|
@@ -596,7 +596,7 @@ const E = (t, o) => {
|
|
|
596
596
|
null,
|
|
597
597
|
-1
|
|
598
598
|
/* HOISTED */
|
|
599
|
-
),
|
|
599
|
+
), p6 = /* @__PURE__ */ r(
|
|
600
600
|
"path",
|
|
601
601
|
{
|
|
602
602
|
d: "M672 0l256 256h-192c-35.3472 0-64-28.6528-64-64V0z",
|
|
@@ -606,7 +606,7 @@ const E = (t, o) => {
|
|
|
606
606
|
null,
|
|
607
607
|
-1
|
|
608
608
|
/* HOISTED */
|
|
609
|
-
),
|
|
609
|
+
), v6 = /* @__PURE__ */ r(
|
|
610
610
|
"path",
|
|
611
611
|
{
|
|
612
612
|
d: "M384 499.2c0-25.6 5.12-46.08 10.24-58.88 5.12-12.8 15.36-25.6 28.16-35.84 12.8-12.8 25.6-20.48 43.52-25.6 15.36-5.12 30.72-7.68 48.64-7.68 35.84 0 64 10.24 89.6 30.72C627.2 422.4 640 448 640 481.28c0 15.36-5.12 28.16-10.24 40.96s-17.92 28.16-38.4 46.08-28.16 30.72-35.84 38.4c-7.68 7.68-10.24 17.92-15.36 28.16-5.12 10.24-2.56 17.92-2.56 43.52h-51.2c0-25.6 2.56-38.4 5.12-51.2s7.68-23.04 15.36-33.28 15.36-23.04 33.28-40.96c17.92-17.92 30.72-30.72 35.84-38.4 5.12-7.68 10.24-20.48 10.24-38.4s-7.68-30.72-20.48-43.52-30.72-20.48-53.76-20.48c-51.2 0-76.8 35.84-76.8 87.04h-51.2z m153.6 281.6h-51.2v-51.2h51.2v51.2z",
|
|
@@ -618,8 +618,8 @@ const E = (t, o) => {
|
|
|
618
618
|
/* HOISTED */
|
|
619
619
|
), h6 = [
|
|
620
620
|
f6,
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
p6,
|
|
622
|
+
v6
|
|
623
623
|
], g6 = /* @__PURE__ */ F({
|
|
624
624
|
__name: "FileIcon",
|
|
625
625
|
props: {
|
|
@@ -641,8 +641,8 @@ const E = (t, o) => {
|
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
setup(t) {
|
|
644
|
-
const
|
|
645
|
-
return (e,
|
|
644
|
+
const n = t, o = m(() => n.file ? W(n.file, n.fields) : n.type);
|
|
645
|
+
return (e, l) => o.value === "image" ? (c(), u("svg", h3, _3)) : o.value === "zip" ? (c(), u("svg", k3, b3)) : o.value === "ppt" ? (c(), u("svg", F3, V3)) : o.value === "word" ? (c(), u("svg", O3, R3)) : o.value === "pdf" ? (c(), u("svg", $3, H3)) : o.value === "txt" ? (c(), u("svg", q3, P3)) : o.value === "audio" ? (c(), u("svg", T3, L3)) : o.value === "video" ? (c(), u("svg", N3, G3)) : o.value === "excel" ? (c(), u("svg", X3, Q3)) : o.value === "exe" ? (c(), u("svg", e6, l6)) : o.value === "json" ? (c(), u("svg", s6, d6)) : (c(), u("svg", u6, h6));
|
|
646
646
|
}
|
|
647
647
|
}), m6 = ["onClick"], y6 = { class: "fileName simple" }, w6 = ["onClick"], _6 = { class: "text" }, k6 = { class: "fileName" }, x6 = { class: "size" }, z6 = /* @__PURE__ */ F({
|
|
648
648
|
__name: "IkPreviewFile",
|
|
@@ -719,35 +719,35 @@ const E = (t, o) => {
|
|
|
719
719
|
}
|
|
720
720
|
},
|
|
721
721
|
setup(t) {
|
|
722
|
-
const
|
|
722
|
+
const n = t, { cLoadUrl: o, cOnlyofficeConfig: e } = f3(n), l = m(() => ({
|
|
723
723
|
name: "name",
|
|
724
724
|
url: "url",
|
|
725
725
|
suffix: "suffix",
|
|
726
726
|
size: "size",
|
|
727
|
-
...
|
|
728
|
-
})), i = q({}),
|
|
727
|
+
...n.field
|
|
728
|
+
})), i = q({}), s = q(!1), v = (d) => {
|
|
729
729
|
var w, x;
|
|
730
730
|
i.value = {
|
|
731
731
|
...d,
|
|
732
732
|
name: d.name,
|
|
733
733
|
url: T(
|
|
734
|
-
|
|
734
|
+
o.value,
|
|
735
735
|
d.url || ((x = (w = d == null ? void 0 : d.response) == null ? void 0 : w.data) == null ? void 0 : x.id) || (d == null ? void 0 : d.id)
|
|
736
736
|
)
|
|
737
|
-
},
|
|
737
|
+
}, s.value = !0;
|
|
738
738
|
}, f = (d) => {
|
|
739
739
|
a3.downloadFile(
|
|
740
740
|
T(
|
|
741
|
-
|
|
742
|
-
d[
|
|
741
|
+
o.value,
|
|
742
|
+
d[l.value.url] || d.attachmentId || d.id
|
|
743
743
|
),
|
|
744
|
-
d[
|
|
744
|
+
d[l.value.name] || d.attachmentName
|
|
745
745
|
);
|
|
746
|
-
}, a = m(() => s3.isNumber(
|
|
746
|
+
}, a = m(() => s3.isNumber(n.width) ? `${n.width}px` : n.width), h = m(() => n.list.map((d) => ({
|
|
747
747
|
...d,
|
|
748
|
-
name: d[
|
|
749
|
-
size: d[
|
|
750
|
-
suffix: d[
|
|
748
|
+
name: d[l.value.name] || d.attachmentName,
|
|
749
|
+
size: d[l.value.size] || d.fileSize || d.attachmentSize,
|
|
750
|
+
suffix: d[l.value.suffix] || d.attachmentSuffix
|
|
751
751
|
})));
|
|
752
752
|
return (d, w) => {
|
|
753
753
|
var _, A, P;
|
|
@@ -763,15 +763,15 @@ const E = (t, o) => {
|
|
|
763
763
|
t.simple ? (c(!0), u(
|
|
764
764
|
M,
|
|
765
765
|
{ key: 0 },
|
|
766
|
-
L(h.value, (
|
|
766
|
+
L(h.value, (p, O) => (c(), u("div", {
|
|
767
767
|
class: "iking-privew-annex simple",
|
|
768
|
-
onClick: (B) => p
|
|
768
|
+
onClick: (B) => v(p),
|
|
769
769
|
style: z({ width: a.value })
|
|
770
770
|
}, [
|
|
771
771
|
r(
|
|
772
772
|
"div",
|
|
773
773
|
y6,
|
|
774
|
-
V(
|
|
774
|
+
V(p.name),
|
|
775
775
|
1
|
|
776
776
|
/* TEXT */
|
|
777
777
|
),
|
|
@@ -783,7 +783,7 @@ const E = (t, o) => {
|
|
|
783
783
|
[
|
|
784
784
|
k(g(R), {
|
|
785
785
|
name: "iksvg_daochu",
|
|
786
|
-
onClick: G((B) => f(
|
|
786
|
+
onClick: G((B) => f(p), ["stop"]),
|
|
787
787
|
size: 20,
|
|
788
788
|
active: ""
|
|
789
789
|
}, null, 8, ["onClick"]),
|
|
@@ -793,7 +793,7 @@ const E = (t, o) => {
|
|
|
793
793
|
active: ""
|
|
794
794
|
}),
|
|
795
795
|
C(d.$slots, "operation", {
|
|
796
|
-
data: { ...
|
|
796
|
+
data: { ...p, findex: O }
|
|
797
797
|
})
|
|
798
798
|
],
|
|
799
799
|
2
|
|
@@ -807,7 +807,7 @@ const E = (t, o) => {
|
|
|
807
807
|
(c(!0), u(
|
|
808
808
|
M,
|
|
809
809
|
null,
|
|
810
|
-
L(h.value, (
|
|
810
|
+
L(h.value, (p, O) => {
|
|
811
811
|
var B;
|
|
812
812
|
return c(), u(
|
|
813
813
|
"div",
|
|
@@ -822,26 +822,26 @@ const E = (t, o) => {
|
|
|
822
822
|
[
|
|
823
823
|
r("div", {
|
|
824
824
|
class: "file-card",
|
|
825
|
-
onClick: (j) => p
|
|
825
|
+
onClick: (j) => v(p)
|
|
826
826
|
}, [
|
|
827
827
|
k(g6, {
|
|
828
|
-
file:
|
|
828
|
+
file: p,
|
|
829
829
|
style: z({ height: `${t.iconSize}px` }),
|
|
830
830
|
class: "ikui-w-auto",
|
|
831
|
-
fields:
|
|
831
|
+
fields: l.value
|
|
832
832
|
}, null, 8, ["file", "style", "fields"]),
|
|
833
833
|
r("div", _6, [
|
|
834
834
|
r(
|
|
835
835
|
"div",
|
|
836
836
|
k6,
|
|
837
|
-
V(
|
|
837
|
+
V(p.name),
|
|
838
838
|
1
|
|
839
839
|
/* TEXT */
|
|
840
840
|
),
|
|
841
841
|
r(
|
|
842
842
|
"div",
|
|
843
843
|
x6,
|
|
844
|
-
V(g(d3)(
|
|
844
|
+
V(g(d3)(p.size)),
|
|
845
845
|
1
|
|
846
846
|
/* TEXT */
|
|
847
847
|
)
|
|
@@ -854,7 +854,7 @@ const E = (t, o) => {
|
|
|
854
854
|
[
|
|
855
855
|
k(g(R), {
|
|
856
856
|
name: "iksvg_daochu",
|
|
857
|
-
onClick: G((j) => f(
|
|
857
|
+
onClick: G((j) => f(p), ["stop"]),
|
|
858
858
|
bg: t.showBg,
|
|
859
859
|
size: t.showBg ? "default" : 20,
|
|
860
860
|
title: "下载"
|
|
@@ -866,7 +866,7 @@ const E = (t, o) => {
|
|
|
866
866
|
title: "预览"
|
|
867
867
|
}, null, 8, ["bg", "size"]),
|
|
868
868
|
C(d.$slots, "operation", {
|
|
869
|
-
data: { ...
|
|
869
|
+
data: { ...p, findex: O }
|
|
870
870
|
})
|
|
871
871
|
],
|
|
872
872
|
2
|
|
@@ -890,9 +890,9 @@ const E = (t, o) => {
|
|
|
890
890
|
/* STABLE_FRAGMENT */
|
|
891
891
|
)) : I("v-if", !0),
|
|
892
892
|
k(g(S6), {
|
|
893
|
-
show:
|
|
894
|
-
"onUpdate:show": w[0] || (w[0] = (
|
|
895
|
-
loadUrl: g(
|
|
893
|
+
show: s.value,
|
|
894
|
+
"onUpdate:show": w[0] || (w[0] = (p) => s.value = p),
|
|
895
|
+
loadUrl: g(o),
|
|
896
896
|
file: i.value,
|
|
897
897
|
onlyofficeServer: ((A = g(e)) == null ? void 0 : A.serverUrl) || t.onlyofficeServer,
|
|
898
898
|
onlyOfficeConfig: g(e),
|
|
@@ -942,37 +942,37 @@ const b6 = E(z6), F6 = /* @__PURE__ */ F({
|
|
|
942
942
|
}),
|
|
943
943
|
emits: ["update:show"],
|
|
944
944
|
setup(t) {
|
|
945
|
-
const
|
|
945
|
+
const n = t, o = J(t, "show"), e = m(() => ({
|
|
946
946
|
name: "name",
|
|
947
947
|
url: "url",
|
|
948
948
|
suffix: "suffix",
|
|
949
949
|
size: "fileSize",
|
|
950
|
-
...
|
|
951
|
-
})),
|
|
950
|
+
...n.field
|
|
951
|
+
})), l = q(null), i = q(null), s = Q({
|
|
952
952
|
image: !1,
|
|
953
953
|
office: !1,
|
|
954
954
|
video: !1
|
|
955
|
-
}),
|
|
955
|
+
}), v = (a) => {
|
|
956
956
|
var h, d, w, x, _, A, P;
|
|
957
957
|
try {
|
|
958
|
-
const
|
|
958
|
+
const p = ((h = a == null ? void 0 : a.response) == null ? void 0 : h.data) || a, O = p[e.value.url] || (p == null ? void 0 : p.id) || p.attachmentId, B = (d = p[e.value.suffix] || p.attachmentSuffix) == null ? void 0 : d.toLowerCase(), j = p[e.value.name] || (p == null ? void 0 : p.attachmentName) || (p == null ? void 0 : p.originName);
|
|
959
959
|
if (i.value = {
|
|
960
960
|
...a,
|
|
961
961
|
name: a[e.value.name],
|
|
962
|
-
url: T(
|
|
962
|
+
url: T(n.loadUrl, O)
|
|
963
963
|
}, a && W(a, e.value) === "image") {
|
|
964
|
-
|
|
964
|
+
s.image = !0;
|
|
965
965
|
return;
|
|
966
966
|
} else if (a && W(a, e.value) === "video") {
|
|
967
|
-
|
|
967
|
+
s.video = !0;
|
|
968
968
|
return;
|
|
969
|
-
} else if ((((w =
|
|
970
|
-
|
|
971
|
-
...
|
|
969
|
+
} else if ((((w = n.onlyOfficeConfig) == null ? void 0 : w.accept) || n.onlyOfficeAccept).includes(B)) {
|
|
970
|
+
s.office = !0, l.value = {
|
|
971
|
+
...n.onlyOfficeConfig,
|
|
972
972
|
editorConfig: {
|
|
973
|
-
...((x =
|
|
973
|
+
...((x = n.onlyOfficeConfig) == null ? void 0 : x.editorConfig) || {},
|
|
974
974
|
customization: {
|
|
975
|
-
...((A = (_ =
|
|
975
|
+
...((A = (_ = n.onlyOfficeConfig) == null ? void 0 : _.editorConfig) == null ? void 0 : A.customization) || {},
|
|
976
976
|
review: {
|
|
977
977
|
reviewDisplay: "final"
|
|
978
978
|
}
|
|
@@ -981,34 +981,34 @@ const b6 = E(z6), F6 = /* @__PURE__ */ F({
|
|
|
981
981
|
document: {
|
|
982
982
|
key: c3(),
|
|
983
983
|
title: j,
|
|
984
|
-
url: T(
|
|
984
|
+
url: T(n.loadUrl, O),
|
|
985
985
|
fileType: B,
|
|
986
|
-
...((P =
|
|
986
|
+
...((P = n.onlyOfficeConfig) == null ? void 0 : P.document) || {}
|
|
987
987
|
},
|
|
988
|
-
documentType:
|
|
988
|
+
documentType: v3(B)
|
|
989
989
|
};
|
|
990
990
|
return;
|
|
991
991
|
}
|
|
992
|
-
} catch (
|
|
993
|
-
console.info("预览错误: ",
|
|
992
|
+
} catch (p) {
|
|
993
|
+
console.info("预览错误: ", p);
|
|
994
994
|
}
|
|
995
995
|
};
|
|
996
|
-
e3([
|
|
996
|
+
e3([o, n.file], ([a, h]) => {
|
|
997
997
|
a && t3(() => {
|
|
998
|
-
|
|
998
|
+
v(n.file);
|
|
999
999
|
});
|
|
1000
1000
|
});
|
|
1001
1001
|
const f = () => {
|
|
1002
|
-
|
|
1002
|
+
o.value = !1, s.office = !1, s.image = !1, s.video = !1, i.value = null;
|
|
1003
1003
|
};
|
|
1004
1004
|
return (a, h) => {
|
|
1005
1005
|
var w, x;
|
|
1006
1006
|
const d = $("el-image-viewer");
|
|
1007
|
-
return
|
|
1007
|
+
return o.value ? (c(), u(
|
|
1008
1008
|
M,
|
|
1009
1009
|
{ key: 0 },
|
|
1010
1010
|
[
|
|
1011
|
-
(w = i.value) != null && w.url &&
|
|
1011
|
+
(w = i.value) != null && w.url && s.image ? (c(), b(d, {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
onClose: h[0] || (h[0] = (_) => f()),
|
|
1014
1014
|
ref: "previewImgRef",
|
|
@@ -1018,8 +1018,8 @@ const b6 = E(z6), F6 = /* @__PURE__ */ F({
|
|
|
1018
1018
|
I(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),
|
|
1019
1019
|
I(" 文档类 "),
|
|
1020
1020
|
k(g(T6), {
|
|
1021
|
-
modelValue:
|
|
1022
|
-
"onUpdate:modelValue": h[1] || (h[1] = (_) =>
|
|
1021
|
+
modelValue: s.office,
|
|
1022
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => s.office = _),
|
|
1023
1023
|
draggable: "",
|
|
1024
1024
|
"no-footer": "",
|
|
1025
1025
|
"no-header": "",
|
|
@@ -1036,7 +1036,7 @@ const b6 = E(z6), F6 = /* @__PURE__ */ F({
|
|
|
1036
1036
|
var _;
|
|
1037
1037
|
return [
|
|
1038
1038
|
k(g(X6), {
|
|
1039
|
-
"config-options":
|
|
1039
|
+
"config-options": l.value,
|
|
1040
1040
|
"document-server-url": ((_ = t.onlyOfficeConfig) == null ? void 0 : _.serverUrl) || t.onlyofficeServer
|
|
1041
1041
|
}, null, 8, ["config-options", "document-server-url"])
|
|
1042
1042
|
];
|
|
@@ -1089,40 +1089,40 @@ const S6 = E(F6), C6 = {
|
|
|
1089
1089
|
tableIconType: {}
|
|
1090
1090
|
},
|
|
1091
1091
|
setup(t) {
|
|
1092
|
-
const
|
|
1093
|
-
...(
|
|
1094
|
-
...
|
|
1095
|
-
})),
|
|
1096
|
-
const { name:
|
|
1097
|
-
return /^http?:\/\//.test(
|
|
1092
|
+
const n = t, o = D("iconConfig"), e = m(() => ({
|
|
1093
|
+
...(o == null ? void 0 : o.value) || {},
|
|
1094
|
+
...n
|
|
1095
|
+
})), l = m(() => {
|
|
1096
|
+
const { name: s } = e.value;
|
|
1097
|
+
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";
|
|
1098
1098
|
}), i = m(() => {
|
|
1099
|
-
const
|
|
1099
|
+
const s = [];
|
|
1100
1100
|
if (e.value.flip)
|
|
1101
1101
|
switch (e.value.flip) {
|
|
1102
1102
|
case "horizontal":
|
|
1103
|
-
|
|
1103
|
+
s.push("rotateY(180deg)");
|
|
1104
1104
|
break;
|
|
1105
1105
|
case "vertical":
|
|
1106
|
-
|
|
1106
|
+
s.push("rotateX(180deg)");
|
|
1107
1107
|
break;
|
|
1108
1108
|
case "both":
|
|
1109
|
-
|
|
1109
|
+
s.push("rotateX(180deg)"), s.push("rotateY(180deg)");
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
1112
|
-
e.value.rotate &&
|
|
1113
|
-
const
|
|
1112
|
+
e.value.rotate && s.push(`rotate(${e.value.rotate % 360}deg)`);
|
|
1113
|
+
const v = {
|
|
1114
1114
|
...e.value.color && { color: e.value.color },
|
|
1115
1115
|
...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
|
|
1116
|
-
...
|
|
1116
|
+
...s.length && { transform: s.join(" ") },
|
|
1117
1117
|
padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
|
|
1118
|
-
...e.value.color &&
|
|
1118
|
+
...e.value.color && l.value !== "iksig" ? {
|
|
1119
1119
|
"--ik-color-icon-dark": e.value.color,
|
|
1120
1120
|
"--ik-color-icon-light": e.value.colorLight || r3.setOpacity(e.value.color, e.value.opacity)
|
|
1121
1121
|
} : {}
|
|
1122
1122
|
};
|
|
1123
|
-
return e.value.width && (
|
|
1123
|
+
return e.value.width && (v.width = v.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), v;
|
|
1124
1124
|
});
|
|
1125
|
-
return (
|
|
1125
|
+
return (s, v) => {
|
|
1126
1126
|
const f = $("el-tooltip"), a = $("el-button");
|
|
1127
1127
|
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (c(), u("span", C6, [
|
|
1128
1128
|
e.value.notip || !e.value.title ? (c(), u(
|
|
@@ -1130,14 +1130,14 @@ const S6 = E(F6), C6 = {
|
|
|
1130
1130
|
{
|
|
1131
1131
|
key: 0,
|
|
1132
1132
|
class: S(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
1133
|
-
[
|
|
1133
|
+
[s.name]: l.value === "unocss",
|
|
1134
1134
|
"show-bg": e.value.showBg || e.value.bg,
|
|
1135
1135
|
default: e.value.size === "default",
|
|
1136
1136
|
small: e.value.size === "small",
|
|
1137
1137
|
big: e.value.size === "big",
|
|
1138
1138
|
warning: e.value.warning || e.value.type === "warning",
|
|
1139
1139
|
primary: e.value.primary || e.value.type === "primary",
|
|
1140
|
-
success:
|
|
1140
|
+
success: s.success || e.value.type === "success",
|
|
1141
1141
|
error: e.value.error || e.value.type === "error",
|
|
1142
1142
|
active: e.value.active,
|
|
1143
1143
|
disabled: e.value.disabled
|
|
@@ -1146,7 +1146,7 @@ const S6 = E(F6), C6 = {
|
|
|
1146
1146
|
},
|
|
1147
1147
|
[
|
|
1148
1148
|
I(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
1149
|
-
|
|
1149
|
+
l.value === "iksig" ? (c(), u(
|
|
1150
1150
|
"i",
|
|
1151
1151
|
{
|
|
1152
1152
|
key: 0,
|
|
@@ -1156,11 +1156,11 @@ const S6 = E(F6), C6 = {
|
|
|
1156
1156
|
null,
|
|
1157
1157
|
6
|
|
1158
1158
|
/* CLASS, STYLE */
|
|
1159
|
-
)) :
|
|
1159
|
+
)) : l.value === "svg" ? (c(), u("svg", V6, [
|
|
1160
1160
|
r("use", {
|
|
1161
1161
|
"xlink:href": `#${e.value.name}`
|
|
1162
1162
|
}, null, 8, O6)
|
|
1163
|
-
])) :
|
|
1163
|
+
])) : l.value === "img" ? (c(), u("img", {
|
|
1164
1164
|
key: 2,
|
|
1165
1165
|
src: e.value.name,
|
|
1166
1166
|
class: "h-[1em] w-[1em]"
|
|
@@ -1188,21 +1188,21 @@ const S6 = E(F6), C6 = {
|
|
|
1188
1188
|
"i",
|
|
1189
1189
|
{
|
|
1190
1190
|
class: S(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
1191
|
-
[
|
|
1191
|
+
[s.name]: l.value === "unocss",
|
|
1192
1192
|
"show-bg": e.value.showBg || e.value.bg,
|
|
1193
1193
|
default: e.value.size === "default",
|
|
1194
1194
|
small: e.value.size === "small",
|
|
1195
1195
|
big: e.value.size === "big",
|
|
1196
1196
|
warning: e.value.warning || e.value.type === "warning",
|
|
1197
|
-
primary:
|
|
1198
|
-
success:
|
|
1197
|
+
primary: s.primary || e.value.type === "primary",
|
|
1198
|
+
success: s.success || e.value.type === "success",
|
|
1199
1199
|
error: e.value.error || e.value.type === "error",
|
|
1200
1200
|
active: e.value.active
|
|
1201
1201
|
}]),
|
|
1202
1202
|
style: z(i.value)
|
|
1203
1203
|
},
|
|
1204
1204
|
[
|
|
1205
|
-
|
|
1205
|
+
l.value === "iksig" ? (c(), u(
|
|
1206
1206
|
"i",
|
|
1207
1207
|
{
|
|
1208
1208
|
key: 0,
|
|
@@ -1212,11 +1212,11 @@ const S6 = E(F6), C6 = {
|
|
|
1212
1212
|
null,
|
|
1213
1213
|
6
|
|
1214
1214
|
/* CLASS, STYLE */
|
|
1215
|
-
)) :
|
|
1215
|
+
)) : l.value === "svg" ? (c(), u("svg", I6, [
|
|
1216
1216
|
r("use", {
|
|
1217
1217
|
"xlink:href": `#${e.value.name}`
|
|
1218
1218
|
}, null, 8, R6)
|
|
1219
|
-
])) :
|
|
1219
|
+
])) : l.value === "img" ? (c(), u("img", {
|
|
1220
1220
|
key: 2,
|
|
1221
1221
|
src: e.value.name,
|
|
1222
1222
|
class: "h-[1em] w-[1em]"
|
|
@@ -1272,7 +1272,7 @@ const M6 = /* @__PURE__ */ U(D6, [["__scopeId", "data-v-76d7e119"]]), R = E(M6),
|
|
|
1272
1272
|
}
|
|
1273
1273
|
},
|
|
1274
1274
|
setup(t) {
|
|
1275
|
-
return (
|
|
1275
|
+
return (n, o) => (c(), u("div", null, [
|
|
1276
1276
|
t.showBg && t.fullscreen ? (c(), u("div", H6, [
|
|
1277
1277
|
k(g(R), {
|
|
1278
1278
|
name: "iksvg_guanbidanchuang",
|
|
@@ -1311,31 +1311,31 @@ const E6 = /* @__PURE__ */ U(q6, [["__scopeId", "data-v-79f49df8"]]), A6 = { cla
|
|
|
1311
1311
|
}),
|
|
1312
1312
|
emits: ["update:modelValue"],
|
|
1313
1313
|
setup(t) {
|
|
1314
|
-
const
|
|
1314
|
+
const n = t, o = J(t, "modelValue"), e = q(n.fullscreen), l = () => {
|
|
1315
1315
|
e.value = !e.value;
|
|
1316
1316
|
}, i = F({
|
|
1317
1317
|
setup() {
|
|
1318
|
-
return () =>
|
|
1319
|
-
showBg:
|
|
1320
|
-
fullscreen:
|
|
1318
|
+
return () => n3(E6, {
|
|
1319
|
+
showBg: n.showCloseBg,
|
|
1320
|
+
fullscreen: n.fullscreen
|
|
1321
1321
|
});
|
|
1322
1322
|
}
|
|
1323
1323
|
});
|
|
1324
|
-
return (
|
|
1324
|
+
return (s, v) => {
|
|
1325
1325
|
const f = $("el-dialog");
|
|
1326
1326
|
return c(), b(f, N({
|
|
1327
|
-
modelValue:
|
|
1328
|
-
"onUpdate:modelValue":
|
|
1329
|
-
},
|
|
1327
|
+
modelValue: o.value,
|
|
1328
|
+
"onUpdate:modelValue": v[0] || (v[0] = (a) => o.value = a)
|
|
1329
|
+
}, s.$attrs, {
|
|
1330
1330
|
"close-icon": g(i),
|
|
1331
|
-
class: `ik-base-dialog ${
|
|
1331
|
+
class: `ik-base-dialog ${s.noHeader ? "no-header" : ""} ${s.noFooter ? "no-footer" : ""}`,
|
|
1332
1332
|
fullscreen: e.value,
|
|
1333
1333
|
"modal-class": "baseDialog"
|
|
1334
|
-
}),
|
|
1334
|
+
}), o3({
|
|
1335
1335
|
icon: y(() => [
|
|
1336
|
-
C(
|
|
1336
|
+
C(s.$slots, "title", {}, () => [
|
|
1337
1337
|
H(
|
|
1338
|
-
V(
|
|
1338
|
+
V(s.title),
|
|
1339
1339
|
1
|
|
1340
1340
|
/* TEXT */
|
|
1341
1341
|
)
|
|
@@ -1343,32 +1343,32 @@ const E6 = /* @__PURE__ */ U(q6, [["__scopeId", "data-v-79f49df8"]]), A6 = { cla
|
|
|
1343
1343
|
]),
|
|
1344
1344
|
header: y(() => [
|
|
1345
1345
|
r("div", A6, [
|
|
1346
|
-
C(
|
|
1346
|
+
C(s.$slots, "header", {}, () => [
|
|
1347
1347
|
H(
|
|
1348
|
-
V(
|
|
1348
|
+
V(s.title),
|
|
1349
1349
|
1
|
|
1350
1350
|
/* TEXT */
|
|
1351
1351
|
)
|
|
1352
1352
|
])
|
|
1353
1353
|
]),
|
|
1354
|
-
|
|
1354
|
+
s.$attrs.showClose ? (c(), b(g(R), {
|
|
1355
1355
|
key: 0,
|
|
1356
|
-
onClick:
|
|
1356
|
+
onClick: l,
|
|
1357
1357
|
name: e.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
|
|
1358
1358
|
class: "absolute! top-[18px] right-[50px] icon-dialog-full",
|
|
1359
1359
|
title: e.value ? "退出全屏" : "全屏"
|
|
1360
1360
|
}, null, 8, ["name", "title"])) : I("v-if", !0)
|
|
1361
1361
|
]),
|
|
1362
1362
|
default: y(() => [
|
|
1363
|
-
C(
|
|
1363
|
+
C(s.$slots, "default")
|
|
1364
1364
|
]),
|
|
1365
1365
|
_: 2
|
|
1366
1366
|
/* DYNAMIC */
|
|
1367
1367
|
}, [
|
|
1368
|
-
|
|
1368
|
+
s.$slots.footer ? {
|
|
1369
1369
|
name: "footer",
|
|
1370
1370
|
fn: y(() => [
|
|
1371
|
-
C(
|
|
1371
|
+
C(s.$slots, "footer")
|
|
1372
1372
|
]),
|
|
1373
1373
|
key: "0"
|
|
1374
1374
|
} : void 0
|
|
@@ -1377,43 +1377,43 @@ const E6 = /* @__PURE__ */ U(q6, [["__scopeId", "data-v-79f49df8"]]), A6 = { cla
|
|
|
1377
1377
|
}
|
|
1378
1378
|
});
|
|
1379
1379
|
const T6 = E(P6);
|
|
1380
|
-
function U6(t,
|
|
1381
|
-
function
|
|
1382
|
-
return i instanceof
|
|
1383
|
-
|
|
1380
|
+
function U6(t, n, o, e) {
|
|
1381
|
+
function l(i) {
|
|
1382
|
+
return i instanceof o ? i : new o(function(s) {
|
|
1383
|
+
s(i);
|
|
1384
1384
|
});
|
|
1385
1385
|
}
|
|
1386
|
-
return new (
|
|
1387
|
-
function
|
|
1386
|
+
return new (o || (o = Promise))(function(i, s) {
|
|
1387
|
+
function v(h) {
|
|
1388
1388
|
try {
|
|
1389
1389
|
a(e.next(h));
|
|
1390
1390
|
} catch (d) {
|
|
1391
|
-
|
|
1391
|
+
s(d);
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
1394
|
function f(h) {
|
|
1395
1395
|
try {
|
|
1396
1396
|
a(e.throw(h));
|
|
1397
1397
|
} catch (d) {
|
|
1398
|
-
|
|
1398
|
+
s(d);
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
function a(h) {
|
|
1402
|
-
h.done ? i(h.value) :
|
|
1402
|
+
h.done ? i(h.value) : l(h.value).then(v, f);
|
|
1403
1403
|
}
|
|
1404
|
-
a((e = e.apply(t,
|
|
1404
|
+
a((e = e.apply(t, n || [])).next());
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function j6(t,
|
|
1408
|
-
var
|
|
1407
|
+
function j6(t, n) {
|
|
1408
|
+
var o = { label: 0, sent: function() {
|
|
1409
1409
|
if (i[0] & 1)
|
|
1410
1410
|
throw i[1];
|
|
1411
1411
|
return i[1];
|
|
1412
|
-
}, trys: [], ops: [] }, e,
|
|
1413
|
-
return
|
|
1412
|
+
}, trys: [], ops: [] }, e, l, i, s;
|
|
1413
|
+
return s = { next: v(0), throw: v(1), return: v(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
1414
1414
|
return this;
|
|
1415
|
-
}),
|
|
1416
|
-
function
|
|
1415
|
+
}), s;
|
|
1416
|
+
function v(a) {
|
|
1417
1417
|
return function(h) {
|
|
1418
1418
|
return f([a, h]);
|
|
1419
1419
|
};
|
|
@@ -1421,46 +1421,46 @@ function j6(t, o) {
|
|
|
1421
1421
|
function f(a) {
|
|
1422
1422
|
if (e)
|
|
1423
1423
|
throw new TypeError("Generator is already executing.");
|
|
1424
|
-
for (;
|
|
1424
|
+
for (; s && (s = 0, a[0] && (o = 0)), o; )
|
|
1425
1425
|
try {
|
|
1426
|
-
if (e = 1,
|
|
1426
|
+
if (e = 1, l && (i = a[0] & 2 ? l.return : a[0] ? l.throw || ((i = l.return) && i.call(l), 0) : l.next) && !(i = i.call(l, a[1])).done)
|
|
1427
1427
|
return i;
|
|
1428
|
-
switch (
|
|
1428
|
+
switch (l = 0, i && (a = [a[0] & 2, i.value]), a[0]) {
|
|
1429
1429
|
case 0:
|
|
1430
1430
|
case 1:
|
|
1431
1431
|
i = a;
|
|
1432
1432
|
break;
|
|
1433
1433
|
case 4:
|
|
1434
|
-
return
|
|
1434
|
+
return o.label++, { value: a[1], done: !1 };
|
|
1435
1435
|
case 5:
|
|
1436
|
-
|
|
1436
|
+
o.label++, l = a[1], a = [0];
|
|
1437
1437
|
continue;
|
|
1438
1438
|
case 7:
|
|
1439
|
-
a =
|
|
1439
|
+
a = o.ops.pop(), o.trys.pop();
|
|
1440
1440
|
continue;
|
|
1441
1441
|
default:
|
|
1442
|
-
if (i =
|
|
1443
|
-
|
|
1442
|
+
if (i = o.trys, !(i = i.length > 0 && i[i.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
1443
|
+
o = 0;
|
|
1444
1444
|
continue;
|
|
1445
1445
|
}
|
|
1446
1446
|
if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
|
|
1447
|
-
|
|
1447
|
+
o.label = a[1];
|
|
1448
1448
|
break;
|
|
1449
1449
|
}
|
|
1450
|
-
if (a[0] === 6 &&
|
|
1451
|
-
|
|
1450
|
+
if (a[0] === 6 && o.label < i[1]) {
|
|
1451
|
+
o.label = i[1], i = a;
|
|
1452
1452
|
break;
|
|
1453
1453
|
}
|
|
1454
|
-
if (i &&
|
|
1455
|
-
|
|
1454
|
+
if (i && o.label < i[2]) {
|
|
1455
|
+
o.label = i[2], o.ops.push(a);
|
|
1456
1456
|
break;
|
|
1457
1457
|
}
|
|
1458
|
-
i[2] &&
|
|
1458
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
1459
1459
|
continue;
|
|
1460
1460
|
}
|
|
1461
|
-
a =
|
|
1461
|
+
a = n.call(t, o);
|
|
1462
1462
|
} catch (h) {
|
|
1463
|
-
a = [6, h],
|
|
1463
|
+
a = [6, h], l = 0;
|
|
1464
1464
|
} finally {
|
|
1465
1465
|
e = i = 0;
|
|
1466
1466
|
}
|
|
@@ -1469,27 +1469,27 @@ function j6(t, o) {
|
|
|
1469
1469
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
var L6 = function(t,
|
|
1472
|
+
var L6 = function(t, n) {
|
|
1473
1473
|
return U6(void 0, void 0, void 0, function() {
|
|
1474
|
-
return j6(this, function(
|
|
1475
|
-
return [2, new Promise(function(e,
|
|
1474
|
+
return j6(this, function(o) {
|
|
1475
|
+
return [2, new Promise(function(e, l) {
|
|
1476
1476
|
try {
|
|
1477
1477
|
if (window.DocsAPI)
|
|
1478
1478
|
return e(null);
|
|
1479
|
-
var i = document.getElementById(
|
|
1479
|
+
var i = document.getElementById(n);
|
|
1480
1480
|
if (i)
|
|
1481
|
-
var
|
|
1481
|
+
var s = setInterval(function() {
|
|
1482
1482
|
var f = i.getAttribute("loading");
|
|
1483
1483
|
if (!f) {
|
|
1484
|
-
if (clearInterval(
|
|
1484
|
+
if (clearInterval(s), window.DocsAPI)
|
|
1485
1485
|
return e(null);
|
|
1486
|
-
var a = Y(
|
|
1486
|
+
var a = Y(n, t, e, l);
|
|
1487
1487
|
i.remove(), document.body.appendChild(a);
|
|
1488
1488
|
}
|
|
1489
1489
|
}, 500);
|
|
1490
1490
|
else {
|
|
1491
|
-
var
|
|
1492
|
-
document.body.appendChild(
|
|
1491
|
+
var v = Y(n, t, e, l);
|
|
1492
|
+
document.body.appendChild(v);
|
|
1493
1493
|
}
|
|
1494
1494
|
} catch (f) {
|
|
1495
1495
|
console.error(f);
|
|
@@ -1497,13 +1497,13 @@ var L6 = function(t, o) {
|
|
|
1497
1497
|
})];
|
|
1498
1498
|
});
|
|
1499
1499
|
});
|
|
1500
|
-
}, Y = function(t,
|
|
1501
|
-
var
|
|
1502
|
-
return
|
|
1503
|
-
|
|
1504
|
-
},
|
|
1505
|
-
|
|
1506
|
-
},
|
|
1500
|
+
}, Y = function(t, n, o, e) {
|
|
1501
|
+
var l = document.createElement("script");
|
|
1502
|
+
return l.id = t, l.type = "text/javascript", l.src = n, l.async = !0, l.onload = function() {
|
|
1503
|
+
l.removeAttribute("loading"), o(null);
|
|
1504
|
+
}, l.onerror = function(i) {
|
|
1505
|
+
l.removeAttribute("loading"), e(i);
|
|
1506
|
+
}, l.setAttribute("loading", ""), l;
|
|
1507
1507
|
}, K = F({
|
|
1508
1508
|
name: "DocumentEditor",
|
|
1509
1509
|
props: {
|
|
@@ -1556,58 +1556,58 @@ var L6 = function(t, o) {
|
|
|
1556
1556
|
events_onRequestSelectDocument: Function
|
|
1557
1557
|
},
|
|
1558
1558
|
mounted: function() {
|
|
1559
|
-
var t = this,
|
|
1560
|
-
|
|
1561
|
-
var
|
|
1562
|
-
L6(
|
|
1559
|
+
var t = this, n = this.documentServerUrl;
|
|
1560
|
+
n.endsWith("/") || (n += "/");
|
|
1561
|
+
var o = "".concat(n, "web-apps/apps/api/documents/api.js");
|
|
1562
|
+
L6(o, "onlyoffice-api-script").then(function() {
|
|
1563
1563
|
return t.onLoad();
|
|
1564
1564
|
}).catch(function() {
|
|
1565
1565
|
t.onError(-2);
|
|
1566
1566
|
});
|
|
1567
1567
|
},
|
|
1568
1568
|
unmounted: function() {
|
|
1569
|
-
var t,
|
|
1570
|
-
!((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[
|
|
1569
|
+
var t, n = this.id || "";
|
|
1570
|
+
!((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[n] && (window.DocEditor.instances[n].destroyEditor(), window.DocEditor.instances[n] = void 0);
|
|
1571
1571
|
},
|
|
1572
1572
|
watch: {
|
|
1573
1573
|
config: {
|
|
1574
|
-
handler: function(t,
|
|
1574
|
+
handler: function(t, n) {
|
|
1575
1575
|
this.onChangeProps();
|
|
1576
1576
|
},
|
|
1577
1577
|
deep: !0
|
|
1578
1578
|
},
|
|
1579
|
-
document_fileType: function(t,
|
|
1579
|
+
document_fileType: function(t, n) {
|
|
1580
1580
|
this.onChangeProps();
|
|
1581
1581
|
},
|
|
1582
|
-
document_title: function(t,
|
|
1582
|
+
document_title: function(t, n) {
|
|
1583
1583
|
this.onChangeProps();
|
|
1584
1584
|
},
|
|
1585
|
-
documentType: function(t,
|
|
1585
|
+
documentType: function(t, n) {
|
|
1586
1586
|
this.onChangeProps();
|
|
1587
1587
|
},
|
|
1588
|
-
editorConfig_lang: function(t,
|
|
1588
|
+
editorConfig_lang: function(t, n) {
|
|
1589
1589
|
this.onChangeProps();
|
|
1590
1590
|
},
|
|
1591
|
-
height: function(t,
|
|
1591
|
+
height: function(t, n) {
|
|
1592
1592
|
this.onChangeProps();
|
|
1593
1593
|
},
|
|
1594
|
-
type: function(t,
|
|
1594
|
+
type: function(t, n) {
|
|
1595
1595
|
this.onChangeProps();
|
|
1596
1596
|
},
|
|
1597
|
-
width: function(t,
|
|
1597
|
+
width: function(t, n) {
|
|
1598
1598
|
this.onChangeProps();
|
|
1599
1599
|
}
|
|
1600
1600
|
},
|
|
1601
1601
|
methods: {
|
|
1602
1602
|
onLoad: function() {
|
|
1603
|
-
var t,
|
|
1603
|
+
var t, n;
|
|
1604
1604
|
try {
|
|
1605
|
-
var
|
|
1606
|
-
if (window.DocsAPI || this.onError(-3), !((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[
|
|
1607
|
-
console.log("Skip loading. Instance already exists",
|
|
1605
|
+
var o = this.id || "";
|
|
1606
|
+
if (window.DocsAPI || this.onError(-3), !((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[o]) {
|
|
1607
|
+
console.log("Skip loading. Instance already exists", o);
|
|
1608
1608
|
return;
|
|
1609
1609
|
}
|
|
1610
|
-
!((
|
|
1610
|
+
!((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances || (window.DocEditor = { instances: {} });
|
|
1611
1611
|
var e = Object.assign({
|
|
1612
1612
|
document: {
|
|
1613
1613
|
fileType: this.document_fileType,
|
|
@@ -1643,38 +1643,38 @@ var L6 = function(t, o) {
|
|
|
1643
1643
|
height: this.height,
|
|
1644
1644
|
type: this.type,
|
|
1645
1645
|
width: this.width
|
|
1646
|
-
}, this.config || {}),
|
|
1647
|
-
window.DocEditor.instances[
|
|
1646
|
+
}, this.config || {}), l = window.DocsAPI.DocEditor(o, e);
|
|
1647
|
+
window.DocEditor.instances[o] = l;
|
|
1648
1648
|
} catch (i) {
|
|
1649
1649
|
console.error(i), this.onError(-1);
|
|
1650
1650
|
}
|
|
1651
1651
|
},
|
|
1652
1652
|
onError: function(t) {
|
|
1653
|
-
var
|
|
1653
|
+
var n;
|
|
1654
1654
|
switch (t) {
|
|
1655
1655
|
case -2:
|
|
1656
|
-
|
|
1656
|
+
n = "Error load DocsAPI from " + this.documentServerUrl;
|
|
1657
1657
|
break;
|
|
1658
1658
|
case -3:
|
|
1659
|
-
|
|
1659
|
+
n = "DocsAPI is not defined";
|
|
1660
1660
|
break;
|
|
1661
1661
|
default:
|
|
1662
|
-
|
|
1662
|
+
n = "Unknown error loading component", t = -1;
|
|
1663
1663
|
}
|
|
1664
|
-
typeof this.onLoadComponentError > "u" ? console.error(
|
|
1664
|
+
typeof this.onLoadComponentError > "u" ? console.error(n) : this.onLoadComponentError(t, n);
|
|
1665
1665
|
},
|
|
1666
1666
|
onAppReady: function() {
|
|
1667
1667
|
var t = this.id || "";
|
|
1668
1668
|
this.events_onAppReady(window.DocEditor.instances[t]);
|
|
1669
1669
|
},
|
|
1670
1670
|
onChangeProps: function() {
|
|
1671
|
-
var t,
|
|
1672
|
-
!((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[
|
|
1671
|
+
var t, n = this.id || "";
|
|
1672
|
+
!((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances[n] && (window.DocEditor.instances[n].destroyEditor(), window.DocEditor.instances[n] = void 0, console.log("Important props have been changed. Load new Editor."), this.onLoad());
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
});
|
|
1676
1676
|
const N6 = ["id"];
|
|
1677
|
-
function W6(t,
|
|
1677
|
+
function W6(t, n, o, e, l, i) {
|
|
1678
1678
|
return c(), u("div", { id: t.id }, null, 8, N6);
|
|
1679
1679
|
}
|
|
1680
1680
|
K.render = W6;
|
|
@@ -1700,25 +1700,25 @@ const K6 = /* @__PURE__ */ F({
|
|
|
1700
1700
|
}
|
|
1701
1701
|
},
|
|
1702
1702
|
setup(t) {
|
|
1703
|
-
const
|
|
1703
|
+
const n = t, o = q({
|
|
1704
1704
|
width: "100%",
|
|
1705
1705
|
height: "100%",
|
|
1706
|
-
...
|
|
1707
|
-
...
|
|
1706
|
+
...n.configOptions || {},
|
|
1707
|
+
...n.configOptions
|
|
1708
1708
|
}), e = () => {
|
|
1709
|
-
console.info("文档加载完成",
|
|
1709
|
+
console.info("文档加载完成", n.configOptions);
|
|
1710
1710
|
};
|
|
1711
|
-
return (
|
|
1711
|
+
return (l, i) => (c(), u(
|
|
1712
1712
|
"div",
|
|
1713
1713
|
{
|
|
1714
|
-
style: z({ height:
|
|
1714
|
+
style: z({ height: n.officeHeight })
|
|
1715
1715
|
},
|
|
1716
1716
|
[
|
|
1717
1717
|
k(g(K), {
|
|
1718
1718
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
1719
1719
|
ref: "editorRef",
|
|
1720
1720
|
"document-server-url": t.documentServerUrl,
|
|
1721
|
-
config:
|
|
1721
|
+
config: o.value,
|
|
1722
1722
|
events_onDocumentReady: e
|
|
1723
1723
|
}, null, 8, ["id", "document-server-url", "config"])
|
|
1724
1724
|
],
|
|
@@ -1786,55 +1786,55 @@ const G6 = /* @__PURE__ */ U(K6, [["__scopeId", "data-v-98d51ef9"]]), X6 = E(G6)
|
|
|
1786
1786
|
}
|
|
1787
1787
|
},
|
|
1788
1788
|
setup(t) {
|
|
1789
|
-
i3((
|
|
1789
|
+
i3((l) => ({
|
|
1790
1790
|
acbb9d0c: e.value
|
|
1791
1791
|
}));
|
|
1792
|
-
const
|
|
1792
|
+
const n = t, o = {
|
|
1793
1793
|
id: "id",
|
|
1794
1794
|
value: "value",
|
|
1795
1795
|
props: "props",
|
|
1796
1796
|
label: "label",
|
|
1797
1797
|
tag: "tag",
|
|
1798
1798
|
fileList: "fileList",
|
|
1799
|
-
...
|
|
1800
|
-
}, e = m(() => typeof
|
|
1801
|
-
return (
|
|
1802
|
-
const
|
|
1799
|
+
...n.fileField
|
|
1800
|
+
}, e = m(() => typeof n.labelWidth == "number" ? `${n.labelWidth}px` : n.labelWidth);
|
|
1801
|
+
return (l, i) => {
|
|
1802
|
+
const s = $("el-descriptions-item"), v = $("el-descriptions");
|
|
1803
1803
|
return c(), b(
|
|
1804
|
-
|
|
1805
|
-
N({ class: "margin-top" }, { ...t.titleProps, ...
|
|
1804
|
+
v,
|
|
1805
|
+
N({ class: "margin-top" }, { ...t.titleProps, ...n }),
|
|
1806
1806
|
{
|
|
1807
1807
|
extra: y(() => [
|
|
1808
|
-
C(
|
|
1808
|
+
C(l.$slots, "extra", {}, void 0, !0)
|
|
1809
1809
|
]),
|
|
1810
1810
|
default: y(() => [
|
|
1811
1811
|
(c(!0), u(
|
|
1812
1812
|
M,
|
|
1813
1813
|
null,
|
|
1814
1814
|
L(t.listData, (f) => (c(), b(
|
|
1815
|
-
|
|
1815
|
+
s,
|
|
1816
1816
|
N({
|
|
1817
|
-
key: f[
|
|
1817
|
+
key: f[o.id],
|
|
1818
1818
|
ref_for: !0
|
|
1819
|
-
}, f[
|
|
1819
|
+
}, f[o.props]),
|
|
1820
1820
|
{
|
|
1821
1821
|
label: y(() => [
|
|
1822
|
-
C(
|
|
1822
|
+
C(l.$slots, f[o.label], {}, () => [
|
|
1823
1823
|
H(
|
|
1824
|
-
V(f[
|
|
1824
|
+
V(f[o.label]),
|
|
1825
1825
|
1
|
|
1826
1826
|
/* TEXT */
|
|
1827
1827
|
)
|
|
1828
1828
|
], !0)
|
|
1829
1829
|
]),
|
|
1830
1830
|
default: y(() => [
|
|
1831
|
-
C(
|
|
1831
|
+
C(l.$slots, `${f[o.label]}_value`, {}, () => [
|
|
1832
1832
|
H(
|
|
1833
|
-
V(f[
|
|
1833
|
+
V(f[o.value]) + " ",
|
|
1834
1834
|
1
|
|
1835
1835
|
/* TEXT */
|
|
1836
1836
|
),
|
|
1837
|
-
f[
|
|
1837
|
+
f[o.tag] ? (c(), b(
|
|
1838
1838
|
g(l3),
|
|
1839
1839
|
{
|
|
1840
1840
|
key: 0,
|
|
@@ -1843,7 +1843,7 @@ const G6 = /* @__PURE__ */ U(K6, [["__scopeId", "data-v-98d51ef9"]]), X6 = E(G6)
|
|
|
1843
1843
|
{
|
|
1844
1844
|
default: y(() => [
|
|
1845
1845
|
H(
|
|
1846
|
-
V(f[
|
|
1846
|
+
V(f[o.value].value),
|
|
1847
1847
|
1
|
|
1848
1848
|
/* TEXT */
|
|
1849
1849
|
)
|
|
@@ -1855,7 +1855,7 @@ const G6 = /* @__PURE__ */ U(K6, [["__scopeId", "data-v-98d51ef9"]]), X6 = E(G6)
|
|
|
1855
1855
|
/* DYNAMIC_SLOTS */
|
|
1856
1856
|
)) : I("v-if", !0),
|
|
1857
1857
|
k(g(b6), {
|
|
1858
|
-
list: f[
|
|
1858
|
+
list: f[o.fileList],
|
|
1859
1859
|
field: t.fileField,
|
|
1860
1860
|
"load-url": t.loadUrl,
|
|
1861
1861
|
"kk-url": t.kkUrl,
|
|
@@ -1886,8 +1886,8 @@ const G6 = /* @__PURE__ */ U(K6, [["__scopeId", "data-v-98d51ef9"]]), X6 = E(G6)
|
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
1888
|
});
|
|
1889
|
-
const Z6 = /* @__PURE__ */ U(Y6, [["__scopeId", "data-v-a33bc2ce"]]),
|
|
1889
|
+
const Z6 = /* @__PURE__ */ U(Y6, [["__scopeId", "data-v-a33bc2ce"]]), ne = E(Z6);
|
|
1890
1890
|
export {
|
|
1891
|
-
|
|
1892
|
-
|
|
1891
|
+
ne as IkDescriptions,
|
|
1892
|
+
ne as default
|
|
1893
1893
|
};
|