@work-zhanguo/light-file-preview 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/DocxRenderer-Cck1uOjU.js +110 -0
- package/dist/{PdfRenderer-Due2M5cA.js → PdfRenderer-DweDxjLS.js} +102 -36
- package/dist/SheetRenderer-CMDoDBXR.js +940 -0
- package/dist/{UnsupportedRenderer-Z8yR4DCm.js → UnsupportedRenderer-pjXuzLhC.js} +1 -1
- package/dist/{index-CB4lf4Rv.js → index-AN7FkZtw.js} +1 -1
- package/dist/light-file-preview.js +1 -1
- package/dist/light-file-preview.umd.cjs +67 -67
- package/dist/standalone/light-file-preview.iife.js +71 -71
- package/dist/standalone/style.css +1 -1
- package/dist/style.css +1 -1
- package/dist/vue2/DocxRenderer-DR_4KeGA.js +110 -0
- package/dist/vue2/{PdfRenderer-CANDrYvV.js → PdfRenderer-DNDmJ3M6.js} +102 -36
- package/dist/vue2/SheetRenderer-XW8dLaab.js +940 -0
- package/dist/vue2/{TextRenderer-CFNsDxIx.js → TextRenderer-CQsD7GMD.js} +1 -1
- package/dist/vue2/{UnsupportedRenderer-NMI6uTEn.js → UnsupportedRenderer-fr1iHYbj.js} +3 -3
- package/dist/vue2/light-file-preview-vue2.js +1 -1
- package/dist/vue2/light-file-preview-vue2.umd.cjs +115 -115
- package/dist/vue2/{vue2-n72zoIZI.js → vue2-C42eMKpL.js} +8 -7
- package/package.json +1 -1
- package/dist/DocxRenderer-DogNhBLd.js +0 -42
- package/dist/SheetRenderer-Dr5f9ZTy.js +0 -918
- package/dist/vue2/DocxRenderer-DGXNIVsp.js +0 -42
- package/dist/vue2/SheetRenderer-CM49qq4y.js +0 -918
|
@@ -5820,7 +5820,7 @@ const fa = ["aria-modal"], da = {
|
|
|
5820
5820
|
},
|
|
5821
5821
|
emits: ["update:visible", "error"],
|
|
5822
5822
|
setup(e, { emit: t }) {
|
|
5823
|
-
const n = /* @__PURE__ */ Qt(() => import("./PdfRenderer-
|
|
5823
|
+
const n = /* @__PURE__ */ Qt(() => import("./PdfRenderer-DNDmJ3M6.js")), o = /* @__PURE__ */ Qt(() => import("./TextRenderer-CQsD7GMD.js")), r = /* @__PURE__ */ Qt(() => import("./DocxRenderer-DR_4KeGA.js")), s = /* @__PURE__ */ Qt(() => import("./SheetRenderer-XW8dLaab.js")), i = /* @__PURE__ */ Qt(() => import("./UnsupportedRenderer-fr1iHYbj.js")), l = e, u = t, p = /* @__PURE__ */ ft(null), a = /* @__PURE__ */ ft(!1), f = /* @__PURE__ */ ft(""), h = /* @__PURE__ */ ft(0), m = /* @__PURE__ */ ft(gs(l.source, l.fileName)), O = {
|
|
5824
5824
|
image: "图片",
|
|
5825
5825
|
pdf: "PDF",
|
|
5826
5826
|
text: "文本",
|
|
@@ -6232,19 +6232,20 @@ export {
|
|
|
6232
6232
|
Va as L,
|
|
6233
6233
|
ir as a,
|
|
6234
6234
|
he as b,
|
|
6235
|
-
|
|
6235
|
+
tt as c,
|
|
6236
6236
|
ci as d,
|
|
6237
|
-
|
|
6237
|
+
Ue as e,
|
|
6238
6238
|
ue as f,
|
|
6239
|
-
|
|
6239
|
+
tn as g,
|
|
6240
6240
|
Ta as h,
|
|
6241
6241
|
du as i,
|
|
6242
|
-
|
|
6242
|
+
Yo as j,
|
|
6243
6243
|
aa as k,
|
|
6244
|
-
|
|
6244
|
+
oo as n,
|
|
6245
6245
|
ai as o,
|
|
6246
6246
|
ft as r,
|
|
6247
6247
|
on as t,
|
|
6248
6248
|
Mt as u,
|
|
6249
|
-
Ca as v
|
|
6249
|
+
Ca as v,
|
|
6250
|
+
xt as w
|
|
6250
6251
|
};
|
package/package.json
CHANGED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { defineComponent as s, ref as f, onMounted as u, onBeforeUnmount as d, openBlock as m, createElementBlock as p } from "vue";
|
|
2
|
-
import { r as v } from "./text-Bqxn_tMI.js";
|
|
3
|
-
const x = /* @__PURE__ */ s({
|
|
4
|
-
__name: "DocxRenderer",
|
|
5
|
-
props: {
|
|
6
|
-
source: {}
|
|
7
|
-
},
|
|
8
|
-
emits: ["loading", "error"],
|
|
9
|
-
setup(a, { emit: c }) {
|
|
10
|
-
const i = a, n = c, e = f(null), o = new AbortController();
|
|
11
|
-
async function l() {
|
|
12
|
-
n("loading", !0);
|
|
13
|
-
try {
|
|
14
|
-
const r = await v(i.source, o.signal), { renderAsync: t } = await import("./docx-preview-BV-bQyiM.js");
|
|
15
|
-
if (!e.value)
|
|
16
|
-
return;
|
|
17
|
-
e.value.innerHTML = "", await t(r, e.value, void 0, {
|
|
18
|
-
className: "lfp-docx-content",
|
|
19
|
-
ignoreWidth: !1,
|
|
20
|
-
ignoreHeight: !1,
|
|
21
|
-
useBase64URL: !0
|
|
22
|
-
});
|
|
23
|
-
} catch (r) {
|
|
24
|
-
n("error", r instanceof Error ? r : new Error("DOCX 预览失败"));
|
|
25
|
-
} finally {
|
|
26
|
-
n("loading", !1);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return u(() => {
|
|
30
|
-
l();
|
|
31
|
-
}), d(() => {
|
|
32
|
-
o.abort(), e.value && (e.value.innerHTML = "");
|
|
33
|
-
}), (r, t) => (m(), p("div", {
|
|
34
|
-
ref_key: "containerRef",
|
|
35
|
-
ref: e,
|
|
36
|
-
class: "lfp-document lfp-docx"
|
|
37
|
-
}, null, 512));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
x as default
|
|
42
|
-
};
|