@lingshugroup/web-plus 1.0.35 → 1.0.37

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 (46) 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/preview_docx/Docx.vue/index.cjs +1 -1
  5. package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
  6. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
  7. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
  8. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
  9. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +42 -42
  10. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
  11. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
  12. package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
  13. package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
  14. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
  15. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +159 -149
  16. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
  17. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
  18. package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
  19. package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
  20. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
  21. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +44 -44
  22. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
  23. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
  24. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
  25. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +4 -4
  26. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
  27. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +38 -38
  28. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
  29. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
  30. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
  31. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +1 -1
  32. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
  33. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +41 -41
  34. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
  35. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
  36. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  37. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  38. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  39. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +111 -104
  40. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  41. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  42. package/lib/packages/ls-components/components/upload/types/index.cjs +1 -1
  43. package/lib/packages/ls-components/components/upload/types/index.js +4 -0
  44. package/lib/packages/ls-components/components/upload/types/index.js.br +0 -0
  45. package/lib/packages/ls-components/components/upload/types/index.js.gz +0 -0
  46. package/package.json +1 -1
@@ -1,31 +1,31 @@
1
- var me = Object.defineProperty;
2
- var r = (y, S) => me(y, "name", { value: S, configurable: !0 });
3
- import { defineComponent as q, ref as O, effectScope as fe, shallowRef as de, reactive as pe, computed as w, watch as B, nextTick as ve, onMounted as ge, openBlock as x, createElementBlock as E, createBlock as be, Teleport as he, createVNode as f, Transition as ke, withCtx as Fe, createElementVNode as u, normalizeClass as c, unref as o, normalizeStyle as P, withModifiers as we, Fragment as G, createCommentVNode as Ie, renderList as ze, withDirectives as xe, vShow as Ce, renderSlot as Ne } from "vue";
4
- import { useEventListener as L } from "../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.js";
1
+ var fe = Object.defineProperty;
2
+ var a = (L, S) => fe(L, "name", { value: S, configurable: !0 });
3
+ import { defineComponent as ee, ref as O, effectScope as de, shallowRef as pe, reactive as ve, computed as I, watch as J, nextTick as ge, onMounted as be, openBlock as h, createElementBlock as z, createBlock as he, Teleport as ke, createVNode as m, Transition as we, withCtx as Fe, createElementVNode as f, normalizeClass as l, unref as o, normalizeStyle as D, withModifiers as Ie, Fragment as K, createCommentVNode as Q, renderList as ze, withDirectives as Ce, vShow as xe, renderSlot as Ne } from "vue";
4
+ import { useEventListener as E } from "../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.js";
5
5
  import { useNamespace as Te } from "../../_hooks/useNamespace/index.js";
6
- import { useZIndex as Oe } from "../../_hooks/useZIndex/index.js";
7
- import { EVENT_CODE as I } from "../../_constants/aria/index.js";
8
- import { isNumber as Ee, isFirefox as Le } from "../../_utils/check/index.js";
9
- import { keysOf as ye } from "../../_utils/types/index.js";
10
- import { imageViewerProps as Se, previewEmits as Re } from "../types/index.js";
6
+ import { useZIndex as ye } from "../../_hooks/useZIndex/index.js";
7
+ import { EVENT_CODE as C } from "../../_constants/aria/index.js";
8
+ import { isString as Oe, isNumber as Ee, isArray as Le, isFirefox as Se } from "../../_utils/check/index.js";
9
+ import { keysOf as Me } from "../../_utils/types/index.js";
10
+ import { imageViewerProps as Re, previewEmits as Ae } from "../types/index.js";
11
11
  import v from "../../icon/Index.vue/index.js";
