@lingshugroup/web-plus 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/icon/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/icon/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/icon/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js +16 -15
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/icon/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js +54 -39
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +30 -27
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +132 -131
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +33 -30
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +31 -27
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js +132 -116
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Pdf.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +25 -22
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js +124 -108
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (
|
|
3
|
-
import { defineComponent as te, useAttrs as
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var a = (S, D) => ve(S, "name", { value: D, configurable: !0 });
|
|
3
|
+
import { defineComponent as te, useAttrs as ge, computed as k, ref as O, effectScope as we, shallowRef as be, reactive as ke, watch as ee, nextTick as Fe, onMounted as he, createElementBlock as F, openBlock as g, createBlock as Ie, Teleport as ze, createVNode as u, Transition as Ce, withCtx as Ne, createElementVNode as d, normalizeStyle as Y, normalizeClass as i, unref as o, createCommentVNode as j, renderSlot as oe, withModifiers as Te, Fragment as V, renderList as xe, withDirectives as ye, vShow as Le } from "vue";
|
|
4
4
|
import { useEventListener as E } from "../../../../../node_modules/.pnpm/@vueuse_core@12.8.2_typescript@5.9.2/node_modules/@vueuse/core/index/index.js";
|
|
5
5
|
import { useNamespace as Oe } from "../../_hooks/useNamespace/index.js";
|
|
6
6
|
import { useZIndex as Ee } from "../../_hooks/useZIndex/index.js";
|
|
7
7
|
import { EVENT_CODE as C } from "../../_constants/aria/index.js";
|
|
8
|
-
import { isString as
|
|
8
|
+
import { isString as Se, isNumber as De, isArray as $e, isFirefox as Ae } from "../../_utils/check/index.js";
|
|
9
9
|
import { keysOf as Me } from "../../_utils/types/index.js";
|
|
10
10
|
import { imageViewerProps as Re } from "../types/index.js";
|
|
11
|
-
import { previewEmits as
|
|
11
|
+
import { previewEmits as Xe } from "../../_constants/previewType/index.js";
|
|
12
12
|
import p from "../../icon/Index.vue/index.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
13
|
+
import Z from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.js";
|
|
14
|
+
import ne from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
15
|
+
const Ye = ["src"], je = ["src"], Ve = te({
|
|
16
16
|
name: "LSImage"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
17
|
+
}), oo = /* @__PURE__ */ te({
|
|
18
|
+
...Ve,
|
|
19
19
|
props: Re,
|
|
20
|
-
emits:
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
20
|
+
emits: Xe,
|
|
21
|
+
setup(S, { expose: D, emit: se }) {
|
|
22
|
+
const h = {
|
|
23
23
|
CONTAIN: {
|
|
24
24
|
name: "FullScreen"
|
|
25
25
|
},
|
|
26
26
|
ORIGINAL: {
|
|
27
27
|
name: "ScaleToOriginal"
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, ae = Ae() ? "DOMMouseScroll" : "mousewheel", l = S, N = se, x = ge(), H = k(() => x["download-loading"] || x.downloadLoading || !1), s = Oe("image"), { nextZIndex: re } = Ee(), $ = O(), A = O([]), B = we(), I = O(!0), v = O(l.initialIndex), y = be(h.CONTAIN), r = ke({
|
|
30
30
|
scale: 1,
|
|
31
31
|
deg: 0,
|
|
32
32
|
offsetX: 0,
|
|
@@ -35,16 +35,16 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
35
35
|
width: "auto",
|
|
36
36
|
height: "auto",
|
|
37
37
|
objectFit: "contain"
|
|
38
|
-
}),
|
|
38
|
+
}), ie = k(() => {
|
|
39
39
|
const { source: e } = l || {};
|
|
40
|
-
return
|
|
41
|
-
}),
|
|
40
|
+
return Se(e) || e.length <= 1;
|
|
41
|
+
}), P = k(() => v.value === 0), G = k(() => {
|
|
42
42
|
const e = l.source;
|
|
43
43
|
return v.value === e.length - 1;
|
|
44
|
-
}),
|
|
45
|
-
const { scale: e, deg:
|
|
46
|
-
let w =
|
|
47
|
-
switch (
|
|
44
|
+
}), le = k(() => (l.source || {})[v.value]), W = k(() => {
|
|
45
|
+
const { scale: e, deg: t, offsetX: n, offsetY: c, enableTransition: f, width: T, height: X, objectFit: L } = r;
|
|
46
|
+
let w = n / e, b = c / e;
|
|
47
|
+
switch (t % 360) {
|
|
48
48
|
case 90:
|
|
49
49
|
case -270:
|
|
50
50
|
[w, b] = [b, -w];
|
|
@@ -58,32 +58,32 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
58
58
|
[w, b] = [-b, w];
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
transform: `scale(${e}) rotate(${
|
|
61
|
+
const z = {
|
|
62
|
+
transform: `scale(${e}) rotate(${t}deg) translate(${w}px, ${b}px)`,
|
|
63
63
|
transition: f ? "transform .3s" : ""
|
|
64
64
|
};
|
|
65
|
-
return
|
|
66
|
-
}),
|
|
65
|
+
return y.value.name === h.CONTAIN.name && (z.maxWidth = z.maxHeight = "100%"), z.width = T, z.height = X, z.objectFit = L, z;
|
|
66
|
+
}), ce = k(() => De(l.zIndex) ? l.zIndex : re()), ue = /* @__PURE__ */ a(() => {
|
|
67
67
|
l.onClose && l.onClose(), N("update:source", []);
|
|
68
68
|
}, "closeFunc");
|
|
69
69
|
function M() {
|
|
70
|
-
|
|
70
|
+
me(), ue();
|
|
71
71
|
}
|
|
72
72
|
a(M, "hide");
|
|
73
|
-
function
|
|
74
|
-
const e =
|
|
75
|
-
switch (
|
|
73
|
+
function de() {
|
|
74
|
+
const e = Z((n) => {
|
|
75
|
+
switch (n.code) {
|
|
76
76
|
// ESC
|
|
77
77
|
case C.esc:
|
|
78
78
|
l.closeOnPressEscape && M();
|
|
79
79
|
break;
|
|
80
80
|
// SPACE
|
|
81
81
|
case C.space:
|
|
82
|
-
|
|
82
|
+
K();
|
|
83
83
|
break;
|
|
84
84
|
// LEFT_ARROW
|
|
85
85
|
case C.left:
|
|
86
|
-
|
|
86
|
+
Q();
|
|
87
87
|
break;
|
|
88
88
|
// UP_ARROW
|
|
89
89
|
case C.up:
|
|
@@ -91,15 +91,15 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
91
91
|
break;
|
|
92
92
|
// RIGHT_ARROW
|
|
93
93
|
case C.right:
|
|
94
|
-
|
|
94
|
+
U();
|
|
95
95
|
break;
|
|
96
96
|
// DOWN_ARROW
|
|
97
97
|
case C.down:
|
|
98
98
|
m("zoomOut");
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
102
|
-
(
|
|
101
|
+
}), t = Z((n) => {
|
|
102
|
+
(n.wheelDelta ? n.wheelDelta : -n.detail) > 0 ? m("zoomIn", {
|
|
103
103
|
zoomRate: 1.2,
|
|
104
104
|
enableTransition: !1
|
|
105
105
|
}) : m("zoomOut", {
|
|
@@ -107,36 +107,36 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
107
107
|
enableTransition: !1
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
|
-
|
|
111
|
-
E(document, "keydown", e), E(document,
|
|
110
|
+
B.run(() => {
|
|
111
|
+
E(document, "keydown", e), E(document, ae, t);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
a(
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
a(de, "unregisterEventListener");
|
|
119
|
-
function W() {
|
|
120
|
-
h.value = !1, N("loadComplete");
|
|
114
|
+
a(de, "registerEventListener");
|
|
115
|
+
function me() {
|
|
116
|
+
B.stop();
|
|
121
117
|
}
|
|
122
|
-
a(
|
|
123
|
-
function _(
|
|
124
|
-
|
|
118
|
+
a(me, "unregisterEventListener");
|
|
119
|
+
function _() {
|
|
120
|
+
I.value = !1, N("loadComplete");
|
|
125
121
|
}
|
|
126
|
-
a(_, "
|
|
122
|
+
a(_, "handleImgLoad");
|
|
127
123
|
function q(e) {
|
|
128
|
-
|
|
124
|
+
I.value = !1, e.target.alt = "ls.image.error", N("loadError");
|
|
125
|
+
}
|
|
126
|
+
a(q, "handleImgError");
|
|
127
|
+
function J(e) {
|
|
128
|
+
if (I.value || e.button !== 0 || !$.value) return;
|
|
129
129
|
r.enableTransition = !1;
|
|
130
|
-
const { offsetX:
|
|
131
|
-
r.offsetX =
|
|
132
|
-
}),
|
|
130
|
+
const { offsetX: t, offsetY: n } = r, c = e.pageX, f = e.pageY, T = Z((L) => {
|
|
131
|
+
r.offsetX = t + L.pageX - c, r.offsetY = n + L.pageY - f;
|
|
132
|
+
}), X = E(document, "mousemove", T);
|
|
133
133
|
E(document, "mouseup", () => {
|
|
134
|
-
|
|
134
|
+
X();
|
|
135
135
|
}), e.preventDefault();
|
|
136
136
|
}
|
|
137
|
-
a(
|
|
138
|
-
function
|
|
139
|
-
|
|
137
|
+
a(J, "handleMouseDown");
|
|
138
|
+
function fe() {
|
|
139
|
+
ne(r, {
|
|
140
140
|
scale: 1,
|
|
141
141
|
deg: 0,
|
|
142
142
|
offsetX: 0,
|
|
@@ -147,9 +147,9 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
147
147
|
objectFit: "contain"
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
a(
|
|
151
|
-
function
|
|
152
|
-
|
|
150
|
+
a(fe, "reset");
|
|
151
|
+
function pe() {
|
|
152
|
+
ne(r, {
|
|
153
153
|
scale: 1,
|
|
154
154
|
deg: 0,
|
|
155
155
|
offsetX: 0,
|
|
@@ -160,40 +160,40 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
160
160
|
objectFit: "contain"
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
a(
|
|
164
|
-
function
|
|
165
|
-
if (
|
|
166
|
-
const e = Me(
|
|
167
|
-
|
|
163
|
+
a(pe, "fullScreen");
|
|
164
|
+
function K() {
|
|
165
|
+
if (I.value) return;
|
|
166
|
+
const e = Me(h), t = Object.values(h), n = y.value.name, f = (t.findIndex((T) => T.name === n) + 1) % e.length;
|
|
167
|
+
y.value = h[e[f]], n === h.CONTAIN.name ? pe() : fe();
|
|
168
168
|
}
|
|
169
|
-
a(
|
|
169
|
+
a(K, "toggleMode");
|
|
170
170
|
function R(e) {
|
|
171
|
-
const
|
|
172
|
-
v.value = (e +
|
|
171
|
+
const n = l.source.length;
|
|
172
|
+
v.value = (e + n) % n;
|
|
173
173
|
}
|
|
174
174
|
a(R, "setActiveItem");
|
|
175
|
-
function K() {
|
|
176
|
-
B.value && !l.infinite || R(v.value - 1);
|
|
177
|
-
}
|
|
178
|
-
a(K, "prev");
|
|
179
175
|
function Q() {
|
|
180
|
-
P.value && !l.infinite || R(v.value
|
|
176
|
+
P.value && !l.infinite || R(v.value - 1);
|
|
177
|
+
}
|
|
178
|
+
a(Q, "prev");
|
|
179
|
+
function U() {
|
|
180
|
+
G.value && !l.infinite || R(v.value + 1);
|
|
181
181
|
}
|
|
182
|
-
a(
|
|
183
|
-
function m(e,
|
|
184
|
-
if (
|
|
185
|
-
const { zoomRate:
|
|
182
|
+
a(U, "next");
|
|
183
|
+
function m(e, t = {}) {
|
|
184
|
+
if (I.value) return;
|
|
185
|
+
const { zoomRate: n, rotateDeg: c, enableTransition: f } = {
|
|
186
186
|
zoomRate: 1.4,
|
|
187
187
|
rotateDeg: 90,
|
|
188
188
|
enableTransition: !0,
|
|
189
|
-
...
|
|
189
|
+
...t
|
|
190
190
|
};
|
|
191
191
|
switch (e) {
|
|
192
192
|
case "zoomOut":
|
|
193
|
-
r.scale > 0.2 && (r.scale = Number.parseFloat((r.scale /
|
|
193
|
+
r.scale > 0.2 && (r.scale = Number.parseFloat((r.scale / n).toFixed(3)));
|
|
194
194
|
break;
|
|
195
195
|
case "zoomIn":
|
|
196
|
-
r.scale < 7 && (r.scale = Number.parseFloat((r.scale *
|
|
196
|
+
r.scale < 7 && (r.scale = Number.parseFloat((r.scale * n).toFixed(3)));
|
|
197
197
|
break;
|
|
198
198
|
case "clockwise":
|
|
199
199
|
r.deg += c;
|
|
@@ -202,44 +202,44 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
202
202
|
r.deg -= c;
|
|
203
203
|
break;
|
|
204
204
|
case "download":
|
|
205
|
-
N("download",
|
|
205
|
+
N("download", x.downloadData);
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
208
|
r.enableTransition = f;
|
|
209
209
|
}
|
|
210
|
-
return a(m, "handleActions"),
|
|
211
|
-
|
|
210
|
+
return a(m, "handleActions"), ee(le, () => {
|
|
211
|
+
Fe(() => {
|
|
212
212
|
const e = A.value[0];
|
|
213
|
-
e != null && e.complete || (
|
|
213
|
+
e != null && e.complete || (I.value = !0);
|
|
214
214
|
});
|
|
215
|
-
}),
|
|
215
|
+
}), ee(v, (e) => {
|
|
216
216
|
N("switch", e);
|
|
217
|
-
}),
|
|
218
|
-
var e,
|
|
219
|
-
|
|
220
|
-
}),
|
|
217
|
+
}), he(() => {
|
|
218
|
+
var e, t;
|
|
219
|
+
de(), (t = (e = $.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
220
|
+
}), D({
|
|
221
221
|
/** @description manually switch image */
|
|
222
222
|
setActiveItem: R
|
|
223
|
-
}), (e,
|
|
224
|
-
(g(),
|
|
223
|
+
}), (e, t) => (g(), F("div", null, [
|
|
224
|
+
(g(), Ie(ze, {
|
|
225
225
|
to: "body",
|
|
226
226
|
disabled: !e.teleported
|
|
227
227
|
}, [
|
|
228
|
-
u(
|
|
228
|
+
u(Ce, {
|
|
229
229
|
name: "viewer-fade",
|
|
230
230
|
appear: ""
|
|
231
231
|
}, {
|
|
232
|
-
default:
|
|
232
|
+
default: Ne(() => [
|
|
233
233
|
d("div", {
|
|
234
234
|
ref_key: "wrapper",
|
|
235
|
-
ref:
|
|
235
|
+
ref: $,
|
|
236
236
|
tabindex: -1,
|
|
237
237
|
class: i(o(s).e("wrapper")),
|
|
238
|
-
style:
|
|
238
|
+
style: Y({ zIndex: o(ce) })
|
|
239
239
|
}, [
|
|
240
240
|
d("div", {
|
|
241
241
|
class: i(o(s).e("mask")),
|
|
242
|
-
onClick:
|
|
242
|
+
onClick: t[0] || (t[0] = Te((n) => e.hideOnClickModal && M(), ["self"]))
|
|
243
243
|
}, null, 2),
|
|
244
244
|
d("span", {
|
|
245
245
|
class: i([o(s).e("btn"), o(s).e("close")]),
|
|
@@ -251,10 +251,10 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
251
251
|
color: "#FFF"
|
|
252
252
|
})
|
|
253
253
|
], 2),
|
|
254
|
-
o(
|
|
254
|
+
o(ie) ? j("", !0) : (g(), F(V, { key: 0 }, [
|
|
255
255
|
d("span", {
|
|
256
|
-
class: i([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(
|
|
257
|
-
onClick:
|
|
256
|
+
class: i([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(P))]),
|
|
257
|
+
onClick: Q
|
|
258
258
|
}, [
|
|
259
259
|
u(p, {
|
|
260
260
|
name: "ArrowLeft",
|
|
@@ -263,8 +263,8 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
263
263
|
})
|
|
264
264
|
], 2),
|
|
265
265
|
d("span", {
|
|
266
|
-
class: i([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(
|
|
267
|
-
onClick:
|
|
266
|
+
class: i([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(G))]),
|
|
267
|
+
onClick: U
|
|
268
268
|
}, [
|
|
269
269
|
u(p, {
|
|
270
270
|
name: "ArrowRight",
|
|
@@ -283,22 +283,22 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
283
283
|
name: "ZoomOut",
|
|
284
284
|
size: 24,
|
|
285
285
|
color: "#FFF",
|
|
286
|
-
onClick:
|
|
286
|
+
onClick: t[1] || (t[1] = (n) => m("zoomOut"))
|
|
287
287
|
}),
|
|
288
288
|
u(p, {
|
|
289
289
|
name: "ZoomIn",
|
|
290
290
|
size: 24,
|
|
291
291
|
color: "#FFF",
|
|
292
|
-
onClick:
|
|
292
|
+
onClick: t[2] || (t[2] = (n) => m("zoomIn"))
|
|
293
293
|
}),
|
|
294
294
|
d("i", {
|
|
295
295
|
class: i(o(s).e("actions__divider"))
|
|
296
296
|
}, null, 2),
|
|
297
297
|
u(p, {
|
|
298
|
-
name: o(
|
|
298
|
+
name: o(y).name,
|
|
299
299
|
size: 24,
|
|
300
300
|
color: "#FFF",
|
|
301
|
-
onClick:
|
|
301
|
+
onClick: K
|
|
302
302
|
}, null, 8, ["name"]),
|
|
303
303
|
d("i", {
|
|
304
304
|
class: i(o(s).e("actions__divider"))
|
|
@@ -307,56 +307,57 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
307
307
|
name: "RefreshLeft",
|
|
308
308
|
size: 24,
|
|
309
309
|
color: "#FFF",
|
|
310
|
-
onClick:
|
|
310
|
+
onClick: t[3] || (t[3] = (n) => m("anticlockwise"))
|
|
311
311
|
}),
|
|
312
312
|
u(p, {
|
|
313
313
|
name: "RefreshRight",
|
|
314
314
|
size: 24,
|
|
315
315
|
color: "#FFF",
|
|
316
|
-
onClick:
|
|
316
|
+
onClick: t[4] || (t[4] = (n) => m("clockwise"))
|
|
317
317
|
}),
|
|
318
|
-
o(
|
|
318
|
+
o(x).hasDownload ? (g(), F(V, { key: 0 }, [
|
|
319
319
|
d("i", {
|
|
320
320
|
class: i(o(s).e("actions__divider"))
|
|
321
321
|
}, null, 2),
|
|
322
322
|
u(p, {
|
|
323
|
-
|
|
323
|
+
class: i({ "is-loading": o(H) }),
|
|
324
|
+
name: `${o(H) ? "Loading" : "Download"}`,
|
|
324
325
|
size: 24,
|
|
325
326
|
color: "#FFF",
|
|
326
|
-
onClick:
|
|
327
|
-
})
|
|
328
|
-
], 64)) :
|
|
327
|
+
onClick: t[5] || (t[5] = (n) => m("download"))
|
|
328
|
+
}, null, 8, ["class", "name"])
|
|
329
|
+
], 64)) : j("", !0)
|
|
329
330
|
], 2)
|
|
330
331
|
], 2),
|
|
331
|
-
e.source ? (g(),
|
|
332
|
+
e.source ? (g(), F("div", {
|
|
332
333
|
key: 1,
|
|
333
334
|
class: i(o(s).e("canvas"))
|
|
334
335
|
}, [
|
|
335
|
-
o(
|
|
336
|
+
o($e)(e.source) ? (g(!0), F(V, { key: 0 }, xe(e.source, (n, c) => ye((g(), F("img", {
|
|
336
337
|
ref_for: !0,
|
|
337
338
|
ref: /* @__PURE__ */ a((f) => o(A)[c] = f, "ref"),
|
|
338
|
-
key:
|
|
339
|
-
src:
|
|
340
|
-
style:
|
|
339
|
+
key: n,
|
|
340
|
+
src: n,
|
|
341
|
+
style: Y(o(W)),
|
|
341
342
|
class: i(o(s).e("img")),
|
|
342
|
-
onLoad:
|
|
343
|
-
onError:
|
|
344
|
-
onMousedown:
|
|
345
|
-
}, null, 46,
|
|
346
|
-
[
|
|
347
|
-
])), 128)) : (g(),
|
|
348
|
-
ref: /* @__PURE__ */ a((
|
|
343
|
+
onLoad: _,
|
|
344
|
+
onError: q,
|
|
345
|
+
onMousedown: J
|
|
346
|
+
}, null, 46, Ye)), [
|
|
347
|
+
[Le, c === o(v)]
|
|
348
|
+
])), 128)) : (g(), F("img", {
|
|
349
|
+
ref: /* @__PURE__ */ a((n) => o(A)[0] = n, "ref"),
|
|
349
350
|
key: e.source,
|
|
350
351
|
src: e.source,
|
|
351
|
-
style:
|
|
352
|
+
style: Y(o(W)),
|
|
352
353
|
class: i(o(s).e("img")),
|
|
353
|
-
onLoad:
|
|
354
|
-
onError:
|
|
355
|
-
onMousedown:
|
|
356
|
-
}, null, 46,
|
|
357
|
-
], 2)) :
|
|
358
|
-
|
|
359
|
-
|
|
354
|
+
onLoad: _,
|
|
355
|
+
onError: q,
|
|
356
|
+
onMousedown: J
|
|
357
|
+
}, null, 46, je))
|
|
358
|
+
], 2)) : j("", !0),
|
|
359
|
+
oe(e.$slots, "viewer", {}, void 0, !0),
|
|
360
|
+
oe(e.$slots, "default", {}, void 0, !0)
|
|
360
361
|
], 6)
|
|
361
362
|
]),
|
|
362
363
|
_: 3
|
|
@@ -366,5 +367,5 @@ const Xe = ["src"], Ye = ["src"], je = te({
|
|
|
366
367
|
}
|
|
367
368
|
});
|
|
368
369
|
export {
|
|
369
|
-
|
|
370
|
+
oo as default
|
|
370
371
|
};
|
|
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-d85c49b8"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d85c49b8"]]);
|
|
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=e.defineComponent({name:"LSPreviewImage"}),
|
|
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,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (r, t) =>
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var a = (r, t) => V(r, "name", { value: t, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { lsPreviewProp as
|
|
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
8
|
import { ElWatermark as O } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/watermark/index/index.js";
|
|
9
9
|
import h from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
10
|
-
const A =
|
|
10
|
+
const A = { class: "ls-preview-extra" }, W = E({
|
|
11
11
|
name: "LSPreviewImage"
|
|
12
|
-
}),
|
|
13
|
-
...
|
|
12
|
+
}), K = /* @__PURE__ */ E({
|
|
13
|
+
...W,
|
|
14
14
|
name: "LSPreviewImage",
|
|
15
15
|
components: {
|
|
16
|
-
LSImage:
|
|
16
|
+
LSImage: n
|
|
17
17
|
},
|
|
18
18
|
inheritAttrs: !1,
|
|
19
|
-
props: /* @__PURE__ */ w(
|
|
19
|
+
props: /* @__PURE__ */ w(N, {
|
|
20
20
|
modelValue: {
|
|
21
21
|
type: Boolean
|
|
22
22
|
},
|
|
@@ -24,45 +24,48 @@ const A = L({
|
|
|
24
24
|
}),
|
|
25
25
|
emits: /* @__PURE__ */ w(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
26
26
|
setup(r, { emit: t }) {
|
|
27
|
-
const
|
|
28
|
-
|
|
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
29
|
}, "loadComplete"), f = /* @__PURE__ */ a(() => {
|
|
30
|
-
|
|
30
|
+
u(), c("loadError");
|
|
31
31
|
}, "loadError");
|
|
32
|
-
return (e,
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
return (e, b) => {
|
|
33
|
+
const y = O;
|
|
34
|
+
return p.value ? (m(), P("div", {
|
|
35
35
|
key: 0,
|
|
36
|
-
class: S(o(
|
|
36
|
+
class: S(o(L))
|
|
37
37
|
}, [
|
|
38
|
-
e.showWatermark ? (m(),
|
|
39
|
-
default:
|
|
40
|
-
B(
|
|
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
41
|
"hide-on-click-modal": l.hideOnClickModal,
|
|
42
|
-
onLoadComplete:
|
|
42
|
+
onLoadComplete: v,
|
|
43
43
|
onLoadError: f
|
|
44
44
|
}), {
|
|
45
|
-
viewer:
|
|
46
|
-
|
|
45
|
+
viewer: s(() => [
|
|
46
|
+
d(e.$slots, "viewer", {}, void 0, !0)
|
|
47
47
|
]),
|
|
48
48
|
_: 3
|
|
49
49
|
}, 16, ["hide-on-click-modal"])
|
|
50
50
|
]),
|
|
51
51
|
_: 3
|
|
52
|
-
}, 16, ["style"])) : (m(),
|
|
52
|
+
}, 16, ["style"])) : (m(), C(n, i({ key: 1 }, o(h)(o(k), e.$attrs), {
|
|
53
53
|
"hide-on-click-modal": l.hideOnClickModal,
|
|
54
|
-
onLoadComplete:
|
|
54
|
+
onLoadComplete: v,
|
|
55
55
|
onLoadError: f
|
|
56
56
|
}), {
|
|
57
|
-
viewer:
|
|
58
|
-
|
|
57
|
+
viewer: s(() => [
|
|
58
|
+
d(e.$slots, "viewer", {}, void 0, !0)
|
|
59
59
|
]),
|
|
60
60
|
_: 3
|
|
61
|
-
}, 16, ["hide-on-click-modal"]))
|
|
61
|
+
}, 16, ["hide-on-click-modal"])),
|
|
62
|
+
$("div", A, [
|
|
63
|
+
d(e.$slots, "extra", {}, void 0, !0)
|
|
64
|
+
])
|
|
62
65
|
], 2)) : M("", !0);
|
|
63
66
|
};
|
|
64
67
|
}
|
|
65
68
|
});
|
|
66
69
|
export {
|
|
67
|
-
|
|
70
|
+
K as default
|
|
68
71
|
};
|
|
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-fb4e3e2a"]]);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 _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
4
|
+
const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fb4e3e2a"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|