@lingshugroup/web-plus 1.0.36 → 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.
- 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/preview_docx/Docx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/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 +42 -42
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +159 -149
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +44 -44
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +4 -4
- 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 +38 -38
- 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_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +41 -41
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { useEventListener as
|
|
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
|
|
7
|
-
import { EVENT_CODE as
|
|
8
|
-
import { isNumber as Ee,
|
|
9
|
-
import { keysOf as
|
|
10
|
-
import { imageViewerProps as
|
|
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
|
|
13
|
-
import
|
|
14
|
-
const
|
|
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
|
-
}),
|
|
17
|
-
...
|
|
18
|
-
props:
|
|
19
|
-
emits:
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
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
|
-
},
|
|
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
|
-
}),
|
|
37
|
+
}), se = I(() => {
|
|
38
38
|
const { source: e } = i;
|
|
39
|
-
return e.length <= 1;
|
|
40
|
-
}),
|
|
41
|
-
const { scale: e, deg: t, offsetX: n, offsetY:
|
|
42
|
-
let g = n / e, b =
|
|
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:
|
|
59
|
+
transition: u ? "transform .3s" : ""
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
}),
|
|
63
|
-
i.onClose && i.onClose(),
|
|
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
|
|
66
|
-
|
|
65
|
+
function A() {
|
|
66
|
+
ce(), ie();
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
function
|
|
70
|
-
const e =
|
|
68
|
+
a(A, "hide");
|
|
69
|
+
function le() {
|
|
70
|
+
const e = $((n) => {
|
|
71
71
|
switch (n.code) {
|
|
72
|
-
case
|
|
73
|
-
i.closeOnPressEscape &&
|
|
72
|
+
case C.esc:
|
|
73
|
+
i.closeOnPressEscape && A();
|
|
74
74
|
break;
|
|
75
|
-
case
|
|
76
|
-
|
|
75
|
+
case C.space:
|
|
76
|
+
G();
|
|
77
77
|
break;
|
|
78
|
-
case
|
|
79
|
-
|
|
78
|
+
case C.left:
|
|
79
|
+
W();
|
|
80
80
|
break;
|
|
81
|
-
case
|
|
81
|
+
case C.up:
|
|
82
82
|
p("zoomIn");
|
|
83
83
|
break;
|
|
84
|
-
case
|
|
85
|
-
|
|
84
|
+
case C.right:
|
|
85
|
+
q();
|
|
86
86
|
break;
|
|
87
|
-
case
|
|
87
|
+
case C.down:
|
|
88
88
|
p("zoomOut");
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
|
-
}), t =
|
|
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
|
-
|
|
101
|
-
|
|
100
|
+
j.run(() => {
|
|
101
|
+
E(document, "keydown", e), E(document, te, t);
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
function
|
|
106
|
-
|
|
104
|
+
a(le, "registerEventListener");
|
|
105
|
+
function ce() {
|
|
106
|
+
j.stop();
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
function
|
|
110
|
-
|
|
108
|
+
a(ce, "unregisterEventListener");
|
|
109
|
+
function B() {
|
|
110
|
+
w.value = !1, N("loadComplete");
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
function
|
|
114
|
-
|
|
112
|
+
a(B, "handleImgLoad");
|
|
113
|
+
function P(e) {
|
|
114
|
+
w.value = !1, e.target.alt = "ls.image.error", N("loadError");
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
119
|
-
|
|
120
|
-
const { offsetX: t, offsetY: n } =
|
|
121
|
-
|
|
122
|
-
}), Y =
|
|
123
|
-
|
|
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
|
-
|
|
128
|
-
function
|
|
129
|
-
|
|
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
|
-
|
|
141
|
-
function
|
|
142
|
-
|
|
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
|
-
|
|
154
|
-
function
|
|
155
|
-
if (
|
|
156
|
-
const e =
|
|
157
|
-
|
|
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
|
-
|
|
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
|
-
|
|
165
|
-
function
|
|
166
|
-
|
|
164
|
+
a(X, "setActiveItem");
|
|
165
|
+
function W() {
|
|
166
|
+
V.value && !i.infinite || X(d.value - 1);
|
|
167
167
|
}
|
|
168
|
-
|
|
169
|
-
function
|
|
170
|
-
|
|
168
|
+
a(W, "prev");
|
|
169
|
+
function q() {
|
|
170
|
+
Z.value && !i.infinite || X(d.value + 1);
|
|
171
171
|
}
|
|
172
|
-
|
|
172
|
+
a(q, "next");
|
|
173
173
|
function p(e, t = {}) {
|
|
174
|
-
if (
|
|
175
|
-
const { zoomRate: n, rotateDeg:
|
|
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
|
-
|
|
183
|
+
r.scale > 0.2 && (r.scale = Number.parseFloat((r.scale / n).toFixed(3)));
|
|
184
184
|
break;
|
|
185
185
|
case "zoomIn":
|
|
186
|
-
|
|
186
|
+
r.scale < 7 && (r.scale = Number.parseFloat((r.scale * n).toFixed(3)));
|
|
187
187
|
break;
|
|
188
188
|
case "clockwise":
|
|
189
|
-
|
|
189
|
+
r.deg += c;
|
|
190
190
|
break;
|
|
191
191
|
case "anticlockwise":
|
|
192
|
-
|
|
192
|
+
r.deg -= c;
|
|
193
193
|
break;
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
r.enableTransition = u;
|
|
196
196
|
}
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
const e =
|
|
200
|
-
e != null && e.complete || (
|
|
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
|
-
}),
|
|
203
|
-
|
|
204
|
-
}),
|
|
202
|
+
}), J(d, (e) => {
|
|
203
|
+
N("switch", e);
|
|
204
|
+
}), be(() => {
|
|
205
205
|
var e, t;
|
|
206
|
-
|
|
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) => (
|
|
211
|
-
(
|
|
210
|
+
}), (e, t) => (h(), z("div", null, [
|
|
211
|
+
(h(), he(ke, {
|
|
212
212
|
to: "body",
|
|
213
213
|
disabled: !e.teleported
|
|
214
214
|
}, [
|
|
215
|
-
|
|
215
|
+
m(we, {
|
|
216
216
|
name: "viewer-fade",
|
|
217
217
|
appear: ""
|
|
218
218
|
}, {
|
|
219
219
|
default: Fe(() => [
|
|
220
|
-
|
|
220
|
+
f("div", {
|
|
221
221
|
ref_key: "wrapper",
|
|
222
|
-
ref:
|
|
222
|
+
ref: M,
|
|
223
223
|
tabindex: -1,
|
|
224
|
-
class:
|
|
225
|
-
style:
|
|
224
|
+
class: l(o(s).e("wrapper")),
|
|
225
|
+
style: D({ zIndex: o(re) })
|
|
226
226
|
}, [
|
|
227
|
-
|
|
228
|
-
class:
|
|
229
|
-
onClick: t[0] || (t[0] =
|
|
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
|
-
|
|
232
|
-
class:
|
|
233
|
-
onClick:
|
|
231
|
+
f("span", {
|
|
232
|
+
class: l([o(s).e("btn"), o(s).e("close")]),
|
|
233
|
+
onClick: A
|
|
234
234
|
}, [
|
|
235
|
-
|
|
235
|
+
m(v, {
|
|
236
236
|
name: "Close",
|
|
237
237
|
size: 24,
|
|
238
238
|
color: "#FFF"
|
|
239
239
|
})
|
|
240
240
|
], 2),
|
|
241
|
-
o(
|
|
242
|
-
|
|
243
|
-
class:
|
|
244
|
-
onClick:
|
|
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
|
-
|
|
246
|
+
m(v, {
|
|
247
247
|
name: "ArrowLeft",
|
|
248
248
|
size: 24,
|
|
249
249
|
color: "#FFF"
|
|
250
250
|
})
|
|
251
251
|
], 2),
|
|
252
|
-
|
|
253
|
-
class:
|
|
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
|
-
|
|
256
|
+
m(v, {
|
|
257
257
|
name: "ArrowRight",
|
|
258
258
|
size: 24,
|
|
259
259
|
color: "#FFF"
|
|
260
260
|
})
|
|
261
261
|
], 2)
|
|
262
262
|
], 64)),
|
|
263
|
-
|
|
264
|
-
class:
|
|
263
|
+
f("div", {
|
|
264
|
+
class: l([o(s).e("btn"), o(s).e("actions")])
|
|
265
265
|
}, [
|
|
266
|
-
|
|
267
|
-
class:
|
|
266
|
+
f("div", {
|
|
267
|
+
class: l(o(s).e("actions__inner"))
|
|
268
268
|
}, [
|
|
269
|
-
|
|
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
|
-
|
|
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
|
-
|
|
282
|
-
class:
|
|
281
|
+
f("i", {
|
|
282
|
+
class: l(o(s).e("actions__divider"))
|
|
283
283
|
}, null, 2),
|
|
284
|
-
|
|
285
|
-
name: o(
|
|
284
|
+
m(v, {
|
|
285
|
+
name: o(T).name,
|
|
286
286
|
size: 24,
|
|
287
287
|
color: "#FFF",
|
|
288
|
-
onClick:
|
|
288
|
+
onClick: G
|
|
289
289
|
}, null, 8, ["name"]),
|
|
290
|
-
|
|
291
|
-
class:
|
|
290
|
+
f("i", {
|
|
291
|
+
class: l(o(s).e("actions__divider"))
|
|
292
292
|
}, null, 2),
|
|
293
|
-
|
|
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
|
-
|
|
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
|
-
|
|
308
|
-
|
|
307
|
+
e.source ? (h(), z("div", {
|
|
308
|
+
key: 1,
|
|
309
|
+
class: l(o(s).e("canvas"))
|
|
309
310
|
}, [
|
|
310
|
-
(
|
|
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__ */
|
|
313
|
+
ref: /* @__PURE__ */ a((u) => o(R)[c] = u, "ref"),
|
|
313
314
|
key: n,
|
|
314
315
|
src: n,
|
|
315
|
-
style:
|
|
316
|
-
class:
|
|
317
|
-
onLoad:
|
|
318
|
-
onError:
|
|
319
|
-
onMousedown:
|
|
320
|
-
}, null, 46,
|
|
321
|
-
[
|
|
322
|
-
])), 128))
|
|
323
|
-
|
|
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
|
-
|
|
344
|
+
Ke as default
|
|
335
345
|
};
|
|
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-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
|
|
4
|
+
const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2258e153"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
|
2
|
-
var t = (a,
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import
|
|
6
|
-
import { lsPreviewProp as
|
|
7
|
-
import { ElLoading as
|
|
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
|
|
12
|
-
import
|
|
13
|
-
const
|
|
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
|
-
}),
|
|
16
|
-
|
|
15
|
+
}), Z = /* @__PURE__ */ v({
|
|
16
|
+
...$,
|
|
17
17
|
name: "LSPreviewImage",
|
|
18
18
|
components: {
|
|
19
|
-
LSImage:
|
|
19
|
+
LSImage: g
|
|
20
20
|
},
|
|
21
21
|
inheritAttrs: !1,
|
|
22
|
-
props: /* @__PURE__ */ p(
|
|
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:
|
|
30
|
-
const c =
|
|
31
|
-
zoomSize:
|
|
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
|
-
}),
|
|
34
|
-
let
|
|
35
|
-
|
|
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 &&
|
|
38
|
+
r && u();
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
immediate: !0,
|
|
42
42
|
deep: !0
|
|
43
43
|
}
|
|
44
|
-
),
|
|
44
|
+
), f(
|
|
45
45
|
() => e.source,
|
|
46
46
|
(r) => {
|
|
47
|
-
|
|
47
|
+
d.source = r;
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
immediate: !0,
|
|
51
51
|
deep: !0
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
function
|
|
55
|
-
e.needLoading && (
|
|
56
|
-
e.source || (
|
|
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(
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
}, "closeLoading"),
|
|
63
|
-
|
|
64
|
-
}, "loadComplete"),
|
|
65
|
-
|
|
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
|
|
68
|
-
o.value &&
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
}), (r,
|
|
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:
|
|
73
|
+
class: z(i(C))
|
|
74
74
|
}, [
|
|
75
|
-
|
|
76
|
-
onLoadComplete:
|
|
77
|
-
onLoadError:
|
|
75
|
+
N(g, T(i(U)(i(d), r.$attrs), {
|
|
76
|
+
onLoadComplete: E,
|
|
77
|
+
onLoadError: B
|
|
78
78
|
}), null, 16)
|
|
79
|
-
], 2)) :
|
|
79
|
+
], 2)) : y("", !0);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
Z as default
|
|
84
84
|
};
|