iking-web-ui-pro 0.2.0 → 0.2.2
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 +329 -373
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +381 -425
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +231 -275
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +422 -466
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkOnlyOffice/ik.index.es.js +80 -127
- package/dist/IkOnlyOffice/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +144 -188
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkTemplateOfficeConfig/ik.index.es.js +194 -241
- package/dist/IkTemplateOfficeConfig/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/ik.index.es.js +314 -352
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/index.es.js +5064 -5102
- package/dist/index.umd.js +56 -56
- package/dist/src/components/IkOnlyOffice/index.d.ts +0 -18
- package/dist/src/components/IkOnlyOffice/src/IkOnlyOffice.vue.d.ts +0 -18
- package/dist/src/components/IkUploadFile/index.d.ts +19 -0
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +9 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
2
|
-
import { ikColor as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as F, resolveComponent as z, openBlock as l, createElementBlock as d, normalizeClass as w, normalizeStyle as v, createCommentVNode as S, createElementVNode as I, createBlock as _, withCtx as g, createTextVNode as B, toDisplayString as $, createVNode as D, unref as y, mergeModels as L, useModel as H, ref as x, h as N, mergeProps as X, createSlots as Y, renderSlot as C, reactive as G, watch as K, nextTick as J, Fragment as Q } from "vue";
|
|
2
|
+
import { ikColor as Z, buildUUID as ee } from "iking-utils-pro";
|
|
3
|
+
const q = (n, e) => {
|
|
4
4
|
if (n.install = (o) => {
|
|
5
5
|
for (const r of [n, ...Object.values(e ?? {})])
|
|
6
6
|
o.component(r.name, r);
|
|
@@ -8,14 +8,14 @@ const x = (n, e) => {
|
|
|
8
8
|
for (const [o, r] of Object.entries(e))
|
|
9
9
|
n[o] = r;
|
|
10
10
|
return n;
|
|
11
|
-
},
|
|
11
|
+
}, j = (n, e) => e ? e.startsWith("http") ? e : `${n || location.origin}${e}` : "", V = (n, e) => {
|
|
12
12
|
const o = n.__vccOpts || n;
|
|
13
13
|
for (const [r, t] of e)
|
|
14
14
|
o[r] = t;
|
|
15
15
|
return o;
|
|
16
|
-
},
|
|
17
|
-
var i, a,
|
|
18
|
-
const o = (i = n == null ? void 0 : n.response) != null && i.data ?
|
|
16
|
+
}, te = (n, e) => {
|
|
17
|
+
var i, a, u, p;
|
|
18
|
+
const o = (i = n == null ? void 0 : n.response) != null && i.data ? M((u = (a = n == null ? void 0 : n.response) == null ? void 0 : a.data) == null ? void 0 : u.suffix) : ((p = n.raw) == null ? void 0 : p.type) || M(n[e.suffix]), r = o == null ? void 0 : o.toLowerCase(), t = {
|
|
19
19
|
sheet: "excel",
|
|
20
20
|
excel: "excel",
|
|
21
21
|
zip: "zip",
|
|
@@ -35,7 +35,7 @@ const x = (n, e) => {
|
|
|
35
35
|
if (typeof r == "string" && (r.includes(s) || r === s))
|
|
36
36
|
return t[s];
|
|
37
37
|
return "unknown";
|
|
38
|
-
},
|
|
38
|
+
}, ne = {
|
|
39
39
|
".doc": "word",
|
|
40
40
|
".docx": "word",
|
|
41
41
|
".docxf": "word",
|
|
@@ -120,24 +120,24 @@ const x = (n, e) => {
|
|
|
120
120
|
".vob": "video",
|
|
121
121
|
".txt": "txt",
|
|
122
122
|
".pdf": "pdf"
|
|
123
|
-
},
|
|
123
|
+
}, M = (n) => {
|
|
124
124
|
const e = n == null ? void 0 : n.toLocaleLowerCase(), o = e != null && e.startsWith(".") ? e : `.${e}`;
|
|
125
|
-
return o &&
|
|
126
|
-
},
|
|
125
|
+
return o && ne[o] || "unknow";
|
|
126
|
+
}, oe = (n) => {
|
|
127
127
|
let e = "", o = ["doc", "docx"], r = ["xls", "xlsx"], t = ["ppt", "pptx"], i = ["pdf"];
|
|
128
128
|
return o.includes(n) && (e = "word"), r.includes(n) && (e = "cell"), t.includes(n) && (e = "slide"), i.includes(n) && (e = "text-pdf"), e;
|
|
129
|
-
},
|
|
129
|
+
}, ie = {
|
|
130
130
|
key: 0,
|
|
131
131
|
class: "ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"
|
|
132
|
-
},
|
|
132
|
+
}, se = {
|
|
133
133
|
key: 1,
|
|
134
134
|
class: "h-[1em] w-[1em]",
|
|
135
135
|
"aria-hidden": "true"
|
|
136
|
-
},
|
|
136
|
+
}, re = ["xlink:href"], ae = ["src"], le = {
|
|
137
137
|
key: 1,
|
|
138
138
|
class: "h-[1em] w-[1em]",
|
|
139
139
|
"aria-hidden": "true"
|
|
140
|
-
},
|
|
140
|
+
}, ce = ["xlink:href"], ue = ["src"], de = /* @__PURE__ */ h({
|
|
141
141
|
name: "IkSvgIcon",
|
|
142
142
|
__name: "index",
|
|
143
143
|
props: {
|
|
@@ -164,10 +164,10 @@ const x = (n, e) => {
|
|
|
164
164
|
tableIconType: { default: "icon" }
|
|
165
165
|
},
|
|
166
166
|
setup(n) {
|
|
167
|
-
const e = n, o =
|
|
167
|
+
const e = n, o = F(() => {
|
|
168
168
|
var t, i, a;
|
|
169
169
|
return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : (t = e.name) != null && t.startsWith("iksig") ? "iksig" : (i = e.name) != null && i.includes(":") ? "iconify" : (a = e.name) != null && a.startsWith("iksvg") ? "svg" : "i";
|
|
170
|
-
}), r =
|
|
170
|
+
}), r = F(() => {
|
|
171
171
|
const t = [];
|
|
172
172
|
if (e.flip)
|
|
173
173
|
switch (e.flip) {
|
|
@@ -189,19 +189,19 @@ const x = (n, e) => {
|
|
|
189
189
|
padding: e.showBg || e.bg ? e.padding : 0,
|
|
190
190
|
...e.color && o.value !== "iksig" ? {
|
|
191
191
|
"--ik-color-icon-dark": e.color,
|
|
192
|
-
"--ik-color-icon-light": e.colorLight ||
|
|
192
|
+
"--ik-color-icon-light": e.colorLight || Z.setOpacity(e.color, e.opacity)
|
|
193
193
|
} : {}
|
|
194
194
|
};
|
|
195
195
|
return e.width && (i.width = i.height = typeof e.width == "number" ? `${e.width}px` : e.width), i;
|
|
196
196
|
});
|
|
197
197
|
return (t, i) => {
|
|
198
|
-
const a =
|
|
199
|
-
return t.tableIconType === "icon" ? (l(),
|
|
200
|
-
t.notip || !t.title ? (l(),
|
|
198
|
+
const a = z("el-tooltip"), u = z("el-button");
|
|
199
|
+
return t.tableIconType === "icon" ? (l(), d("span", ie, [
|
|
200
|
+
t.notip || !t.title ? (l(), d(
|
|
201
201
|
"i",
|
|
202
202
|
{
|
|
203
203
|
key: 0,
|
|
204
|
-
class:
|
|
204
|
+
class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
205
205
|
[t.name]: o.value === "unocss",
|
|
206
206
|
"show-bg": t.showBg || t.bg,
|
|
207
207
|
default: t.size === "default",
|
|
@@ -218,29 +218,29 @@ const x = (n, e) => {
|
|
|
218
218
|
},
|
|
219
219
|
[
|
|
220
220
|
S(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
221
|
-
o.value === "iksig" ? (l(),
|
|
221
|
+
o.value === "iksig" ? (l(), d(
|
|
222
222
|
"i",
|
|
223
223
|
{
|
|
224
224
|
key: 0,
|
|
225
|
-
class:
|
|
225
|
+
class: w(`iksig ${t.name}`),
|
|
226
226
|
style: v(r.value)
|
|
227
227
|
},
|
|
228
228
|
null,
|
|
229
229
|
6
|
|
230
230
|
/* CLASS, STYLE */
|
|
231
|
-
)) : o.value === "svg" ? (l(),
|
|
232
|
-
|
|
231
|
+
)) : o.value === "svg" ? (l(), d("svg", se, [
|
|
232
|
+
I("use", {
|
|
233
233
|
"xlink:href": `#${t.name}`
|
|
234
|
-
}, null, 8,
|
|
235
|
-
])) : o.value === "img" ? (l(),
|
|
234
|
+
}, null, 8, re)
|
|
235
|
+
])) : o.value === "img" ? (l(), d("img", {
|
|
236
236
|
key: 2,
|
|
237
237
|
src: t.name,
|
|
238
238
|
class: "h-[1em] w-[1em]"
|
|
239
|
-
}, null, 8,
|
|
239
|
+
}, null, 8, ae)) : (l(), d(
|
|
240
240
|
"i",
|
|
241
241
|
{
|
|
242
242
|
key: 3,
|
|
243
|
-
class:
|
|
243
|
+
class: w(t.name),
|
|
244
244
|
style: v(r.value)
|
|
245
245
|
},
|
|
246
246
|
null,
|
|
@@ -250,16 +250,16 @@ const x = (n, e) => {
|
|
|
250
250
|
],
|
|
251
251
|
6
|
|
252
252
|
/* CLASS, STYLE */
|
|
253
|
-
)) : (l(),
|
|
253
|
+
)) : (l(), _(a, {
|
|
254
254
|
key: 1,
|
|
255
255
|
content: t.title,
|
|
256
256
|
placement: "top"
|
|
257
257
|
}, {
|
|
258
258
|
default: g(() => [
|
|
259
|
-
|
|
259
|
+
I(
|
|
260
260
|
"i",
|
|
261
261
|
{
|
|
262
|
-
class:
|
|
262
|
+
class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
263
263
|
[t.name]: o.value === "unocss",
|
|
264
264
|
"show-bg": t.showBg || t.bg,
|
|
265
265
|
default: t.size === "default",
|
|
@@ -274,29 +274,29 @@ const x = (n, e) => {
|
|
|
274
274
|
style: v(r.value)
|
|
275
275
|
},
|
|
276
276
|
[
|
|
277
|
-
o.value === "iksig" ? (l(),
|
|
277
|
+
o.value === "iksig" ? (l(), d(
|
|
278
278
|
"i",
|
|
279
279
|
{
|
|
280
280
|
key: 0,
|
|
281
|
-
class:
|
|
281
|
+
class: w(`iksig ${t.name}`),
|
|
282
282
|
style: v(r.value)
|
|
283
283
|
},
|
|
284
284
|
null,
|
|
285
285
|
6
|
|
286
286
|
/* CLASS, STYLE */
|
|
287
|
-
)) : o.value === "svg" ? (l(),
|
|
288
|
-
|
|
287
|
+
)) : o.value === "svg" ? (l(), d("svg", le, [
|
|
288
|
+
I("use", {
|
|
289
289
|
"xlink:href": `#${t.name}`
|
|
290
|
-
}, null, 8,
|
|
291
|
-
])) : o.value === "img" ? (l(),
|
|
290
|
+
}, null, 8, ce)
|
|
291
|
+
])) : o.value === "img" ? (l(), d("img", {
|
|
292
292
|
key: 2,
|
|
293
293
|
src: t.name,
|
|
294
294
|
class: "h-[1em] w-[1em]"
|
|
295
|
-
}, null, 8,
|
|
295
|
+
}, null, 8, ue)) : (l(), d(
|
|
296
296
|
"i",
|
|
297
297
|
{
|
|
298
298
|
key: 3,
|
|
299
|
-
class:
|
|
299
|
+
class: w(t.name),
|
|
300
300
|
style: v(r.value)
|
|
301
301
|
},
|
|
302
302
|
null,
|
|
@@ -311,13 +311,13 @@ const x = (n, e) => {
|
|
|
311
311
|
_: 1
|
|
312
312
|
/* STABLE */
|
|
313
313
|
}, 8, ["content"]))
|
|
314
|
-
])) : (l(),
|
|
314
|
+
])) : (l(), _(u, {
|
|
315
315
|
key: 1,
|
|
316
316
|
type: ["warning", "error"].includes(t.type) ? "danger" : ""
|
|
317
317
|
}, {
|
|
318
318
|
default: g(() => [
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
B(
|
|
320
|
+
$(t.title),
|
|
321
321
|
1
|
|
322
322
|
/* TEXT */
|
|
323
323
|
)
|
|
@@ -328,10 +328,10 @@ const x = (n, e) => {
|
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
|
-
const
|
|
331
|
+
const pe = /* @__PURE__ */ V(de, [["__scopeId", "data-v-7d95dbf5"]]), O = q(pe), fe = {
|
|
332
332
|
key: 0,
|
|
333
333
|
class: "exit-main-page-maximize"
|
|
334
|
-
},
|
|
334
|
+
}, me = /* @__PURE__ */ h({
|
|
335
335
|
__name: "CloseIcon",
|
|
336
336
|
props: {
|
|
337
337
|
showBg: {
|
|
@@ -344,15 +344,15 @@ const le = /* @__PURE__ */ $(ae, [["__scopeId", "data-v-7d95dbf5"]]), B = x(le),
|
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
346
|
setup(n) {
|
|
347
|
-
return (e, o) => (l(),
|
|
348
|
-
n.showBg && n.fullscreen ? (l(),
|
|
349
|
-
|
|
347
|
+
return (e, o) => (l(), d("div", null, [
|
|
348
|
+
n.showBg && n.fullscreen ? (l(), d("div", fe, [
|
|
349
|
+
D(y(O), {
|
|
350
350
|
name: "iksvg_guanbidanchuang",
|
|
351
351
|
title: "关闭",
|
|
352
352
|
size: 20,
|
|
353
353
|
error: ""
|
|
354
354
|
})
|
|
355
|
-
])) : (l(),
|
|
355
|
+
])) : (l(), _(y(O), {
|
|
356
356
|
key: 1,
|
|
357
357
|
error: "",
|
|
358
358
|
name: "iksvg_guanbidanchuang",
|
|
@@ -362,9 +362,9 @@ const le = /* @__PURE__ */ $(ae, [["__scopeId", "data-v-7d95dbf5"]]), B = x(le),
|
|
|
362
362
|
]));
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
|
-
const
|
|
365
|
+
const ve = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ge = { class: "base-header" }, he = /* @__PURE__ */ h({
|
|
366
366
|
__name: "IkBaseDialog",
|
|
367
|
-
props: /* @__PURE__ */
|
|
367
|
+
props: /* @__PURE__ */ L({
|
|
368
368
|
title: { default: "" },
|
|
369
369
|
cancelText: { default: "取消" },
|
|
370
370
|
confirmText: { default: "确认" },
|
|
@@ -383,47 +383,47 @@ const de = /* @__PURE__ */ $(ue, [["__scopeId", "data-v-79f49df8"]]), pe = { cla
|
|
|
383
383
|
}),
|
|
384
384
|
emits: ["update:modelValue"],
|
|
385
385
|
setup(n) {
|
|
386
|
-
const e = n, o =
|
|
386
|
+
const e = n, o = H(n, "modelValue"), r = x(e.fullscreen), t = () => {
|
|
387
387
|
r.value = !r.value;
|
|
388
388
|
}, i = h({
|
|
389
389
|
setup() {
|
|
390
|
-
return () =>
|
|
390
|
+
return () => N(ve, {
|
|
391
391
|
showBg: e.showCloseBg,
|
|
392
392
|
fullscreen: e.fullscreen
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
-
return (a,
|
|
397
|
-
const p =
|
|
398
|
-
return l(),
|
|
396
|
+
return (a, u) => {
|
|
397
|
+
const p = z("el-dialog");
|
|
398
|
+
return l(), _(p, X({
|
|
399
399
|
modelValue: o.value,
|
|
400
|
-
"onUpdate:modelValue":
|
|
400
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s)
|
|
401
401
|
}, a.$attrs, {
|
|
402
402
|
"close-icon": y(i),
|
|
403
403
|
class: `ik-base-dialog ${a.noHeader ? "no-header" : ""} ${a.noFooter ? "no-footer" : ""}`,
|
|
404
404
|
fullscreen: r.value,
|
|
405
405
|
"modal-class": "baseDialog"
|
|
406
|
-
}),
|
|
406
|
+
}), Y({
|
|
407
407
|
icon: g(() => [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
C(a.$slots, "title", {}, () => [
|
|
409
|
+
B(
|
|
410
|
+
$(a.title),
|
|
411
411
|
1
|
|
412
412
|
/* TEXT */
|
|
413
413
|
)
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
416
|
header: g(() => [
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
417
|
+
I("div", ge, [
|
|
418
|
+
C(a.$slots, "header", {}, () => [
|
|
419
|
+
B(
|
|
420
|
+
$(a.title),
|
|
421
421
|
1
|
|
422
422
|
/* TEXT */
|
|
423
423
|
)
|
|
424
424
|
])
|
|
425
425
|
]),
|
|
426
|
-
a.$attrs.showClose ? (l(),
|
|
426
|
+
a.$attrs.showClose ? (l(), _(y(O), {
|
|
427
427
|
key: 0,
|
|
428
428
|
onClick: t,
|
|
429
429
|
name: r.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
|
|
@@ -432,7 +432,7 @@ const de = /* @__PURE__ */ $(ue, [["__scopeId", "data-v-79f49df8"]]), pe = { cla
|
|
|
432
432
|
}, null, 8, ["name", "title"])) : S("v-if", !0)
|
|
433
433
|
]),
|
|
434
434
|
default: g(() => [
|
|
435
|
-
|
|
435
|
+
C(a.$slots, "default")
|
|
436
436
|
]),
|
|
437
437
|
_: 2
|
|
438
438
|
/* DYNAMIC */
|
|
@@ -440,7 +440,7 @@ const de = /* @__PURE__ */ $(ue, [["__scopeId", "data-v-79f49df8"]]), pe = { cla
|
|
|
440
440
|
a.$slots.footer ? {
|
|
441
441
|
name: "footer",
|
|
442
442
|
fn: g(() => [
|
|
443
|
-
|
|
443
|
+
C(a.$slots, "footer")
|
|
444
444
|
]),
|
|
445
445
|
key: "0"
|
|
446
446
|
} : void 0
|
|
@@ -448,46 +448,46 @@ const de = /* @__PURE__ */ $(ue, [["__scopeId", "data-v-79f49df8"]]), pe = { cla
|
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
-
const
|
|
452
|
-
function
|
|
451
|
+
const ye = q(he);
|
|
452
|
+
function we(n, e, o, r) {
|
|
453
453
|
function t(i) {
|
|
454
454
|
return i instanceof o ? i : new o(function(a) {
|
|
455
455
|
a(i);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
return new (o || (o = Promise))(function(i, a) {
|
|
459
|
-
function c
|
|
459
|
+
function u(c) {
|
|
460
460
|
try {
|
|
461
|
-
s(r.next(
|
|
461
|
+
s(r.next(c));
|
|
462
462
|
} catch (m) {
|
|
463
463
|
a(m);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function p(
|
|
466
|
+
function p(c) {
|
|
467
467
|
try {
|
|
468
|
-
s(r.throw(
|
|
468
|
+
s(r.throw(c));
|
|
469
469
|
} catch (m) {
|
|
470
470
|
a(m);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
function s(
|
|
474
|
-
|
|
473
|
+
function s(c) {
|
|
474
|
+
c.done ? i(c.value) : t(c.value).then(u, p);
|
|
475
475
|
}
|
|
476
476
|
s((r = r.apply(n, e || [])).next());
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function _e(n, e) {
|
|
480
480
|
var o = { label: 0, sent: function() {
|
|
481
481
|
if (i[0] & 1)
|
|
482
482
|
throw i[1];
|
|
483
483
|
return i[1];
|
|
484
484
|
}, trys: [], ops: [] }, r, t, i, a;
|
|
485
|
-
return a = { next:
|
|
485
|
+
return a = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
486
486
|
return this;
|
|
487
487
|
}), a;
|
|
488
|
-
function
|
|
489
|
-
return function(
|
|
490
|
-
return p([s,
|
|
488
|
+
function u(s) {
|
|
489
|
+
return function(c) {
|
|
490
|
+
return p([s, c]);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
function p(s) {
|
|
@@ -531,8 +531,8 @@ function ge(n, e) {
|
|
|
531
531
|
continue;
|
|
532
532
|
}
|
|
533
533
|
s = e.call(n, o);
|
|
534
|
-
} catch (
|
|
535
|
-
s = [6,
|
|
534
|
+
} catch (c) {
|
|
535
|
+
s = [6, c], t = 0;
|
|
536
536
|
} finally {
|
|
537
537
|
r = i = 0;
|
|
538
538
|
}
|
|
@@ -541,9 +541,9 @@ function ge(n, e) {
|
|
|
541
541
|
return { value: s[0] ? s[1] : void 0, done: !0 };
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
var
|
|
545
|
-
return
|
|
546
|
-
return
|
|
544
|
+
var ke = function(n, e) {
|
|
545
|
+
return we(void 0, void 0, void 0, function() {
|
|
546
|
+
return _e(this, function(o) {
|
|
547
547
|
return [2, new Promise(function(r, t) {
|
|
548
548
|
try {
|
|
549
549
|
if (window.DocsAPI)
|
|
@@ -555,13 +555,13 @@ var he = function(n, e) {
|
|
|
555
555
|
if (!p) {
|
|
556
556
|
if (clearInterval(a), window.DocsAPI)
|
|
557
557
|
return r(null);
|
|
558
|
-
var s =
|
|
558
|
+
var s = U(e, n, r, t);
|
|
559
559
|
i.remove(), document.body.appendChild(s);
|
|
560
560
|
}
|
|
561
561
|
}, 500);
|
|
562
562
|
else {
|
|
563
|
-
var
|
|
564
|
-
document.body.appendChild(
|
|
563
|
+
var u = U(e, n, r, t);
|
|
564
|
+
document.body.appendChild(u);
|
|
565
565
|
}
|
|
566
566
|
} catch (p) {
|
|
567
567
|
console.error(p);
|
|
@@ -569,14 +569,14 @@ var he = function(n, e) {
|
|
|
569
569
|
})];
|
|
570
570
|
});
|
|
571
571
|
});
|
|
572
|
-
},
|
|
572
|
+
}, U = function(n, e, o, r) {
|
|
573
573
|
var t = document.createElement("script");
|
|
574
574
|
return t.id = n, t.type = "text/javascript", t.src = e, t.async = !0, t.onload = function() {
|
|
575
575
|
t.removeAttribute("loading"), o(null);
|
|
576
576
|
}, t.onerror = function(i) {
|
|
577
577
|
t.removeAttribute("loading"), r(i);
|
|
578
578
|
}, t.setAttribute("loading", ""), t;
|
|
579
|
-
},
|
|
579
|
+
}, T = h({
|
|
580
580
|
name: "DocumentEditor",
|
|
581
581
|
props: {
|
|
582
582
|
id: {
|
|
@@ -631,7 +631,7 @@ var he = function(n, e) {
|
|
|
631
631
|
var n = this, e = this.documentServerUrl;
|
|
632
632
|
e.endsWith("/") || (e += "/");
|
|
633
633
|
var o = "".concat(e, "web-apps/apps/api/documents/api.js");
|
|
634
|
-
|
|
634
|
+
ke(o, "onlyoffice-api-script").then(function() {
|
|
635
635
|
return n.onLoad();
|
|
636
636
|
}).catch(function() {
|
|
637
637
|
n.onError(-2);
|
|
@@ -745,13 +745,13 @@ var he = function(n, e) {
|
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
747
|
});
|
|
748
|
-
const
|
|
749
|
-
function
|
|
750
|
-
return l(),
|
|
748
|
+
const be = ["id"];
|
|
749
|
+
function Re(n, e, o, r, t, i) {
|
|
750
|
+
return l(), d("div", { id: n.id }, null, 8, be);
|
|
751
751
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const
|
|
752
|
+
T.render = Re;
|
|
753
|
+
T.__file = "src/components/DocumentEditor.vue";
|
|
754
|
+
const Se = /* @__PURE__ */ h({
|
|
755
755
|
__name: "IkOnlyOffice",
|
|
756
756
|
props: {
|
|
757
757
|
// 文件服务器的服务的地址
|
|
@@ -759,80 +759,33 @@ const _e = /* @__PURE__ */ h({
|
|
|
759
759
|
type: String,
|
|
760
760
|
default: ""
|
|
761
761
|
},
|
|
762
|
-
// 当前onlyoffice的模式 (edit 编辑模式 view是查看模式)
|
|
763
|
-
mode: {
|
|
764
|
-
type: String,
|
|
765
|
-
default: ""
|
|
766
|
-
},
|
|
767
762
|
// 配置项
|
|
768
763
|
configOptions: {
|
|
769
764
|
type: Object,
|
|
770
765
|
default: () => {
|
|
771
766
|
}
|
|
772
767
|
},
|
|
773
|
-
//
|
|
768
|
+
// 元素的高度
|
|
774
769
|
officeHeight: {
|
|
775
770
|
type: String,
|
|
776
771
|
default: "100%"
|
|
777
|
-
},
|
|
778
|
-
// 加密后的token
|
|
779
|
-
token: {
|
|
780
|
-
type: String,
|
|
781
|
-
default: ""
|
|
782
772
|
}
|
|
783
773
|
},
|
|
784
774
|
setup(n) {
|
|
785
|
-
|
|
786
|
-
const e = n, o = D({
|
|
775
|
+
const e = n, o = x({
|
|
787
776
|
width: "100%",
|
|
788
777
|
height: "100%",
|
|
789
|
-
|
|
790
|
-
// word cell(表格) slide(PPT)
|
|
791
|
-
documentType: (i = e.configOptions) == null ? void 0 : i.documentType,
|
|
792
|
-
editorConfig: {
|
|
793
|
-
callbackUrl: (c = (a = e.configOptions) == null ? void 0 : a.editorConfig) == null ? void 0 : c.callbackUrl,
|
|
794
|
-
// 保存的回调函数
|
|
795
|
-
lang: "zh-CN",
|
|
796
|
-
mode: e.mode,
|
|
797
|
-
// 强制保存
|
|
798
|
-
customization: {
|
|
799
|
-
forcesave: !0,
|
|
800
|
-
autosave: !0
|
|
801
|
-
}
|
|
802
|
-
},
|
|
803
|
-
// 权限
|
|
804
|
-
permissions: {
|
|
805
|
-
comment: !0,
|
|
806
|
-
commentGroups: {
|
|
807
|
-
edit: ["Group1"],
|
|
808
|
-
remove: ["Group1"],
|
|
809
|
-
view: ""
|
|
810
|
-
},
|
|
811
|
-
copy: !0,
|
|
812
|
-
deleteCommentAuthorOnly: !0,
|
|
813
|
-
download: !0,
|
|
814
|
-
edit: !0,
|
|
815
|
-
editCommentAuthorOnly: !0,
|
|
816
|
-
fillForms: !0,
|
|
817
|
-
modifyContentControl: !0,
|
|
818
|
-
modifyFilter: !0,
|
|
819
|
-
print: !0,
|
|
820
|
-
review: !0,
|
|
821
|
-
reviewGroups: ["Group1", "Group2", "Group3"],
|
|
822
|
-
userInfoGroups: ["Group1"]
|
|
823
|
-
},
|
|
824
|
-
mode: e.mode,
|
|
825
|
-
token: e.token
|
|
778
|
+
...e.configOptions || {}
|
|
826
779
|
}), r = () => {
|
|
827
|
-
console.info("文档加载完成");
|
|
780
|
+
console.info("文档加载完成", e.configOptions);
|
|
828
781
|
};
|
|
829
|
-
return (
|
|
782
|
+
return (t, i) => (l(), d(
|
|
830
783
|
"div",
|
|
831
784
|
{
|
|
832
785
|
style: v({ height: e.officeHeight })
|
|
833
786
|
},
|
|
834
787
|
[
|
|
835
|
-
|
|
788
|
+
D(y(T), {
|
|
836
789
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
837
790
|
ref: "editorRef",
|
|
838
791
|
"document-server-url": n.documentServerUrl,
|
|
@@ -845,9 +798,9 @@ const _e = /* @__PURE__ */ h({
|
|
|
845
798
|
));
|
|
846
799
|
}
|
|
847
800
|
});
|
|
848
|
-
const
|
|
801
|
+
const Ce = /* @__PURE__ */ V(Se, [["__scopeId", "data-v-fe959cd8"]]), Ie = q(Ce), ze = /* @__PURE__ */ h({
|
|
849
802
|
__name: "IkPreviewFileDialog",
|
|
850
|
-
props: /* @__PURE__ */
|
|
803
|
+
props: /* @__PURE__ */ L({
|
|
851
804
|
file: {
|
|
852
805
|
type: Object,
|
|
853
806
|
default: () => []
|
|
@@ -882,78 +835,81 @@ const ke = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-ea0a8f6d"]]), be = x(ke)
|
|
|
882
835
|
}),
|
|
883
836
|
emits: ["update:show"],
|
|
884
837
|
setup(n) {
|
|
885
|
-
const e = n, o =
|
|
838
|
+
const e = n, o = H(n, "show"), r = F(() => ({
|
|
886
839
|
name: "name",
|
|
887
840
|
url: "url",
|
|
888
841
|
suffix: "suffix",
|
|
889
842
|
size: "fileSize",
|
|
890
843
|
...e.field
|
|
891
|
-
})), t =
|
|
844
|
+
})), t = x(null), i = x(null), a = G({
|
|
892
845
|
image: !1,
|
|
893
846
|
office: !1,
|
|
894
847
|
video: !1
|
|
895
|
-
}),
|
|
896
|
-
var
|
|
848
|
+
}), u = (s) => {
|
|
849
|
+
var c, m, k, b, R, A;
|
|
897
850
|
try {
|
|
898
|
-
const
|
|
851
|
+
const f = ((c = s == null ? void 0 : s.response) == null ? void 0 : c.data) || s, P = f[r.value.url] || (f == null ? void 0 : f.id) || f.attachmentId, E = (m = f[r.value.suffix] || f.attachmentSuffix) == null ? void 0 : m.toLowerCase(), W = f[r.value.name] || (f == null ? void 0 : f.attachmentName);
|
|
899
852
|
if (i.value = {
|
|
900
853
|
...s,
|
|
901
854
|
name: s[r.value.name],
|
|
902
|
-
url:
|
|
903
|
-
}, s &&
|
|
855
|
+
url: j(e.loadUrl, P)
|
|
856
|
+
}, s && te(s, r.value) === "image") {
|
|
904
857
|
a.image = !0;
|
|
905
858
|
return;
|
|
906
|
-
} else if (e.onlyOfficeAccept.includes(
|
|
859
|
+
} else if (e.onlyOfficeAccept.includes(E)) {
|
|
907
860
|
a.office = !0, t.value = {
|
|
908
|
-
|
|
909
|
-
document: {
|
|
910
|
-
key: K(),
|
|
911
|
-
title: j,
|
|
912
|
-
url: V(e.loadUrl, b),
|
|
913
|
-
fileType: w
|
|
914
|
-
},
|
|
861
|
+
...e.onlyOfficeConfig,
|
|
915
862
|
editorConfig: {
|
|
863
|
+
...((k = e.onlyOfficeConfig) == null ? void 0 : k.editorConfig) || {},
|
|
916
864
|
customization: {
|
|
865
|
+
...((R = (b = e.onlyOfficeConfig) == null ? void 0 : b.editorConfig) == null ? void 0 : R.customization) || {},
|
|
917
866
|
review: {
|
|
918
867
|
reviewDisplay: "final"
|
|
919
868
|
}
|
|
920
869
|
}
|
|
921
870
|
},
|
|
922
|
-
|
|
871
|
+
document: {
|
|
872
|
+
key: ee(),
|
|
873
|
+
title: W,
|
|
874
|
+
url: j(e.loadUrl, P),
|
|
875
|
+
fileType: E,
|
|
876
|
+
...((A = e.onlyOfficeConfig) == null ? void 0 : A.document) || {}
|
|
877
|
+
},
|
|
878
|
+
documentType: oe(E)
|
|
923
879
|
};
|
|
924
880
|
return;
|
|
925
881
|
}
|
|
926
|
-
} catch (
|
|
927
|
-
console.info("预览错误: ",
|
|
882
|
+
} catch (f) {
|
|
883
|
+
console.info("预览错误: ", f);
|
|
928
884
|
}
|
|
929
885
|
};
|
|
930
|
-
|
|
931
|
-
s &&
|
|
932
|
-
|
|
886
|
+
K([o, e.file], ([s, c]) => {
|
|
887
|
+
s && J(() => {
|
|
888
|
+
u(e.file);
|
|
933
889
|
});
|
|
934
890
|
});
|
|
935
891
|
const p = () => {
|
|
936
892
|
o.value = !1, a.office = !1, a.image = !1, a.video = !1;
|
|
937
893
|
};
|
|
938
|
-
return (s,
|
|
939
|
-
var
|
|
940
|
-
const m =
|
|
941
|
-
return o.value ? (l(),
|
|
942
|
-
|
|
894
|
+
return (s, c) => {
|
|
895
|
+
var k, b;
|
|
896
|
+
const m = z("el-image-viewer");
|
|
897
|
+
return o.value ? (l(), d(
|
|
898
|
+
Q,
|
|
943
899
|
{ key: 0 },
|
|
944
900
|
[
|
|
945
|
-
(
|
|
901
|
+
(k = i.value) != null && k.url && a.image ? (l(), _(m, {
|
|
946
902
|
key: 0,
|
|
947
|
-
onClose:
|
|
903
|
+
onClose: c[0] || (c[0] = (R) => {
|
|
948
904
|
i.value = null, a.image = !1;
|
|
949
905
|
}),
|
|
950
906
|
ref: "previewImgRef",
|
|
951
907
|
"url-list": [(b = i.value) == null ? void 0 : b.url]
|
|
952
908
|
}, null, 8, ["url-list"])) : S("v-if", !0),
|
|
953
909
|
S(" 文档类 "),
|
|
954
|
-
|
|
910
|
+
D(y(ye), {
|
|
955
911
|
modelValue: a.office,
|
|
956
|
-
"onUpdate:modelValue":
|
|
912
|
+
"onUpdate:modelValue": c[1] || (c[1] = (R) => a.office = R),
|
|
957
913
|
draggable: "",
|
|
958
914
|
"no-footer": "",
|
|
959
915
|
"no-header": "",
|
|
@@ -967,7 +923,7 @@ const ke = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-ea0a8f6d"]]), be = x(ke)
|
|
|
967
923
|
"modal-class": "ik-only-preview-dialog"
|
|
968
924
|
}, {
|
|
969
925
|
default: g(() => [
|
|
970
|
-
|
|
926
|
+
D(y(Ie), {
|
|
971
927
|
configOptions: t.value,
|
|
972
928
|
documentServerUrl: n.onlyofficeServer,
|
|
973
929
|
mode: "view"
|
|
@@ -983,8 +939,8 @@ const ke = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-ea0a8f6d"]]), be = x(ke)
|
|
|
983
939
|
};
|
|
984
940
|
}
|
|
985
941
|
});
|
|
986
|
-
const
|
|
942
|
+
const qe = q(ze);
|
|
987
943
|
export {
|
|
988
|
-
|
|
989
|
-
|
|
944
|
+
qe as IkPreviewFileDialog,
|
|
945
|
+
qe as default
|
|
990
946
|
};
|