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