12
- import A from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.js";
13
- import W from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
14
- const Me = ["src"], Xe = q({
12
+ import $ from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.js";
13
+ import U from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
14
+ const Xe = ["src"], Ye = ["src"], De = ee({
15
15
  name: "LSImage"
16
- }), We = /* @__PURE__ */ q({
17
- ...Xe,
18
- props: Se,
19
- emits: Re,
20
- setup(y, { expose: S, emit: J }) {
21
- const h = {
16
+ }), Ke = /* @__PURE__ */ ee({
17
+ ...De,
18
+ props: Re,
19
+ emits: Ae,
20
+ setup(L, { expose: S, emit: oe }) {
21
+ const k = {
22
22
  CONTAIN: {
23
23
  name: "FullScreen"
24
24
  },
25
25
  ORIGINAL: {
26
26
  name: "ScaleToOriginal"
27
27
  }
28
- }, K = Le() ? "DOMMouseScroll" : "mousewheel", i = y, C = J, s = Te("image"), { nextZIndex: Q } = Oe(), R = O(), D = O([]), $ = fe(), k = O(!0), d = O(i.initialIndex), N = de(h.CONTAIN), a = pe({
28
+ }, te = Se() ? "DOMMouseScroll" : "mousewheel", i = L, N = oe, s = Te("image"), { nextZIndex: ne } = ye(), M = O(), R = O([]), j = de(), w = O(!0), d = O(i.initialIndex), T = pe(k.CONTAIN), r = ve({
29
29
  scale: 1,
30
30
  deg: 0,
31
31
  offsetX: 0,
@@ -34,12 +34,12 @@ const Me = ["src"], Xe = q({
34
34
  width: "auto",
35
35
  height: "auto",
36
36
  objectFit: "none"
37
- }), U = w(() => {
37
+ }), se = I(() => {
38
38
  const { source: e } = i;
39
- return e.length <= 1;
40
- }), j = w(() => d.value === 0), V = w(() => d.value === i.source.length - 1), ee = w(() => i.source[d.value]), te = w(() => {
41
- const { scale: e, deg: t, offsetX: n, offsetY: l, enableTransition: m, width: z, height: Y, objectFit: T } = a;
42
- let g = n / e, b = l / e;
39
+ return Oe(e) || e.length <= 1;
40
+ }), V = I(() => d.value === 0), Z = I(() => d.value === i.source.length - 1), ae = I(() => i.source[d.value]), H = I(() => {
41
+ const { scale: e, deg: t, offsetX: n, offsetY: c, enableTransition: u, width: x, height: Y, objectFit: y } = r;
42
+ let g = n / e, b = c / e;
43
43
  switch (t % 360) {
44
44
  case 90:
45
45
  case -270:
@@ -56,39 +56,39 @@ const Me = ["src"], Xe = q({
56
56
  }
57
57
  const F = {
58
58
  transform: `scale(${e}) rotate(${t}deg) translate(${g}px, ${b}px)`,
59
- transition: m ? "transform .3s" : ""
59
+ transition: u ? "transform .3s" : ""
60
60
  };
61
- return N.value.name === h.CONTAIN.name && (F.maxWidth = F.maxHeight = "100%"), F.width = z, F.height = Y, F.objectFit = T, F;
62
- }), oe = w(() => Ee(i.zIndex) ? i.zIndex : Q()), ne = /* @__PURE__ */ r(() => {
63
- i.onClose && i.onClose(), C("update:source", []);
61
+ return T.value.name === k.CONTAIN.name && (F.maxWidth = F.maxHeight = "100%"), F.width = x, F.height = Y, F.objectFit = y, F;
62
+ }), re = I(() => Ee(i.zIndex) ? i.zIndex : ne()), ie = /* @__PURE__ */ a(() => {
63
+ i.onClose && i.onClose(), N("update:source", []);
64
64
  }, "closeFunc");
65
- function M() {
66
- ae(), ne();
65
+ function A() {
66
+ ce(), ie();
67
67
  }
68
- r(M, "hide");
69
- function se() {
70
- const e = A((n) => {
68
+ a(A, "hide");
69
+ function le() {
70
+ const e = $((n) => {
71
71
  switch (n.code) {
72
- case I.esc:
73
- i.closeOnPressEscape && M();
72
+ case C.esc:
73
+ i.closeOnPressEscape && A();
74
74
  break;
75
- case I.space:
76
- Z();
75
+ case C.space:
76
+ G();
77
77
  break;
78
- case I.left:
79
- H();
78
+ case C.left:
79
+ W();
80
80
  break;
81
- case I.up:
81
+ case C.up:
82
82
  p("zoomIn");
83
83
  break;
84
- case I.right:
85
- _();
84
+ case C.right:
85
+ q();
86
86
  break;
87
- case I.down:
87
+ case C.down:
88
88
  p("zoomOut");
89
89
  break;
90
90
  }
91
- }), t = A((n) => {
91
+ }), t = $((n) => {
92
92
  (n.wheelDelta ? n.wheelDelta : -n.detail) > 0 ? p("zoomIn", {
93
93
  zoomRate: 1.2,
94
94
  enableTransition: !1
@@ -97,36 +97,36 @@ const Me = ["src"], Xe = q({
97
97
  enableTransition: !1
98
98
  });
99
99
  });
100
- $.run(() => {
101
- L(document, "keydown", e), L(document, K, t);
100
+ j.run(() => {
101
+ E(document, "keydown", e), E(document, te, t);
102
102
  });
103
103
  }
104
- r(se, "registerEventListener");
105
- function ae() {
106
- $.stop();
104
+ a(le, "registerEventListener");
105
+ function ce() {
106
+ j.stop();
107
107
  }
108
- r(ae, "unregisterEventListener");
109
- function re() {
110
- k.value = !1, C("loadComplete");
108
+ a(ce, "unregisterEventListener");
109
+ function B() {
110
+ w.value = !1, N("loadComplete");
111
111
  }
112
- r(re, "handleImgLoad");
113
- function ie(e) {
114
- k.value = !1, e.target.alt = "ls.image.error", C("loadError");
112
+ a(B, "handleImgLoad");
113
+ function P(e) {
114
+ w.value = !1, e.target.alt = "ls.image.error", N("loadError");
115
115
  }
116
- r(ie, "handleImgError");
117
- function le(e) {
118
- if (k.value || e.button !== 0 || !R.value) return;
119
- a.enableTransition = !1;
120
- const { offsetX: t, offsetY: n } = a, l = e.pageX, m = e.pageY, z = A((T) => {
121
- a.offsetX = t + T.pageX - l, a.offsetY = n + T.pageY - m;
122
- }), Y = L(document, "mousemove", z);
123
- L(document, "mouseup", () => {
116
+ a(P, "handleImgError");
117
+ function _(e) {
118
+ if (w.value || e.button !== 0 || !M.value) return;
119
+ r.enableTransition = !1;
120
+ const { offsetX: t, offsetY: n } = r, c = e.pageX, u = e.pageY, x = $((y) => {
121
+ r.offsetX = t + y.pageX - c, r.offsetY = n + y.pageY - u;
122
+ }), Y = E(document, "mousemove", x);
123
+ E(document, "mouseup", () => {
124
124
  Y();
125
125
  }), e.preventDefault();
126
126
  }
127
- r(le, "handleMouseDown");
128
- function ce() {
129
- W(a, {
127
+ a(_, "handleMouseDown");
128
+ function ue() {
129
+ U(r, {
130
130
  scale: 1,
131
131
  deg: 0,
132
132
  offsetX: 0,
@@ -137,9 +137,9 @@ const Me = ["src"], Xe = q({
137
137
  objectFit: "none"
138
138
  });
139
139
  }
140
- r(ce, "reset");
141
- function ue() {
142
- W(a, {
140
+ a(ue, "reset");
141
+ function me() {
142
+ U(r, {
143
143
  scale: 1,
144
144
  deg: 0,
145
145
  offsetX: 0,
@@ -150,29 +150,29 @@ const Me = ["src"], Xe = q({
150
150
  objectFit: "cover"
151
151
  });
152
152
  }
153
- r(ue, "fullScreen");
154
- function Z() {
155
- if (k.value) return;
156
- const e = ye(h), t = Object.values(h), n = N.value.name, m = (t.findIndex((z) => z.name === n) + 1) % e.length;
157
- N.value = h[e[m]], n === h.CONTAIN.name ? ue() : ce();
153
+ a(me, "fullScreen");
154
+ function G() {
155
+ if (w.value) return;
156
+ const e = Me(k), t = Object.values(k), n = T.value.name, u = (t.findIndex((x) => x.name === n) + 1) % e.length;
157
+ T.value = k[e[u]], n === k.CONTAIN.name ? me() : ue();
158
158
  }
159
- r(Z, "toggleMode");
159
+ a(G, "toggleMode");
160
160
  function X(e) {
161
161
  const t = i.source.length;
162
162
  d.value = (e + t) % t;
163
163
  }
164
- r(X, "setActiveItem");
165
- function H() {
166
- j.value && !i.infinite || X(d.value - 1);
164
+ a(X, "setActiveItem");
165
+ function W() {
166
+ V.value && !i.infinite || X(d.value - 1);
167
167
  }
168
- r(H, "prev");
169
- function _() {
170
- V.value && !i.infinite || X(d.value + 1);
168
+ a(W, "prev");
169
+ function q() {
170
+ Z.value && !i.infinite || X(d.value + 1);
171
171
  }
172
- r(_, "next");
172
+ a(q, "next");
173
173
  function p(e, t = {}) {
174
- if (k.value) return;
175
- const { zoomRate: n, rotateDeg: l, enableTransition: m } = {
174
+ if (w.value) return;
175
+ const { zoomRate: n, rotateDeg: c, enableTransition: u } = {
176
176
  zoomRate: 1.4,
177
177
  rotateDeg: 90,
178
178
  enableTransition: !0,
@@ -180,123 +180,123 @@ const Me = ["src"], Xe = q({
180
180
  };
181
181
  switch (e) {
182
182
  case "zoomOut":
183
- a.scale > 0.2 && (a.scale = Number.parseFloat((a.scale / n).toFixed(3)));
183
+ r.scale > 0.2 && (r.scale = Number.parseFloat((r.scale / n).toFixed(3)));
184
184
  break;
185
185
  case "zoomIn":
186
- a.scale < 7 && (a.scale = Number.parseFloat((a.scale * n).toFixed(3)));
186
+ r.scale < 7 && (r.scale = Number.parseFloat((r.scale * n).toFixed(3)));
187
187
  break;
188
188
  case "clockwise":
189
- a.deg += l;
189
+ r.deg += c;
190
190
  break;
191
191
  case "anticlockwise":
192
- a.deg -= l;
192
+ r.deg -= c;
193
193
  break;
194
194
  }
195
- a.enableTransition = m;
195
+ r.enableTransition = u;
196
196
  }
197
- return r(p, "handleActions"), B(ee, () => {
198
- ve(() => {
199
- const e = D.value[0];
200
- e != null && e.complete || (k.value = !0);
197
+ return a(p, "handleActions"), J(ae, () => {
198
+ ge(() => {
199
+ const e = R.value[0];
200
+ e != null && e.complete || (w.value = !0);
201
201
  });
202
- }), B(d, (e) => {
203
- C("switch", e);
204
- }), ge(() => {
202
+ }), J(d, (e) => {
203
+ N("switch", e);
204
+ }), be(() => {
205
205
  var e, t;
206
- se(), (t = (e = R.value) == null ? void 0 : e.focus) == null || t.call(e);
206
+ le(), (t = (e = M.value) == null ? void 0 : e.focus) == null || t.call(e);
207
207
  }), S({
208
208
  /** @description manually switch image */
209
209
  setActiveItem: X
210
- }), (e, t) => (x(), E("div", null, [
211
- (x(), be(he, {
210
+ }), (e, t) => (h(), z("div", null, [
211
+ (h(), he(ke, {
212
212
  to: "body",
213
213
  disabled: !e.teleported
214
214
  }, [
215
- f(ke, {
215
+ m(we, {
216
216
  name: "viewer-fade",
217
217
  appear: ""
218
218
  }, {
219
219
  default: Fe(() => [
220
- u("div", {
220
+ f("div", {
221
221
  ref_key: "wrapper",
222
- ref: R,
222
+ ref: M,
223
223
  tabindex: -1,
224
- class: c(o(s).e("wrapper")),
225
- style: P({ zIndex: o(oe) })
224
+ class: l(o(s).e("wrapper")),
225
+ style: D({ zIndex: o(re) })
226
226
  }, [
227
- u("div", {
228
- class: c(o(s).e("mask")),
229
- onClick: t[0] || (t[0] = we((n) => e.hideOnClickModal && M(), ["self"]))
227
+ f("div", {
228
+ class: l(o(s).e("mask")),
229
+ onClick: t[0] || (t[0] = Ie((n) => e.hideOnClickModal && A(), ["self"]))
230
230
  }, null, 2),
231
- u("span", {
232
- class: c([o(s).e("btn"), o(s).e("close")]),
233
- onClick: M
231
+ f("span", {
232
+ class: l([o(s).e("btn"), o(s).e("close")]),
233
+ onClick: A
234
234
  }, [
235
- f(v, {
235
+ m(v, {
236
236
  name: "Close",
237
237
  size: 24,
238
238
  color: "#FFF"
239
239
  })
240
240
  ], 2),
241
- o(U) ? Ie("", !0) : (x(), E(G, { key: 0 }, [
242
- u("span", {
243
- class: c([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(j))]),
244
- onClick: H
241
+ o(se) ? Q("", !0) : (h(), z(K, { key: 0 }, [
242
+ f("span", {
243
+ class: l([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(V))]),
244
+ onClick: W
245
245
  }, [
246
- f(v, {
246
+ m(v, {
247
247
  name: "ArrowLeft",
248
248
  size: 24,
249
249
  color: "#FFF"
250
250
  })
251
251
  ], 2),
252
- u("span", {
253
- class: c([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(V))]),
254
- onClick: _
252
+ f("span", {
253
+ class: l([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(Z))]),
254
+ onClick: q
255
255
  }, [
256
- f(v, {
256
+ m(v, {
257
257
  name: "ArrowRight",
258
258
  size: 24,
259
259
  color: "#FFF"
260
260
  })
261
261
  ], 2)
262
262
  ], 64)),
263
- u("div", {
264
- class: c([o(s).e("btn"), o(s).e("actions")])
263
+ f("div", {
264
+ class: l([o(s).e("btn"), o(s).e("actions")])
265
265
  }, [
266
- u("div", {
267
- class: c(o(s).e("actions__inner"))
266
+ f("div", {
267
+ class: l(o(s).e("actions__inner"))
268
268
  }, [
269
- f(v, {
269
+ m(v, {
270
270
  name: "ZoomOut",
271
271
  size: 24,
272
272
  color: "#FFF",
273
273
  onClick: t[1] || (t[1] = (n) => p("zoomOut"))
274
274
  }),
275
- f(v, {
275
+ m(v, {
276
276
  name: "ZoomIn",
277
277
  size: 24,
278
278
  color: "#FFF",
279
279
  onClick: t[2] || (t[2] = (n) => p("zoomIn"))
280
280
  }),
281
- u("i", {
282
- class: c(o(s).e("actions__divider"))
281
+ f("i", {
282
+ class: l(o(s).e("actions__divider"))
283
283
  }, null, 2),
284
- f(v, {
285
- name: o(N).name,
284
+ m(v, {
285
+ name: o(T).name,
286
286
  size: 24,
287
287
  color: "#FFF",
288
- onClick: Z
288
+ onClick: G
289
289
  }, null, 8, ["name"]),
290
- u("i", {
291
- class: c(o(s).e("actions__divider"))
290
+ f("i", {
291
+ class: l(o(s).e("actions__divider"))
292
292
  }, null, 2),
293
- f(v, {
293
+ m(v, {
294
294
  name: "RefreshLeft",
295
295
  size: 24,
296
296
  color: "#FFF",
297
297
  onClick: t[3] || (t[3] = (n) => p("anticlockwise"))
298
298
  }),
299
- f(v, {
299
+ m(v, {
300
300
  name: "RefreshRight",
301
301
  size: 24,
302
302
  color: "#FFF",
@@ -304,23 +304,33 @@ const Me = ["src"], Xe = q({
304
304
  })
305
305
  ], 2)
306
306
  ], 2),
307
- u("div", {
308
- class: c(o(s).e("canvas"))
307
+ e.source ? (h(), z("div", {
308
+ key: 1,
309
+ class: l(o(s).e("canvas"))
309
310
  }, [
310
- (x(!0), E(G, null, ze(e.source, (n, l) => xe((x(), E("img", {
311
+ o(Le)(e.source) ? (h(!0), z(K, { key: 0 }, ze(e.source, (n, c) => Ce((h(), z("img", {
311
312
  ref_for: !0,
312
- ref: /* @__PURE__ */ r((m) => o(D)[l] = m, "ref"),
313
+ ref: /* @__PURE__ */ a((u) => o(R)[c] = u, "ref"),
313
314
  key: n,
314
315
  src: n,
315
- style: P(o(te)),
316
- class: c(o(s).e("img")),
317
- onLoad: re,
318
- onError: ie,
319
- onMousedown: le
320
- }, null, 46, Me)), [
321
- [Ce, l === o(d)]
322
- ])), 128))
323
- ], 2),
316
+ style: D(o(H)),
317
+ class: l(o(s).e("img")),
318
+ onLoad: B,
319
+ onError: P,
320
+ onMousedown: _
321
+ }, null, 46, Xe)), [
322
+ [xe, c === o(d)]
323
+ ])), 128)) : (h(), z("img", {
324
+ ref: /* @__PURE__ */ a((n) => o(R)[0] = n, "ref"),
325
+ key: e.source,
326
+ src: e.source,
327
+ style: D(o(H)),
328
+ class: l(o(s).e("img")),
329
+ onLoad: B,
330
+ onError: P,
331
+ onMousedown: _
332
+ }, null, 46, Ye))
333
+ ], 2)) : Q("", !0),
324
334
  Ne(e.$slots, "default", {}, void 0, !0)
325
335
  ], 6)
326
336
  ]),
@@ -331,5 +341,5 @@ const Me = ["src"], Xe = q({
331
341
  }
332
342
  });
333
343
  export {
334
- We as default
344
+ Ke as default
335
345
  };
@@ -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-f1a1594e"]]);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-2258e153"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f1a1594e"]]);
4
+ const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2258e153"]]);
5
5
  export {
6
- m as default
6
+ _ as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty;var n=(s,u)=>C(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=,/* empty css */f=,/* empty css */E=,/* empty css */P=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const _=,/* empty css */S=,/* empty css */w=e.defineComponent({name:"LSPreviewImage"}),B=e.defineComponent({...w,name:"LSPreviewImage",components:{LSImage:f.default},inheritAttrs:!1,props:e.mergeModels(E.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const i=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),d=e.reactive({zoomSize:p,source:""}),g=M.useNamespace("preview").b(),c=e.ref(),v=e.ref("文件加载失败,请检查文件是否已损坏!");let a=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=P.ElLoading.service(o.loadingOption)),a=setTimeout(()=>{o.source||(_.ElMessage.error("文件加载超时,请检查文件是否存在!"),l(),r.value=!1),clearTimeout(a)},6e3)}n(m,"openLoading");const l=n(()=>{a&&clearTimeout(a),o.needLoading&&c.value&&c.value.close()},"closeLoading"),q=n(()=>{l(),i("loadComplete")},"loadComplete"),L=n(()=>{l(),console.error(v.value),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,h)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(g))},[e.createVNode(f.default,e.mergeProps(e.unref(S.default)(e.unref(d),t.$attrs),{onLoadComplete:q,onLoadError:L}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=B;
1
+ "use strict";var L=Object.defineProperty;var n=(a,u)=>L(a,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewImage"}),w=e.defineComponent({...S,name:"LSPreviewImage",components:{LSImage:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:u}){const i=u,o=a,{zoomSize:p}=e.toRefs(o),r=e.useModel(a,"modelValue"),d=e.reactive({zoomSize:p,source:""}),g=C.useNamespace("preview").b(),c=e.ref();let s=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),s=setTimeout(()=>{o.source||(P.ElMessage.error("文件加载超时,请检查文件是否存在!"),l(),r.value=!1),clearTimeout(s)},6e3)}n(m,"openLoading");const l=n(()=>{s&&clearTimeout(s),o.needLoading&&c.value&&c.value.close()},"closeLoading"),v=n(()=>{l(),i("loadComplete")},"loadComplete"),q=n(()=>{l(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,I)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(g))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:v,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
@@ -1,84 +1,84 @@
1
- var _ = Object.defineProperty;
2
- var t = (a, s) => _(a, "name", { value: s, configurable: !0 });
3
- import { defineComponent as L, mergeModels as p, toRefs as w, useModel as I, reactive as S, ref as f, watch as g, onBeforeMount as V, onBeforeUnmount as h, openBlock as k, createElementBlock as z, normalizeClass as N, unref as i, createVNode as T, mergeProps as y, createCommentVNode as A } from "vue";
4
- import { useNamespace as x } from "../../_hooks/useNamespace/index.js";
5
- import v from "../Image.vue/index.js";
6
- import { lsPreviewProp as O } from "../types/index.js";
7
- import { ElLoading as R } from "element-plus";
1
+ var M = Object.defineProperty;
2
+ var t = (a, l) => M(a, "name", { value: l, configurable: !0 });
3
+ import { defineComponent as v, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as I, watch as f, onBeforeMount as S, onBeforeUnmount as V, openBlock as h, createElementBlock as k, normalizeClass as z, unref as i, createVNode as N, mergeProps as T, createCommentVNode as y } from "vue";
4
+ import { useNamespace as A } from "../../_hooks/useNamespace/index.js";
5
+ import g from "../Image.vue/index.js";
6
+ import { lsPreviewProp as x } from "../types/index.js";
7
+ import { ElLoading as O } from "element-plus";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
- import { ElMessage as U } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
12
- import $ from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
13
- const b = L({
11
+ import { ElMessage as R } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
12
+ import U from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
13
+ const $ = v({
14
14
  name: "LSPreviewImage"
15
- }), ee = /* @__PURE__ */ L({
16
- ...b,
15
+ }), Z = /* @__PURE__ */ v({
16
+ ...$,
17
17
  name: "LSPreviewImage",
18
18
  components: {
19
- LSImage: v
19
+ LSImage: g
20
20
  },
21
21
  inheritAttrs: !1,
22
- props: /* @__PURE__ */ p(O, {
22
+ props: /* @__PURE__ */ p(x, {
23
23
  modelValue: {
24
24
  type: Boolean
25
25
  },
26
26
  modelModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ p(["loadComplete", "loadError"], ["update:modelValue"]),
29
- setup(a, { emit: s }) {
30
- const c = s, e = a, { zoomSize: C } = w(e), o = I(a, "modelValue"), u = S({
31
- zoomSize: C,
29
+ setup(a, { emit: l }) {
30
+ const c = l, e = a, { zoomSize: L } = P(e), o = _(a, "modelValue"), d = w({
31
+ zoomSize: L,
32
32
  source: ""
33
- }), E = x("preview").b(), l = f(), M = f("文件加载失败,请检查文件是否已损坏!");
34
- let n = null;
35
- g(
33
+ }), C = A("preview").b(), s = I();
34
+ let m = null;
35
+ f(
36
36
  () => o == null ? void 0 : o.value,
37
37
  (r) => {
38
- r && d();
38
+ r && u();
39
39
  },
40
40
  {
41
41
  immediate: !0,
42
42
  deep: !0
43
43
  }
44
- ), g(
44
+ ), f(
45
45
  () => e.source,
46
46
  (r) => {
47
- u.source = r;
47
+ d.source = r;
48
48
  },
49
49
  {
50
50
  immediate: !0,
51
51
  deep: !0
52
52
  }
53
53
  );
54
- function d() {
55
- e.needLoading && (l.value = R.service(e.loadingOption)), n = setTimeout(() => {
56
- e.source || (U.error("文件加载超时,请检查文件是否存在!"), m(), o.value = !1), clearTimeout(n);
54
+ function u() {
55
+ e.needLoading && (s.value = O.service(e.loadingOption)), m = setTimeout(() => {
56
+ e.source || (R.error("文件加载超时,请检查文件是否存在!"), n(), o.value = !1), clearTimeout(m);
57
57
  }, 6e3);
58
58
  }
59
- t(d, "openLoading");
60
- const m = /* @__PURE__ */ t(() => {
61
- n && clearTimeout(n), e.needLoading && l.value && l.value.close();
62
- }, "closeLoading"), B = /* @__PURE__ */ t(() => {
63
- m(), c("loadComplete");
64
- }, "loadComplete"), P = /* @__PURE__ */ t(() => {
65
- m(), console.error(M.value), c("loadError");
59
+ t(u, "openLoading");
60
+ const n = /* @__PURE__ */ t(() => {
61
+ m && clearTimeout(m), e.needLoading && s.value && s.value.close();
62
+ }, "closeLoading"), E = /* @__PURE__ */ t(() => {
63
+ n(), c("loadComplete");
64
+ }, "loadComplete"), B = /* @__PURE__ */ t(() => {
65
+ n(), c("loadError");
66
66
  }, "loadError");
67
- return V(() => {
68
- o.value && d();
69
- }), h(() => {
70
- m();
71
- }), (r, q) => o.value ? (k(), z("div", {
67
+ return S(() => {
68
+ o.value && u();
69
+ }), V(() => {
70
+ n();
71
+ }), (r, j) => o.value ? (h(), k("div", {
72
72
  key: 0,
73
- class: N(i(E))
73
+ class: z(i(C))
74
74
  }, [
75
- T(v, y(i($)(i(u), r.$attrs), {
76
- onLoadComplete: B,
77
- onLoadError: P
75
+ N(g, T(i(U)(i(d), r.$attrs), {
76
+ onLoadComplete: E,
77
+ onLoadError: B
78
78
  }), null, 16)
79
- ], 2)) : A("", !0);
79
+ ], 2)) : y("", !0);
80
80
  }
81
81
  });
82
82
  export {
83
- ee as default
83
+ Z as default
84
84
  };