@lingshugroup/web-plus 2.4.6 → 2.4.10

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.
Files changed (64) hide show
  1. package/lib/index.css +1 -1
  2. package/lib/index.css.br +0 -0
  3. package/lib/index.css.gz +0 -0
  4. package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
  5. package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
  6. package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
  7. package/lib/packages/ls-components/components/button/Button.vue/index2.js +19 -19
  8. package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
  9. package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
  10. package/lib/packages/ls-components/components/cropper/Index.vue/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/cropper/Index.vue/index.js +2 -2
  12. package/lib/packages/ls-components/components/cropper/Index.vue/index2.cjs +1 -1
  13. package/lib/packages/ls-components/components/cropper/Index.vue/index2.js +23 -23
  14. package/lib/packages/ls-components/components/cropper/Index.vue/index2.js.br +0 -0
  15. package/lib/packages/ls-components/components/cropper/Index.vue/index2.js.gz +0 -0
  16. package/lib/packages/ls-components/components/layout/Index.vue/index.cjs +1 -1
  17. package/lib/packages/ls-components/components/layout/Index.vue/index.js +1 -1
  18. package/lib/packages/ls-components/components/layout/Index.vue/index2.cjs +1 -1
  19. package/lib/packages/ls-components/components/layout/Index.vue/index2.js +42 -42
  20. package/lib/packages/ls-components/components/layout/Index.vue/index2.js.br +0 -0
  21. package/lib/packages/ls-components/components/layout/Index.vue/index2.js.gz +0 -0
  22. package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/menu/Index.vue/index2.js +1 -1
  26. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
  29. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
  30. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
  31. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +38 -32
  32. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
  33. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
  34. package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
  35. package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +1 -1
  36. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
  37. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +44 -39
  38. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
  39. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
  40. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
  41. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +2 -2
  42. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
  43. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +41 -36
  44. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
  45. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
  46. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
  47. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +3 -3
  48. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
  49. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +34 -29
  50. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
  51. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
  52. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.cjs +1 -1
  53. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.js +2 -2
  54. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.cjs +1 -1
  55. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js +11 -11
  56. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.br +0 -0
  57. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.gz +0 -0
  58. package/lib/packages/ls-components/components/preview_xlsx/config/index.cjs +1 -1
  59. package/lib/packages/ls-components/components/preview_xlsx/config/index.js +5 -5
  60. package/lib/packages/ls-components/components/preview_xlsx/config/index.js.br +0 -0
  61. package/lib/packages/ls-components/components/preview_xlsx/config/index.js.gz +0 -0
  62. package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
  63. package/lib/packages/ls-components/components/tree/Index.vue/index.js +3 -3
  64. package/package.json +1 -1
@@ -1,58 +1,64 @@
1
1
  var h = Object.defineProperty;
