@lingshugroup/web-plus 2.4.0 → 2.4.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/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/icon/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/icon/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/icon/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js +16 -15
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js +54 -39
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +30 -27
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +132 -131
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +33 -30
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +31 -27
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js +132 -116
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +25 -22
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js +124 -108
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.gz +0 -0
- package/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-3a0f2635"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a0f2635"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),r=require("@iconify/vue"),c=/* empty css */t=/* empty css */i=/* empty css */a=e.defineComponent({name:"LSIcon"}),u=e.defineComponent({...a,props:t.lsIconProps,setup(m){const n=e.useSlots(),s=c.useNamespace("icon").b();return(o,p)=>{const l=i.ElIcon;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s))},[o.type==1&&o.name?(e.openBlock(),e.createBlock(e.unref(r.Icon),{key:0,icon:o.name,class:"icon-iconify",width:o.width,height:o.height,color:o.color},null,8,["icon","width","height","color"])):o.type==2&&o.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.name),{key:1,class:"icon-svg",width:o.width,height:o.height,fill:o.color,src:o.src},null,8,["width","height","fill","src"])):o.name?(e.openBlock(),e.createBlock(l,{key:2,size:o.size,color:o.color,class:e.normalizeClass(o.$attrs.class)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.name),{color:o.color},null,8,["color"]))]),_:1},8,["size","color","class"])):e.createCommentVNode("",!0),e.unref(n).default?e.renderSlot(o.$slots,"default",{key:3},void 0,!0):e.createCommentVNode("",!0)],2)}}});exports.default=u;
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as t, useSlots as h, createElementBlock as p, openBlock as e, normalizeClass as n, unref as l, createBlock as s, createCommentVNode as r, renderSlot as u, resolveDynamicComponent as i, withCtx as d } from "vue";
|
|
3
3
|
import { Icon as f } from "@iconify/vue";
|
|
4
4
|
import { useNamespace as y } from "../../_hooks/useNamespace/index.js";
|
|
5
5
|
import { lsIconProps as g } from "../types/index.js";
|
|
6
6
|
import { ElIcon as k } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/icon/index/index.js";
|
|
7
|
-
const w =
|
|
7
|
+
const w = t({
|
|
8
8
|
name: "LSIcon"
|
|
9
|
-
}),
|
|
9
|
+
}), b = /* @__PURE__ */ t({
|
|
10
10
|
...w,
|
|
11
11
|
props: g,
|
|
12
12
|
setup(C) {
|
|
13
|
-
const
|
|
13
|
+
const a = h(), c = y("icon").b();
|
|
14
14
|
return (o, z) => {
|
|
15
|
-
const
|
|
16
|
-
return e(),
|
|
17
|
-
class:
|
|
15
|
+
const m = k;
|
|
16
|
+
return e(), p("div", {
|
|
17
|
+
class: n(l(c))
|
|
18
18
|
}, [
|
|
19
|
-
o.type == 1 && o.name ? (e(),
|
|
19
|
+
o.type == 1 && o.name ? (e(), s(l(f), {
|
|
20
20
|
key: 0,
|
|
21
21
|
icon: o.name,
|
|
22
22
|
class: "icon-iconify",
|
|
23
23
|
width: o.width,
|
|
24
24
|
height: o.height,
|
|
25
25
|
color: o.color
|
|
26
|
-
}, null, 8, ["icon", "width", "height", "color"])) : o.type == 2 && o.name ? (e(),
|
|
26
|
+
}, null, 8, ["icon", "width", "height", "color"])) : o.type == 2 && o.name ? (e(), s(i(o.name), {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "icon-svg",
|
|
29
29
|
width: o.width,
|
|
30
30
|
height: o.height,
|
|
31
31
|
fill: o.color,
|
|
32
32
|
src: o.src
|
|
33
|
-
}, null, 8, ["width", "height", "fill", "src"])) : o.name ? (e(),
|
|
33
|
+
}, null, 8, ["width", "height", "fill", "src"])) : o.name ? (e(), s(m, {
|
|
34
34
|
key: 2,
|
|
35
35
|
size: o.size,
|
|
36
|
-
color: o.color
|
|
36
|
+
color: o.color,
|
|
37
|
+
class: n(o.$attrs.class)
|
|
37
38
|
}, {
|
|
38
39
|
default: d(() => [
|
|
39
|
-
(e(),
|
|
40
|
+
(e(), s(i(o.name), { color: o.color }, null, 8, ["color"]))
|
|
40
41
|
]),
|
|
41
42
|
_: 1
|
|
42
|
-
}, 8, ["size", "color"])) : r("", !0),
|
|
43
|
-
l(
|
|
43
|
+
}, 8, ["size", "color", "class"])) : r("", !0),
|
|
44
|
+
l(a).default ? u(o.$slots, "default", { key: 3 }, void 0, !0) : r("", !0)
|
|
44
45
|
], 2);
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
b as default
|
|
50
51
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-1a817d2e"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1a817d2e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var h=Object.defineProperty;var t=(a,c)=>h(a,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=/* empty css */q=/* empty css */m=/* empty css */E=;/* empty css */;/* empty css */;/* empty css */;/* empty css */const F=/* empty css */y=e.defineComponent({name:"LSDocx"}),v=e.defineComponent({...y,props:q.docxProps,emits:m.previewEmits,setup(a,{emit:c}){const r=k.useNamespace("docx"),f=r.b(),p=t(()=>Promise.resolve().then(()=>require("../../../../../node_modules/.pnpm/docx-preview@0.3.6/node_modules/docx-preview/dist/docx-preview/index.cjs")),"docxPromise"),l=a,n=c,s=e.useAttrs(),g=e.computed(()=>s["has-download"]||s.hasDownload),u=e.computed(()=>s["download-loading"]||s.downloadLoading||!1),d=e.ref();e.watch(()=>l.source,o=>{o&&C(o)},{immediate:!0,deep:!0});async function C(o){if(!o||!E.isArrayBuffer(o)){F.ElMessage.error(m.fileEmpty),n("loadError");return}(await p()).renderAsync(o,d.value,d.value,{className:"docx",inWrapper:!0,ignoreWidth:!1,ignoreHeight:!0,ignoreFonts:!1,breakPages:!0,ignoreLastRenderedPageBreak:!0,experimental:!1,trimXmlDeclaration:!0,useBase64URL:!1,renderChanges:!1,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,debug:!1}).then(()=>{n("loadComplete")}).catch(()=>{n("loadError")})}t(C,"updateDocx");const w=t(()=>{l.onClose&&l.onClose(),n("update:source",[])},"closeFunc");function x(){n("download",s.downloadData)}return t(x,"onDownload"),(o,_)=>{const i=e.resolveComponent("LSIcon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(r).e("btn"),e.unref(r).e("close")]),onClick:w},[e.createVNode(i,{name:"Close",size:24,color:"#FFF"})],2),e.unref(g)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(r).e("btn"),e.unref(r).e("download")]),onClick:x},[e.createVNode(i,{class:e.normalizeClass({"is-loading":e.unref(u)}),name:`${e.unref(u)?"Loading":"Download"}`,size:24,color:"#FFF"},null,8,["class","name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"docxRef",ref:d},null,512)],2)}}});exports.default=v;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import { docxProps as
|
|
6
|
-
import { previewEmits as
|
|
7
|
-
import { isArrayBuffer as
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var s = (c, d) => y(c, "name", { value: d, configurable: !0 });
|
|
3
|
+
import { defineComponent as C, useAttrs as b, computed as p, ref as B, watch as N, resolveComponent as P, createElementBlock as f, openBlock as g, normalizeClass as a, unref as e, createElementVNode as w, createCommentVNode as R, createVNode as x } from "vue";
|
|
4
|
+
import { useNamespace as v } from "../../_hooks/useNamespace/index.js";
|
|
5
|
+
import { docxProps as z } from "../types/index.js";
|
|
6
|
+
import { previewEmits as A, fileEmpty as S } from "../../_constants/previewType/index.js";
|
|
7
|
+
import { isArrayBuffer as V } from "../../_utils/check/index.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { ElMessage as
|
|
12
|
-
const
|
|
11
|
+
import { ElMessage as H } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/message/index/index.js";
|
|
12
|
+
const I = C({
|
|
13
13
|
name: "LSDocx"
|
|
14
|
-
}),
|
|
15
|
-
...
|
|
16
|
-
props:
|
|
17
|
-
emits:
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
() =>
|
|
22
|
-
(
|
|
23
|
-
|
|
14
|
+
}), O = /* @__PURE__ */ C({
|
|
15
|
+
...I,
|
|
16
|
+
props: z,
|
|
17
|
+
emits: A,
|
|
18
|
+
setup(c, { emit: d }) {
|
|
19
|
+
const r = v("docx"), _ = r.b(), h = /* @__PURE__ */ s(() => import("../../../../../node_modules/.pnpm/docx-preview@0.3.6/node_modules/docx-preview/dist/docx-preview/index.js"), "docxPromise"), l = c, n = d, t = b(), F = p(() => t["has-download"] || t.hasDownload), m = p(() => t["download-loading"] || t.downloadLoading || !1), i = B();
|
|
20
|
+
N(
|
|
21
|
+
() => l.source,
|
|
22
|
+
(o) => {
|
|
23
|
+
o && k(o);
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
immediate: !0,
|
|
27
27
|
deep: !0
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
|
-
async function
|
|
31
|
-
if (!
|
|
32
|
-
|
|
30
|
+
async function k(o) {
|
|
31
|
+
if (!o || !V(o)) {
|
|
32
|
+
H.error(S), n("loadError");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
(await
|
|
35
|
+
(await h()).renderAsync(o, i.value, i.value, {
|
|
36
36
|
className: "docx",
|
|
37
37
|
//class name/prefix for default and document style classes
|
|
38
38
|
inWrapper: !0,
|
|
@@ -66,38 +66,53 @@ const w = d({
|
|
|
66
66
|
debug: !1
|
|
67
67
|
//enables additional logging
|
|
68
68
|
}).then(() => {
|
|
69
|
-
|
|
69
|
+
n("loadComplete");
|
|
70
70
|
}).catch(() => {
|
|
71
|
-
|
|
71
|
+
n("loadError");
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
74
|
+
s(k, "updateDocx");
|
|
75
|
+
const D = /* @__PURE__ */ s(() => {
|
|
76
|
+
l.onClose && l.onClose(), n("update:source", []);
|
|
77
77
|
}, "closeFunc");
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
function E() {
|
|
79
|
+
n("download", t.downloadData);
|
|
80
|
+
}
|
|
81
|
+
return s(E, "onDownload"), (o, L) => {
|
|
82
|
+
const u = P("LSIcon");
|
|
83
|
+
return g(), f("div", {
|
|
84
|
+
class: a(e(_))
|
|
82
85
|
}, [
|
|
83
|
-
|
|
84
|
-
class:
|
|
85
|
-
onClick:
|
|
86
|
+
w("span", {
|
|
87
|
+
class: a([e(r).e("btn"), e(r).e("close")]),
|
|
88
|
+
onClick: D
|
|
86
89
|
}, [
|
|
87
|
-
|
|
90
|
+
x(u, {
|
|
88
91
|
name: "Close",
|
|
89
92
|
size: 24,
|
|
90
93
|
color: "#FFF"
|
|
91
94
|
})
|
|
92
95
|
], 2),
|
|
93
|
-
|
|
96
|
+
e(F) ? (g(), f("span", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: a([e(r).e("btn"), e(r).e("download")]),
|
|
99
|
+
onClick: E
|
|
100
|
+
}, [
|
|
101
|
+
x(u, {
|
|
102
|
+
class: a({ "is-loading": e(m) }),
|
|
103
|
+
name: `${e(m) ? "Loading" : "Download"}`,
|
|
104
|
+
size: 24,
|
|
105
|
+
color: "#FFF"
|
|
106
|
+
}, null, 8, ["class", "name"])
|
|
107
|
+
], 2)) : R("", !0),
|
|
108
|
+
w("div", {
|
|
94
109
|
ref_key: "docxRef",
|
|
95
|
-
ref:
|
|
110
|
+
ref: i
|
|
96
111
|
}, null, 512)
|
|
97
112
|
], 2);
|
|
98
113
|
};
|
|
99
114
|
}
|
|
100
115
|
});
|
|
101
116
|
export {
|
|
102
|
-
|
|
117
|
+
O as default
|
|
103
118
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-a3df1ad0"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a3df1ad0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var l=(r,a)=>y(r,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),c=/* empty css */
|
|
1
|
+
"use strict";var y=Object.defineProperty;var l=(r,a)=>y(r,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),c=/* empty css */_=/* empty css */E=/* empty css */L=/* empty css */w=/* empty css */q={class:"ls-preview-extra"},B=e.defineComponent({name:"LSPreviewDocx"}),M=e.defineComponent({...B,name:"LSPreviewDocx",components:{LSDocx:c.default},inheritAttrs:!1,props:e.mergeModels(E.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(r,{emit:a}){const d=a,i=r,n=e.useModel(r,"modelValue"),{comClass:g,defAttrs:u,closeLoading:m,watermarkStyle:C}=_.default(i,n),p=l(()=>{m(),d("loadComplete")},"loadComplete"),f=l(()=>{m(),d("loadError")},"loadError");function P(o){var s,t,k,v;i.hideOnClickModal&&(o.target===o.currentTarget||(t=(s=o==null?void 0:o.target)==null?void 0:s.className)!=null&&t.includes&&((v=(k=o==null?void 0:o.target)==null?void 0:k.className)!=null&&v.includes("docx-wrapper")))&&(n.value=!1)}return l(P,"closePreview"),(o,s)=>{const t=L.ElWatermark;return n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(g)),onClick:P},[o.showWatermark?(e.openBlock(),e.createBlock(t,e.mergeProps({key:0},o.watermarkOption,{style:e.unref(C)}),{default:e.withCtx(()=>[e.createVNode(c.default,e.mergeProps(e.unref(w.default)(e.unref(u),o.$attrs),{onLoadComplete:p,onLoadError:f}),null,16)]),_:1},16,["style"])):(e.openBlock(),e.createBlock(c.default,e.mergeProps({key:1},e.unref(w.default)(e.unref(u),o.$attrs),{onLoadComplete:p,onLoadError:f}),null,16)),e.createElementVNode("div",q,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=M;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
2
|
var a = (r, l) => h(r, "name", { value: l, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { lsPreviewProp as
|
|
8
|
-
import { ElWatermark as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
4
|
+
import { defineComponent as y, mergeModels as g, useModel as N, createElementBlock as S, createCommentVNode as x, openBlock as n, normalizeClass as B, unref as o, createBlock as E, createElementVNode as M, mergeProps as i, withCtx as D, createVNode as $, renderSlot as A } from "vue";
|
|
5
|
+
import d from "../Docx.vue/index.js";
|
|
6
|
+
import O from "../../_hooks/usePreviewHook/index.js";
|
|
7
|
+
import { lsPreviewProp as W } from "../../_constants/previewType/index.js";
|
|
8
|
+
import { ElWatermark as b } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/watermark/index/index.js";
|
|
9
|
+
import L from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
10
|
+
const z = { class: "ls-preview-extra" }, H = y({
|
|
11
11
|
name: "LSPreviewDocx"
|
|
12
|
-
}),
|
|
13
|
-
|
|
12
|
+
}), Q = /* @__PURE__ */ y({
|
|
13
|
+
...H,
|
|
14
14
|
name: "LSPreviewDocx",
|
|
15
15
|
components: {
|
|
16
|
-
LSDocx:
|
|
16
|
+
LSDocx: d
|
|
17
17
|
},
|
|
18
18
|
inheritAttrs: !1,
|
|
19
|
-
props: /* @__PURE__ */ g(
|
|
19
|
+
props: /* @__PURE__ */ g(W, {
|
|
20
20
|
modelValue: {
|
|
21
21
|
type: Boolean
|
|
22
22
|
},
|
|
@@ -24,38 +24,41 @@ const $ = E({
|
|
|
24
24
|
}),
|
|
25
25
|
emits: /* @__PURE__ */ g(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
26
26
|
setup(r, { emit: l }) {
|
|
27
|
-
const
|
|
28
|
-
f(),
|
|
27
|
+
const c = l, p = r, s = N(r, "modelValue"), { comClass: P, defAttrs: u, closeLoading: f, watermarkStyle: V } = O(p, s), k = /* @__PURE__ */ a(() => {
|
|
28
|
+
f(), c("loadComplete");
|
|
29
29
|
}, "loadComplete"), w = /* @__PURE__ */ a(() => {
|
|
30
|
-
f(),
|
|
30
|
+
f(), c("loadError");
|
|
31
31
|
}, "loadError");
|
|
32
32
|
function _(e) {
|
|
33
|
-
var
|
|
34
|
-
p.hideOnClickModal && (e.target === e.currentTarget || (t = (
|
|
33
|
+
var m, t, v, C;
|
|
34
|
+
p.hideOnClickModal && (e.target === e.currentTarget || (t = (m = e == null ? void 0 : e.target) == null ? void 0 : m.className) != null && t.includes && ((C = (v = e == null ? void 0 : e.target) == null ? void 0 : v.className) != null && C.includes("docx-wrapper"))) && (s.value = !1);
|
|
35
35
|
}
|
|
36
|
-
return a(_, "closePreview"), (e,
|
|
37
|
-
const t =
|
|
38
|
-
return
|
|
36
|
+
return a(_, "closePreview"), (e, m) => {
|
|
37
|
+
const t = b;
|
|
38
|
+
return s.value ? (n(), S("div", {
|
|
39
39
|
key: 0,
|
|
40
|
-
class:
|
|
40
|
+
class: B(o(P)),
|
|
41
41
|
onClick: _
|
|
42
42
|
}, [
|
|
43
|
-
e.showWatermark ? (n(),
|
|
44
|
-
default:
|
|
45
|
-
|
|
43
|
+
e.showWatermark ? (n(), E(t, i({ key: 0 }, e.watermarkOption, { style: o(V) }), {
|
|
44
|
+
default: D(() => [
|
|
45
|
+
$(d, i(o(L)(o(u), e.$attrs), {
|
|
46
46
|
onLoadComplete: k,
|
|
47
47
|
onLoadError: w
|
|
48
48
|
}), null, 16)
|
|
49
49
|
]),
|
|
50
50
|
_: 1
|
|
51
|
-
}, 16, ["style"])) : (n(),
|
|
51
|
+
}, 16, ["style"])) : (n(), E(d, i({ key: 1 }, o(L)(o(u), e.$attrs), {
|
|
52
52
|
onLoadComplete: k,
|
|
53
53
|
onLoadError: w
|
|
54
|
-
}), null, 16))
|
|
55
|
-
|
|
54
|
+
}), null, 16)),
|
|
55
|
+
M("div", z, [
|
|
56
|
+
A(e.$slots, "extra", {}, void 0, !0)
|
|
57
|
+
])
|
|
58
|
+
], 2)) : x("", !0);
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
});
|
|
59
62
|
export {
|
|
60
|
-
|
|
63
|
+
Q as default
|
|
61
64
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-fbf0760a"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fbf0760a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var oe=Object.defineProperty;var a=(V,I)=>oe(V,"name",{value:I,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../../node_modules/.pnpm/@vueuse_core@12.8.2_typescript@5.9.2/node_modules/@vueuse/core/index/index.cjs"),se=require("../../_hooks/useNamespace/index.cjs"),ae=require("../../_hooks/useZIndex/index.cjs"),w=require("../../_constants/aria/index.cjs"),z=require("../../_utils/check/index.cjs"),re=require("../../_utils/types/index.cjs"),le=require("../types/index.cjs"),ie=require("../../_constants/previewType/index.cjs"),d=require("../../icon/Index.vue/index.cjs"),D=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.cjs"),Z=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),ce=["src"],ue=["src"],de=e.defineComponent({name:"LSImage"}),fe=e.defineComponent({...de,props:le.imageViewerProps,emits:ie.previewEmits,setup(V,{expose:I,emit:H}){const v={CONTAIN:{name:"FullScreen"},ORIGINAL:{name:"ScaleToOriginal"}},P=z.isFirefox()?"DOMMouseScroll":"mousewheel",l=V,E=H,C=e.useAttrs(),S=e.computed(()=>C["download-loading"]||C.downloadLoading||!1),s=se.useNamespace("image"),{nextZIndex:G}=ae.useZIndex(),T=e.ref(),y=e.ref([]),B=e.effectScope(),g=e.ref(!0),f=e.ref(l.initialIndex),N=e.shallowRef(v.CONTAIN),r=e.reactive({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"contain"}),W=e.computed(()=>{const{source:n}=l||{};return z.isString(n)||n.length<=1}),M=e.computed(()=>f.value===0),$=e.computed(()=>{const n=l.source;return f.value===n.length-1}),J=e.computed(()=>(l.source||{})[f.value]),q=e.computed(()=>{const{scale:n,deg:o,offsetX:t,offsetY:i,enableTransition:u,width:b,height:L,objectFit:F}=r;let m=t/n,p=i/n;switch(o%360){case 90:case-270:[m,p]=[p,-m];break;case 180:case-180:[m,p]=[-m,-p];break;case 270:case-90:[m,p]=[-p,m];break}const k={transform:`scale(${n}) rotate(${o}deg) translate(${m}px, ${p}px)`,transition:u?"transform .3s":""};return N.value.name===v.CONTAIN.name&&(k.maxWidth=k.maxHeight="100%"),k.width=b,k.height=L,k.objectFit=F,k}),K=e.computed(()=>z.isNumber(l.zIndex)?l.zIndex:G()),Q=a(()=>{l.onClose&&l.onClose(),E("update:source",[])},"closeFunc");function O(){ee(),Q()}a(O,"hide");function U(){const n=D.default(t=>{switch(t.code){case w.EVENT_CODE.esc:l.closeOnPressEscape&&O();break;case w.EVENT_CODE.space:Y();break;case w.EVENT_CODE.left:_();break;case w.EVENT_CODE.up:c("zoomIn");break;case w.EVENT_CODE.right:j();break;case w.EVENT_CODE.down:c("zoomOut");break}}),o=D.default(t=>{(t.wheelDelta?t.wheelDelta:-t.detail)>0?c("zoomIn",{zoomRate:1.2,enableTransition:!1}):c("zoomOut",{zoomRate:1.2,enableTransition:!1})});B.run(()=>{h.useEventListener(document,"keydown",n),h.useEventListener(document,P,o)})}a(U,"registerEventListener");function ee(){B.stop()}a(ee,"unregisterEventListener");function A(){g.value=!1,E("loadComplete")}a(A,"handleImgLoad");function R(n){g.value=!1,n.target.alt="ls.image.error",E("loadError")}a(R,"handleImgError");function X(n){if(g.value||n.button!==0||!T.value)return;r.enableTransition=!1;const{offsetX:o,offsetY:t}=r,i=n.pageX,u=n.pageY,b=D.default(F=>{r.offsetX=o+F.pageX-i,r.offsetY=t+F.pageY-u}),L=h.useEventListener(document,"mousemove",b);h.useEventListener(document,"mouseup",()=>{L()}),n.preventDefault()}a(X,"handleMouseDown");function ne(){Z.default(r,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"contain"})}a(ne,"reset");function te(){Z.default(r,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"100%",height:"100%",objectFit:"contain"})}a(te,"fullScreen");function Y(){if(g.value)return;const n=re.keysOf(v),o=Object.values(v),t=N.value.name,u=(o.findIndex(b=>b.name===t)+1)%n.length;N.value=v[n[u]],t===v.CONTAIN.name?te():ne()}a(Y,"toggleMode");function x(n){const t=l.source.length;f.value=(n+t)%t}a(x,"setActiveItem");function _(){M.value&&!l.infinite||x(f.value-1)}a(_,"prev");function j(){$.value&&!l.infinite||x(f.value+1)}a(j,"next");function c(n,o={}){if(g.value)return;const{zoomRate:t,rotateDeg:i,enableTransition:u}={zoomRate:1.4,rotateDeg:90,enableTransition:!0,...o};switch(n){case"zoomOut":r.scale>.2&&(r.scale=Number.parseFloat((r.scale/t).toFixed(3)));break;case"zoomIn":r.scale<7&&(r.scale=Number.parseFloat((r.scale*t).toFixed(3)));break;case"clockwise":r.deg+=i;break;case"anticlockwise":r.deg-=i;break;case"download":E("download",C.downloadData);break}r.enableTransition=u}return a(c,"handleActions"),e.watch(J,()=>{e.nextTick(()=>{const n=y.value[0];n!=null&&n.complete||(g.value=!0)})}),e.watch(f,n=>{E("switch",n)}),e.onMounted(()=>{var n,o;U(),(o=(n=T.value)==null?void 0:n.focus)==null||o.call(n)}),I({setActiveItem:x}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!n.teleported},[e.createVNode(e.Transition,{name:"viewer-fade",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapper",ref:T,tabindex:-1,class:e.normalizeClass(e.unref(s).e("wrapper")),style:e.normalizeStyle({zIndex:e.unref(K)})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("mask")),onClick:o[0]||(o[0]=e.withModifiers(t=>n.hideOnClickModal&&O(),["self"]))},null,2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("close")]),onClick:O},[e.createVNode(d.default,{name:"Close",size:24,color:"#FFF"})],2),e.unref(W)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("prev"),e.unref(s).is("disabled",!n.infinite&&e.unref(M))]),onClick:_},[e.createVNode(d.default,{name:"ArrowLeft",size:24,color:"#FFF"})],2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("next"),e.unref(s).is("disabled",!n.infinite&&e.unref($))]),onClick:j},[e.createVNode(d.default,{name:"ArrowRight",size:24,color:"#FFF"})],2)],64)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("actions")])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("actions__inner"))},[e.createVNode(d.default,{name:"ZoomOut",size:24,color:"#FFF",onClick:o[1]||(o[1]=t=>c("zoomOut"))}),e.createVNode(d.default,{name:"ZoomIn",size:24,color:"#FFF",onClick:o[2]||(o[2]=t=>c("zoomIn"))}),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{name:e.unref(N).name,size:24,color:"#FFF",onClick:Y},null,8,["name"]),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{name:"RefreshLeft",size:24,color:"#FFF",onClick:o[3]||(o[3]=t=>c("anticlockwise"))}),e.createVNode(d.default,{name:"RefreshRight",size:24,color:"#FFF",onClick:o[4]||(o[4]=t=>c("clockwise"))}),e.unref(C).hasDownload?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{class:e.normalizeClass({"is-loading":e.unref(S)}),name:`${e.unref(S)?"Loading":"Download"}`,size:24,color:"#FFF",onClick:o[5]||(o[5]=t=>c("download"))},null,8,["class","name"])],64)):e.createCommentVNode("",!0)],2)],2),n.source?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(s).e("canvas"))},[e.unref(z.isArray)(n.source)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.source,(t,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("img",{ref_for:!0,ref:a(u=>e.unref(y)[i]=u,"ref"),key:t,src:t,style:e.normalizeStyle(e.unref(q)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:A,onError:R,onMousedown:X},null,46,ce)),[[e.vShow,i===e.unref(f)]])),128)):(e.openBlock(),e.createElementBlock("img",{ref:a(t=>e.unref(y)[0]=t,"ref"),key:n.source,src:n.source,style:e.normalizeStyle(e.unref(q)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:A,onError:R,onMousedown:X},null,46,ue))],2)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"viewer",{},void 0,!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],6)]),_:3})],8,["disabled"]))]))}});exports.default=fe;
|