@gx-design-vue/image 0.2.0-beta.27 → 0.2.0-beta.28
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/dist/Image.d.ts +12 -7
- package/dist/ImagePreview/props.d.ts +2 -0
- package/dist/image.js +425 -394
- package/dist/image.umd.cjs +1 -1
- package/dist/props.d.ts +4 -3
- package/dist/style.d.ts +1 -1
- package/package.json +4 -4
package/dist/image.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { ref as L, defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useState as
|
|
1
|
+
import { ref as L, defineComponent as Se, createVNode as u, Teleport as Te, Transition as he, withDirectives as we, Fragment as se, cloneVNode as it, vShow as pe, toRef as k, reactive as at, computed as b, watch as J, onMounted as De, onUnmounted as lt, mergeProps as le, watchEffect as rt, nextTick as st } from "vue";
|
|
2
|
+
import { CloseOutlined as ut, LeftOutlined as ct, RightOutlined as dt, SwapOutlined as ze, ZoomOutOutlined as ft, ZoomInOutlined as vt, RotateRightOutlined as gt, RotateLeftOutlined as mt, EyeOutlined as ht } from "@ant-design/icons-vue";
|
|
3
|
+
import { getTransitionProps as ye, Keyframe as ce, useStyle as wt, mergeToken as pt, unit as ee, FastColor as yt, useProStyle as St } from "@gx-design-vue/pro-provider";
|
|
4
|
+
import { classNames as X, getPrefixCls as Re, isNumber as Ne, getSlotVNode as H, isArray as Ct, getSlot as Pe, getSlotsProps as xt, isInContainer as It, isString as bt, getScrollContainer as $t } from "@gx-design-vue/pro-utils";
|
|
5
|
+
import { useWindowSize as Xe, isClient as Q, useThrottleFn as zt, useEventListener as Le } from "@vueuse/core";
|
|
6
|
+
import { isEqual as Lt, cloneDeep as Ot, omit as Ye, fromPairs as Mt, pick as At } from "lodash-es";
|
|
7
|
+
import { useState as ne, useEffect as Ce, useMergedState as Et } from "@gx-design-vue/pro-hooks";
|
|
8
8
|
import { TinyColor as Z } from "@ctrl/tinycolor";
|
|
9
|
-
let
|
|
10
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
|
|
9
|
+
let je = (e) => setTimeout(e, 16), Be = (e) => clearTimeout(e);
|
|
10
|
+
typeof window < "u" && "requestAnimationFrame" in window && (je = (e) => window.requestAnimationFrame(e), Be = (e) => window.cancelAnimationFrame(e));
|
|
11
|
+
let Oe = 0;
|
|
12
|
+
const xe = /* @__PURE__ */ new Map();
|
|
13
|
+
function Fe(e) {
|
|
14
|
+
xe.delete(e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
const o =
|
|
16
|
+
function ke(e, n = 1) {
|
|
17
|
+
Oe += 1;
|
|
18
|
+
const o = Oe;
|
|
19
19
|
function l(t) {
|
|
20
20
|
if (t === 0)
|
|
21
|
-
|
|
21
|
+
Fe(o), e();
|
|
22
22
|
else {
|
|
23
|
-
const
|
|
23
|
+
const r = je(() => {
|
|
24
24
|
l(t - 1);
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
xe.set(o, r);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
return l(n), o;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
const n =
|
|
33
|
-
return
|
|
31
|
+
ke.cancel = (e) => {
|
|
32
|
+
const n = xe.get(e);
|
|
33
|
+
return Fe(n), Be(n);
|
|
34
34
|
};
|
|
35
|
-
const
|
|
35
|
+
const ae = {
|
|
36
36
|
x: 0,
|
|
37
37
|
y: 0,
|
|
38
38
|
rotate: 0,
|
|
@@ -40,16 +40,16 @@ const oe = {
|
|
|
40
40
|
flipX: !1,
|
|
41
41
|
flipY: !1
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const t = L(null),
|
|
45
|
-
h(
|
|
43
|
+
function Tt(e, n, o, l) {
|
|
44
|
+
const t = L(null), r = L([]), [c, h] = ne(ae), y = (m) => {
|
|
45
|
+
h(ae), Lt(ae, c.value) || l == null || l({ transform: ae, action: m });
|
|
46
46
|
}, d = (m, w) => {
|
|
47
|
-
t.value === null && (
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}), t.value = null, l == null || l({ transform:
|
|
52
|
-
})),
|
|
47
|
+
t.value === null && (r.value = [], t.value = ke(() => {
|
|
48
|
+
let x = Ot(c.value);
|
|
49
|
+
r.value.forEach((a) => {
|
|
50
|
+
x = { ...x, ...a };
|
|
51
|
+
}), t.value = null, l == null || l({ transform: x, action: w }), h(x);
|
|
52
|
+
})), r.value.push({
|
|
53
53
|
...c.value,
|
|
54
54
|
...m
|
|
55
55
|
});
|
|
@@ -58,41 +58,41 @@ function Et(e, n, o, l) {
|
|
|
58
58
|
transform: c,
|
|
59
59
|
resetTransform: y,
|
|
60
60
|
updateTransform: d,
|
|
61
|
-
dispatchZoomChange: (m, w,
|
|
62
|
-
const { width: p, height:
|
|
63
|
-
let
|
|
64
|
-
I > o.value ? (I = o.value,
|
|
65
|
-
const
|
|
66
|
-
let
|
|
61
|
+
dispatchZoomChange: (m, w, x, a, i) => {
|
|
62
|
+
const { width: p, height: g, offsetWidth: S, offsetHeight: C, offsetLeft: $, offsetTop: T } = e.value;
|
|
63
|
+
let O = m, I = c.value.scale * m;
|
|
64
|
+
I > o.value ? (I = o.value, O = o.value / c.value.scale) : I < n.value && (I = i ? I : n.value, O = I / c.value.scale);
|
|
65
|
+
const F = x ?? innerWidth / 2, W = a ?? innerHeight / 2, N = O - 1, M = N * p * 0.5, P = N * g * 0.5, Y = N * (F - c.value.x - $), _ = N * (W - c.value.y - T);
|
|
66
|
+
let j = c.value.x - (Y - M), B = c.value.y - (_ - P);
|
|
67
67
|
if (m < 1 && I === 1) {
|
|
68
|
-
const D = S * I,
|
|
69
|
-
D <= A.value &&
|
|
68
|
+
const D = S * I, f = C * I, { width: A, height: E } = Xe();
|
|
69
|
+
D <= A.value && f <= E.value && (j = 0, B = 0);
|
|
70
70
|
}
|
|
71
71
|
d({
|
|
72
|
-
x:
|
|
73
|
-
y:
|
|
72
|
+
x: j,
|
|
73
|
+
y: B,
|
|
74
74
|
scale: I
|
|
75
75
|
}, w);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Dt(e, n) {
|
|
80
80
|
process.env.NODE_ENV !== "production" && console !== void 0 && console.error(`Warning: ${n}`);
|
|
81
81
|
}
|
|
82
|
-
let
|
|
82
|
+
let He = !1;
|
|
83
83
|
try {
|
|
84
84
|
const e = Object.defineProperty({}, "passive", {
|
|
85
85
|
get() {
|
|
86
|
-
|
|
86
|
+
He = !0;
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function q(e, n, o, l) {
|
|
93
93
|
if (e && e.addEventListener) {
|
|
94
94
|
let t = l;
|
|
95
|
-
t === void 0 &&
|
|
95
|
+
t === void 0 && He && (n === "touchstart" || n === "touchmove" || n === "wheel") && (t = { passive: !1 }), e.addEventListener(n, o, t);
|
|
96
96
|
}
|
|
97
97
|
return {
|
|
98
98
|
remove: () => {
|
|
@@ -100,42 +100,42 @@ function V(e, n, o, l) {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const K = 1, Rt = 1;
|
|
104
104
|
function Me(e, n, o, l) {
|
|
105
|
-
const t = n + o,
|
|
105
|
+
const t = n + o, r = (o - l) / 2;
|
|
106
106
|
if (o > l) {
|
|
107
107
|
if (n > 0)
|
|
108
108
|
return {
|
|
109
|
-
[e]:
|
|
109
|
+
[e]: r
|
|
110
110
|
};
|
|
111
111
|
if (n < 0 && t < l)
|
|
112
112
|
return {
|
|
113
|
-
[e]: -
|
|
113
|
+
[e]: -r
|
|
114
114
|
};
|
|
115
115
|
} else if (n < 0 || t > l)
|
|
116
116
|
return {
|
|
117
|
-
[e]: n < 0 ?
|
|
117
|
+
[e]: n < 0 ? r : -r
|
|
118
118
|
};
|
|
119
119
|
return {};
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
const { width: t, height:
|
|
121
|
+
function Ze(e, n, o, l) {
|
|
122
|
+
const { width: t, height: r } = Xe();
|
|
123
123
|
let c = null;
|
|
124
|
-
return e <= t.value && n <=
|
|
124
|
+
return e <= t.value && n <= r.value ? c = {
|
|
125
125
|
x: 0,
|
|
126
126
|
y: 0
|
|
127
|
-
} : (e > t.value || n >
|
|
127
|
+
} : (e > t.value || n > r.value) && (c = {
|
|
128
128
|
...Me("x", o, e, t.value),
|
|
129
|
-
...Me("y", l, n,
|
|
129
|
+
...Me("y", l, n, r.value)
|
|
130
130
|
}), c;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
const [h, y] =
|
|
132
|
+
function Nt(e, n, o, l, t, r, c) {
|
|
133
|
+
const [h, y] = ne(!1), d = L({
|
|
134
134
|
diffX: 0,
|
|
135
135
|
diffY: 0,
|
|
136
136
|
transformX: 0,
|
|
137
137
|
transformY: 0
|
|
138
|
-
}),
|
|
138
|
+
}), v = (a) => {
|
|
139
139
|
!n || a.button !== 0 || (a.preventDefault(), a.stopPropagation(), d.value = {
|
|
140
140
|
diffX: a.pageX - t.value.x,
|
|
141
141
|
diffY: a.pageY - t.value.y,
|
|
@@ -143,7 +143,7 @@ function Rt(e, n, o, l, t, s, c) {
|
|
|
143
143
|
transformY: t.value.y
|
|
144
144
|
}, y(!0));
|
|
145
145
|
}, m = (a) => {
|
|
146
|
-
o && h.value &&
|
|
146
|
+
o && h.value && r({
|
|
147
147
|
x: a.pageX - d.value.diffX,
|
|
148
148
|
y: a.pageY - d.value.diffY
|
|
149
149
|
}, "move");
|
|
@@ -153,54 +153,54 @@ function Rt(e, n, o, l, t, s, c) {
|
|
|
153
153
|
const { transformX: a, transformY: i } = d.value;
|
|
154
154
|
if (!(t.value.x !== a && t.value.y !== i))
|
|
155
155
|
return;
|
|
156
|
-
const
|
|
157
|
-
|
|
156
|
+
const g = e.value.offsetWidth * t.value.scale, S = e.value.offsetHeight * t.value.scale, { left: C, top: $ } = e.value.getBoundingClientRect(), T = t.value.rotate % 180 !== 0, O = Ze(T ? S : g, T ? g : S, C, $);
|
|
157
|
+
O && r({ ...O }, "dragRebound");
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, x = (a) => {
|
|
160
160
|
if (!o || a.deltaY === 0)
|
|
161
161
|
return;
|
|
162
|
-
const i = Math.abs(a.deltaY / 100), p = Math.min(i,
|
|
163
|
-
let
|
|
164
|
-
a.deltaY > 0 && (
|
|
162
|
+
const i = Math.abs(a.deltaY / 100), p = Math.min(i, Rt);
|
|
163
|
+
let g = K + p * l.value;
|
|
164
|
+
a.deltaY > 0 && (g = K / g), c(g, "wheel", a.clientX, a.clientY);
|
|
165
165
|
};
|
|
166
|
-
return
|
|
167
|
-
let a, i, p,
|
|
166
|
+
return Ce(() => {
|
|
167
|
+
let a, i, p, g;
|
|
168
168
|
if (n) {
|
|
169
|
-
p =
|
|
169
|
+
p = q(window, "mouseup", w, !1), g = q(window, "mousemove", m, !1);
|
|
170
170
|
try {
|
|
171
|
-
window.top !== window.self && (a =
|
|
171
|
+
window.top !== window.self && (a = q(window.top, "mouseup", w, !1), i = q(window.top, "mousemove", m, !1));
|
|
172
172
|
} catch (S) {
|
|
173
|
-
|
|
173
|
+
Dt(!1, `[rc-image] ${S}`);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
return () => {
|
|
177
|
-
p == null || p.remove(),
|
|
177
|
+
p == null || p.remove(), g == null || g.remove(), a == null || a.remove(), i == null || i.remove();
|
|
178
178
|
};
|
|
179
179
|
}, [o, h, () => t.value.x, () => t.value.y, () => t.value.rotate, n]), {
|
|
180
180
|
isMoving: h,
|
|
181
|
-
onMouseDown:
|
|
181
|
+
onMouseDown: v,
|
|
182
182
|
onMouseMove: m,
|
|
183
183
|
onMouseUp: w,
|
|
184
|
-
onWheel:
|
|
184
|
+
onWheel: x
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function ue(e, n) {
|
|
188
188
|
const o = e.x - n.x, l = e.y - n.y;
|
|
189
189
|
return Math.hypot(o, l);
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
const t =
|
|
193
|
-
if (t === 0 &&
|
|
191
|
+
function Pt(e, n, o, l) {
|
|
192
|
+
const t = ue(e, o), r = ue(n, l);
|
|
193
|
+
if (t === 0 && r === 0)
|
|
194
194
|
return [e.x, e.y];
|
|
195
|
-
const c = t / (t +
|
|
195
|
+
const c = t / (t + r), h = e.x + c * (n.x - e.x), y = e.y + c * (n.y - e.y);
|
|
196
196
|
return [h, y];
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const [h, y] =
|
|
198
|
+
function Xt(e, n, o, l, t, r, c) {
|
|
199
|
+
const [h, y] = ne(!1), d = L({
|
|
200
200
|
point1: { x: 0, y: 0 },
|
|
201
201
|
point2: { x: 0, y: 0 },
|
|
202
202
|
eventType: "none"
|
|
203
|
-
}),
|
|
203
|
+
}), v = (a) => {
|
|
204
204
|
d.value = {
|
|
205
205
|
...d.value,
|
|
206
206
|
...a
|
|
@@ -210,11 +210,11 @@ function Pt(e, n, o, l, t, s, c) {
|
|
|
210
210
|
return;
|
|
211
211
|
a.stopPropagation(), y(!0);
|
|
212
212
|
const { touches: i = [] } = a;
|
|
213
|
-
i.length > 1 ?
|
|
213
|
+
i.length > 1 ? v({
|
|
214
214
|
point1: { x: i[0].clientX, y: i[0].clientY },
|
|
215
215
|
point2: { x: i[1].clientX, y: i[1].clientY },
|
|
216
216
|
eventType: "touchZoom"
|
|
217
|
-
}) :
|
|
217
|
+
}) : v({
|
|
218
218
|
point1: {
|
|
219
219
|
x: i[0].clientX - t.value.x,
|
|
220
220
|
y: i[0].clientY - t.value.y
|
|
@@ -222,35 +222,35 @@ function Pt(e, n, o, l, t, s, c) {
|
|
|
222
222
|
eventType: "move"
|
|
223
223
|
});
|
|
224
224
|
}, w = (a) => {
|
|
225
|
-
const { touches: i = [] } = a, { point1: p, point2:
|
|
225
|
+
const { touches: i = [] } = a, { point1: p, point2: g, eventType: S } = d.value;
|
|
226
226
|
if (i.length > 1 && S === "touchZoom") {
|
|
227
|
-
const
|
|
227
|
+
const C = {
|
|
228
228
|
x: i[0].clientX,
|
|
229
229
|
y: i[0].clientY
|
|
230
230
|
}, $ = {
|
|
231
231
|
x: i[1].clientX,
|
|
232
232
|
y: i[1].clientY
|
|
233
|
-
}, [T,
|
|
234
|
-
c(I, "touchZoom", T,
|
|
235
|
-
point1:
|
|
233
|
+
}, [T, O] = Pt(p, g, C, $), I = ue(C, $) / ue(p, g);
|
|
234
|
+
c(I, "touchZoom", T, O, !0), v({
|
|
235
|
+
point1: C,
|
|
236
236
|
point2: $,
|
|
237
237
|
eventType: "touchZoom"
|
|
238
238
|
});
|
|
239
|
-
} else S === "move" && (
|
|
239
|
+
} else S === "move" && (r({
|
|
240
240
|
x: i[0].clientX - p.x,
|
|
241
241
|
y: i[0].clientY - p.y
|
|
242
|
-
}, "move"),
|
|
243
|
-
},
|
|
242
|
+
}, "move"), v({ eventType: "move" }));
|
|
243
|
+
}, x = () => {
|
|
244
244
|
if (!o.value)
|
|
245
245
|
return;
|
|
246
|
-
if (h && y(!1),
|
|
247
|
-
return
|
|
248
|
-
const a = e.value.offsetWidth * t.value.scale, i = e.value.offsetHeight * t.value.scale, { left: p, top:
|
|
249
|
-
|
|
246
|
+
if (h && y(!1), v({ eventType: "none" }), l.value > t.value.scale)
|
|
247
|
+
return r({ x: 0, y: 0, scale: l.value }, "touchZoom");
|
|
248
|
+
const a = e.value.offsetWidth * t.value.scale, i = e.value.offsetHeight * t.value.scale, { left: p, top: g } = e.value.getBoundingClientRect(), S = t.value.rotate % 180 !== 0, C = Ze(S ? i : a, S ? a : i, p, g);
|
|
249
|
+
C && r({ ...C }, "dragRebound");
|
|
250
250
|
};
|
|
251
|
-
return
|
|
251
|
+
return Ce(() => {
|
|
252
252
|
let a;
|
|
253
|
-
return o.value && n.value && (a =
|
|
253
|
+
return o.value && n.value && (a = q(window, "touchmove", (i) => i.preventDefault(), {
|
|
254
254
|
passive: !1
|
|
255
255
|
})), () => {
|
|
256
256
|
a == null || a.remove();
|
|
@@ -259,10 +259,10 @@ function Pt(e, n, o, l, t, s, c) {
|
|
|
259
259
|
isTouching: h,
|
|
260
260
|
onTouchStart: m,
|
|
261
261
|
onTouchMove: w,
|
|
262
|
-
onTouchEnd:
|
|
262
|
+
onTouchEnd: x
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const te = {
|
|
266
266
|
infinite: {
|
|
267
267
|
type: Boolean,
|
|
268
268
|
default: !0
|
|
@@ -278,7 +278,7 @@ const J = {
|
|
|
278
278
|
getContainer: {
|
|
279
279
|
type: String
|
|
280
280
|
}
|
|
281
|
-
},
|
|
281
|
+
}, We = {
|
|
282
282
|
preview: {
|
|
283
283
|
type: [Object, Boolean],
|
|
284
284
|
default: !0
|
|
@@ -298,7 +298,7 @@ const J = {
|
|
|
298
298
|
type: String,
|
|
299
299
|
default: "contain"
|
|
300
300
|
},
|
|
301
|
-
|
|
301
|
+
crossOrigin: {
|
|
302
302
|
type: String
|
|
303
303
|
},
|
|
304
304
|
lazy: Boolean,
|
|
@@ -324,16 +324,17 @@ const J = {
|
|
|
324
324
|
onClick: {
|
|
325
325
|
type: Function
|
|
326
326
|
},
|
|
327
|
-
|
|
327
|
+
imageStyle: {
|
|
328
328
|
type: Object,
|
|
329
329
|
default: () => ({})
|
|
330
330
|
},
|
|
331
|
-
|
|
331
|
+
imageClass: String,
|
|
332
|
+
size: Number,
|
|
332
333
|
width: Number,
|
|
333
334
|
height: Number,
|
|
334
|
-
zIndex:
|
|
335
|
-
getContainer:
|
|
336
|
-
},
|
|
335
|
+
zIndex: te.zIndex,
|
|
336
|
+
getContainer: te.getContainer
|
|
337
|
+
}, V = {
|
|
337
338
|
urls: {
|
|
338
339
|
type: Array,
|
|
339
340
|
default: () => []
|
|
@@ -359,10 +360,10 @@ const J = {
|
|
|
359
360
|
default: !0
|
|
360
361
|
},
|
|
361
362
|
disabled: Boolean,
|
|
362
|
-
zIndex:
|
|
363
|
-
current:
|
|
364
|
-
infinite:
|
|
365
|
-
getContainer:
|
|
363
|
+
zIndex: te.zIndex,
|
|
364
|
+
current: te.current,
|
|
365
|
+
infinite: te.infinite,
|
|
366
|
+
getContainer: We.getContainer,
|
|
366
367
|
onHideOnClickModal: {
|
|
367
368
|
type: Boolean,
|
|
368
369
|
default: !0
|
|
@@ -375,7 +376,7 @@ const J = {
|
|
|
375
376
|
onTransform: Function,
|
|
376
377
|
onOpenChange: Function,
|
|
377
378
|
"onUpdate:open": Function
|
|
378
|
-
},
|
|
379
|
+
}, Yt = /* @__PURE__ */ Se({
|
|
379
380
|
name: "Operations",
|
|
380
381
|
inheritAttrs: !1,
|
|
381
382
|
props: {
|
|
@@ -392,11 +393,11 @@ const J = {
|
|
|
392
393
|
showProgress: Boolean,
|
|
393
394
|
prefixCls: String,
|
|
394
395
|
hashId: String,
|
|
395
|
-
zIndex:
|
|
396
|
-
icons:
|
|
397
|
-
infinite:
|
|
398
|
-
getContainer:
|
|
399
|
-
countRender:
|
|
396
|
+
zIndex: V.zIndex,
|
|
397
|
+
icons: V.icons,
|
|
398
|
+
infinite: V.infinite,
|
|
399
|
+
getContainer: V.getContainer,
|
|
400
|
+
countRender: V.countRender,
|
|
400
401
|
tools: Array,
|
|
401
402
|
onClose: Function,
|
|
402
403
|
onActive: Function
|
|
@@ -411,32 +412,32 @@ const J = {
|
|
|
411
412
|
prefixCls: o,
|
|
412
413
|
hashId: l,
|
|
413
414
|
tools: t
|
|
414
|
-
} = e,
|
|
415
|
-
return u(
|
|
415
|
+
} = e, r = ye(`${e.prefixCls}-fade`), c = `${o}-operations-operation`, h = `${o}-operations-icon`;
|
|
416
|
+
return u(Te, {
|
|
416
417
|
to: e.getContainer || "body"
|
|
417
418
|
}, {
|
|
418
|
-
default: () => [u(
|
|
419
|
+
default: () => [u(he, r, {
|
|
419
420
|
default: () => {
|
|
420
|
-
var y, d,
|
|
421
|
-
return [
|
|
422
|
-
class:
|
|
421
|
+
var y, d, v, m;
|
|
422
|
+
return [we(u("div", {
|
|
423
|
+
class: X(`${o}-operations-wrapper`, l),
|
|
423
424
|
style: {
|
|
424
425
|
zIndex: e.zIndex
|
|
425
426
|
}
|
|
426
427
|
}, [((y = e.icons) == null ? void 0 : y.close) === null ? null : u("button", {
|
|
427
428
|
class: `${o}-close ${l}`,
|
|
428
429
|
onClick: e.onClose
|
|
429
|
-
}, [((d = e.icons) == null ? void 0 : d.close) || u(
|
|
430
|
-
class:
|
|
430
|
+
}, [((d = e.icons) == null ? void 0 : d.close) || u(ut, null, null)]), e.showSwitch && u(se, null, [u("div", {
|
|
431
|
+
class: X(`${o}-switch-left ${l}`, {
|
|
431
432
|
[`${o}-switch-left-disabled`]: e.infinite ? !1 : e.current === 0
|
|
432
433
|
}),
|
|
433
434
|
onClick: (w) => n(w, -1)
|
|
434
|
-
}, [((
|
|
435
|
-
class:
|
|
435
|
+
}, [((v = e.icons) == null ? void 0 : v.left) || u(ct, null, null)]), u("div", {
|
|
436
|
+
class: X(`${o}-switch-right ${l}`, {
|
|
436
437
|
[`${o}-switch-right-disabled`]: e.infinite ? !1 : e.current === e.count - 1
|
|
437
438
|
}),
|
|
438
439
|
onClick: (w) => n(w, 1)
|
|
439
|
-
}, [((m = e.icons) == null ? void 0 : m.right) || u(
|
|
440
|
+
}, [((m = e.icons) == null ? void 0 : m.right) || u(dt, null, null)])]), u("div", {
|
|
440
441
|
class: `${o}-footer ${l}`
|
|
441
442
|
}, [e.showProgress && u("div", {
|
|
442
443
|
class: `${o}-progress`
|
|
@@ -444,38 +445,38 @@ const J = {
|
|
|
444
445
|
class: `${e.prefixCls}-operations`
|
|
445
446
|
}, [t == null ? void 0 : t.map(({
|
|
446
447
|
icon: w,
|
|
447
|
-
onClick:
|
|
448
|
+
onClick: x,
|
|
448
449
|
type: a,
|
|
449
450
|
disabled: i
|
|
450
451
|
}) => u("div", {
|
|
451
|
-
class:
|
|
452
|
+
class: X(c, {
|
|
452
453
|
[`${e.prefixCls}-operations-operation-disabled`]: i && (i == null ? void 0 : i.value)
|
|
453
454
|
}),
|
|
454
|
-
onClick:
|
|
455
|
+
onClick: x,
|
|
455
456
|
key: a
|
|
456
|
-
}, [
|
|
457
|
+
}, [it(w, {
|
|
457
458
|
class: h
|
|
458
|
-
})]))])])]), [[
|
|
459
|
+
})]))])])]), [[pe, e.open]])];
|
|
459
460
|
}
|
|
460
461
|
})]
|
|
461
462
|
});
|
|
462
463
|
};
|
|
463
464
|
}
|
|
464
|
-
}),
|
|
465
|
+
}), jt = new ce("viewFadeIn", {
|
|
465
466
|
"0%": {
|
|
466
467
|
opacity: 0
|
|
467
468
|
},
|
|
468
469
|
"100%": {
|
|
469
470
|
opacity: 1
|
|
470
471
|
}
|
|
471
|
-
}),
|
|
472
|
+
}), Bt = new ce("viewFadeOut", {
|
|
472
473
|
"0%": {
|
|
473
474
|
opacity: 1
|
|
474
475
|
},
|
|
475
476
|
"100%": {
|
|
476
477
|
opacity: 0
|
|
477
478
|
}
|
|
478
|
-
}),
|
|
479
|
+
}), Ft = new ce("viewZoomBadgeIn", {
|
|
479
480
|
"0%": {
|
|
480
481
|
transform: "scale(0)",
|
|
481
482
|
opacity: 0
|
|
@@ -484,7 +485,7 @@ const J = {
|
|
|
484
485
|
transform: "scale(1)",
|
|
485
486
|
opacity: 1
|
|
486
487
|
}
|
|
487
|
-
}),
|
|
488
|
+
}), kt = new ce("viewZoomBadgeOut", {
|
|
488
489
|
"0%": {
|
|
489
490
|
transform: "scale(1)"
|
|
490
491
|
},
|
|
@@ -492,11 +493,11 @@ const J = {
|
|
|
492
493
|
transform: "scale(0)",
|
|
493
494
|
opacity: 0
|
|
494
495
|
}
|
|
495
|
-
}),
|
|
496
|
+
}), Ae = (e) => ({
|
|
496
497
|
position: e || "absolute",
|
|
497
498
|
inset: 0
|
|
498
499
|
});
|
|
499
|
-
function
|
|
500
|
+
function ve(e) {
|
|
500
501
|
return {
|
|
501
502
|
position: e,
|
|
502
503
|
top: 0,
|
|
@@ -506,7 +507,7 @@ function fe(e) {
|
|
|
506
507
|
};
|
|
507
508
|
}
|
|
508
509
|
const Ht = (e) => {
|
|
509
|
-
const { previewCls: n, modalMaskBg: o, marginXL: l, margin: t, colorTextLightSolid:
|
|
510
|
+
const { previewCls: n, modalMaskBg: o, marginXL: l, margin: t, colorTextLightSolid: r, previewOperationColorDisabled: c, previewOperationHoverColor: h, motionDurationSlow: y, iconCls: d } = e, v = new Z(o).setAlpha(0.1), m = v.clone().setAlpha(0.2), w = new Z(o).setAlpha(0.06);
|
|
510
511
|
return {
|
|
511
512
|
[`${n}-footer`]: {
|
|
512
513
|
position: "fixed",
|
|
@@ -534,8 +535,8 @@ const Ht = (e) => {
|
|
|
534
535
|
display: "flex",
|
|
535
536
|
alignItems: "center",
|
|
536
537
|
justifyContent: "center",
|
|
537
|
-
color:
|
|
538
|
-
backgroundColor:
|
|
538
|
+
color: r,
|
|
539
|
+
backgroundColor: v.toRgbString(),
|
|
539
540
|
borderRadius: e.borderRadiusLG,
|
|
540
541
|
backdropFilter: "saturate(180%) blur(10px)",
|
|
541
542
|
width: e.sizeXL,
|
|
@@ -556,7 +557,7 @@ const Ht = (e) => {
|
|
|
556
557
|
alignItems: "center",
|
|
557
558
|
gap: e.sizeXXS,
|
|
558
559
|
padding: e.paddingXXS,
|
|
559
|
-
backgroundColor:
|
|
560
|
+
backgroundColor: v.toRgbString(),
|
|
560
561
|
borderRadius: e.borderRadiusLG,
|
|
561
562
|
backdropFilter: "saturate(180%) blur(10px)",
|
|
562
563
|
"&-operation": {
|
|
@@ -566,7 +567,7 @@ const Ht = (e) => {
|
|
|
566
567
|
width: e.sizeXL + 4,
|
|
567
568
|
height: e.sizeXL + 4,
|
|
568
569
|
cursor: "pointer",
|
|
569
|
-
color:
|
|
570
|
+
color: r,
|
|
570
571
|
borderRadius: e.borderRadiusSM,
|
|
571
572
|
transition: `all ${y}`,
|
|
572
573
|
userSelect: "none",
|
|
@@ -590,12 +591,12 @@ const Ht = (e) => {
|
|
|
590
591
|
}
|
|
591
592
|
};
|
|
592
593
|
}, Zt = (e) => {
|
|
593
|
-
const { modalMaskBg: n, iconCls: o, previewOperationColorDisabled: l, previewCls: t, zIndexPopup:
|
|
594
|
+
const { modalMaskBg: n, iconCls: o, previewOperationColorDisabled: l, previewCls: t, zIndexPopup: r, motionDurationSlow: c, colorTextLightSolid: h } = e, y = new Z(n).setAlpha(0.1), d = y.clone().setAlpha(0.2);
|
|
594
595
|
return {
|
|
595
596
|
[`${t}-switch-left, ${t}-switch-right`]: {
|
|
596
597
|
position: "fixed",
|
|
597
598
|
insetBlockStart: "50%",
|
|
598
|
-
zIndex: e.calc(
|
|
599
|
+
zIndex: e.calc(r).add(1).equal(),
|
|
599
600
|
display: "flex",
|
|
600
601
|
alignItems: "center",
|
|
601
602
|
justifyContent: "center",
|
|
@@ -634,7 +635,7 @@ const Ht = (e) => {
|
|
|
634
635
|
insetInlineEnd: e.marginSM
|
|
635
636
|
}
|
|
636
637
|
};
|
|
637
|
-
},
|
|
638
|
+
}, Wt = (e) => {
|
|
638
639
|
const { motionEaseOut: n, motionDurationSlow: o } = e;
|
|
639
640
|
return {
|
|
640
641
|
[e.componentCls]: {
|
|
@@ -642,28 +643,28 @@ const Ht = (e) => {
|
|
|
642
643
|
textAlign: "center",
|
|
643
644
|
pointerEvents: "none",
|
|
644
645
|
"&-root": {
|
|
645
|
-
...
|
|
646
|
+
...ve("fixed"),
|
|
646
647
|
zIndex: e.zIndexPopup,
|
|
647
648
|
overflow: "auto",
|
|
648
649
|
outline: 0,
|
|
649
650
|
WebkitOverflowScrolling: "touch"
|
|
650
651
|
},
|
|
651
652
|
"&-wrap": {
|
|
652
|
-
...
|
|
653
|
+
...ve("fixed"),
|
|
653
654
|
zIndex: e.zIndexPopup,
|
|
654
655
|
overflow: "auto",
|
|
655
656
|
outline: 0,
|
|
656
657
|
WebkitOverflowScrolling: "touch"
|
|
657
658
|
},
|
|
658
659
|
"&-mask": {
|
|
659
|
-
...
|
|
660
|
+
...ve("fixed"),
|
|
660
661
|
zIndex: e.zIndexPopupBase,
|
|
661
662
|
height: "100%",
|
|
662
663
|
backgroundColor: e.colorBgMask,
|
|
663
664
|
backdropFilter: "blur(2px)"
|
|
664
665
|
},
|
|
665
666
|
"&-body": {
|
|
666
|
-
...
|
|
667
|
+
...Ae(),
|
|
667
668
|
overflow: "hidden"
|
|
668
669
|
},
|
|
669
670
|
"&-img": {
|
|
@@ -675,7 +676,7 @@ const Ht = (e) => {
|
|
|
675
676
|
transition: `transform ${o} ${n} 0s`,
|
|
676
677
|
userSelect: "none",
|
|
677
678
|
"&-wrapper": {
|
|
678
|
-
...
|
|
679
|
+
...Ae(),
|
|
679
680
|
transition: `transform ${o} ${n} 0s`,
|
|
680
681
|
display: "flex",
|
|
681
682
|
justifyContent: "center",
|
|
@@ -701,19 +702,19 @@ const Ht = (e) => {
|
|
|
701
702
|
}
|
|
702
703
|
},
|
|
703
704
|
"&-mask-zoom-appear, &-mask-zoom-enter": {
|
|
704
|
-
animationName:
|
|
705
|
+
animationName: jt,
|
|
705
706
|
animationDuration: e.motionDurationSlow,
|
|
706
707
|
animationTimingFunction: "linear",
|
|
707
708
|
userSelect: "none"
|
|
708
709
|
},
|
|
709
710
|
"&-mask-zoom-leave": {
|
|
710
|
-
animationName:
|
|
711
|
+
animationName: Bt,
|
|
711
712
|
animationDuration: e.motionDurationSlow,
|
|
712
713
|
animationTimingFunction: "linear",
|
|
713
714
|
pointerEvents: "none"
|
|
714
715
|
},
|
|
715
716
|
"&-zoom-appear, &-zoom-enter": {
|
|
716
|
-
animationName:
|
|
717
|
+
animationName: Ft,
|
|
717
718
|
opacity: 0,
|
|
718
719
|
animationTimingFunction: e.motionEaseOutCirc,
|
|
719
720
|
animationFillMode: "both",
|
|
@@ -725,7 +726,7 @@ const Ht = (e) => {
|
|
|
725
726
|
animationPlayState: "running"
|
|
726
727
|
},
|
|
727
728
|
"&-zoom-leave": {
|
|
728
|
-
animationName:
|
|
729
|
+
animationName: kt,
|
|
729
730
|
animationDuration: e.motionDurationSlow,
|
|
730
731
|
animationTimingFunction: e.motionEaseInOutCirc,
|
|
731
732
|
animationFillMode: "both"
|
|
@@ -746,9 +747,9 @@ const Ht = (e) => {
|
|
|
746
747
|
"&": [Ht(e), Zt(e)]
|
|
747
748
|
};
|
|
748
749
|
};
|
|
749
|
-
function
|
|
750
|
-
return
|
|
751
|
-
const o =
|
|
750
|
+
function _t(e) {
|
|
751
|
+
return wt("ImageViewer", (n) => {
|
|
752
|
+
const o = pt(n, {
|
|
752
753
|
zIndexPopup: n.zIndexPopupBase + 80,
|
|
753
754
|
previewOperationColor: new Z(n.colorTextLightSolid).setAlpha(0.65).toRgbString(),
|
|
754
755
|
previewOperationHoverColor: new Z(n.colorTextLightSolid).setAlpha(0.85).toRgbString(),
|
|
@@ -761,10 +762,10 @@ function Wt(e) {
|
|
|
761
762
|
iconCls: ".anticon",
|
|
762
763
|
previewCls: n.componentCls
|
|
763
764
|
});
|
|
764
|
-
return [
|
|
765
|
+
return [Wt(o)];
|
|
765
766
|
}, e);
|
|
766
767
|
}
|
|
767
|
-
const
|
|
768
|
+
const ge = {
|
|
768
769
|
/**
|
|
769
770
|
* ESC
|
|
770
771
|
*/
|
|
@@ -779,18 +780,18 @@ const ve = {
|
|
|
779
780
|
* RIGHT
|
|
780
781
|
*/
|
|
781
782
|
RIGHT: 39
|
|
782
|
-
},
|
|
783
|
-
rotateLeft: u(
|
|
784
|
-
rotateRight: u(
|
|
785
|
-
zoomIn: u(
|
|
786
|
-
zoomOut: u(
|
|
783
|
+
}, U = {
|
|
784
|
+
rotateLeft: u(mt, null, null),
|
|
785
|
+
rotateRight: u(gt, null, null),
|
|
786
|
+
zoomIn: u(vt, null, null),
|
|
787
|
+
zoomOut: u(ft, null, null),
|
|
787
788
|
flipX: u(ze, null, null),
|
|
788
789
|
flipY: u(ze, {
|
|
789
790
|
rotate: 90
|
|
790
791
|
}, null)
|
|
791
|
-
},
|
|
792
|
+
}, _e = ["close", "left", "right", "rotateRight", "rotateRight", "zoomOut", "flipX", "flipY", "rotateLeft"], Gt = /* @__PURE__ */ Se({
|
|
792
793
|
name: "GImagePreview",
|
|
793
|
-
props:
|
|
794
|
+
props: V,
|
|
794
795
|
inheritAttrs: !1,
|
|
795
796
|
slots: Object,
|
|
796
797
|
emits: {
|
|
@@ -803,179 +804,179 @@ const ve = {
|
|
|
803
804
|
expose: o,
|
|
804
805
|
slots: l
|
|
805
806
|
}) => {
|
|
806
|
-
const t =
|
|
807
|
+
const t = Re({
|
|
807
808
|
suffixCls: "image-view"
|
|
808
809
|
}), {
|
|
809
|
-
wrapSSR:
|
|
810
|
+
wrapSSR: r,
|
|
810
811
|
hashId: c
|
|
811
|
-
} =
|
|
812
|
-
value:
|
|
813
|
-
onChange: (
|
|
812
|
+
} = _t(t), [h, y, d] = Et(e.open, {
|
|
813
|
+
value: k(e, "open"),
|
|
814
|
+
onChange: (s) => {
|
|
814
815
|
var z;
|
|
815
|
-
(z = e.onOpenChange) == null || z.call(e,
|
|
816
|
+
(z = e.onOpenChange) == null || z.call(e, s), n("update:open", s);
|
|
816
817
|
}
|
|
817
|
-
}), [
|
|
818
|
+
}), [v, m] = ne(!1), [w, x] = ne(!0), a = L(), {
|
|
818
819
|
transform: i,
|
|
819
820
|
resetTransform: p,
|
|
820
|
-
updateTransform:
|
|
821
|
+
updateTransform: g,
|
|
821
822
|
dispatchZoomChange: S
|
|
822
|
-
} =
|
|
823
|
-
isMoving:
|
|
823
|
+
} = Tt(a, k(e, "minScale"), k(e, "maxScale"), e.onTransform), {
|
|
824
|
+
isMoving: C,
|
|
824
825
|
onMouseDown: $,
|
|
825
826
|
onWheel: T
|
|
826
|
-
} =
|
|
827
|
-
isTouching:
|
|
827
|
+
} = Nt(a, k(e, "movable"), d, k(e, "scaleStep"), i, g, S), {
|
|
828
|
+
isTouching: O,
|
|
828
829
|
onTouchStart: I,
|
|
829
|
-
onTouchMove:
|
|
830
|
-
onTouchEnd:
|
|
831
|
-
} =
|
|
832
|
-
|
|
833
|
-
w.value ||
|
|
830
|
+
onTouchMove: F,
|
|
831
|
+
onTouchEnd: W
|
|
832
|
+
} = Xt(a, k(e, "movable"), d, k(e, "minScale"), i, g, S);
|
|
833
|
+
Ce(() => {
|
|
834
|
+
w.value || x(!0);
|
|
834
835
|
}, [w]);
|
|
835
|
-
const N = L(null),
|
|
836
|
+
const N = L(null), M = L(e.current), P = at(/* @__PURE__ */ new Map()), Y = b(() => new Map(Array.from(P).map(([s, {
|
|
836
837
|
url: z
|
|
837
|
-
}]) => [
|
|
838
|
-
|
|
839
|
-
|
|
838
|
+
}]) => [s, z]))), _ = b(() => Y.value.get(M.value)), j = b(() => Y.value.size), B = b(() => Array.from(Y.value.keys())), D = b(() => B.value.indexOf(M.value)), f = b(() => j.value > 1), A = b(() => j.value >= 1);
|
|
839
|
+
J(d, (s) => {
|
|
840
|
+
s && (v.value = !0);
|
|
840
841
|
});
|
|
841
|
-
const E = (
|
|
842
|
-
|
|
842
|
+
const E = (s) => {
|
|
843
|
+
M.value = s;
|
|
843
844
|
};
|
|
844
|
-
|
|
845
|
-
|
|
845
|
+
J(() => e.current, (s) => {
|
|
846
|
+
Ne(s) && E(s);
|
|
846
847
|
});
|
|
847
|
-
function
|
|
848
|
-
P.set(
|
|
848
|
+
function de(s, z) {
|
|
849
|
+
P.set(s, {
|
|
849
850
|
url: z,
|
|
850
851
|
loading: !0,
|
|
851
852
|
canPreview: !1
|
|
852
853
|
});
|
|
853
854
|
}
|
|
854
|
-
const
|
|
855
|
+
const G = () => {
|
|
855
856
|
m(!1);
|
|
856
|
-
},
|
|
857
|
+
}, oe = () => {
|
|
857
858
|
p("close"), n("close");
|
|
858
|
-
},
|
|
859
|
-
|
|
860
|
-
},
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
}, Ve = (
|
|
864
|
-
const z = P.get(
|
|
865
|
-
z && (z.loading = !1, z.canPreview = !1),
|
|
866
|
-
},
|
|
859
|
+
}, Ge = (s) => {
|
|
860
|
+
C.value || N.value === (s == null ? void 0 : s.target) && G();
|
|
861
|
+
}, Ue = () => {
|
|
862
|
+
const s = P.get(M.value);
|
|
863
|
+
s && (s.loading = !1, s.canPreview = !0);
|
|
864
|
+
}, Ve = (s) => {
|
|
865
|
+
const z = P.get(M.value);
|
|
866
|
+
z && (z.loading = !1, z.canPreview = !1), s.target.alt = "加载失败";
|
|
867
|
+
}, Ie = () => {
|
|
867
868
|
if (D.value > 0 || e.infinite) {
|
|
868
|
-
const
|
|
869
|
-
E(
|
|
869
|
+
const s = D.value - 1 < 0 ? e.urls.length - 1 : D.value - 1;
|
|
870
|
+
E(B.value[s]), p("prev");
|
|
870
871
|
}
|
|
871
|
-
},
|
|
872
|
-
if (D.value <
|
|
873
|
-
const
|
|
874
|
-
E(
|
|
872
|
+
}, be = () => {
|
|
873
|
+
if (D.value < j.value - 1 || e.infinite) {
|
|
874
|
+
const s = D.value + 1 > e.urls.length - 1 ? 0 : D.value + 1;
|
|
875
|
+
E(B.value[s]), p("next");
|
|
875
876
|
}
|
|
876
|
-
}, Ue = () => {
|
|
877
|
-
S(U + e.scaleStep, "zoomIn");
|
|
878
877
|
}, qe = () => {
|
|
879
|
-
S(
|
|
878
|
+
S(K + e.scaleStep, "zoomIn");
|
|
880
879
|
}, Ke = () => {
|
|
881
|
-
|
|
880
|
+
S(K / (K + e.scaleStep), "zoomOut");
|
|
881
|
+
}, Qe = () => {
|
|
882
|
+
g({
|
|
882
883
|
rotate: i.value.rotate + 90
|
|
883
884
|
}, "rotateRight");
|
|
884
|
-
},
|
|
885
|
-
|
|
885
|
+
}, Je = () => {
|
|
886
|
+
g({
|
|
886
887
|
rotate: i.value.rotate - 90
|
|
887
888
|
}, "rotateLeft");
|
|
888
|
-
},
|
|
889
|
-
|
|
889
|
+
}, et = () => {
|
|
890
|
+
g({
|
|
890
891
|
flipX: !i.value.flipX
|
|
891
892
|
}, "flipX");
|
|
892
|
-
},
|
|
893
|
-
|
|
893
|
+
}, tt = () => {
|
|
894
|
+
g({
|
|
894
895
|
flipY: !i.value.flipY
|
|
895
896
|
}, "flipY");
|
|
896
|
-
},
|
|
897
|
-
icon: H(l, e.icons, "flipY") ||
|
|
898
|
-
onClick:
|
|
897
|
+
}, $e = [{
|
|
898
|
+
icon: H(l, e.icons, "flipY") || U.flipY,
|
|
899
|
+
onClick: tt,
|
|
899
900
|
type: "flipY"
|
|
900
901
|
}, {
|
|
901
|
-
icon: H(l, e.icons, "flipX") ||
|
|
902
|
-
onClick:
|
|
902
|
+
icon: H(l, e.icons, "flipX") || U.flipX,
|
|
903
|
+
onClick: et,
|
|
903
904
|
type: "flipX"
|
|
904
905
|
}, {
|
|
905
|
-
icon: H(l, e.icons, "rotateLeft") ||
|
|
906
|
-
onClick:
|
|
906
|
+
icon: H(l, e.icons, "rotateLeft") || U.rotateLeft,
|
|
907
|
+
onClick: Je,
|
|
907
908
|
type: "rotateLeft"
|
|
908
909
|
}, {
|
|
909
|
-
icon: H(l, e.icons, "rotateRight") ||
|
|
910
|
-
onClick:
|
|
910
|
+
icon: H(l, e.icons, "rotateRight") || U.rotateRight,
|
|
911
|
+
onClick: Qe,
|
|
911
912
|
type: "rotateRight"
|
|
912
913
|
}, {
|
|
913
|
-
icon: H(l, e.icons, "zoomOut") ||
|
|
914
|
-
onClick: () =>
|
|
914
|
+
icon: H(l, e.icons, "zoomOut") || U.zoomOut,
|
|
915
|
+
onClick: () => Ke(),
|
|
915
916
|
type: "zoomOut",
|
|
916
917
|
disabled: b(() => i.value.scale <= e.minScale)
|
|
917
918
|
}, {
|
|
918
|
-
icon: H(l, e.icons, "zoomIn") ||
|
|
919
|
-
onClick: () =>
|
|
919
|
+
icon: H(l, e.icons, "zoomIn") || U.zoomIn,
|
|
920
|
+
onClick: () => qe(),
|
|
920
921
|
type: "zoomIn",
|
|
921
922
|
disabled: b(() => i.value.scale === e.maxScale)
|
|
922
|
-
}],
|
|
923
|
-
d.value && (i.value.scale !== 1 ?
|
|
923
|
+
}], nt = (s) => {
|
|
924
|
+
d.value && (i.value.scale !== 1 ? g({
|
|
924
925
|
x: 0,
|
|
925
926
|
y: 0,
|
|
926
927
|
scale: 1
|
|
927
|
-
}, "doubleClick") : S(
|
|
928
|
-
},
|
|
929
|
-
|
|
928
|
+
}, "doubleClick") : S(K + e.scaleStep, "doubleClick", s.clientX, s.clientY));
|
|
929
|
+
}, ot = (s) => {
|
|
930
|
+
s.keyCode === ge.ESC && G(), !(!d.value || !f.value) && (s.keyCode === ge.LEFT ? Ie() : s.keyCode === ge.RIGHT && be());
|
|
930
931
|
};
|
|
931
|
-
let
|
|
932
|
+
let fe = () => {
|
|
932
933
|
};
|
|
933
|
-
return
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
934
|
+
return De(() => {
|
|
935
|
+
J(() => e.urls, (s) => {
|
|
936
|
+
Ct(s) && s.forEach((z, ie) => {
|
|
937
|
+
de(ie, z);
|
|
937
938
|
});
|
|
938
939
|
}, {
|
|
939
940
|
flush: "post",
|
|
940
941
|
immediate: !0
|
|
941
|
-
}),
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
|
|
942
|
+
}), J([() => d.value, () => C.value], () => {
|
|
943
|
+
fe();
|
|
944
|
+
const s = q(window, "keydown", ot, !1);
|
|
945
|
+
fe = () => {
|
|
946
|
+
s.remove();
|
|
946
947
|
};
|
|
947
948
|
}, {
|
|
948
949
|
flush: "post",
|
|
949
950
|
immediate: !0
|
|
950
951
|
});
|
|
951
|
-
}),
|
|
952
|
-
|
|
952
|
+
}), lt(() => {
|
|
953
|
+
fe();
|
|
953
954
|
}), o({
|
|
954
|
-
setOpen: (
|
|
955
|
-
y(
|
|
955
|
+
setOpen: (s) => {
|
|
956
|
+
y(s), M.value = e.current;
|
|
956
957
|
}
|
|
957
958
|
}), () => {
|
|
958
|
-
const
|
|
959
|
+
const s = ye(`${t}-mask-zoom`), z = ye(`${t}-zoom`), ie = {};
|
|
959
960
|
for (const R in e.icons)
|
|
960
|
-
|
|
961
|
-
return
|
|
961
|
+
ie[R] = H(l, e.icons, R);
|
|
962
|
+
return r(u(se, null, [u(Te, {
|
|
962
963
|
to: e.getContainer || "body"
|
|
963
964
|
}, {
|
|
964
|
-
default: () => [d.value && u(
|
|
965
|
+
default: () => [d.value && u(se, null, [u("div", {
|
|
965
966
|
class: `${t}-root ${c.value}`
|
|
966
|
-
}, [u(
|
|
967
|
-
default: () => [
|
|
967
|
+
}, [u(he, s, {
|
|
968
|
+
default: () => [we(u("div", {
|
|
968
969
|
class: `${t}-mask ${c.value}`
|
|
969
|
-
}, null), [[
|
|
970
|
+
}, null), [[pe, d.value && v.value]])]
|
|
970
971
|
}), u("div", {
|
|
971
972
|
ref: N,
|
|
972
973
|
tabindex: -1,
|
|
973
|
-
class: [`${t}-wrap`, `${c.value}`,
|
|
974
|
-
onClick: (R) => e.onHideOnClickModal &&
|
|
975
|
-
}, [u(
|
|
976
|
-
onAfterLeave: () =>
|
|
974
|
+
class: [`${t}-wrap`, `${c.value}`, C.value && `${t}-moving`],
|
|
975
|
+
onClick: (R) => e.onHideOnClickModal && Ge(R)
|
|
976
|
+
}, [u(he, le(z, {
|
|
977
|
+
onAfterLeave: () => oe()
|
|
977
978
|
}), {
|
|
978
|
-
default: () => [
|
|
979
|
+
default: () => [we(u("div", {
|
|
979
980
|
role: "dialog",
|
|
980
981
|
class: `${t} ${c.value}`
|
|
981
982
|
}, [u("div", {
|
|
@@ -987,97 +988,119 @@ const ve = {
|
|
|
987
988
|
}, [u("img", {
|
|
988
989
|
ref: a,
|
|
989
990
|
class: `${t}-img ${c.value}`,
|
|
990
|
-
src:
|
|
991
|
-
onLoad: () =>
|
|
991
|
+
src: _.value,
|
|
992
|
+
onLoad: () => Ue(),
|
|
992
993
|
onError: (R) => Ve(R),
|
|
993
994
|
style: {
|
|
994
995
|
transform: `translate3d(${i.value.x}px, ${i.value.y}px, 0) scale3d(${i.value.flipX ? "-" : ""}${i.value.scale}, ${i.value.flipY ? "-" : ""}${i.value.scale}, 1) rotate(${i.value.rotate}deg)`,
|
|
995
|
-
transitionDuration: !w.value ||
|
|
996
|
+
transitionDuration: !w.value || O.value ? "0s" : void 0
|
|
996
997
|
},
|
|
997
998
|
onWheel: T,
|
|
998
999
|
onMousedown: $,
|
|
999
|
-
onDblclick:
|
|
1000
|
+
onDblclick: nt,
|
|
1000
1001
|
onTouchstart: I,
|
|
1001
|
-
onTouchmove:
|
|
1002
|
-
onTouchend:
|
|
1003
|
-
onTouchcancel:
|
|
1004
|
-
}, null)])])])]), [[
|
|
1002
|
+
onTouchmove: F,
|
|
1003
|
+
onTouchend: W,
|
|
1004
|
+
onTouchcancel: W
|
|
1005
|
+
}, null)])])])]), [[pe, d.value && v.value]])]
|
|
1005
1006
|
})])])])]
|
|
1006
|
-
}), d.value &&
|
|
1007
|
-
open: d.value &&
|
|
1007
|
+
}), d.value && v.value && u(Yt, {
|
|
1008
|
+
open: d.value && v.value,
|
|
1008
1009
|
hashId: c.value,
|
|
1009
1010
|
count: e.urls.length,
|
|
1010
|
-
current:
|
|
1011
|
+
current: M.value,
|
|
1011
1012
|
zIndex: e.zIndex + 1,
|
|
1012
1013
|
getContainer: e.getContainer,
|
|
1013
1014
|
prefixCls: t,
|
|
1014
|
-
icons:
|
|
1015
|
+
icons: Ye(ie, $e.map(({
|
|
1015
1016
|
type: R
|
|
1016
1017
|
}) => R)),
|
|
1017
|
-
tools:
|
|
1018
|
+
tools: $e,
|
|
1018
1019
|
infinite: e.infinite,
|
|
1019
|
-
countRender:
|
|
1020
|
-
showSwitch:
|
|
1020
|
+
countRender: Pe(l, e, "countRenders"),
|
|
1021
|
+
showSwitch: f.value,
|
|
1021
1022
|
showProgress: A.value,
|
|
1022
|
-
onClose:
|
|
1023
|
-
onActive: (R) => R > 0 ?
|
|
1023
|
+
onClose: G,
|
|
1024
|
+
onActive: (R) => R > 0 ? be() : Ie()
|
|
1024
1025
|
}, null)]));
|
|
1025
1026
|
};
|
|
1026
1027
|
}
|
|
1027
|
-
}),
|
|
1028
|
+
}), me = {
|
|
1028
1029
|
width: "100%",
|
|
1029
1030
|
height: "100%"
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1031
|
+
}, Ut = {
|
|
1032
|
+
overflow: "hidden",
|
|
1033
|
+
whiteSpace: "nowrap",
|
|
1034
|
+
textOverflow: "ellipsis"
|
|
1035
|
+
}, Vt = (e) => {
|
|
1036
|
+
const { motionDurationSlow: n, paddingXXS: o, marginXXS: l, colorTextLightSolid: t } = e, r = ".anticon";
|
|
1037
|
+
return {
|
|
1038
|
+
position: "absolute",
|
|
1039
|
+
inset: 0,
|
|
1040
|
+
display: "flex",
|
|
1041
|
+
alignItems: "center",
|
|
1042
|
+
justifyContent: "center",
|
|
1043
|
+
color: t,
|
|
1044
|
+
background: new yt("#000").setA(0.5).toRgbString(),
|
|
1045
|
+
cursor: "pointer",
|
|
1046
|
+
opacity: 0,
|
|
1047
|
+
transition: `opacity ${n}`,
|
|
1048
|
+
[`.${e.componentCls}-mask-info`]: {
|
|
1049
|
+
...Ut,
|
|
1050
|
+
padding: `0 ${ee(o)}`,
|
|
1051
|
+
[r]: {
|
|
1052
|
+
marginInlineEnd: l,
|
|
1053
|
+
svg: {
|
|
1054
|
+
verticalAlign: "baseline"
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
}, qt = (e) => ({
|
|
1039
1060
|
position: e || "absolute",
|
|
1040
1061
|
inset: 0
|
|
1041
|
-
}),
|
|
1062
|
+
}), Kt = (e) => ({
|
|
1042
1063
|
[e.componentCls]: {
|
|
1043
1064
|
display: "inline-block",
|
|
1044
1065
|
position: "relative",
|
|
1045
1066
|
overflow: "hidden",
|
|
1046
|
-
|
|
1047
|
-
...
|
|
1067
|
+
[`${e.componentCls}-img`]: {
|
|
1068
|
+
...me,
|
|
1048
1069
|
verticalAlign: "top",
|
|
1049
1070
|
opacity: 1,
|
|
1050
|
-
[`&${e.componentCls}-
|
|
1071
|
+
[`&${e.componentCls}-img-preview`]: {
|
|
1051
1072
|
userSelect: "none",
|
|
1052
1073
|
cursor: "pointer"
|
|
1074
|
+
},
|
|
1075
|
+
"&-placeholder": {
|
|
1076
|
+
...me,
|
|
1077
|
+
backgroundColor: e.colorBgContainerDisabled,
|
|
1078
|
+
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
|
|
1079
|
+
backgroundRepeat: "no-repeat",
|
|
1080
|
+
backgroundPosition: "center center",
|
|
1081
|
+
backgroundSize: "30%"
|
|
1053
1082
|
}
|
|
1054
1083
|
},
|
|
1055
|
-
|
|
1056
|
-
...
|
|
1057
|
-
...Vt()
|
|
1058
|
-
},
|
|
1059
|
-
"&-placeholder": {
|
|
1060
|
-
...ie,
|
|
1061
|
-
backgroundColor: e.colorBgContainerDisabled,
|
|
1062
|
-
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
|
|
1063
|
-
backgroundRepeat: "no-repeat",
|
|
1064
|
-
backgroundPosition: "center center",
|
|
1065
|
-
backgroundSize: "30%"
|
|
1066
|
-
},
|
|
1067
|
-
"&-error": {
|
|
1068
|
-
...ie,
|
|
1084
|
+
[`${e.componentCls}-error`]: {
|
|
1085
|
+
...me,
|
|
1069
1086
|
display: "flex",
|
|
1070
1087
|
alignItems: "center",
|
|
1071
|
-
justifyContent: "center"
|
|
1072
|
-
color: e.colorText,
|
|
1073
|
-
backgroundColor: e.colorBgContainerDisabled
|
|
1088
|
+
justifyContent: "center"
|
|
1074
1089
|
},
|
|
1075
|
-
|
|
1090
|
+
[`${e.componentCls}-placeholder`]: {
|
|
1091
|
+
...qt()
|
|
1092
|
+
},
|
|
1093
|
+
[`${e.componentCls}-mask`]: {
|
|
1094
|
+
...Vt(e)
|
|
1095
|
+
},
|
|
1096
|
+
[`${e.componentCls}-mask:hover`]: {
|
|
1097
|
+
opacity: 1
|
|
1098
|
+
}
|
|
1076
1099
|
}
|
|
1077
|
-
}),
|
|
1078
|
-
let
|
|
1079
|
-
const
|
|
1080
|
-
props:
|
|
1100
|
+
}), Qt = (e) => typeof Element > "u" ? !1 : e instanceof Element;
|
|
1101
|
+
let Ee = "";
|
|
1102
|
+
const Jt = [..._e, "placeholder", "fallback"], re = /* @__PURE__ */ Se({
|
|
1103
|
+
props: We,
|
|
1081
1104
|
name: "GImage",
|
|
1082
1105
|
inheritAttrs: !1,
|
|
1083
1106
|
emits: {
|
|
@@ -1091,120 +1114,128 @@ const Kt = [...ke, "fallback", "placeholder"], le = /* @__PURE__ */ pe({
|
|
|
1091
1114
|
emit: o,
|
|
1092
1115
|
attrs: l
|
|
1093
1116
|
}) {
|
|
1094
|
-
const t =
|
|
1117
|
+
const t = Q && "loading" in HTMLImageElement.prototype, r = Re({
|
|
1095
1118
|
suffixCls: "image"
|
|
1096
1119
|
}), {
|
|
1097
1120
|
wrapSSR: c,
|
|
1098
1121
|
hashId: h
|
|
1099
|
-
} =
|
|
1122
|
+
} = St("Image", [Kt], r), y = L(), d = L(), v = L(!1), m = L(!0), w = L(!1), x = L(), a = L();
|
|
1100
1123
|
let i, p;
|
|
1101
|
-
const
|
|
1124
|
+
const g = b(() => e.loading === "eager" ? !1 : !t && e.loading === "lazy" || e.lazy), S = b(() => Q && e.fit ? {
|
|
1125
|
+
...e.imageStyle,
|
|
1102
1126
|
objectFit: e.fit
|
|
1103
|
-
} :
|
|
1127
|
+
} : e.imageStyle), C = b(() => typeof e.preview == "object" ? e.preview : {}), $ = b(() => !!e.preview), T = b(() => {
|
|
1104
1128
|
const {
|
|
1105
|
-
urls:
|
|
1129
|
+
urls: f = [],
|
|
1106
1130
|
current: A = 0
|
|
1107
|
-
} =
|
|
1108
|
-
if (
|
|
1109
|
-
const E =
|
|
1131
|
+
} = C.value;
|
|
1132
|
+
if (Ne(A)) return f.length >= A ? A : 0;
|
|
1133
|
+
const E = f.indexOf(e.src);
|
|
1110
1134
|
return E >= 0 ? E : 0;
|
|
1111
|
-
}),
|
|
1112
|
-
|
|
1135
|
+
}), O = b(() => ee(e.width)), I = b(() => ee(e.height)), F = () => {
|
|
1136
|
+
Q && (m.value = !0, v.value = !1, d.value = e.src);
|
|
1113
1137
|
};
|
|
1114
|
-
function
|
|
1115
|
-
m.value = !1,
|
|
1138
|
+
function W(f) {
|
|
1139
|
+
v.value || (m.value = !1, v.value = !1, o("load", f));
|
|
1116
1140
|
}
|
|
1117
|
-
function N(
|
|
1118
|
-
m.value = !1,
|
|
1141
|
+
function N(f) {
|
|
1142
|
+
m.value = !1, v.value = !0, o("error", f);
|
|
1119
1143
|
}
|
|
1120
|
-
function
|
|
1121
|
-
|
|
1144
|
+
function M() {
|
|
1145
|
+
It(x.value, a.value) && (F(), _());
|
|
1122
1146
|
}
|
|
1123
|
-
const P =
|
|
1124
|
-
async function
|
|
1125
|
-
if (!
|
|
1147
|
+
const P = zt(M, 200, !0);
|
|
1148
|
+
async function Y() {
|
|
1149
|
+
if (!Q) return;
|
|
1126
1150
|
await st();
|
|
1127
1151
|
const {
|
|
1128
|
-
scrollContainer:
|
|
1152
|
+
scrollContainer: f
|
|
1129
1153
|
} = e;
|
|
1130
|
-
|
|
1154
|
+
Qt(f) ? a.value = f : bt(f) && f !== "" ? a.value = document.querySelector(f) ?? void 0 : x.value && (a.value = $t(x.value)), a.value && (i = Le(a, "scroll", P), setTimeout(() => M(), 100));
|
|
1131
1155
|
}
|
|
1132
|
-
function
|
|
1133
|
-
!
|
|
1156
|
+
function _() {
|
|
1157
|
+
!Q || !a.value || !P || (i == null || i(), a.value = void 0);
|
|
1134
1158
|
}
|
|
1135
|
-
function
|
|
1136
|
-
if (
|
|
1137
|
-
if (
|
|
1138
|
-
return
|
|
1139
|
-
if (
|
|
1140
|
-
return
|
|
1159
|
+
function j(f) {
|
|
1160
|
+
if (f.ctrlKey) {
|
|
1161
|
+
if (f.deltaY < 0)
|
|
1162
|
+
return f.preventDefault(), !1;
|
|
1163
|
+
if (f.deltaY > 0)
|
|
1164
|
+
return f.preventDefault(), !1;
|
|
1141
1165
|
}
|
|
1142
1166
|
}
|
|
1143
|
-
const
|
|
1144
|
-
o("click"), !(m.value ||
|
|
1167
|
+
const B = () => {
|
|
1168
|
+
o("click"), !(m.value || v.value) && $.value && (p = Le("wheel", j, {
|
|
1145
1169
|
passive: !1
|
|
1146
|
-
}),
|
|
1170
|
+
}), Ee = document.body.style.overflow, document.body.style.overflow = "hidden", w.value = !0);
|
|
1147
1171
|
}, D = () => {
|
|
1148
|
-
p == null || p(), document.body.style.overflow =
|
|
1172
|
+
p == null || p(), document.body.style.overflow = Ee, w.value = !1;
|
|
1149
1173
|
};
|
|
1150
|
-
return
|
|
1151
|
-
|
|
1152
|
-
}),
|
|
1153
|
-
var
|
|
1154
|
-
$.value && w.value ? (
|
|
1155
|
-
}),
|
|
1156
|
-
|
|
1174
|
+
return J(() => e.src, () => {
|
|
1175
|
+
g.value ? (m.value = !0, v.value = !1, _(), Y()) : F();
|
|
1176
|
+
}), rt(() => {
|
|
1177
|
+
var f, A;
|
|
1178
|
+
$.value && w.value ? (f = y.value) == null || f.setOpen(!0) : (A = y.value) == null || A.setOpen(!1);
|
|
1179
|
+
}), De(() => {
|
|
1180
|
+
g.value ? Y() : F();
|
|
1157
1181
|
}), () => {
|
|
1158
|
-
|
|
1182
|
+
var G;
|
|
1183
|
+
const f = Mt(Object.entries(l).filter(([oe]) => /^(?:data-|on[A-Z])/i.test(oe) || ["id", "style", "class"].includes(oe))), A = Ye(l, Object.keys(f)), E = xt(Jt, n, e, {
|
|
1159
1184
|
render: !0
|
|
1160
|
-
});
|
|
1161
|
-
return c(u("div",
|
|
1185
|
+
}), de = Pe(n, e, ["preview", "mask"], !0);
|
|
1186
|
+
return c(u("div", le({
|
|
1162
1187
|
class: {
|
|
1163
1188
|
[`${h.value}`]: !0,
|
|
1164
|
-
[`${
|
|
1165
|
-
[`${l.class}`]: !!l.class
|
|
1189
|
+
[`${r}`]: !0
|
|
1166
1190
|
},
|
|
1167
|
-
ref:
|
|
1168
|
-
},
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1191
|
+
ref: x
|
|
1192
|
+
}, f, {
|
|
1193
|
+
style: {
|
|
1194
|
+
width: ee(e.size) || O.value,
|
|
1195
|
+
height: ee(e.size) || I.value,
|
|
1196
|
+
...f.style || {}
|
|
1197
|
+
}
|
|
1198
|
+
}), [v.value ? u("div", {
|
|
1199
|
+
class: X(h.value, `${r}-error`)
|
|
1200
|
+
}, [E.fallback]) : u(se, null, [u("img", le(A, {
|
|
1172
1201
|
src: d.value,
|
|
1173
1202
|
loading: e.loading,
|
|
1174
1203
|
style: S.value,
|
|
1175
|
-
class: {
|
|
1176
|
-
[`${
|
|
1177
|
-
[`${
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
crossorigin: e.crossorigin,
|
|
1182
|
-
width: M.value,
|
|
1204
|
+
class: X(h.value, e.imageClass, `${r}-img`, {
|
|
1205
|
+
[`${r}-img-placeholder`]: e.placeholder === !0,
|
|
1206
|
+
[`${r}-img-preview`]: $.value
|
|
1207
|
+
}),
|
|
1208
|
+
crossorigin: e.crossOrigin,
|
|
1209
|
+
width: O.value,
|
|
1183
1210
|
height: I.value,
|
|
1184
|
-
onClick:
|
|
1185
|
-
onLoad:
|
|
1211
|
+
onClick: B,
|
|
1212
|
+
onLoad: W,
|
|
1186
1213
|
onError: N
|
|
1187
1214
|
}), null), m.value && u("div", {
|
|
1188
|
-
class:
|
|
1189
|
-
}, [E.placeholder
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1215
|
+
class: X(`${r}-placeholder`, h.value)
|
|
1216
|
+
}, [E.placeholder])]), C.value.mask && $.value && u("div", {
|
|
1217
|
+
class: X(`${r}-mask`, C.value.maskClass, h.value),
|
|
1218
|
+
style: {
|
|
1219
|
+
display: ((G = f.style) == null ? void 0 : G.display) === "none" ? "none" : void 0
|
|
1220
|
+
}
|
|
1221
|
+
}, [de || u("div", {
|
|
1222
|
+
class: X(`${r}-mask-info`, h.value)
|
|
1223
|
+
}, [u(ht, null, null)])]), $.value && u(Gt, le({
|
|
1193
1224
|
ref: y
|
|
1194
|
-
},
|
|
1195
|
-
urls:
|
|
1225
|
+
}, C.value, At(E, _e), {
|
|
1226
|
+
urls: C.value.urls || [e.src],
|
|
1196
1227
|
current: T.value,
|
|
1197
1228
|
onClose: () => D()
|
|
1198
1229
|
}), null)]));
|
|
1199
1230
|
};
|
|
1200
1231
|
}
|
|
1201
1232
|
});
|
|
1202
|
-
|
|
1203
|
-
|
|
1233
|
+
re.isGImage = !0;
|
|
1234
|
+
re.install = (e) => (e.component(re.name, re), e);
|
|
1204
1235
|
export {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1236
|
+
re as GImage,
|
|
1237
|
+
Gt as GImagePreview,
|
|
1238
|
+
te as baseProps,
|
|
1239
|
+
re as default,
|
|
1240
|
+
We as imageProps
|
|
1210
1241
|
};
|