@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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var w=Object.defineProperty;var t=(r,l)=>w(r,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),s=/* empty css */C=/* empty css */g=/* empty css */y=/* empty css */f=/* empty css */_={class:"ls-preview-extra"},E=e.defineComponent({name:"LSPreviewPdf"}),L=e.defineComponent({...E,name:"LSPreviewPdf",components:{LSPdf:s.default},inheritAttrs:!1,props:e.mergeModels(g.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(r,{emit:l}){const d=l,i=r,a=e.useModel(r,"modelValue"),{comClass:p,defAttrs:n,closeLoading:u,watermarkStyle:k}=C.default(i,a),c=t(()=>{u(),d("loadComplete")},"loadComplete"),m=t(()=>{u(),d("loadError")},"loadError");function v(o){i.hideOnClickModal&&o.target===o.currentTarget&&(a.value=!1)}return t(v,"closePreview"),(o,S)=>{const P=y.ElWatermark;return a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(p)),onClick:v},[e.createTextVNode(e.toDisplayString(e.unref(n))+" ",1),o.showWatermark?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0},o.watermarkOption,{style:e.unref(k)}),{default:e.withCtx(()=>[e.createVNode(s.default,e.mergeProps(e.unref(f.default)(e.unref(n),o.$attrs),{onLoadComplete:c,onLoadError:m}),null,16)]),_:1},16,["style"])):(e.openBlock(),e.createBlock(s.default,e.mergeProps({key:1},e.unref(f.default)(e.unref(n),o.$attrs),{onLoadComplete:c,onLoadError:m}),null,16)),e.createElementVNode("div",_,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=L;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var t = (r, l) =>
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var t = (r, l) => V(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
|
|
4
|
+
import { defineComponent as C, mergeModels as k, useModel as g, createElementBlock as _, createCommentVNode as h, openBlock as m, normalizeClass as S, unref as o, createTextVNode as B, createBlock as v, createElementVNode as M, toDisplayString as N, mergeProps as n, withCtx as $, createVNode as A, renderSlot as O } from "vue";
|
|
5
|
+
import i from "../Pdf.vue/index.js";
|
|
6
|
+
import T 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
9
|
import w from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
10
|
-
const
|
|
10
|
+
const x = { class: "ls-preview-extra" }, z = C({
|
|
11
11
|
name: "LSPreviewPdf"
|
|
12
|
-
}),
|
|
13
|
-
...
|
|
12
|
+
}), Q = /* @__PURE__ */ C({
|
|
13
|
+
...z,
|
|
14
14
|
name: "LSPreviewPdf",
|
|
15
15
|
components: {
|
|
16
|
-
LSPdf:
|
|
16
|
+
LSPdf: i
|
|
17
17
|
},
|
|
18
18
|
inheritAttrs: !1,
|
|
19
|
-
props: /* @__PURE__ */ k(
|
|
19
|
+
props: /* @__PURE__ */ k(W, {
|
|
20
20
|
modelValue: {
|
|
21
21
|
type: Boolean
|
|
22
22
|
},
|
|
@@ -24,37 +24,41 @@ const W = P({
|
|
|
24
24
|
}),
|
|
25
25
|
emits: /* @__PURE__ */ k(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
26
26
|
setup(r, { emit: l }) {
|
|
27
|
-
const
|
|
28
|
-
p(),
|
|
27
|
+
const d = l, c = r, a = g(r, "modelValue"), { comClass: P, defAttrs: s, closeLoading: p, watermarkStyle: y } = T(c, a), f = /* @__PURE__ */ t(() => {
|
|
28
|
+
p(), d("loadComplete");
|
|
29
29
|
}, "loadComplete"), u = /* @__PURE__ */ t(() => {
|
|
30
|
-
p(),
|
|
30
|
+
p(), d("loadError");
|
|
31
31
|
}, "loadError");
|
|
32
|
-
function
|
|
33
|
-
|
|
32
|
+
function E(e) {
|
|
33
|
+
c.hideOnClickModal && e.target === e.currentTarget && (a.value = !1);
|
|
34
34
|
}
|
|
35
|
-
return t(
|
|
36
|
-
const
|
|
35
|
+
return t(E, "closePreview"), (e, D) => {
|
|
36
|
+
const L = b;
|
|
37
37
|
return a.value ? (m(), _("div", {
|
|
38
38
|
key: 0,
|
|
39
|
-
class:
|
|
40
|
-
onClick:
|
|
39
|
+
class: S(o(P)),
|
|
40
|
+
onClick: E
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
B(N(o(s)) + " ", 1),
|
|
43
|
+
e.showWatermark ? (m(), v(L, n({ key: 0 }, e.watermarkOption, { style: o(y) }), {
|
|
44
|
+
default: $(() => [
|
|
45
|
+
A(i, n(o(w)(o(s), e.$attrs), {
|
|
45
46
|
onLoadComplete: f,
|
|
46
47
|
onLoadError: u
|
|
47
48
|
}), null, 16)
|
|
48
49
|
]),
|
|
49
50
|
_: 1
|
|
50
|
-
}, 16, ["style"])) : (m(),
|
|
51
|
+
}, 16, ["style"])) : (m(), v(i, n({ key: 1 }, o(w)(o(s), e.$attrs), {
|
|
51
52
|
onLoadComplete: f,
|
|
52
53
|
onLoadError: u
|
|
53
|
-
}), null, 16))
|
|
54
|
+
}), null, 16)),
|
|
55
|
+
M("div", x, [
|
|
56
|
+
O(e.$slots, "extra", {}, void 0, !0)
|
|
57
|
+
])
|
|
54
58
|
], 2)) : h("", !0);
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
});
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
Q as default
|
|
60
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-42d850ff"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import f from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const p = /* @__PURE__ */ f(o, [["__scopeId", "data-v-42d850ff"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var j=Object.defineProperty;var n=(v,_)=>j(v,"name",{value:_,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),O=/* empty css */U=/* empty css */N=/* empty css */A=/* empty css */G=/* empty css */H={class:"opt-wrap"},J={key:0,class:"page-wrap"},K={class:"num-wrap"},Q={key:1,class:"size-wrap"},R={class:"num-wrap"},W={class:"pdf-content"},X={key:1,class:"infinite-list-wrapper",style:{overflow:"auto"}},Y=["infinite-scroll-disabled"],Z=e.defineComponent({name:"LSPdf"}),ee=e.defineComponent({...Z,props:{source:{},onClose:{},showSize:{type:Boolean,default:!0},cMapUrlPath:{}},emits:["annotation","highlight","loaded","textLoaded","annotationLoaded","xfaLoaded","loadComplete","loadError","update:source","download"],setup(v,{emit:_}){const g=O.useNamespace("pdf"),B=g.b(),k=e.ref(void 0),r=e.ref(1),i=e.ref(0),o=e.ref(1),c=e.ref(!0),C=e.ref(!1),l=e.useAttrs(),V=e.computed(()=>l["init-no-pagination"]||l.initNoPagination),E=e.computed(()=>l["has-download"]||l.hasDownload),P=e.computed(()=>l["download-txt"]||l.downloadTxt||"下载"),b=e.computed(()=>l["download-loading"]||l.downloadLoading||!1);e.watch(V,t=>{c.value=!t},{immediate:!0,deep:!0});const u=v,d=_;e.watch(()=>u.source,t=>{t&&L()},{immediate:!0,deep:!0});const x=e.computed(()=>c.value?"取消分页":"分页展示");async function L(){if(u.source)try{const{pdf:t,processLoadingTask:a,pages:s}=U.usePDF(u.source,u.cMapUrlPath,{onError:p});await a(u.source),k.value=t.value,i.value=s.value,y()}catch{p()}finally{C.value=!0}}n(L,"initPdf");const S=n(()=>{C.value=!1,u.onClose&&u.onClose(),d("update:source")},"closeFunc");function z(){r.value>1&&r.value--}n(z,"prevPdf");function D(){r.value<i.value&&r.value++}n(D,"nextPdf");function h(t){t===0?o.value=o.value>.25?o.value-.25:o.value:o.value=o.value<2?o.value+.25:o.value}n(h,"scalePdf");const w=e.ref(!1),f=e.ref(0),q=n(()=>{if(f.value>=i.value){w.value=!0;return}f.value++},"load");function T(){c.value=!c.value,c.value||(w.value=!1,f.value=i.value>10?10:i.value)}n(T,"changePagition");function y(){d("loadComplete")}n(y,"loadComplete");function p(){d("loadError")}n(p,"loadError");function M(){d("download",l.downloadData)}return n(M,"onDownload"),(t,a)=>{const s=e.resolveComponent("LSButton"),$=e.resolveComponent("LSIcon"),I=A.ElScrollbar,F=G.ElInfiniteScroll;return e.unref(C)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(B))},[e.createElementVNode("div",H,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(s,{type:"primary",size:"small",disabled:e.unref(r)==1,onClick:z},{default:e.withCtx(()=>a[2]||(a[2]=[e.createTextVNode("上一页",-1)])),_:1,__:[2]},8,["disabled"]),e.createElementVNode("span",K,e.toDisplayString(e.unref(r))+" / "+e.toDisplayString(e.unref(i)),1),e.createVNode(s,{type:"primary",size:"small",disabled:e.unref(r)==e.unref(i),onClick:D},{default:e.withCtx(()=>a[3]||(a[3]=[e.createTextVNode("下一页",-1)])),_:1,__:[3]},8,["disabled"])])):e.createCommentVNode("",!0),t.showSize?(e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(s,{type:"primary",icon:"Minus",size:"small",disabled:e.unref(o)==.25,onClick:a[0]||(a[0]=m=>h(0))},null,8,["disabled"]),e.createElementVNode("span",R,e.toDisplayString(e.unref(o)*100)+"%",1),e.createVNode(s,{type:"primary",icon:"Plus",size:"small",disabled:e.unref(o)==2,onClick:a[1]||(a[1]=m=>h(1))},null,8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(s,{type:"primary",size:"small",onClick:T},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(x)),1)]),_:1}),e.unref(E)?(e.openBlock(),e.createBlock(s,{key:2,type:"primary",size:"small",loading:e.unref(b),onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(P)),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass([e.unref(g).e("btn"),e.unref(g).e("close")]),onClick:S},[e.createVNode($,{name:"Close",size:26})],2)]),e.createElementVNode("div",W,[e.unref(c)?(e.openBlock(),e.createBlock(N.default,e.mergeProps({key:0},t.$attrs,{pdf:e.unref(k),page:e.unref(r),scale:e.unref(o),onLoadComplete:y,onLoadError:p}),null,16,["pdf","page","scale"])):(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(I,{height:"calc(100vh - 48px)"},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("ul",{"infinite-scroll-disabled":e.unref(w),class:"infinite-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),m=>(e.openBlock(),e.createElementBlock("li",{key:m,class:"infinite-list-item"},[e.createVNode(N.default,e.mergeProps({ref_for:!0},t.$attrs,{pdf:e.unref(k),page:m,scale:e.unref(o),onLoadComplete:y,onLoadError:p}),null,16,["pdf","page","scale"])]))),128))],8,Y)),[[F,q]])]),_:1})]))])],2)):e.createCommentVNode("",!0)}}});exports.default=ee;
|
|
@@ -1,215 +1,231 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var te = Object.defineProperty;
|
|
2
|
+
var a = (b, z) => te(b, "name", { value: z, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import { usePDF as
|
|
6
|
+
import { defineComponent as U, ref as d, useAttrs as ae, computed as v, watch as T, resolveComponent as $, createElementBlock as m, createCommentVNode as L, unref as e, openBlock as s, normalizeClass as M, createElementVNode as _, createVNode as c, createBlock as V, withCtx as w, createTextVNode as P, toDisplayString as g, mergeProps as F, withDirectives as ne, Fragment as le, renderList as se } from "vue";
|
|
7
|
+
import { useNamespace as ie } from "../../_hooks/useNamespace/index.js";
|
|
8
|
+
import { usePDF as re } from "../composable/index.js";
|
|
9
9
|
import I from "../pdfs/PdfItem.vue/index.js";
|
|
10
|
-
import { ElScrollbar as
|
|
11
|
-
import { ElInfiniteScroll as
|
|
12
|
-
const
|
|
10
|
+
import { ElScrollbar as de } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/scrollbar/index/index.js";
|
|
11
|
+
import { ElInfiniteScroll as ce } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/infinite-scroll/index/index.js";
|
|
12
|
+
const ue = { class: "opt-wrap" }, pe = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "page-wrap"
|
|
15
|
-
},
|
|
15
|
+
}, fe = { class: "num-wrap" }, me = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "size-wrap"
|
|
18
|
-
},
|
|
18
|
+
}, ve = { class: "num-wrap" }, _e = { class: "pdf-content" }, we = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "infinite-list-wrapper",
|
|
21
21
|
style: { overflow: "auto" }
|
|
22
|
-
},
|
|
22
|
+
}, ge = ["infinite-scroll-disabled"], ye = U({
|
|
23
23
|
name: "LSPdf"
|
|
24
|
-
}),
|
|
25
|
-
...
|
|
24
|
+
}), De = /* @__PURE__ */ U({
|
|
25
|
+
...ye,
|
|
26
26
|
props: {
|
|
27
27
|
source: {},
|
|
28
28
|
onClose: {},
|
|
29
29
|
showSize: { type: Boolean, default: !0 },
|
|
30
30
|
cMapUrlPath: {}
|
|
31
31
|
},
|
|
32
|
-
emits: ["annotation", "highlight", "loaded", "textLoaded", "annotationLoaded", "xfaLoaded", "loadComplete", "loadError", "update:source"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
(
|
|
38
|
-
|
|
32
|
+
emits: ["annotation", "highlight", "loaded", "textLoaded", "annotationLoaded", "xfaLoaded", "loadComplete", "loadError", "update:source", "download"],
|
|
33
|
+
setup(b, { emit: z }) {
|
|
34
|
+
const E = ie("pdf"), j = E.b(), S = d(void 0), i = d(1), u = d(0), o = d(1), p = d(!0), x = d(!1), l = ae(), A = v(() => l["init-no-pagination"] || l.initNoPagination), O = v(() => l["has-download"] || l.hasDownload), q = v(() => l["download-txt"] || l.downloadTxt || "下载"), G = v(() => l["download-loading"] || l.downloadLoading || !1);
|
|
35
|
+
T(
|
|
36
|
+
A,
|
|
37
|
+
(t) => {
|
|
38
|
+
p.value = !t;
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
immediate: !0,
|
|
42
42
|
deep: !0
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
() =>
|
|
48
|
-
(
|
|
49
|
-
|
|
45
|
+
const f = b, y = z;
|
|
46
|
+
T(
|
|
47
|
+
() => f.source,
|
|
48
|
+
(t) => {
|
|
49
|
+
t && J();
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
immediate: !0,
|
|
53
53
|
deep: !0
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
|
-
const
|
|
57
|
-
async function
|
|
58
|
-
if (
|
|
56
|
+
const H = v(() => p.value ? "取消分页" : "分页展示");
|
|
57
|
+
async function J() {
|
|
58
|
+
if (f.source)
|
|
59
59
|
try {
|
|
60
|
-
const { pdf:
|
|
61
|
-
onError:
|
|
60
|
+
const { pdf: t, processLoadingTask: n, pages: r } = re(f.source, f.cMapUrlPath, {
|
|
61
|
+
onError: h
|
|
62
62
|
});
|
|
63
|
-
await
|
|
63
|
+
await n(f.source), S.value = t.value, u.value = r.value, N();
|
|
64
64
|
} catch {
|
|
65
|
-
|
|
65
|
+
h();
|
|
66
66
|
} finally {
|
|
67
|
-
|
|
67
|
+
x.value = !0;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
70
|
+
a(J, "initPdf");
|
|
71
|
+
const K = /* @__PURE__ */ a(() => {
|
|
72
|
+
x.value = !1, f.onClose && f.onClose(), y("update:source");
|
|
73
73
|
}, "closeFunc");
|
|
74
|
-
function
|
|
75
|
-
|
|
74
|
+
function Q() {
|
|
75
|
+
i.value > 1 && i.value--;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
function
|
|
79
|
-
|
|
77
|
+
a(Q, "prevPdf");
|
|
78
|
+
function R() {
|
|
79
|
+
i.value < u.value && i.value++;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
function B(
|
|
83
|
-
|
|
81
|
+
a(R, "nextPdf");
|
|
82
|
+
function B(t) {
|
|
83
|
+
t === 0 ? o.value = o.value > 0.25 ? o.value - 0.25 : o.value : o.value = o.value < 2 ? o.value + 0.25 : o.value;
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
|
|
85
|
+
a(B, "scalePdf");
|
|
86
|
+
const D = d(!1), C = d(0), W = /* @__PURE__ */ a(() => {
|
|
87
|
+
if (C.value >= u.value) {
|
|
88
|
+
D.value = !0;
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
C.value++;
|
|
92
92
|
}, "load");
|
|
93
|
-
function
|
|
94
|
-
|
|
93
|
+
function X() {
|
|
94
|
+
p.value = !p.value, p.value || (D.value = !1, C.value = u.value > 10 ? 10 : u.value);
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
|
|
96
|
+
a(X, "changePagition");
|
|
97
|
+
function N() {
|
|
98
|
+
y("loadComplete");
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
|
|
100
|
+
a(N, "loadComplete");
|
|
101
|
+
function h() {
|
|
102
|
+
y("loadError");
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
a(h, "loadError");
|
|
105
|
+
function Y() {
|
|
106
|
+
y("download", l.downloadData);
|
|
107
|
+
}
|
|
108
|
+
return a(Y, "onDownload"), (t, n) => {
|
|
109
|
+
const r = $("LSButton"), Z = $("LSIcon"), ee = de, oe = ce;
|
|
110
|
+
return e(x) ? (s(), m("div", {
|
|
107
111
|
key: 0,
|
|
108
|
-
class:
|
|
112
|
+
class: M(e(j))
|
|
109
113
|
}, [
|
|
110
|
-
|
|
111
|
-
e(
|
|
112
|
-
r
|
|
114
|
+
_("div", ue, [
|
|
115
|
+
e(p) ? (s(), m("div", pe, [
|
|
116
|
+
c(r, {
|
|
113
117
|
type: "primary",
|
|
114
118
|
size: "small",
|
|
115
|
-
disabled: e(
|
|
116
|
-
onClick:
|
|
119
|
+
disabled: e(i) == 1,
|
|
120
|
+
onClick: Q
|
|
117
121
|
}, {
|
|
118
|
-
default:
|
|
119
|
-
|
|
122
|
+
default: w(() => n[2] || (n[2] = [
|
|
123
|
+
P("上一页", -1)
|
|
120
124
|
])),
|
|
121
125
|
_: 1,
|
|
122
126
|
__: [2]
|
|
123
127
|
}, 8, ["disabled"]),
|
|
124
|
-
|
|
125
|
-
r
|
|
128
|
+
_("span", fe, g(e(i)) + " / " + g(e(u)), 1),
|
|
129
|
+
c(r, {
|
|
126
130
|
type: "primary",
|
|
127
131
|
size: "small",
|
|
128
|
-
disabled: e(
|
|
129
|
-
onClick:
|
|
132
|
+
disabled: e(i) == e(u),
|
|
133
|
+
onClick: R
|
|
130
134
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
|
|
135
|
+
default: w(() => n[3] || (n[3] = [
|
|
136
|
+
P("下一页", -1)
|
|
133
137
|
])),
|
|
134
138
|
_: 1,
|
|
135
139
|
__: [3]
|
|
136
140
|
}, 8, ["disabled"])
|
|
137
|
-
])) :
|
|
138
|
-
|
|
139
|
-
r
|
|
141
|
+
])) : L("", !0),
|
|
142
|
+
t.showSize ? (s(), m("div", me, [
|
|
143
|
+
c(r, {
|
|
140
144
|
type: "primary",
|
|
141
145
|
icon: "Minus",
|
|
142
146
|
size: "small",
|
|
143
|
-
disabled: e(
|
|
144
|
-
onClick:
|
|
147
|
+
disabled: e(o) == 0.25,
|
|
148
|
+
onClick: n[0] || (n[0] = (k) => B(0))
|
|
145
149
|
}, null, 8, ["disabled"]),
|
|
146
|
-
|
|
147
|
-
r
|
|
150
|
+
_("span", ve, g(e(o) * 100) + "%", 1),
|
|
151
|
+
c(r, {
|
|
148
152
|
type: "primary",
|
|
149
153
|
icon: "Plus",
|
|
150
154
|
size: "small",
|
|
151
|
-
disabled: e(
|
|
152
|
-
onClick:
|
|
155
|
+
disabled: e(o) == 2,
|
|
156
|
+
onClick: n[1] || (n[1] = (k) => B(1))
|
|
153
157
|
}, null, 8, ["disabled"])
|
|
154
|
-
])) :
|
|
155
|
-
r
|
|
158
|
+
])) : L("", !0),
|
|
159
|
+
c(r, {
|
|
156
160
|
type: "primary",
|
|
157
161
|
size: "small",
|
|
158
|
-
onClick:
|
|
162
|
+
onClick: X
|
|
159
163
|
}, {
|
|
160
|
-
default:
|
|
161
|
-
|
|
164
|
+
default: w(() => [
|
|
165
|
+
P(g(e(H)), 1)
|
|
162
166
|
]),
|
|
163
167
|
_: 1
|
|
164
168
|
}),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
e(O) ? (s(), V(r, {
|
|
170
|
+
key: 2,
|
|
171
|
+
type: "primary",
|
|
172
|
+
size: "small",
|
|
173
|
+
loading: e(G),
|
|
174
|
+
onClick: Y
|
|
175
|
+
}, {
|
|
176
|
+
default: w(() => [
|
|
177
|
+
P(g(e(q)), 1)
|
|
178
|
+
]),
|
|
179
|
+
_: 1
|
|
180
|
+
}, 8, ["loading"])) : L("", !0),
|
|
181
|
+
_("span", {
|
|
182
|
+
class: M([e(E).e("btn"), e(E).e("close")]),
|
|
183
|
+
onClick: K
|
|
168
184
|
}, [
|
|
169
|
-
|
|
185
|
+
c(Z, {
|
|
170
186
|
name: "Close",
|
|
171
187
|
size: 26
|
|
172
188
|
})
|
|
173
189
|
], 2)
|
|
174
190
|
]),
|
|
175
|
-
|
|
176
|
-
e(
|
|
177
|
-
pdf: e(
|
|
178
|
-
page: e(
|
|
179
|
-
scale: e(
|
|
180
|
-
onLoadComplete:
|
|
181
|
-
onLoadError:
|
|
182
|
-
}), null, 16, ["pdf", "page", "scale"])) : (
|
|
183
|
-
|
|
184
|
-
default:
|
|
185
|
-
|
|
186
|
-
"infinite-scroll-disabled": e(
|
|
191
|
+
_("div", _e, [
|
|
192
|
+
e(p) ? (s(), V(I, F({ key: 0 }, t.$attrs, {
|
|
193
|
+
pdf: e(S),
|
|
194
|
+
page: e(i),
|
|
195
|
+
scale: e(o),
|
|
196
|
+
onLoadComplete: N,
|
|
197
|
+
onLoadError: h
|
|
198
|
+
}), null, 16, ["pdf", "page", "scale"])) : (s(), m("div", we, [
|
|
199
|
+
c(ee, { height: "calc(100vh - 48px)" }, {
|
|
200
|
+
default: w(() => [
|
|
201
|
+
ne((s(), m("ul", {
|
|
202
|
+
"infinite-scroll-disabled": e(D),
|
|
187
203
|
class: "infinite-list"
|
|
188
204
|
}, [
|
|
189
|
-
(
|
|
190
|
-
key:
|
|
205
|
+
(s(!0), m(le, null, se(e(C), (k) => (s(), m("li", {
|
|
206
|
+
key: k,
|
|
191
207
|
class: "infinite-list-item"
|
|
192
208
|
}, [
|
|
193
|
-
|
|
194
|
-
pdf: e(
|
|
195
|
-
page:
|
|
196
|
-
scale: e(
|
|
197
|
-
onLoadComplete:
|
|
198
|
-
onLoadError:
|
|
209
|
+
c(I, F({ ref_for: !0 }, t.$attrs, {
|
|
210
|
+
pdf: e(S),
|
|
211
|
+
page: k,
|
|
212
|
+
scale: e(o),
|
|
213
|
+
onLoadComplete: N,
|
|
214
|
+
onLoadError: h
|
|
199
215
|
}), null, 16, ["pdf", "page", "scale"])
|
|
200
216
|
]))), 128))
|
|
201
|
-
], 8,
|
|
202
|
-
[
|
|
217
|
+
], 8, ge)), [
|
|
218
|
+
[oe, W]
|
|
203
219
|
])
|
|
204
220
|
]),
|
|
205
221
|
_: 1
|
|
206
222
|
})
|
|
207
223
|
]))
|
|
208
224
|
])
|
|
209
|
-
], 2)) :
|
|
225
|
+
], 2)) : L("", !0);
|
|
210
226
|
};
|
|
211
227
|
}
|
|
212
228
|
});
|
|
213
229
|
export {
|
|
214
|
-
|
|
230
|
+
De as default
|
|
215
231
|
};
|
|
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-d4ee4d15"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-d4ee4d15"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty;var l=(
|
|
1
|
+
"use strict";var w=Object.defineProperty;var l=(r,t)=>w(r,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),s=/* empty css */C=/* empty css */g=/* empty css */y=/* empty css */c=/* empty css */P={class:"ls-preview-extra"},_=e.defineComponent({name:"LSPreviewXlsx"}),E=e.defineComponent({..._,name:"LSPreviewXlsx",components:{LSXlsx:s.default},inheritAttrs:!1,props:e.mergeModels(g.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(r,{emit:t}){const a=t,p=r,n=e.useModel(r,"modelValue"),{comClass:f,defAttrs:d,closeLoading:u,watermarkStyle:k}=C.default(p,n),i=l(()=>{u(),a("loadComplete")},"loadComplete"),m=l(()=>{u(),a("loadError")},"loadError");return(o,L)=>{const v=y.ElWatermark;return n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f))},[o.showWatermark?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0},o.watermarkOption,{style:e.unref(k)}),{default:e.withCtx(()=>[e.createVNode(s.default,e.mergeProps(e.unref(c.default)(e.unref(d),o.$attrs),{onLoadComplete:i,onLoadError:m}),null,16)]),_:1},16,["style"])):(e.openBlock(),e.createBlock(s.default,e.mergeProps({key:1},e.unref(c.default)(e.unref(d),o.$attrs),{onLoadComplete:i,onLoadError:m}),null,16)),e.createElementVNode("div",P,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=E;
|