2
- var a = (r, l) => h(r, "name", { value: l, configurable: !0 });
2
+ var r = (t, l) => h(t, "name", { value: l, configurable: !0 });
3
3
  /* empty css */
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.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
4
+ import { defineComponent as y, mergeModels as D, useModel as N, createElementBlock as S, createCommentVNode as x, openBlock as d, normalizeClass as B, unref as o, createBlock as E, createElementVNode as M, mergeProps as i, withCtx as O, createVNode as $, renderSlot as A } from "vue";
5
+ import c from "../Docx.vue/index.js";
6
+ import W from "../../_hooks/usePreviewHook/index.js";
7
+ import { lsPreviewProp as b } from "../../_constants/previewType/index.js";
8
+ import { ElWatermark as z } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
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({
10
+ const H = { class: "ls-preview-extra" }, T = y({
11
11
  name: "LSPreviewDocx"
12
- }), Q = /* @__PURE__ */ y({
13
- ...H,
12
+ }), R = /* @__PURE__ */ y({
13
+ ...T,
14
14
  name: "LSPreviewDocx",
15
15
  components: {
16
- LSDocx: d
16
+ LSDocx: c
17
17
  },
18
18
  inheritAttrs: !1,
19
- props: /* @__PURE__ */ g(W, {
19
+ props: /* @__PURE__ */ D(b, {
20
20
  modelValue: {
21
21
  type: Boolean
22
22
  },
23
23
  modelModifiers: {}
24
24
  }),
25
- emits: /* @__PURE__ */ g(["loadComplete", "loadError"], ["update:modelValue"]),
26
- setup(r, { emit: l }) {
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
- }, "loadComplete"), w = /* @__PURE__ */ a(() => {
30
- f(), c("loadError");
25
+ emits: /* @__PURE__ */ D(["loadComplete", "loadError", "onDownload"], ["update:modelValue"]),
26
+ setup(t, { emit: l }) {
27
+ const n = l, p = t, s = N(t, "modelValue"), { comClass: P, defAttrs: u, closeLoading: f, watermarkStyle: V } = W(p, s), w = /* @__PURE__ */ r(() => {
28
+ f(), n("loadComplete");
29
+ }, "loadComplete"), k = /* @__PURE__ */ r(() => {
30
+ f(), n("loadError");
31
31
  }, "loadError");
32
32
  function _(e) {
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);
33
+ var m, a, C, g;
34
+ p.hideOnClickModal && (e.target === e.currentTarget || (a = (m = e == null ? void 0 : e.target) == null ? void 0 : m.className) != null && a.includes && ((g = (C = e == null ? void 0 : e.target) == null ? void 0 : C.className) != null && g.includes("docx-wrapper"))) && (s.value = !1);
35
35
  }
36
- return a(_, "closePreview"), (e, m) => {
37
- const t = b;
38
- return s.value ? (n(), S("div", {
36
+ r(_, "closePreview");
37
+ function v(e) {
38
+ n("onDownload", e);
39
+ }
40
+ return r(v, "onDownload"), (e, m) => {
41
+ const a = z;
42
+ return s.value ? (d(), S("div", {
39
43
  key: 0,
40
44
  class: B(o(P)),
41
45
  onClick: _
42
46
  }, [
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
- onLoadComplete: k,
47
- onLoadError: w
47
+ e.showWatermark ? (d(), E(a, i({ key: 0 }, e.watermarkOption, { style: o(V) }), {
48
+ default: O(() => [
49
+ $(c, i(o(L)(o(u), e.$attrs), {
50
+ onLoadComplete: w,
51
+ onLoadError: k,
52
+ onOnDownload: v
48
53
  }), null, 16)
49
54
  ]),
50
55
  _: 1
51
- }, 16, ["style"])) : (n(), E(d, i({ key: 1 }, o(L)(o(u), e.$attrs), {
52
- onLoadComplete: k,
53
- onLoadError: w
56
+ }, 16, ["style"])) : (d(), E(c, i({ key: 1 }, o(L)(o(u), e.$attrs), {
57
+ onLoadComplete: w,
58
+ onLoadError: k,
59
+ onOnDownload: v
54
60
  }), null, 16)),
55
- M("div", z, [
61
+ M("div", H, [
56
62
  A(e.$slots, "extra", {}, void 0, !0)
57
63
  ])
58
64
  ], 2)) : x("", !0);
@@ -60,5 +66,5 @@ const z = { class: "ls-preview-extra" }, H = y({
60
66
  }
61
67
  });
62
68
  export {
63
- Q as default
69
+ R as default
64
70
  };
@@ -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-d85c49b8"]]);exports.default=u;
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-99bcf22b"]]);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 _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d85c49b8"]]);
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-99bcf22b"]]);
5
5
  export {
6
6
  _ as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var w=Object.defineProperty;var a=(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"),n=/* empty css */C=/* empty css */g=/* empty css */h=/* empty css */p=/* empty css */y={class:"ls-preview-extra"},P=e.defineComponent({name:"LSPreviewImage"}),S=e.defineComponent({...P,name:"LSPreviewImage",components:{LSImage:n.default},inheritAttrs:!1,props:e.mergeModels(g.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(r,{emit:t}){const s=t,l=r,d=e.useModel(r,"modelValue"),{comClass:f,defAttrs:i,closeLoading:m,watermarkStyle:k}=C.default(l,d),c=a(()=>{m(),s("loadComplete")},"loadComplete"),u=a(()=>{m(),s("loadError")},"loadError");return(o,_)=>{const v=h.ElWatermark;return d.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(n.default,e.mergeProps(e.unref(p.default)(e.unref(i),o.$attrs),{"hide-on-click-modal":l.hideOnClickModal,onLoadComplete:c,onLoadError:u}),{viewer:e.withCtx(()=>[e.renderSlot(o.$slots,"viewer",{},void 0,!0)]),_:3},16,["hide-on-click-modal"])]),_:3},16,["style"])):(e.openBlock(),e.createBlock(n.default,e.mergeProps({key:1},e.unref(p.default)(e.unref(i),o.$attrs),{"hide-on-click-modal":l.hideOnClickModal,onLoadComplete:c,onLoadError:u}),{viewer:e.withCtx(()=>[e.renderSlot(o.$slots,"viewer",{},void 0,!0)]),_:3},16,["hide-on-click-modal"])),e.createElementVNode("div",y,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=S;
1
+ "use strict";var C=Object.defineProperty;var t=(r,l)=>C(r,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),d=/* empty css */g=/* empty css */h=/* empty css */y=/* empty css */f=/* empty css */P={class:"ls-preview-extra"},S=e.defineComponent({name:"LSPreviewImage"}),_=e.defineComponent({...S,name:"LSPreviewImage",components:{LSImage:d.default},inheritAttrs:!1,props:e.mergeModels(h.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError","onDownload"],["update:modelValue"]),setup(r,{emit:l}){const n=l,a=r,s=e.useModel(r,"modelValue"),{comClass:w,defAttrs:i,closeLoading:m,watermarkStyle:k}=g.default(a,s),c=t(()=>{m(),n("loadComplete")},"loadComplete"),u=t(()=>{m(),n("loadError")},"loadError");function p(o){n("onDownload",o)}return t(p,"onDownload"),(o,E)=>{const v=y.ElWatermark;return s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(w))},[o.showWatermark?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0},o.watermarkOption,{style:e.unref(k)}),{default:e.withCtx(()=>[e.createVNode(d.default,e.mergeProps(e.unref(f.default)(e.unref(i),o.$attrs),{"hide-on-click-modal":a.hideOnClickModal,onLoadComplete:c,onLoadError:u,onOnDownload:p}),{viewer:e.withCtx(()=>[e.renderSlot(o.$slots,"viewer",{},void 0,!0)]),_:3},16,["hide-on-click-modal"])]),_:3},16,["style"])):(e.openBlock(),e.createBlock(d.default,e.mergeProps({key:1},e.unref(f.default)(e.unref(i),o.$attrs),{"hide-on-click-modal":a.hideOnClickModal,onLoadComplete:c,onLoadError:u,onOnDownload:p}),{viewer:e.withCtx(()=>[e.renderSlot(o.$slots,"viewer",{},void 0,!0)]),_:3},16,["hide-on-click-modal"])),e.createElementVNode("div",P,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=_;
@@ -1,71 +1,76 @@
1
- var V = Object.defineProperty;
2
- var a = (r, t) => V(r, "name", { value: t, configurable: !0 });
1
+ var _ = Object.defineProperty;
2
+ var t = (r, l) => _(r, "name", { value: l, configurable: !0 });
3
3
  /* empty css */
4
- import { defineComponent as E, mergeModels as w, useModel as _, createElementBlock as P, createCommentVNode as M, openBlock as m, normalizeClass as S, unref as o, createBlock as C, createElementVNode as $, mergeProps as i, withCtx as s, createVNode as B, renderSlot as d } from "vue";
5
- import n from "../Image.vue/index.js";
6
- import I from "../../_hooks/usePreviewHook/index.js";
7
- import { lsPreviewProp as N } from "../../_constants/previewType/index.js";
8
- import { ElWatermark as O } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
- import h from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
- const A = { class: "ls-preview-extra" }, W = E({
4
+ import { defineComponent as L, mergeModels as C, useModel as P, createElementBlock as D, createCommentVNode as M, openBlock as m, normalizeClass as O, unref as o, createBlock as h, createElementVNode as S, mergeProps as d, withCtx as i, createVNode as $, renderSlot as s } from "vue";
5
+ import c from "../Image.vue/index.js";
6
+ import B from "../../_hooks/usePreviewHook/index.js";
7
+ import { lsPreviewProp as I } from "../../_constants/previewType/index.js";
8
+ import { ElWatermark as N } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
+ import E from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
+ const A = { class: "ls-preview-extra" }, W = L({
11
11
  name: "LSPreviewImage"
12
- }), K = /* @__PURE__ */ E({
12
+ }), Q = /* @__PURE__ */ L({
13
13
  ...W,
14
14
  name: "LSPreviewImage",
15
15
  components: {
16
- LSImage: n
16
+ LSImage: c
17
17
  },
18
18
  inheritAttrs: !1,
19
- props: /* @__PURE__ */ w(N, {
19
+ props: /* @__PURE__ */ C(I, {
20
20
  modelValue: {
21
21
  type: Boolean
22
22
  },
23
23
  modelModifiers: {}
24
24
  }),
25
- emits: /* @__PURE__ */ w(["loadComplete", "loadError"], ["update:modelValue"]),
26
- setup(r, { emit: t }) {
27
- const c = t, l = r, p = _(r, "modelValue"), { comClass: L, defAttrs: k, closeLoading: u, watermarkStyle: g } = I(l, p), v = /* @__PURE__ */ a(() => {
28
- u(), c("loadComplete");
29
- }, "loadComplete"), f = /* @__PURE__ */ a(() => {
30
- u(), c("loadError");
25
+ emits: /* @__PURE__ */ C(["loadComplete", "loadError", "onDownload"], ["update:modelValue"]),
26
+ setup(r, { emit: l }) {
27
+ const a = l, n = r, p = P(r, "modelValue"), { comClass: g, defAttrs: w, closeLoading: u, watermarkStyle: y } = B(n, p), k = /* @__PURE__ */ t(() => {
28
+ u(), a("loadComplete");
29
+ }, "loadComplete"), f = /* @__PURE__ */ t(() => {
30
+ u(), a("loadError");
31
31
  }, "loadError");
32
- return (e, b) => {
33
- const y = O;
34
- return p.value ? (m(), P("div", {
32
+ function v(e) {
33
+ a("onDownload", e);
34
+ }
35
+ return t(v, "onDownload"), (e, b) => {
36
+ const V = N;
37
+ return p.value ? (m(), D("div", {
35
38
  key: 0,
36
- class: S(o(L))
39
+ class: O(o(g))
37
40
  }, [
38
- e.showWatermark ? (m(), C(y, i({ key: 0 }, e.watermarkOption, { style: o(g) }), {
39
- default: s(() => [
40
- B(n, i(o(h)(o(k), e.$attrs), {
41
- "hide-on-click-modal": l.hideOnClickModal,
42
- onLoadComplete: v,
43
- onLoadError: f
41
+ e.showWatermark ? (m(), h(V, d({ key: 0 }, e.watermarkOption, { style: o(y) }), {
42
+ default: i(() => [
43
+ $(c, d(o(E)(o(w), e.$attrs), {
44
+ "hide-on-click-modal": n.hideOnClickModal,
45
+ onLoadComplete: k,
46
+ onLoadError: f,
47
+ onOnDownload: v
44
48
  }), {
45
- viewer: s(() => [
46
- d(e.$slots, "viewer", {}, void 0, !0)
49
+ viewer: i(() => [
50
+ s(e.$slots, "viewer", {}, void 0, !0)
47
51
  ]),
48
52
  _: 3
49
53
  }, 16, ["hide-on-click-modal"])
50
54
  ]),
51
55
  _: 3
52
- }, 16, ["style"])) : (m(), C(n, i({ key: 1 }, o(h)(o(k), e.$attrs), {
53
- "hide-on-click-modal": l.hideOnClickModal,
54
- onLoadComplete: v,
55
- onLoadError: f
56
+ }, 16, ["style"])) : (m(), h(c, d({ key: 1 }, o(E)(o(w), e.$attrs), {
57
+ "hide-on-click-modal": n.hideOnClickModal,
58
+ onLoadComplete: k,
59
+ onLoadError: f,
60
+ onOnDownload: v
56
61
  }), {
57
- viewer: s(() => [
58
- d(e.$slots, "viewer", {}, void 0, !0)
62
+ viewer: i(() => [
63
+ s(e.$slots, "viewer", {}, void 0, !0)
59
64
  ]),
60
65
  _: 3
61
66
  }, 16, ["hide-on-click-modal"])),
62
- $("div", A, [
63
- d(e.$slots, "extra", {}, void 0, !0)
67
+ S("div", A, [
68
+ s(e.$slots, "extra", {}, void 0, !0)
64
69
  ])
65
70
  ], 2)) : M("", !0);
66
71
  };
67
72
  }
68
73
  });
69
74
  export {
70
- K as default
75
+ Q as default
71
76
  };
@@ -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-fb4e3e2a"]]);exports.default=u;
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-3e465aa0"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fb4e3e2a"]]);
3
+ import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3e465aa0"]]);
5
5
  export {
6
6
  _ as default
7
7
  };
@@ -1 +1 @@
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
+ "use strict";var C=Object.defineProperty;var r=(t,l)=>C(t,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),s=/* empty css */g=/* empty css */y=/* empty css */_=/* empty css */p=/* empty css */E={class:"ls-preview-extra"},L=e.defineComponent({name:"LSPreviewPdf"}),q=e.defineComponent({...L,name:"LSPreviewPdf",components:{LSPdf:s.default},inheritAttrs:!1,props:e.mergeModels(y.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError","onDownload"],["update:modelValue"]),setup(t,{emit:l}){const n=l,d=t,a=e.useModel(t,"modelValue"),{comClass:w,defAttrs:i,closeLoading:u,watermarkStyle:k}=g.default(d,a),c=r(()=>{u(),n("loadComplete")},"loadComplete"),m=r(()=>{u(),n("loadError")},"loadError");function v(o){d.hideOnClickModal&&o.target===o.currentTarget&&(a.value=!1)}r(v,"closePreview");function f(o){n("onDownload",o)}return r(f,"onDownload"),(o,B)=>{const P=_.ElWatermark;return a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(w)),onClick:v},[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(p.default)(e.unref(i),o.$attrs),{onLoadComplete:c,onLoadError:m,onOnDownload:f}),null,16)]),_:1},16,["style"])):(e.openBlock(),e.createBlock(s.default,e.mergeProps({key:1},e.unref(p.default)(e.unref(i),o.$attrs),{onLoadComplete:c,onLoadError:m,onOnDownload:f}),null,16)),e.createElementVNode("div",E,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=q;
@@ -1,64 +1,69 @@
1
- var V = Object.defineProperty;
2
- var t = (r, l) => V(r, "name", { value: l, configurable: !0 });
1
+ var _ = Object.defineProperty;
2
+ var r = (t, l) => _(t, "name", { value: l, configurable: !0 });
3
3
  /* empty css */
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.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
- import w from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
- const x = { class: "ls-preview-extra" }, z = C({
4
+ import { defineComponent as P, mergeModels as k, useModel as g, createElementBlock as h, createCommentVNode as D, openBlock as s, normalizeClass as S, unref as o, createBlock as v, createElementVNode as B, mergeProps as m, withCtx as M, createVNode as O, renderSlot as N } from "vue";
5
+ import d from "../Pdf.vue/index.js";
6
+ import $ from "../../_hooks/usePreviewHook/index.js";
7
+ import { lsPreviewProp as A } from "../../_constants/previewType/index.js";
8
+ import { ElWatermark as W } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
+ import C from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
+ const b = { class: "ls-preview-extra" }, z = P({
11
11
  name: "LSPreviewPdf"
12
- }), Q = /* @__PURE__ */ C({
12
+ }), K = /* @__PURE__ */ P({
13
13
  ...z,
14
14
  name: "LSPreviewPdf",
15
15
  components: {
16
- LSPdf: i
16
+ LSPdf: d
17
17
  },
18
18
  inheritAttrs: !1,
19
- props: /* @__PURE__ */ k(W, {
19
+ props: /* @__PURE__ */ k(A, {
20
20
  modelValue: {
21
21
  type: Boolean
22
22
  },
23
23
  modelModifiers: {}
24
24
  }),
25
- emits: /* @__PURE__ */ k(["loadComplete", "loadError"], ["update:modelValue"]),
26
- setup(r, { emit: l }) {
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
- }, "loadComplete"), u = /* @__PURE__ */ t(() => {
30
- p(), d("loadError");
25
+ emits: /* @__PURE__ */ k(["loadComplete", "loadError", "onDownload"], ["update:modelValue"]),
26
+ setup(t, { emit: l }) {
27
+ const a = l, i = t, n = g(t, "modelValue"), { comClass: E, defAttrs: c, closeLoading: p, watermarkStyle: L } = $(i, n), f = /* @__PURE__ */ r(() => {
28
+ p(), a("loadComplete");
29
+ }, "loadComplete"), u = /* @__PURE__ */ r(() => {
30
+ p(), a("loadError");
31
31
  }, "loadError");
32
- function E(e) {
33
- c.hideOnClickModal && e.target === e.currentTarget && (a.value = !1);
32
+ function y(e) {
33
+ i.hideOnClickModal && e.target === e.currentTarget && (n.value = !1);
34
34
  }
35
- return t(E, "closePreview"), (e, D) => {
36
- const L = b;
37
- return a.value ? (m(), _("div", {
35
+ r(y, "closePreview");
36
+ function w(e) {
37
+ a("onDownload", e);
38
+ }
39
+ return r(w, "onDownload"), (e, H) => {
40
+ const V = W;
41
+ return n.value ? (s(), h("div", {
38
42
  key: 0,
39
- class: S(o(P)),
40
- onClick: E
43
+ class: S(o(E)),
44
+ onClick: y
41
45
  }, [
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), {
46
+ e.showWatermark ? (s(), v(V, m({ key: 0 }, e.watermarkOption, { style: o(L) }), {
47
+ default: M(() => [
48
+ O(d, m(o(C)(o(c), e.$attrs), {
46
49
  onLoadComplete: f,
47
- onLoadError: u
50
+ onLoadError: u,
51
+ onOnDownload: w
48
52
  }), null, 16)
49
53
  ]),
50
54
  _: 1
51
- }, 16, ["style"])) : (m(), v(i, n({ key: 1 }, o(w)(o(s), e.$attrs), {
55
+ }, 16, ["style"])) : (s(), v(d, m({ key: 1 }, o(C)(o(c), e.$attrs), {
52
56
  onLoadComplete: f,
53
- onLoadError: u
57
+ onLoadError: u,
58
+ onOnDownload: w
54
59
  }), null, 16)),
55
- M("div", x, [
56
- O(e.$slots, "extra", {}, void 0, !0)
60
+ B("div", b, [
61
+ N(e.$slots, "extra", {}, void 0, !0)
57
62
  ])
58
- ], 2)) : h("", !0);
63
+ ], 2)) : D("", !0);
59
64
  };
60
65
  }
61
66
  });
62
67
  export {
63
- Q as default
68
+ K as default
64
69
  };
@@ -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-d4ee4d15"]]);exports.default=u;
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-d1429f47"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-d4ee4d15"]]);
3
+ import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d1429f47"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1 +1 @@
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;
1
+ "use strict";var C=Object.defineProperty;var t=(r,l)=>C(r,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("vue"),a=/* empty css */g=/* empty css */y=/* empty css */P=/* empty css */p=/* empty css */_={class:"ls-preview-extra"},E=e.defineComponent({name:"LSPreviewXlsx"}),L=e.defineComponent({...E,name:"LSPreviewXlsx",components:{LSXlsx:a.default},inheritAttrs:!1,props:e.mergeModels(y.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError","onDownload"],["update:modelValue"]),setup(r,{emit:l}){const n=l,f=r,s=e.useModel(r,"modelValue"),{comClass:w,defAttrs:d,closeLoading:u,watermarkStyle:k}=g.default(f,s),i=t(()=>{u(),n("loadComplete")},"loadComplete"),m=t(()=>{u(),n("loadError")},"loadError");function c(o){n("onDownload",o)}return t(c,"onDownload"),(o,q)=>{const v=P.ElWatermark;return s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(w))},[o.showWatermark?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0},o.watermarkOption,{style:e.unref(k)}),{default:e.withCtx(()=>[e.createVNode(a.default,e.mergeProps(e.unref(p.default)(e.unref(d),o.$attrs),{onLoadComplete:i,onLoadError:m,onOnDownload:c}),null,16)]),_:1},16,["style"])):(e.openBlock(),e.createBlock(a.default,e.mergeProps({key:1},e.unref(p.default)(e.unref(d),o.$attrs),{onLoadComplete:i,onLoadError:m,onOnDownload:c}),null,16)),e.createElementVNode("div",_,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])],2)):e.createCommentVNode("",!0)}}});exports.default=L;
@@ -1,59 +1,64 @@
1
- var V = Object.defineProperty;
2
- var l = (r, t) => V(r, "name", { value: t, configurable: !0 });
1
+ var _ = Object.defineProperty;
2
+ var t = (r, l) => _(r, "name", { value: l, configurable: !0 });
3
3
  /* empty css */
4
- import { defineComponent as v, mergeModels as f, useModel as _, createElementBlock as P, createCommentVNode as h, openBlock as a, normalizeClass as S, unref as e, createBlock as k, createElementVNode as g, mergeProps as s, withCtx as B, createVNode as x, renderSlot as M } from "vue";
4
+ import { defineComponent as C, mergeModels as w, useModel as P, createElementBlock as h, createCommentVNode as D, openBlock as n, normalizeClass as S, unref as o, createBlock as k, createElementVNode as g, mergeProps as s, withCtx as B, createVNode as x, renderSlot as M } from "vue";
5
5
  import m from "../Xlsx.vue/index.js";
6
6
  import N from "../../_hooks/usePreviewHook/index.js";
7
- import { lsPreviewProp as X } from "../../_constants/previewType/index.js";
8
- import { ElWatermark as $ } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
- import w from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
- const A = { class: "ls-preview-extra" }, W = v({
7
+ import { lsPreviewProp as O } from "../../_constants/previewType/index.js";
8
+ import { ElWatermark as X } from "../../../../../node_modules/.pnpm/element-plus@2.11.8_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index/index.js";
9
+ import v from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
10
+ const $ = { class: "ls-preview-extra" }, A = C({
11
11
  name: "LSPreviewXlsx"
12
- }), I = /* @__PURE__ */ v({
13
- ...W,
12
+ }), J = /* @__PURE__ */ C({
13
+ ...A,
14
14
  name: "LSPreviewXlsx",
15
15
  components: {
16
16
  LSXlsx: m
17
17
  },
18
18
  inheritAttrs: !1,
19
- props: /* @__PURE__ */ f(X, {
19
+ props: /* @__PURE__ */ w(O, {
20
20
  modelValue: {
21
21
  type: Boolean
22
22
  },
23
23
  modelModifiers: {}
24
24
  }),
25
- emits: /* @__PURE__ */ f(["loadComplete", "loadError"], ["update:modelValue"]),
26
- setup(r, { emit: t }) {
27
- const n = t, C = r, d = _(r, "modelValue"), { comClass: E, defAttrs: i, closeLoading: p, watermarkStyle: L } = N(C, d), c = /* @__PURE__ */ l(() => {
28
- p(), n("loadComplete");
29
- }, "loadComplete"), u = /* @__PURE__ */ l(() => {
30
- p(), n("loadError");
25
+ emits: /* @__PURE__ */ w(["loadComplete", "loadError", "onDownload"], ["update:modelValue"]),
26
+ setup(r, { emit: l }) {
27
+ const a = l, E = r, d = P(r, "modelValue"), { comClass: L, defAttrs: i, closeLoading: p, watermarkStyle: y } = N(E, d), c = /* @__PURE__ */ t(() => {
28
+ p(), a("loadComplete");
29
+ }, "loadComplete"), u = /* @__PURE__ */ t(() => {
30
+ p(), a("loadError");
31
31
  }, "loadError");
32
- return (o, b) => {
33
- const y = $;
34
- return d.value ? (a(), P("div", {
32
+ function f(e) {
33
+ a("onDownload", e);
34
+ }
35
+ return t(f, "onDownload"), (e, W) => {
36
+ const V = X;
37
+ return d.value ? (n(), h("div", {
35
38
  key: 0,
36
- class: S(e(E))
39
+ class: S(o(L))
37
40
  }, [
38
- o.showWatermark ? (a(), k(y, s({ key: 0 }, o.watermarkOption, { style: e(L) }), {
41
+ e.showWatermark ? (n(), k(V, s({ key: 0 }, e.watermarkOption, { style: o(y) }), {
39
42
  default: B(() => [
40
- x(m, s(e(w)(e(i), o.$attrs), {
43
+ x(m, s(o(v)(o(i), e.$attrs), {
41
44
  onLoadComplete: c,
42
- onLoadError: u
45
+ onLoadError: u,
46
+ onOnDownload: f
43
47
  }), null, 16)
44
48
  ]),
45
49
  _: 1
46
- }, 16, ["style"])) : (a(), k(m, s({ key: 1 }, e(w)(e(i), o.$attrs), {
50
+ }, 16, ["style"])) : (n(), k(m, s({ key: 1 }, o(v)(o(i), e.$attrs), {
47
51
  onLoadComplete: c,
48
- onLoadError: u
52
+ onLoadError: u,
53
+ onOnDownload: f
49
54
  }), null, 16)),
50
- g("div", A, [
51
- M(o.$slots, "extra", {}, void 0, !0)
55
+ g("div", $, [
56
+ M(e.$slots, "extra", {}, void 0, !0)
52
57
  ])
53
- ], 2)) : h("", !0);
58
+ ], 2)) : D("", !0);
54
59
  };
55
60
  }
56
61
  });
57
62
  export {
58
- I as default
63
+ J as default
59
64
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-6823c766"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-27fcd9d4"]]);exports.default=u;
@@ -2,7 +2,7 @@ import o from "./index2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6823c766"]]);
5
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-27fcd9d4"]]);
6
6
  export {
7
- _ as default
7
+ s as default
8
8
  };
@@ -1 +1 @@
1
- "use strict";var Q=Object.defineProperty;var c=(v,x)=>Q(v,"name",{value:x,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),W=/* empty css */Y=/* empty css */I=/* empty css */L=/* empty css */Z=/* empty css */V=/* empty css */ee=require("luckyexcel"),n=;/* empty css */;/* empty css */;/* empty css */;/* empty css */const j=/* empty css */te=e.defineComponent({name:"LSXlsx"}),oe=e.defineComponent({...te,props:Y.xlsxProps,emits:I.previewEmits,setup(v,{emit:x}){const f=W.useNamespace("xlsx"),A=f.b(),w=v,l=x,h=e.useAttrs(),R=e.computed(()=>h["has-download"]||h.hasDownload),P=e.computed(()=>h["download-loading"]||h.downloadLoading||!1);e.watch(()=>w.source,t=>{if(t){const{size:o}=t||{};o/1024/1024<=n.fileSizeLimit?$(t):w.hasPagination?U(t):(j.ElMessage.error(`文件大小超过 ${n.fileSizeLimit} MB,加载失败!`),l("loadComplete"))}},{immediate:!0,deep:!0});const E=e.ref(!1);function _(){const t=document.scripts;for(let o=0;o<t.length;o++)if(t[o].src.includes("luckysheet"))return!0;return!1}c(_,"isLuckySheet");const X=c(()=>{w.onClose&&w.onClose(),l("update:source",[])},"closeFunc");async function $(t){let o=!1;if(await b(t))try{ee.transformExcelToLucky(t,function(r){if(r.sheets==null){l("loadError");return}window.luckysheet.destroy(),window.luckysheet.create({data:r.sheets,title:r.info.name,...n.luckysheetConfig}),o=!0,l("loadComplete")});let a=setTimeout(()=>{o||(j.ElMessage.error(I.fileEmpty),l("loadError"),clearTimeout(a))},6e3)}catch{l("loadError")}}c($,"initXlsx");function O(t){const o=Math.min(0+n.rowsPerBatch,t.length),a=t.slice(0,o);let r=0;const s=[[]];return window.luckysheet.transToCellData(a).forEach(i=>{const{r:m}=i;r!==m&&(r=m,s[r]=[]),s[r].push(i)}),s}c(O,"getSheetData");async function U(t){if(await e.nextTick(),!!await b(t))try{const o=new FileReader;o.onload=async function(a){var z,N;const r=V.read(a.target.result,{type:"binary",dense:!0});let s=0;const i=(r.SheetNames||[]).map(u=>({name:u,data:V.utils.sheet_to_json(r.Sheets[u],{header:1})})),m=e.ref((z=i[s])==null?void 0:z.name),p=e.ref((N=i[s])==null?void 0:N.data);let y=p.value.length,D=0;const J=(i||[]).map((u,k)=>({name:u.name,index:k+1,status:"1",order:k,data:O(u.data)}));function T(){if(D*n.rowsPerBatch>=y)return;const u=D*n.rowsPerBatch,k=Math.min(u+n.rowsPerBatch,y),K=p.value.slice(u,k);let g=0;const q=[[]];if(window.luckysheet.transToCellData(K).forEach(C=>{const{r:d}=C;g!==d&&(g=d,q[g]=[]),q[g].push(C)}),E.value)window.luckysheet.updataSheet({data:[{name:m,index:s+1,status:"1",order:s,data:q}]});else{window.luckysheet.destroy();const C={...n.luckysheetConfig,hook:{sheetActivate(d){var S,F,M;if(s!=d){s=d-1,m.value=(S=i[s])==null?void 0:S.name,p.value=((F=i[s])==null?void 0:F.data)||[],y=p.value.length;const B=(M=document.getElementById("luckysheet"))==null?void 0:M.querySelector('.spage-number button[data-page="1"]');B==null||B.click()}},onTogglePager(d){const{page:S}=d;D=S-1,T()}}};window.luckysheet.create({data:J,pager:{pageIndex:1,total:y,pageSize:n.rowsPerBatch,showTotal:!0,showSkip:!0,showPN:!0,prevPage:"",nextPage:"",totalTxt:""},...C}),E.value=!0}l("loadComplete")}c(T,"loadBatch"),T()},o.readAsArrayBuffer(t)}catch{l("loadError")}}c(U,"initXlsxLarge");async function b(t){return!t||!Z.isFile(t)?!1:(_()||(await L.loadCss(n.cssList),await L.loadJs(n.jsList)),!0)}c(b,"initLuckySheet");function G(){E.value&&window.luckysheet.destroy(),_()&&(L.removeCss(n.cssList),L.removeJs(n.jsList))}c(G,"resetLuckySheet");function H(){l("onDownload",h.downloadData)}return c(H,"onDownload"),e.onBeforeUnmount(()=>{G()}),(t,o)=>{const a=e.resolveComponent("LSIcon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(A))},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(f).e("btn"),e.unref(f).e("close")]),onClick:X},[e.createVNode(a,{name:"Close",size:24,color:"#FFF"})],2),e.unref(R)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(f).e("btn"),e.unref(f).e("download")]),onClick:H},[e.createVNode(a,{class:e.normalizeClass({"is-loading":e.unref(P)}),name:`${e.unref(P)?"Loading":"Download"}`,size:24,color:"#FFF"},null,8,["class","name"])],2)):e.createCommentVNode("",!0),o[0]||(o[0]=e.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1))],2)}}});exports.default=oe;
1
+ "use strict";var Q=Object.defineProperty;var c=(v,x)=>Q(v,"name",{value:x,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=/* empty css */W=/* empty css */Y=/* empty css */L=/* empty css */Z=require("luckyexcel"),V=/* empty css */n=/* empty css */ee=;/* empty css */;/* empty css */;/* empty css */;/* empty css */const j=/* empty css */te=e.defineComponent({name:"LSXlsx"}),oe=e.defineComponent({...te,props:ee.xlsxProps,emits:I.previewEmits,setup(v,{emit:x}){const f=W.useNamespace("xlsx"),A=f.b(),w=v,l=x,h=e.useAttrs(),R=e.computed(()=>h["has-download"]||h.hasDownload),P=e.computed(()=>h["download-loading"]||h.downloadLoading||!1);e.watch(()=>w.source,t=>{if(t){const{size:o}=t||{};o/1024/1024<=n.fileSizeLimit?$(t):w.hasPagination?U(t):(j.ElMessage.error(`文件大小超过 ${n.fileSizeLimit} MB,加载失败!`),l("loadComplete"))}},{immediate:!0,deep:!0});const E=e.ref(!1);function _(){const t=document.scripts;for(let o=0;o<t.length;o++)if(t[o].src.includes("luckysheet"))return!0;return!1}c(_,"isLuckySheet");const X=c(()=>{w.onClose&&w.onClose(),l("update:source",[])},"closeFunc");async function $(t){let o=!1;if(await b(t))try{Z.transformExcelToLucky(t,function(r){if(r.sheets==null){l("loadError");return}window.luckysheet.destroy(),window.luckysheet.create({data:r.sheets,title:r.info.name,...n.luckysheetConfig}),o=!0,l("loadComplete")});let a=setTimeout(()=>{o||(j.ElMessage.error(I.fileEmpty),l("loadError"),clearTimeout(a))},6e3)}catch{l("loadError")}}c($,"initXlsx");function O(t){const o=Math.min(0+n.rowsPerBatch,t.length),a=t.slice(0,o);let r=0;const s=[[]];return window.luckysheet.transToCellData(a).forEach(i=>{const{r:m}=i;r!==m&&(r=m,s[r]=[]),s[r].push(i)}),s}c(O,"getSheetData");async function U(t){if(await e.nextTick(),!!await b(t))try{const o=new FileReader;o.onload=async function(a){var z,N;const r=V.read(a.target.result,{type:"binary",dense:!0});let s=0;const i=(r.SheetNames||[]).map(u=>({name:u,data:V.utils.sheet_to_json(r.Sheets[u],{header:1})})),m=e.ref((z=i[s])==null?void 0:z.name),p=e.ref((N=i[s])==null?void 0:N.data);let y=p.value.length,D=0;const J=(i||[]).map((u,k)=>({name:u.name,index:k+1,status:"1",order:k,data:O(u.data)}));function T(){if(D*n.rowsPerBatch>=y)return;const u=D*n.rowsPerBatch,k=Math.min(u+n.rowsPerBatch,y),K=p.value.slice(u,k);let g=0;const q=[[]];if(window.luckysheet.transToCellData(K).forEach(C=>{const{r:d}=C;g!==d&&(g=d,q[g]=[]),q[g].push(C)}),E.value)window.luckysheet.updataSheet({data:[{name:m,index:s+1,status:"1",order:s,data:q}]});else{window.luckysheet.destroy();const C={...n.luckysheetConfig,hook:{sheetActivate(d){var S,F,M;if(s!=d){s=d-1,m.value=(S=i[s])==null?void 0:S.name,p.value=((F=i[s])==null?void 0:F.data)||[],y=p.value.length;const B=(M=document.getElementById("luckysheet"))==null?void 0:M.querySelector('.spage-number button[data-page="1"]');B==null||B.click()}},onTogglePager(d){const{page:S}=d;D=S-1,T()}}};window.luckysheet.create({data:J,pager:{pageIndex:1,total:y,pageSize:n.rowsPerBatch,showTotal:!0,showSkip:!0,showPN:!0,prevPage:"",nextPage:"",totalTxt:""},...C}),E.value=!0}l("loadComplete")}c(T,"loadBatch"),T()},o.readAsArrayBuffer(t)}catch{l("loadError")}}c(U,"initXlsxLarge");async function b(t){return!t||!Y.isFile(t)?!1:(_()||(await L.loadCss(n.cssList),await L.loadJs(n.jsList)),!0)}c(b,"initLuckySheet");function G(){E.value&&window.luckysheet.destroy(),_()&&(L.removeCss(n.cssList),L.removeJs(n.jsList))}c(G,"resetLuckySheet");function H(){l("onDownload",h.downloadData)}return c(H,"onDownload"),e.onBeforeUnmount(()=>{G()}),(t,o)=>{const a=e.resolveComponent("LSIcon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(A))},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(f).e("btn"),e.unref(f).e("close")]),onClick:X},[e.createVNode(a,{name:"Close",size:24,color:"#FFF"})],2),e.unref(R)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(f).e("btn"),e.unref(f).e("download")]),onClick:H},[e.createVNode(a,{class:e.normalizeClass({"is-loading":e.unref(P)}),name:`${e.unref(P)?"Loading":"Download"}`,size:24,color:"#FFF"},null,8,["class","name"])],2)):e.createCommentVNode("",!0),o[0]||(o[0]=e.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1))],2)}}});exports.default=oe;