@gx-design-vue/image 0.2.0-beta.2 → 0.2.0-beta.20
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 +20 -27
- package/dist/components/ImageViewer.d.ts +41 -111
- package/dist/components/style.d.ts +4 -2
- package/dist/{image.mjs → image.js} +610 -729
- package/dist/image.umd.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/props.d.ts +7 -12
- package/dist/style.d.ts +2 -5
- package/package.json +18 -43
- package/dist/image.umd.js +0 -2
|
@@ -1,165 +1,142 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useThrottleFn as
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { createTypes as Ze } from "vue-types";
|
|
2
|
+
import { createVNode as f, defineComponent as Ve, shallowRef as Te, ref as C, reactive as Xe, computed as L, watch as _, nextTick as Ye, Teleport as _e, Transition as ke, withDirectives as ze, vShow as Oe, mergeProps as We, cloneVNode as qe, watchEffect as Qe, createTextVNode as Je } from "vue";
|
|
3
|
+
import { ExpandOutlined as Ke, OneToOneOutlined as et, CloseOutlined as tt, ZoomInOutlined as nt, ZoomOutOutlined as at, RotateRightOutlined as it, RotateLeftOutlined as rt, LeftOutlined as ot, RightOutlined as st } from "@ant-design/icons-vue";
|
|
4
|
+
import { isServer as q, getPrefixCls as Ge, isInContainer as lt, getSlotVNode as Le, isString as ut, getScrollContainer as ct, isNumber as ft } from "@gx-design-vue/pro-utils";
|
|
5
|
+
import { useState as Ne, onMountedOrActivated as dt } from "@gx-design-vue/pro-hooks";
|
|
6
|
+
import { Keyframe as fe, useStyle as ht, mergeToken as gt, getTransitionProps as $e, useProStyle as vt } from "@gx-design-vue/pro-provider";
|
|
7
|
+
import { useThrottleFn as mt, useEventListener as Ee } from "@vueuse/core";
|
|
8
|
+
const R = Ze({
|
|
9
|
+
func: void 0,
|
|
10
|
+
bool: void 0,
|
|
11
|
+
string: void 0,
|
|
12
|
+
number: void 0,
|
|
13
|
+
array: void 0,
|
|
14
|
+
object: void 0,
|
|
15
|
+
integer: void 0
|
|
16
|
+
});
|
|
17
|
+
R.extend([{
|
|
18
|
+
name: "looseBool",
|
|
19
|
+
getter: !0,
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
}, {
|
|
23
|
+
name: "style",
|
|
24
|
+
getter: !0,
|
|
25
|
+
type: [String, Object],
|
|
26
|
+
default: void 0
|
|
27
|
+
}, {
|
|
28
|
+
name: "VueNode",
|
|
29
|
+
getter: !0,
|
|
30
|
+
type: null
|
|
31
|
+
}]);
|
|
32
|
+
const D = {
|
|
33
|
+
infinite: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
zIndex: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 2e3
|
|
40
|
+
},
|
|
41
|
+
initialIndex: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
44
|
+
},
|
|
45
|
+
getContainer: {
|
|
46
|
+
type: String
|
|
47
|
+
}
|
|
48
|
+
}, ue = {
|
|
49
|
+
previewTeleported: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !0
|
|
52
|
+
},
|
|
53
|
+
hideOnClickModal: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
src: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: ""
|
|
60
|
+
},
|
|
61
|
+
alt: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: ""
|
|
64
|
+
},
|
|
65
|
+
fit: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: "contain"
|
|
68
|
+
},
|
|
69
|
+
lazy: R.bool,
|
|
70
|
+
scrollContainer: {
|
|
71
|
+
type: [String, Object]
|
|
72
|
+
},
|
|
73
|
+
placeholder: {
|
|
74
|
+
type: [Function, Object],
|
|
75
|
+
default: () => {
|
|
24
76
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
textDecoration: e.linkDecoration,
|
|
30
|
-
backgroundColor: "transparent",
|
|
31
|
-
outline: "none",
|
|
32
|
-
cursor: "pointer",
|
|
33
|
-
transition: `color ${e.motionDurationSlow}`,
|
|
34
|
-
"-webkit-text-decoration-skip": "objects",
|
|
35
|
-
"&:hover": {
|
|
36
|
-
color: e.colorLinkHover
|
|
37
|
-
},
|
|
38
|
-
"&:active": {
|
|
39
|
-
color: e.colorLinkActive
|
|
40
|
-
},
|
|
41
|
-
[`&:active,
|
|
42
|
-
&:hover`]: {
|
|
43
|
-
textDecoration: e.linkHoverDecoration,
|
|
44
|
-
outline: 0
|
|
45
|
-
},
|
|
46
|
-
// https://github.com/ant-design/ant-design/issues/22503
|
|
47
|
-
"&:focus": {
|
|
48
|
-
textDecoration: e.linkFocusDecoration,
|
|
49
|
-
outline: 0
|
|
50
|
-
},
|
|
51
|
-
"&[disabled]": {
|
|
52
|
-
color: e.colorTextDisabled,
|
|
53
|
-
cursor: "not-allowed"
|
|
77
|
+
},
|
|
78
|
+
fallback: {
|
|
79
|
+
type: [Function, Object],
|
|
80
|
+
default: () => {
|
|
54
81
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return qe && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
|
|
81
|
-
get(r, i) {
|
|
82
|
-
return Ae && t.add(i), r[i];
|
|
82
|
+
},
|
|
83
|
+
onLoad: {
|
|
84
|
+
type: Function
|
|
85
|
+
},
|
|
86
|
+
onError: {
|
|
87
|
+
type: Function
|
|
88
|
+
},
|
|
89
|
+
onClick: {
|
|
90
|
+
type: Function
|
|
91
|
+
},
|
|
92
|
+
disablePreview: R.bool,
|
|
93
|
+
previewSrcList: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: () => []
|
|
96
|
+
},
|
|
97
|
+
imageClassName: R.string,
|
|
98
|
+
imageStyle: R.style,
|
|
99
|
+
width: R.number,
|
|
100
|
+
height: R.number,
|
|
101
|
+
zIndex: D.zIndex,
|
|
102
|
+
infinite: D.infinite,
|
|
103
|
+
getContainer: D.getContainer,
|
|
104
|
+
initialIndex: {
|
|
105
|
+
...D.initialIndex,
|
|
106
|
+
default: () => {
|
|
83
107
|
}
|
|
84
|
-
}), a = (r, i) => {
|
|
85
|
-
Array.from(t);
|
|
86
|
-
}), { token: n, keys: t, flush: a };
|
|
87
|
-
}
|
|
88
|
-
class de {
|
|
89
|
-
constructor(t, n) {
|
|
90
|
-
this._keyframe = !0, this.name = t, this.style = n;
|
|
91
108
|
}
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
}, pt = {
|
|
110
|
+
urlList: {
|
|
111
|
+
type: Array,
|
|
112
|
+
default: () => []
|
|
113
|
+
},
|
|
114
|
+
teleported: ue.previewTeleported,
|
|
115
|
+
zIndex: D.zIndex,
|
|
116
|
+
initialIndex: D.initialIndex,
|
|
117
|
+
infinite: D.infinite,
|
|
118
|
+
getContainer: ue.getContainer,
|
|
119
|
+
onHideOnClickModal: ue.hideOnClickModal,
|
|
120
|
+
icons: {
|
|
121
|
+
type: Object,
|
|
122
|
+
default: () => ({})
|
|
94
123
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// type: 'animation',
|
|
100
|
-
// appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
|
|
101
|
-
// appearActiveClass: `antdv-base-transtion`,
|
|
102
|
-
// appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
|
|
103
|
-
enterFromClass: `${e}-enter ${e}-enter-prepare ${e}-enter-start`,
|
|
104
|
-
enterActiveClass: `${e}-enter ${e}-enter-prepare`,
|
|
105
|
-
enterToClass: `${e}-enter ${e}-enter-active`,
|
|
106
|
-
leaveFromClass: ` ${e}-leave`,
|
|
107
|
-
leaveActiveClass: `${e}-leave ${e}-leave-active`,
|
|
108
|
-
leaveToClass: `${e}-leave ${e}-leave-active`,
|
|
109
|
-
...t
|
|
110
|
-
} : { css: !1, ...t }, { useToken: At } = yt;
|
|
111
|
-
function Je(e, t) {
|
|
112
|
-
return (n) => {
|
|
113
|
-
const a = J({}), r = M(() => et(n) ? n == null ? void 0 : n.value : n || a), { token: i, hashId: o, theme: l } = At(), u = M(() => J({})), p = M(() => ({
|
|
114
|
-
theme: l.value,
|
|
115
|
-
token: i.value,
|
|
116
|
-
hashId: o.value,
|
|
117
|
-
path: ["Shared", u.value]
|
|
118
|
-
}));
|
|
119
|
-
Re(p, () => [
|
|
120
|
-
{
|
|
121
|
-
"&": It(i.value)
|
|
122
|
-
}
|
|
123
|
-
]);
|
|
124
|
-
const v = M(() => ({
|
|
125
|
-
theme: l.value,
|
|
126
|
-
token: i.value,
|
|
127
|
-
hashId: o.value,
|
|
128
|
-
path: [e, r.value]
|
|
129
|
-
}));
|
|
130
|
-
return [
|
|
131
|
-
Re(v, () => {
|
|
132
|
-
const { token: z, flush: C } = Ct(i.value), m = `.${r.value}`, A = Te(z, {
|
|
133
|
-
antCls: ".ant",
|
|
134
|
-
componentCls: m,
|
|
135
|
-
proComponentsCls: J({
|
|
136
|
-
isPor: !0
|
|
137
|
-
})
|
|
138
|
-
}), d = t(A, {
|
|
139
|
-
hashId: o.value,
|
|
140
|
-
prefixCls: r.value
|
|
141
|
-
});
|
|
142
|
-
return C(e, {}), [xt(i.value, r.value), d];
|
|
143
|
-
}),
|
|
144
|
-
o
|
|
145
|
-
];
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function g(e, t) {
|
|
149
|
-
kt(e) && (e = "100%");
|
|
150
|
-
var n = Tt(e);
|
|
124
|
+
};
|
|
125
|
+
function v(e, t) {
|
|
126
|
+
bt(e) && (e = "100%");
|
|
127
|
+
var n = yt(e);
|
|
151
128
|
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
152
129
|
}
|
|
153
130
|
function oe(e) {
|
|
154
131
|
return Math.min(1, Math.max(0, e));
|
|
155
132
|
}
|
|
156
|
-
function
|
|
133
|
+
function bt(e) {
|
|
157
134
|
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
158
135
|
}
|
|
159
|
-
function
|
|
136
|
+
function yt(e) {
|
|
160
137
|
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
161
138
|
}
|
|
162
|
-
function
|
|
139
|
+
function Ue(e) {
|
|
163
140
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
164
141
|
}
|
|
165
142
|
function se(e) {
|
|
@@ -168,108 +145,108 @@ function se(e) {
|
|
|
168
145
|
function H(e) {
|
|
169
146
|
return e.length === 1 ? "0" + e : String(e);
|
|
170
147
|
}
|
|
171
|
-
function
|
|
148
|
+
function wt(e, t, n) {
|
|
172
149
|
return {
|
|
173
|
-
r:
|
|
174
|
-
g:
|
|
175
|
-
b:
|
|
150
|
+
r: v(e, 255) * 255,
|
|
151
|
+
g: v(t, 255) * 255,
|
|
152
|
+
b: v(n, 255) * 255
|
|
176
153
|
};
|
|
177
154
|
}
|
|
178
|
-
function
|
|
179
|
-
e =
|
|
180
|
-
var a = Math.max(e, t, n),
|
|
181
|
-
if (a ===
|
|
182
|
-
o = 0,
|
|
155
|
+
function Re(e, t, n) {
|
|
156
|
+
e = v(e, 255), t = v(t, 255), n = v(n, 255);
|
|
157
|
+
var a = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, o = 0, l = (a + i) / 2;
|
|
158
|
+
if (a === i)
|
|
159
|
+
o = 0, r = 0;
|
|
183
160
|
else {
|
|
184
|
-
var
|
|
185
|
-
switch (o = l > 0.5 ?
|
|
161
|
+
var c = a - i;
|
|
162
|
+
switch (o = l > 0.5 ? c / (2 - a - i) : c / (a + i), a) {
|
|
186
163
|
case e:
|
|
187
|
-
|
|
164
|
+
r = (t - n) / c + (t < n ? 6 : 0);
|
|
188
165
|
break;
|
|
189
166
|
case t:
|
|
190
|
-
|
|
167
|
+
r = (n - e) / c + 2;
|
|
191
168
|
break;
|
|
192
169
|
case n:
|
|
193
|
-
|
|
170
|
+
r = (e - t) / c + 4;
|
|
194
171
|
break;
|
|
195
172
|
}
|
|
196
|
-
|
|
173
|
+
r /= 6;
|
|
197
174
|
}
|
|
198
|
-
return { h:
|
|
175
|
+
return { h: r, s: o, l };
|
|
199
176
|
}
|
|
200
|
-
function
|
|
177
|
+
function be(e, t, n) {
|
|
201
178
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
202
179
|
}
|
|
203
|
-
function
|
|
204
|
-
var a,
|
|
205
|
-
if (e =
|
|
206
|
-
|
|
180
|
+
function St(e, t, n) {
|
|
181
|
+
var a, i, r;
|
|
182
|
+
if (e = v(e, 360), t = v(t, 100), n = v(n, 100), t === 0)
|
|
183
|
+
i = n, r = n, a = n;
|
|
207
184
|
else {
|
|
208
185
|
var o = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - o;
|
|
209
|
-
a =
|
|
186
|
+
a = be(l, o, e + 1 / 3), i = be(l, o, e), r = be(l, o, e - 1 / 3);
|
|
210
187
|
}
|
|
211
|
-
return { r: a * 255, g:
|
|
188
|
+
return { r: a * 255, g: i * 255, b: r * 255 };
|
|
212
189
|
}
|
|
213
|
-
function
|
|
214
|
-
e =
|
|
215
|
-
var a = Math.max(e, t, n),
|
|
216
|
-
if (a ===
|
|
217
|
-
|
|
190
|
+
function De(e, t, n) {
|
|
191
|
+
e = v(e, 255), t = v(t, 255), n = v(n, 255);
|
|
192
|
+
var a = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, o = a, l = a - i, c = a === 0 ? 0 : l / a;
|
|
193
|
+
if (a === i)
|
|
194
|
+
r = 0;
|
|
218
195
|
else {
|
|
219
196
|
switch (a) {
|
|
220
197
|
case e:
|
|
221
|
-
|
|
198
|
+
r = (t - n) / l + (t < n ? 6 : 0);
|
|
222
199
|
break;
|
|
223
200
|
case t:
|
|
224
|
-
|
|
201
|
+
r = (n - e) / l + 2;
|
|
225
202
|
break;
|
|
226
203
|
case n:
|
|
227
|
-
|
|
204
|
+
r = (e - t) / l + 4;
|
|
228
205
|
break;
|
|
229
206
|
}
|
|
230
|
-
|
|
207
|
+
r /= 6;
|
|
231
208
|
}
|
|
232
|
-
return { h:
|
|
209
|
+
return { h: r, s: c, v: o };
|
|
233
210
|
}
|
|
234
|
-
function
|
|
235
|
-
e =
|
|
236
|
-
var a = Math.floor(e),
|
|
237
|
-
return { r:
|
|
211
|
+
function xt(e, t, n) {
|
|
212
|
+
e = v(e, 360) * 6, t = v(t, 100), n = v(n, 100);
|
|
213
|
+
var a = Math.floor(e), i = e - a, r = n * (1 - t), o = n * (1 - i * t), l = n * (1 - (1 - i) * t), c = a % 6, S = [n, o, r, r, l, n][c], p = [l, n, n, o, r, r][c], $ = [r, r, l, n, n, o][c];
|
|
214
|
+
return { r: S * 255, g: p * 255, b: $ * 255 };
|
|
238
215
|
}
|
|
239
|
-
function
|
|
240
|
-
var
|
|
216
|
+
function He(e, t, n, a) {
|
|
217
|
+
var i = [
|
|
241
218
|
H(Math.round(e).toString(16)),
|
|
242
219
|
H(Math.round(t).toString(16)),
|
|
243
220
|
H(Math.round(n).toString(16))
|
|
244
221
|
];
|
|
245
|
-
return a &&
|
|
222
|
+
return a && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
|
|
246
223
|
}
|
|
247
|
-
function
|
|
248
|
-
var
|
|
224
|
+
function Mt(e, t, n, a, i) {
|
|
225
|
+
var r = [
|
|
249
226
|
H(Math.round(e).toString(16)),
|
|
250
227
|
H(Math.round(t).toString(16)),
|
|
251
228
|
H(Math.round(n).toString(16)),
|
|
252
|
-
H(
|
|
229
|
+
H(It(a))
|
|
253
230
|
];
|
|
254
|
-
return
|
|
231
|
+
return i && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
|
|
255
232
|
}
|
|
256
|
-
function
|
|
233
|
+
function It(e) {
|
|
257
234
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
258
235
|
}
|
|
259
|
-
function
|
|
260
|
-
return
|
|
236
|
+
function Pe(e) {
|
|
237
|
+
return w(e) / 255;
|
|
261
238
|
}
|
|
262
|
-
function
|
|
239
|
+
function w(e) {
|
|
263
240
|
return parseInt(e, 16);
|
|
264
241
|
}
|
|
265
|
-
function
|
|
242
|
+
function At(e) {
|
|
266
243
|
return {
|
|
267
244
|
r: e >> 16,
|
|
268
245
|
g: (e & 65280) >> 8,
|
|
269
246
|
b: e & 255
|
|
270
247
|
};
|
|
271
248
|
}
|
|
272
|
-
var
|
|
249
|
+
var Ae = {
|
|
273
250
|
aliceblue: "#f0f8ff",
|
|
274
251
|
antiquewhite: "#faebd7",
|
|
275
252
|
aqua: "#00ffff",
|
|
@@ -419,9 +396,9 @@ var ke = {
|
|
|
419
396
|
yellow: "#ffff00",
|
|
420
397
|
yellowgreen: "#9acd32"
|
|
421
398
|
};
|
|
422
|
-
function
|
|
423
|
-
var t = { r: 0, g: 0, b: 0 }, n = 1, a = null,
|
|
424
|
-
return typeof e == "string" && (e =
|
|
399
|
+
function Ct(e) {
|
|
400
|
+
var t = { r: 0, g: 0, b: 0 }, n = 1, a = null, i = null, r = null, o = !1, l = !1;
|
|
401
|
+
return typeof e == "string" && (e = zt(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = wt(e.r, e.g, e.b), o = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (a = se(e.s), i = se(e.v), t = xt(e.h, a, i), o = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (a = se(e.s), r = se(e.l), t = St(e.h, a, r), o = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ue(n), {
|
|
425
402
|
ok: o,
|
|
426
403
|
format: e.format || l,
|
|
427
404
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -430,54 +407,54 @@ function Et(e) {
|
|
|
430
407
|
a: n
|
|
431
408
|
};
|
|
432
409
|
}
|
|
433
|
-
var
|
|
410
|
+
var Tt = "[-\\+]?\\d+%?", kt = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(kt, ")|(?:").concat(Tt, ")"), ye = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), we = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), T = {
|
|
434
411
|
CSS_UNIT: new RegExp(N),
|
|
435
|
-
rgb: new RegExp("rgb" +
|
|
436
|
-
rgba: new RegExp("rgba" +
|
|
437
|
-
hsl: new RegExp("hsl" +
|
|
438
|
-
hsla: new RegExp("hsla" +
|
|
439
|
-
hsv: new RegExp("hsv" +
|
|
440
|
-
hsva: new RegExp("hsva" +
|
|
412
|
+
rgb: new RegExp("rgb" + ye),
|
|
413
|
+
rgba: new RegExp("rgba" + we),
|
|
414
|
+
hsl: new RegExp("hsl" + ye),
|
|
415
|
+
hsla: new RegExp("hsla" + we),
|
|
416
|
+
hsv: new RegExp("hsv" + ye),
|
|
417
|
+
hsva: new RegExp("hsva" + we),
|
|
441
418
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
442
419
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
443
420
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
444
421
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
445
422
|
};
|
|
446
|
-
function
|
|
423
|
+
function zt(e) {
|
|
447
424
|
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
448
425
|
return !1;
|
|
449
426
|
var t = !1;
|
|
450
|
-
if (
|
|
451
|
-
e =
|
|
427
|
+
if (Ae[e])
|
|
428
|
+
e = Ae[e], t = !0;
|
|
452
429
|
else if (e === "transparent")
|
|
453
430
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
454
|
-
var n =
|
|
455
|
-
return n ? { r: n[1], g: n[2], b: n[3] } : (n =
|
|
456
|
-
r:
|
|
457
|
-
g:
|
|
458
|
-
b:
|
|
459
|
-
a:
|
|
431
|
+
var n = T.rgb.exec(e);
|
|
432
|
+
return n ? { r: n[1], g: n[2], b: n[3] } : (n = T.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = T.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = T.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = T.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = T.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = T.hex8.exec(e), n ? {
|
|
433
|
+
r: w(n[1]),
|
|
434
|
+
g: w(n[2]),
|
|
435
|
+
b: w(n[3]),
|
|
436
|
+
a: Pe(n[4]),
|
|
460
437
|
format: t ? "name" : "hex8"
|
|
461
|
-
} : (n =
|
|
462
|
-
r:
|
|
463
|
-
g:
|
|
464
|
-
b:
|
|
438
|
+
} : (n = T.hex6.exec(e), n ? {
|
|
439
|
+
r: w(n[1]),
|
|
440
|
+
g: w(n[2]),
|
|
441
|
+
b: w(n[3]),
|
|
465
442
|
format: t ? "name" : "hex"
|
|
466
|
-
} : (n =
|
|
467
|
-
r:
|
|
468
|
-
g:
|
|
469
|
-
b:
|
|
470
|
-
a:
|
|
443
|
+
} : (n = T.hex4.exec(e), n ? {
|
|
444
|
+
r: w(n[1] + n[1]),
|
|
445
|
+
g: w(n[2] + n[2]),
|
|
446
|
+
b: w(n[3] + n[3]),
|
|
447
|
+
a: Pe(n[4] + n[4]),
|
|
471
448
|
format: t ? "name" : "hex8"
|
|
472
|
-
} : (n =
|
|
473
|
-
r:
|
|
474
|
-
g:
|
|
475
|
-
b:
|
|
449
|
+
} : (n = T.hex3.exec(e), n ? {
|
|
450
|
+
r: w(n[1] + n[1]),
|
|
451
|
+
g: w(n[2] + n[2]),
|
|
452
|
+
b: w(n[3] + n[3]),
|
|
476
453
|
format: t ? "name" : "hex"
|
|
477
454
|
} : !1)))))))));
|
|
478
455
|
}
|
|
479
456
|
function O(e) {
|
|
480
|
-
return !!
|
|
457
|
+
return !!T.CSS_UNIT.exec(String(e));
|
|
481
458
|
}
|
|
482
459
|
var Q = (
|
|
483
460
|
/** @class */
|
|
@@ -487,9 +464,9 @@ var Q = (
|
|
|
487
464
|
var a;
|
|
488
465
|
if (t instanceof e)
|
|
489
466
|
return t;
|
|
490
|
-
typeof t == "number" && (t =
|
|
491
|
-
var
|
|
492
|
-
this.originalInput = t, this.r =
|
|
467
|
+
typeof t == "number" && (t = At(t)), this.originalInput = t;
|
|
468
|
+
var i = Ct(t);
|
|
469
|
+
this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (a = n.format) !== null && a !== void 0 ? a : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
|
|
493
470
|
}
|
|
494
471
|
return e.prototype.isDark = function() {
|
|
495
472
|
return this.getBrightness() < 128;
|
|
@@ -499,35 +476,37 @@ var Q = (
|
|
|
499
476
|
var t = this.toRgb();
|
|
500
477
|
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
501
478
|
}, e.prototype.getLuminance = function() {
|
|
502
|
-
var t = this.toRgb(), n, a,
|
|
503
|
-
return
|
|
479
|
+
var t = this.toRgb(), n, a, i, r = t.r / 255, o = t.g / 255, l = t.b / 255;
|
|
480
|
+
return r <= 0.03928 ? n = r / 12.92 : n = Math.pow((r + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), l <= 0.03928 ? i = l / 12.92 : i = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * a + 0.0722 * i;
|
|
504
481
|
}, e.prototype.getAlpha = function() {
|
|
505
482
|
return this.a;
|
|
506
483
|
}, e.prototype.setAlpha = function(t) {
|
|
507
|
-
return this.a =
|
|
484
|
+
return this.a = Ue(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
508
485
|
}, e.prototype.isMonochrome = function() {
|
|
509
486
|
var t = this.toHsl().s;
|
|
510
487
|
return t === 0;
|
|
511
488
|
}, e.prototype.toHsv = function() {
|
|
512
|
-
var t =
|
|
489
|
+
var t = De(this.r, this.g, this.b);
|
|
513
490
|
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
514
491
|
}, e.prototype.toHsvString = function() {
|
|
515
|
-
var t =
|
|
516
|
-
return this.a === 1 ? "hsv(".concat(n, ", ").concat(a, "%, ").concat(
|
|
492
|
+
var t = De(this.r, this.g, this.b), n = Math.round(t.h * 360), a = Math.round(t.s * 100), i = Math.round(t.v * 100);
|
|
493
|
+
return this.a === 1 ? "hsv(".concat(n, ", ").concat(a, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(a, "%, ").concat(i, "%, ").concat(this.roundA, ")");
|
|
517
494
|
}, e.prototype.toHsl = function() {
|
|
518
|
-
var t =
|
|
495
|
+
var t = Re(this.r, this.g, this.b);
|
|
519
496
|
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
520
497
|
}, e.prototype.toHslString = function() {
|
|
521
|
-
var t =
|
|
522
|
-
return this.a === 1 ? "hsl(".concat(n, ", ").concat(a, "%, ").concat(
|
|
498
|
+
var t = Re(this.r, this.g, this.b), n = Math.round(t.h * 360), a = Math.round(t.s * 100), i = Math.round(t.l * 100);
|
|
499
|
+
return this.a === 1 ? "hsl(".concat(n, ", ").concat(a, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(a, "%, ").concat(i, "%, ").concat(this.roundA, ")");
|
|
523
500
|
}, e.prototype.toHex = function(t) {
|
|
524
|
-
return t === void 0 && (t = !1),
|
|
501
|
+
return t === void 0 && (t = !1), He(this.r, this.g, this.b, t);
|
|
525
502
|
}, e.prototype.toHexString = function(t) {
|
|
526
503
|
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
527
504
|
}, e.prototype.toHex8 = function(t) {
|
|
528
|
-
return t === void 0 && (t = !1),
|
|
505
|
+
return t === void 0 && (t = !1), Mt(this.r, this.g, this.b, this.a, t);
|
|
529
506
|
}, e.prototype.toHex8String = function(t) {
|
|
530
507
|
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
508
|
+
}, e.prototype.toHexShortString = function(t) {
|
|
509
|
+
return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
|
|
531
510
|
}, e.prototype.toRgb = function() {
|
|
532
511
|
return {
|
|
533
512
|
r: Math.round(this.r),
|
|
@@ -540,7 +519,7 @@ var Q = (
|
|
|
540
519
|
return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(a, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(a, ", ").concat(this.roundA, ")");
|
|
541
520
|
}, e.prototype.toPercentageRgb = function() {
|
|
542
521
|
var t = function(n) {
|
|
543
|
-
return "".concat(Math.round(
|
|
522
|
+
return "".concat(Math.round(v(n, 255) * 100), "%");
|
|
544
523
|
};
|
|
545
524
|
return {
|
|
546
525
|
r: t(this.r),
|
|
@@ -550,7 +529,7 @@ var Q = (
|
|
|
550
529
|
};
|
|
551
530
|
}, e.prototype.toPercentageRgbString = function() {
|
|
552
531
|
var t = function(n) {
|
|
553
|
-
return Math.round(
|
|
532
|
+
return Math.round(v(n, 255) * 100);
|
|
554
533
|
};
|
|
555
534
|
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
556
535
|
}, e.prototype.toName = function() {
|
|
@@ -558,17 +537,17 @@ var Q = (
|
|
|
558
537
|
return "transparent";
|
|
559
538
|
if (this.a < 1)
|
|
560
539
|
return !1;
|
|
561
|
-
for (var t = "#" +
|
|
562
|
-
var
|
|
540
|
+
for (var t = "#" + He(this.r, this.g, this.b, !1), n = 0, a = Object.entries(Ae); n < a.length; n++) {
|
|
541
|
+
var i = a[n], r = i[0], o = i[1];
|
|
563
542
|
if (t === o)
|
|
564
|
-
return
|
|
543
|
+
return r;
|
|
565
544
|
}
|
|
566
545
|
return !1;
|
|
567
546
|
}, e.prototype.toString = function(t) {
|
|
568
547
|
var n = !!t;
|
|
569
548
|
t = t ?? this.format;
|
|
570
|
-
var a = !1,
|
|
571
|
-
return
|
|
549
|
+
var a = !1, i = this.a < 1 && this.a >= 0, r = !n && i && (t.startsWith("hex") || t === "name");
|
|
550
|
+
return r ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (a = this.toRgbString()), t === "prgb" && (a = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (a = this.toHexString()), t === "hex3" && (a = this.toHexString(!0)), t === "hex4" && (a = this.toHex8String(!0)), t === "hex8" && (a = this.toHex8String()), t === "name" && (a = this.toName()), t === "hsl" && (a = this.toHslString()), t === "hsv" && (a = this.toHsvString()), a || this.toHexString());
|
|
572
551
|
}, e.prototype.toNumber = function() {
|
|
573
552
|
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
574
553
|
}, e.prototype.clone = function() {
|
|
@@ -604,26 +583,26 @@ var Q = (
|
|
|
604
583
|
return n.h = a < 0 ? 360 + a : a, new e(n);
|
|
605
584
|
}, e.prototype.mix = function(t, n) {
|
|
606
585
|
n === void 0 && (n = 50);
|
|
607
|
-
var a = this.toRgb(),
|
|
608
|
-
r: (
|
|
609
|
-
g: (
|
|
610
|
-
b: (
|
|
611
|
-
a: (
|
|
586
|
+
var a = this.toRgb(), i = new e(t).toRgb(), r = n / 100, o = {
|
|
587
|
+
r: (i.r - a.r) * r + a.r,
|
|
588
|
+
g: (i.g - a.g) * r + a.g,
|
|
589
|
+
b: (i.b - a.b) * r + a.b,
|
|
590
|
+
a: (i.a - a.a) * r + a.a
|
|
612
591
|
};
|
|
613
592
|
return new e(o);
|
|
614
593
|
}, e.prototype.analogous = function(t, n) {
|
|
615
594
|
t === void 0 && (t = 6), n === void 0 && (n = 30);
|
|
616
|
-
var a = this.toHsl(),
|
|
617
|
-
for (a.h = (a.h - (
|
|
618
|
-
a.h = (a.h +
|
|
619
|
-
return
|
|
595
|
+
var a = this.toHsl(), i = 360 / n, r = [this];
|
|
596
|
+
for (a.h = (a.h - (i * t >> 1) + 720) % 360; --t; )
|
|
597
|
+
a.h = (a.h + i) % 360, r.push(new e(a));
|
|
598
|
+
return r;
|
|
620
599
|
}, e.prototype.complement = function() {
|
|
621
600
|
var t = this.toHsl();
|
|
622
601
|
return t.h = (t.h + 180) % 360, new e(t);
|
|
623
602
|
}, e.prototype.monochromatic = function(t) {
|
|
624
603
|
t === void 0 && (t = 6);
|
|
625
|
-
for (var n = this.toHsv(), a = n.h,
|
|
626
|
-
o.push(new e({ h: a, s:
|
|
604
|
+
for (var n = this.toHsv(), a = n.h, i = n.s, r = n.v, o = [], l = 1 / t; t--; )
|
|
605
|
+
o.push(new e({ h: a, s: i, v: r })), r = (r + l) % 1;
|
|
627
606
|
return o;
|
|
628
607
|
}, e.prototype.splitcomplement = function() {
|
|
629
608
|
var t = this.toHsl(), n = t.h;
|
|
@@ -633,40 +612,41 @@ var Q = (
|
|
|
633
612
|
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
|
|
634
613
|
];
|
|
635
614
|
}, e.prototype.onBackground = function(t) {
|
|
636
|
-
var n = this.toRgb(), a = new e(t).toRgb();
|
|
615
|
+
var n = this.toRgb(), a = new e(t).toRgb(), i = n.a + a.a * (1 - n.a);
|
|
637
616
|
return new e({
|
|
638
|
-
r:
|
|
639
|
-
g:
|
|
640
|
-
b:
|
|
617
|
+
r: (n.r * n.a + a.r * a.a * (1 - n.a)) / i,
|
|
618
|
+
g: (n.g * n.a + a.g * a.a * (1 - n.a)) / i,
|
|
619
|
+
b: (n.b * n.a + a.b * a.a * (1 - n.a)) / i,
|
|
620
|
+
a: i
|
|
641
621
|
});
|
|
642
622
|
}, e.prototype.triad = function() {
|
|
643
623
|
return this.polyad(3);
|
|
644
624
|
}, e.prototype.tetrad = function() {
|
|
645
625
|
return this.polyad(4);
|
|
646
626
|
}, e.prototype.polyad = function(t) {
|
|
647
|
-
for (var n = this.toHsl(), a = n.h,
|
|
648
|
-
|
|
649
|
-
return
|
|
627
|
+
for (var n = this.toHsl(), a = n.h, i = [this], r = 360 / t, o = 1; o < t; o++)
|
|
628
|
+
i.push(new e({ h: (a + o * r) % 360, s: n.s, l: n.l }));
|
|
629
|
+
return i;
|
|
650
630
|
}, e.prototype.equals = function(t) {
|
|
651
631
|
return this.toRgbString() === new e(t).toRgbString();
|
|
652
632
|
}, e;
|
|
653
633
|
}()
|
|
654
634
|
);
|
|
655
|
-
const
|
|
635
|
+
const Ot = new fe("viewFadeIn", {
|
|
656
636
|
"0%": {
|
|
657
637
|
opacity: 0
|
|
658
638
|
},
|
|
659
639
|
"100%": {
|
|
660
640
|
opacity: 1
|
|
661
641
|
}
|
|
662
|
-
}),
|
|
642
|
+
}), Lt = new fe("viewFadeOut", {
|
|
663
643
|
"0%": {
|
|
664
644
|
opacity: 1
|
|
665
645
|
},
|
|
666
646
|
"100%": {
|
|
667
647
|
opacity: 0
|
|
668
648
|
}
|
|
669
|
-
}),
|
|
649
|
+
}), Nt = new fe("viewZoomBadgeIn", {
|
|
670
650
|
"0%": {
|
|
671
651
|
transform: "scale(0.2)",
|
|
672
652
|
opacity: 0
|
|
@@ -675,7 +655,7 @@ const Pt = new de("viewFadeIn", {
|
|
|
675
655
|
transform: "scale(1)",
|
|
676
656
|
opacity: 1
|
|
677
657
|
}
|
|
678
|
-
}),
|
|
658
|
+
}), $t = new fe("viewZoomBadgeOut", {
|
|
679
659
|
"0%": {
|
|
680
660
|
transform: "scale(1)"
|
|
681
661
|
},
|
|
@@ -683,11 +663,11 @@ const Pt = new de("viewFadeIn", {
|
|
|
683
663
|
transform: "scale(0.2)",
|
|
684
664
|
opacity: 0
|
|
685
665
|
}
|
|
686
|
-
}),
|
|
666
|
+
}), Fe = (e) => ({
|
|
687
667
|
position: e || "absolute",
|
|
688
668
|
inset: 0
|
|
689
669
|
});
|
|
690
|
-
function
|
|
670
|
+
function Se(e) {
|
|
691
671
|
return {
|
|
692
672
|
position: e,
|
|
693
673
|
top: 0,
|
|
@@ -696,7 +676,7 @@ function xe(e) {
|
|
|
696
676
|
insetInlineStart: 0
|
|
697
677
|
};
|
|
698
678
|
}
|
|
699
|
-
const
|
|
679
|
+
const Et = (e) => ({
|
|
700
680
|
boxSizing: "border-box",
|
|
701
681
|
margin: 0,
|
|
702
682
|
padding: 0,
|
|
@@ -705,11 +685,11 @@ const Yt = (e) => ({
|
|
|
705
685
|
lineHeight: e.lineHeight,
|
|
706
686
|
listStyle: "none",
|
|
707
687
|
fontFamily: e.fontFamily
|
|
708
|
-
}),
|
|
709
|
-
const { componentCls: t, modalMaskBg: n, paddingSM: a, previewOperationColorDisabled:
|
|
688
|
+
}), Rt = (e) => {
|
|
689
|
+
const { componentCls: t, modalMaskBg: n, paddingSM: a, previewOperationColorDisabled: i, motionDurationSlow: r } = e, o = new Q(n).setAlpha(0.1), l = o.clone().setAlpha(0.2);
|
|
710
690
|
return {
|
|
711
691
|
[`${t}-operations`]: {
|
|
712
|
-
...
|
|
692
|
+
...Et(e),
|
|
713
693
|
display: "flex",
|
|
714
694
|
flexDirection: "row-reverse",
|
|
715
695
|
alignItems: "center",
|
|
@@ -721,13 +701,13 @@ const Yt = (e) => ({
|
|
|
721
701
|
marginInlineStart: a,
|
|
722
702
|
padding: a,
|
|
723
703
|
cursor: "pointer",
|
|
724
|
-
transition: `all ${
|
|
704
|
+
transition: `all ${r}`,
|
|
725
705
|
userSelect: "none",
|
|
726
706
|
"&:hover": {
|
|
727
707
|
background: l.toRgbString()
|
|
728
708
|
},
|
|
729
709
|
"&-disabled": {
|
|
730
|
-
color:
|
|
710
|
+
color: i,
|
|
731
711
|
pointerEvents: "none"
|
|
732
712
|
},
|
|
733
713
|
"&:last-of-type": {
|
|
@@ -744,8 +724,8 @@ const Yt = (e) => ({
|
|
|
744
724
|
}
|
|
745
725
|
}
|
|
746
726
|
};
|
|
747
|
-
},
|
|
748
|
-
const { modalMaskBg: t, previewOperationColorDisabled: n, zIndexPopup: a, motionDurationSlow:
|
|
727
|
+
}, Dt = (e) => {
|
|
728
|
+
const { modalMaskBg: t, previewOperationColorDisabled: n, zIndexPopup: a, motionDurationSlow: i } = e, r = new Q(t).setAlpha(0.1), o = r.clone().setAlpha(0.2);
|
|
749
729
|
return {
|
|
750
730
|
[`${e.componentCls}-switch-left, ${e.componentCls}-switch-right`]: {
|
|
751
731
|
position: "fixed",
|
|
@@ -758,17 +738,17 @@ const Yt = (e) => ({
|
|
|
758
738
|
height: e.imagePreviewSwitchSize,
|
|
759
739
|
marginTop: -e.imagePreviewSwitchSize / 2,
|
|
760
740
|
color: e.previewOperationColor,
|
|
761
|
-
background:
|
|
741
|
+
background: r.toRgbString(),
|
|
762
742
|
borderRadius: "50%",
|
|
763
743
|
transform: "translateY(-50%)",
|
|
764
744
|
cursor: "pointer",
|
|
765
|
-
transition: `all ${
|
|
745
|
+
transition: `all ${i}`,
|
|
766
746
|
pointerEvents: "auto",
|
|
767
747
|
userSelect: "none",
|
|
768
748
|
"&:hover": {
|
|
769
749
|
background: o.toRgbString()
|
|
770
750
|
},
|
|
771
|
-
|
|
751
|
+
"&-disabled": {
|
|
772
752
|
"&, &:hover": {
|
|
773
753
|
color: n,
|
|
774
754
|
background: "transparent",
|
|
@@ -789,39 +769,39 @@ const Yt = (e) => ({
|
|
|
789
769
|
insetInlineEnd: e.marginSM
|
|
790
770
|
}
|
|
791
771
|
};
|
|
792
|
-
},
|
|
772
|
+
}, Ht = (e) => ({
|
|
793
773
|
[e.componentCls]: {
|
|
794
|
-
|
|
795
|
-
...
|
|
774
|
+
"&-root": {
|
|
775
|
+
...Se("fixed"),
|
|
796
776
|
zIndex: e.zIndexPopup,
|
|
797
777
|
overflow: "auto",
|
|
798
778
|
outline: 0,
|
|
799
779
|
WebkitOverflowScrolling: "touch"
|
|
800
780
|
},
|
|
801
|
-
|
|
802
|
-
...
|
|
781
|
+
"&-wrapper": {
|
|
782
|
+
...Se("fixed"),
|
|
803
783
|
zIndex: e.zIndexPopup,
|
|
804
784
|
overflow: "auto",
|
|
805
785
|
outline: 0,
|
|
806
786
|
WebkitOverflowScrolling: "touch"
|
|
807
787
|
},
|
|
808
|
-
|
|
809
|
-
...
|
|
788
|
+
"&-mask": {
|
|
789
|
+
...Se("fixed"),
|
|
810
790
|
zIndex: e.zIndexPopupBase,
|
|
811
791
|
height: "100%",
|
|
812
792
|
backgroundColor: e.colorBgMask
|
|
813
793
|
},
|
|
814
|
-
|
|
794
|
+
"&-block": {
|
|
815
795
|
height: "100%",
|
|
816
796
|
textAlign: "center",
|
|
817
797
|
pointerEvents: "none"
|
|
818
798
|
},
|
|
819
|
-
|
|
820
|
-
...
|
|
799
|
+
"&-body": {
|
|
800
|
+
...Fe(),
|
|
821
801
|
overflow: "hidden"
|
|
822
802
|
},
|
|
823
|
-
|
|
824
|
-
...
|
|
803
|
+
"&-canvas": {
|
|
804
|
+
...Fe(),
|
|
825
805
|
display: "flex",
|
|
826
806
|
justifyContent: "center",
|
|
827
807
|
alignItems: "center",
|
|
@@ -833,7 +813,7 @@ const Yt = (e) => ({
|
|
|
833
813
|
content: '""'
|
|
834
814
|
}
|
|
835
815
|
},
|
|
836
|
-
|
|
816
|
+
"&-img": {
|
|
837
817
|
maxWidth: "100%",
|
|
838
818
|
maxHeight: "100%",
|
|
839
819
|
verticalAlign: "middle",
|
|
@@ -843,18 +823,18 @@ const Yt = (e) => ({
|
|
|
843
823
|
userSelect: "none",
|
|
844
824
|
pointerEvents: "auto"
|
|
845
825
|
},
|
|
846
|
-
|
|
847
|
-
animationName:
|
|
826
|
+
"&-fade-appear, &-fade-enter": {
|
|
827
|
+
animationName: Ot,
|
|
848
828
|
animationDuration: e.motionDurationSlow,
|
|
849
829
|
animationTimingFunction: "linear"
|
|
850
830
|
},
|
|
851
|
-
|
|
852
|
-
animationName:
|
|
831
|
+
"&-fade-leave": {
|
|
832
|
+
animationName: Lt,
|
|
853
833
|
animationDuration: e.motionDurationSlow,
|
|
854
834
|
animationTimingFunction: "linear"
|
|
855
835
|
},
|
|
856
|
-
|
|
857
|
-
animationName:
|
|
836
|
+
"&-zoom-appear, &-zoom-enter": {
|
|
837
|
+
animationName: Nt,
|
|
858
838
|
opacity: 0,
|
|
859
839
|
animationTimingFunction: e.motionEaseOutCirc,
|
|
860
840
|
animationFillMode: "both",
|
|
@@ -862,11 +842,11 @@ const Yt = (e) => ({
|
|
|
862
842
|
animationDuration: e.motionDurationSlow,
|
|
863
843
|
userSelect: "none"
|
|
864
844
|
},
|
|
865
|
-
|
|
845
|
+
"&-zoom-enter-active": {
|
|
866
846
|
animationPlayState: "running"
|
|
867
847
|
},
|
|
868
|
-
|
|
869
|
-
animationName:
|
|
848
|
+
"&-zoom-leave": {
|
|
849
|
+
animationName: $t,
|
|
870
850
|
animationDuration: e.motionDurationSlow,
|
|
871
851
|
animationTimingFunction: e.motionEaseOutBack,
|
|
872
852
|
animationFillMode: "both"
|
|
@@ -884,159 +864,55 @@ const Yt = (e) => ({
|
|
|
884
864
|
zIndex: e.zIndexPopup + 1,
|
|
885
865
|
width: "100%"
|
|
886
866
|
},
|
|
887
|
-
"&": [
|
|
888
|
-
}), Ut = Je("ImageView", (e) => {
|
|
889
|
-
const t = Te(e, {
|
|
890
|
-
zIndexPopup: e.zIndexPopupBase + 80,
|
|
891
|
-
previewOperationColorDisabled: new Q(e.colorTextLightSolid).setAlpha(0.25).toRgbString(),
|
|
892
|
-
modalMaskBg: new Q("#000").setAlpha(0.45).toRgbString(),
|
|
893
|
-
previewOperationColor: new Q(e.colorTextLightSolid).toRgbString(),
|
|
894
|
-
previewOperationSize: e.fontSizeIcon * 1.5,
|
|
895
|
-
imagePreviewSwitchSize: e.controlHeightLG,
|
|
896
|
-
iconCls: "anticon"
|
|
897
|
-
});
|
|
898
|
-
return [_t(t)];
|
|
899
|
-
}), Ke = wt({
|
|
900
|
-
func: void 0,
|
|
901
|
-
bool: void 0,
|
|
902
|
-
string: void 0,
|
|
903
|
-
number: void 0,
|
|
904
|
-
array: void 0,
|
|
905
|
-
object: void 0,
|
|
906
|
-
integer: void 0
|
|
867
|
+
"&": [Rt(e), Dt(e)]
|
|
907
868
|
});
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
type: Boolean,
|
|
926
|
-
default: !0
|
|
927
|
-
},
|
|
928
|
-
zIndex: {
|
|
929
|
-
type: Number,
|
|
930
|
-
default: 2e3
|
|
931
|
-
},
|
|
932
|
-
initialIndex: {
|
|
933
|
-
type: Number,
|
|
934
|
-
default: 0
|
|
935
|
-
},
|
|
936
|
-
getContainer: {
|
|
937
|
-
type: String
|
|
938
|
-
}
|
|
939
|
-
}, ce = {
|
|
940
|
-
previewTeleported: {
|
|
941
|
-
type: Boolean,
|
|
942
|
-
default: !0
|
|
943
|
-
},
|
|
944
|
-
hideOnClickModal: {
|
|
945
|
-
type: Boolean,
|
|
946
|
-
default: !0
|
|
947
|
-
},
|
|
948
|
-
wrapperClassName: String,
|
|
949
|
-
wrapperStyle: { type: Object, default: void 0 },
|
|
950
|
-
src: {
|
|
951
|
-
type: String,
|
|
952
|
-
default: ""
|
|
953
|
-
},
|
|
954
|
-
alt: {
|
|
955
|
-
type: String,
|
|
956
|
-
default: ""
|
|
957
|
-
},
|
|
958
|
-
fit: {
|
|
959
|
-
type: String,
|
|
960
|
-
default: "contain"
|
|
961
|
-
},
|
|
962
|
-
lazy: B.bool,
|
|
963
|
-
scrollContainer: {
|
|
964
|
-
type: [String, Object]
|
|
965
|
-
},
|
|
966
|
-
placeholder: {
|
|
967
|
-
type: [Function, Object],
|
|
968
|
-
default: () => {
|
|
969
|
-
}
|
|
970
|
-
},
|
|
971
|
-
fallback: {
|
|
972
|
-
type: [Function, Object],
|
|
973
|
-
default: () => {
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
onLoad: {
|
|
977
|
-
type: Function
|
|
978
|
-
},
|
|
979
|
-
onError: {
|
|
980
|
-
type: Function
|
|
981
|
-
},
|
|
982
|
-
onClick: {
|
|
983
|
-
type: Function
|
|
984
|
-
},
|
|
985
|
-
disablePreview: B.bool,
|
|
986
|
-
previewSrcList: {
|
|
987
|
-
type: Array,
|
|
988
|
-
default: () => []
|
|
989
|
-
},
|
|
990
|
-
imageClassName: B.string,
|
|
991
|
-
imageStyle: B.style,
|
|
992
|
-
width: B.number,
|
|
993
|
-
height: B.number,
|
|
994
|
-
zIndex: F.zIndex,
|
|
995
|
-
infinite: F.infinite,
|
|
996
|
-
getContainer: F.getContainer,
|
|
997
|
-
initialIndex: F.initialIndex
|
|
998
|
-
}, Zt = {
|
|
999
|
-
urlList: {
|
|
1000
|
-
type: Array,
|
|
1001
|
-
default: () => []
|
|
1002
|
-
},
|
|
1003
|
-
teleported: ce.previewTeleported,
|
|
1004
|
-
zIndex: F.zIndex,
|
|
1005
|
-
initialIndex: F.initialIndex,
|
|
1006
|
-
infinite: F.infinite,
|
|
1007
|
-
getContainer: ce.getContainer,
|
|
1008
|
-
onHideOnClickModal: ce.hideOnClickModal,
|
|
1009
|
-
icons: {
|
|
1010
|
-
type: Object,
|
|
1011
|
-
default: () => ({})
|
|
1012
|
-
}
|
|
1013
|
-
}, V = {
|
|
869
|
+
function Pt(e) {
|
|
870
|
+
return ht("ImageView", (t) => {
|
|
871
|
+
const n = gt(t, {
|
|
872
|
+
zIndexPopup: t.zIndexPopupBase + 80,
|
|
873
|
+
previewOperationColorDisabled: new Q(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
|
|
874
|
+
modalMaskBg: new Q("#000").setAlpha(0.45).toRgbString(),
|
|
875
|
+
// FIXME: Shared Token
|
|
876
|
+
previewOperationColor: new Q(t.colorTextLightSolid).toRgbString(),
|
|
877
|
+
previewOperationSize: t.fontSizeIcon * 1.5,
|
|
878
|
+
// FIXME: fontSizeIconLG
|
|
879
|
+
imagePreviewSwitchSize: t.controlHeightLG,
|
|
880
|
+
iconCls: "anticon"
|
|
881
|
+
});
|
|
882
|
+
return [Ht(n)];
|
|
883
|
+
}, e);
|
|
884
|
+
}
|
|
885
|
+
const Y = {
|
|
1014
886
|
tab: "Tab",
|
|
1015
887
|
enter: "Enter",
|
|
1016
888
|
space: "Space",
|
|
1017
889
|
left: "ArrowLeft",
|
|
890
|
+
// 37
|
|
1018
891
|
up: "ArrowUp",
|
|
892
|
+
// 38
|
|
1019
893
|
right: "ArrowRight",
|
|
894
|
+
// 39
|
|
1020
895
|
down: "ArrowDown",
|
|
896
|
+
// 40
|
|
1021
897
|
esc: "Escape",
|
|
1022
898
|
delete: "Delete",
|
|
1023
899
|
backspace: "Backspace"
|
|
1024
900
|
}, le = function(e, t, n, a = !1) {
|
|
1025
901
|
e && t && n && e.addEventListener(t, n, a);
|
|
1026
|
-
},
|
|
902
|
+
}, xe = function(e, t, n, a = !1) {
|
|
1027
903
|
e && t && n && e.removeEventListener(t, n, a);
|
|
1028
904
|
}, X = {
|
|
1029
905
|
CONTAIN: {
|
|
1030
906
|
name: "contain",
|
|
1031
|
-
icon:
|
|
907
|
+
icon: f(Ke, null, null)
|
|
1032
908
|
},
|
|
1033
909
|
ORIGINAL: {
|
|
1034
910
|
name: "original",
|
|
1035
|
-
icon:
|
|
911
|
+
icon: f(et, null, null)
|
|
1036
912
|
}
|
|
1037
|
-
},
|
|
913
|
+
}, Ft = function() {
|
|
1038
914
|
return !q && !!window.navigator.userAgent.match(/firefox/i);
|
|
1039
|
-
},
|
|
915
|
+
}, je = Ft() ? "DOMMouseScroll" : "mousewheel";
|
|
1040
916
|
function Me(e) {
|
|
1041
917
|
let t = !1;
|
|
1042
918
|
return function(...n) {
|
|
@@ -1045,105 +921,56 @@ function Me(e) {
|
|
|
1045
921
|
}));
|
|
1046
922
|
};
|
|
1047
923
|
}
|
|
1048
|
-
const
|
|
1049
|
-
props:
|
|
924
|
+
const jt = /* @__PURE__ */ Ve({
|
|
925
|
+
props: pt,
|
|
1050
926
|
emits: ["close", "switch"],
|
|
1051
|
-
setup:
|
|
927
|
+
setup: (e, {
|
|
1052
928
|
emit: t,
|
|
1053
929
|
expose: n
|
|
1054
|
-
}) {
|
|
1055
|
-
var
|
|
1056
|
-
let a = null,
|
|
1057
|
-
const o =
|
|
930
|
+
}) => {
|
|
931
|
+
var ie, re, E, Z, Ce;
|
|
932
|
+
let a = null, i = null, r = null;
|
|
933
|
+
const o = Ge({
|
|
1058
934
|
suffixCls: "image-viewer"
|
|
1059
|
-
}),
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
935
|
+
}), {
|
|
936
|
+
wrapSSR: l,
|
|
937
|
+
hashId: c
|
|
938
|
+
} = Pt(o), S = Te(!1), [p, $] = Ne(!1), [k, x] = Ne(!1), z = C(!0), h = C(e.initialIndex), P = C(null), F = C(null), W = C(X.CONTAIN), m = Xe({
|
|
939
|
+
transform: {
|
|
940
|
+
scale: 1,
|
|
941
|
+
deg: 0,
|
|
942
|
+
offsetX: 0,
|
|
943
|
+
offsetY: 0,
|
|
944
|
+
enableTransition: !1
|
|
945
|
+
}
|
|
946
|
+
}), J = L(() => e.urlList.length > 1), G = L(() => h.value === 0), K = L(() => h.value === e.urlList.length - 1), ee = L(() => e.urlList[h.value]), te = L(() => {
|
|
1066
947
|
const {
|
|
1067
948
|
scale: s,
|
|
1068
|
-
deg:
|
|
1069
|
-
offsetX:
|
|
1070
|
-
offsetY:
|
|
949
|
+
deg: I,
|
|
950
|
+
offsetX: d,
|
|
951
|
+
offsetY: y,
|
|
1071
952
|
enableTransition: b
|
|
1072
|
-
} =
|
|
1073
|
-
transform: `scale(${s}) rotate(${
|
|
953
|
+
} = m.transform, A = {
|
|
954
|
+
transform: `scale(${s}) rotate(${I}deg)`,
|
|
1074
955
|
transition: b ? "transform .3s" : "",
|
|
1075
|
-
marginLeft: `${
|
|
1076
|
-
marginTop: `${
|
|
956
|
+
marginLeft: `${d}px`,
|
|
957
|
+
marginTop: `${y}px`
|
|
1077
958
|
};
|
|
1078
|
-
return W.value.name === X.CONTAIN.name && (
|
|
959
|
+
return W.value.name === X.CONTAIN.name && (A.maxWidth = A.maxHeight = "100%"), A;
|
|
1079
960
|
}), ne = () => {
|
|
1080
|
-
|
|
961
|
+
xe(document, "keydown", a), xe(document, je, i), a = null, i = null;
|
|
962
|
+
}, de = () => {
|
|
963
|
+
ne(), t("close"), m.transform = {
|
|
1081
964
|
scale: 1,
|
|
1082
965
|
deg: 0,
|
|
1083
966
|
offsetX: 0,
|
|
1084
967
|
offsetY: 0,
|
|
1085
968
|
enableTransition: !1
|
|
1086
969
|
};
|
|
1087
|
-
},
|
|
1088
|
-
|
|
1089
|
-
},
|
|
1090
|
-
|
|
1091
|
-
switch (s.code) {
|
|
1092
|
-
case V.esc:
|
|
1093
|
-
m(!1);
|
|
1094
|
-
break;
|
|
1095
|
-
case V.space:
|
|
1096
|
-
j();
|
|
1097
|
-
break;
|
|
1098
|
-
case V.left:
|
|
1099
|
-
ae();
|
|
1100
|
-
break;
|
|
1101
|
-
case V.up:
|
|
1102
|
-
T("zoomIn");
|
|
1103
|
-
break;
|
|
1104
|
-
case V.right:
|
|
1105
|
-
U();
|
|
1106
|
-
break;
|
|
1107
|
-
case V.down:
|
|
1108
|
-
T("zoomOut");
|
|
1109
|
-
break;
|
|
1110
|
-
}
|
|
1111
|
-
}), r = Me((s) => {
|
|
1112
|
-
(s.wheelDelta ? s.wheelDelta : -s.detail) > 0 ? T("zoomIn", {
|
|
1113
|
-
zoomRate: 0.015,
|
|
1114
|
-
enableTransition: !1
|
|
1115
|
-
}) : T("zoomOut", {
|
|
1116
|
-
zoomRate: 0.015,
|
|
1117
|
-
enableTransition: !1
|
|
1118
|
-
});
|
|
1119
|
-
}), le(document, "keydown", a), le(document, We, r);
|
|
1120
|
-
}, pe = () => {
|
|
1121
|
-
Ie(document, "keydown", a), Ie(document, We, r), a = null, r = null;
|
|
1122
|
-
}, _ = () => {
|
|
1123
|
-
A.value = !1;
|
|
1124
|
-
}, f = (s) => {
|
|
1125
|
-
A.value = !1, s.target.alt = "加载失败";
|
|
1126
|
-
}, D = ze(), L = (s) => {
|
|
1127
|
-
if (A.value || s.button !== 0)
|
|
1128
|
-
return;
|
|
1129
|
-
s.preventDefault(), s.stopPropagation(), clearTimeout(D.value), p.value = !0;
|
|
1130
|
-
const {
|
|
1131
|
-
offsetX: y,
|
|
1132
|
-
offsetY: w
|
|
1133
|
-
} = h.value, $ = s.pageX, b = s.pageY;
|
|
1134
|
-
i = Me((I) => {
|
|
1135
|
-
h.value = {
|
|
1136
|
-
...h.value,
|
|
1137
|
-
offsetX: y + I.pageX - $,
|
|
1138
|
-
offsetY: w + I.pageY - b
|
|
1139
|
-
};
|
|
1140
|
-
}), le(document, "mousemove", i), le(document, "mouseup", () => {
|
|
1141
|
-
Ie(document, "mousemove", i), v.value && C.value && (D.value = setTimeout(() => {
|
|
1142
|
-
p.value = !1;
|
|
1143
|
-
}));
|
|
1144
|
-
});
|
|
1145
|
-
}, E = () => {
|
|
1146
|
-
h.value = {
|
|
970
|
+
}, he = (s) => {
|
|
971
|
+
S.value ? S.value = !1 : P.value === (s == null ? void 0 : s.target) && (x(!1), h.value = e.initialIndex);
|
|
972
|
+
}, ae = () => {
|
|
973
|
+
m.transform = {
|
|
1147
974
|
scale: 1,
|
|
1148
975
|
deg: 0,
|
|
1149
976
|
offsetX: 0,
|
|
@@ -1151,329 +978,381 @@ const qt = /* @__PURE__ */ _e({
|
|
|
1151
978
|
enableTransition: !1
|
|
1152
979
|
};
|
|
1153
980
|
}, j = () => {
|
|
1154
|
-
if (
|
|
1155
|
-
return;
|
|
1156
|
-
const s = Object.keys(X), y = Object.values(X), w = W.value.name, b = (y.findIndex((I) => I.name === w) + 1) % s.length;
|
|
1157
|
-
W.value = X[s[b]], E();
|
|
1158
|
-
}, ae = () => {
|
|
1159
|
-
if (K.value && !e.infinite)
|
|
1160
|
-
return;
|
|
981
|
+
if (G.value && !e.infinite) return;
|
|
1161
982
|
const s = e.urlList.length;
|
|
1162
|
-
|
|
1163
|
-
},
|
|
1164
|
-
if (
|
|
1165
|
-
return;
|
|
983
|
+
h.value = (h.value - 1 + s) % s;
|
|
984
|
+
}, u = () => {
|
|
985
|
+
if (K.value && !e.infinite) return;
|
|
1166
986
|
const s = e.urlList.length;
|
|
1167
|
-
|
|
1168
|
-
},
|
|
1169
|
-
if (
|
|
1170
|
-
|
|
987
|
+
h.value = (h.value + 1) % s;
|
|
988
|
+
}, M = () => {
|
|
989
|
+
if (z.value) return;
|
|
990
|
+
const s = Object.keys(X), I = Object.values(X), d = W.value.name, b = (I.findIndex((A) => A.name === d) + 1) % s.length;
|
|
991
|
+
W.value = X[s[b]], ae();
|
|
992
|
+
}, g = (s, I = {}) => {
|
|
993
|
+
if (z.value) return;
|
|
1171
994
|
const {
|
|
1172
|
-
zoomRate:
|
|
1173
|
-
rotateDeg:
|
|
995
|
+
zoomRate: d,
|
|
996
|
+
rotateDeg: y,
|
|
1174
997
|
enableTransition: b
|
|
1175
998
|
} = {
|
|
1176
999
|
zoomRate: 0.2,
|
|
1177
1000
|
rotateDeg: 90,
|
|
1178
1001
|
enableTransition: !0,
|
|
1179
|
-
...
|
|
1002
|
+
...I
|
|
1180
1003
|
};
|
|
1181
1004
|
switch (s) {
|
|
1182
1005
|
case "zoomOut":
|
|
1183
|
-
|
|
1006
|
+
m.transform.scale > 0.2 && (m.transform.scale = Number.parseFloat((m.transform.scale - d).toFixed(3)));
|
|
1184
1007
|
break;
|
|
1185
1008
|
case "zoomIn":
|
|
1186
|
-
|
|
1009
|
+
m.transform.scale = Number.parseFloat((m.transform.scale + d).toFixed(3));
|
|
1187
1010
|
break;
|
|
1188
1011
|
case "clocelise":
|
|
1189
|
-
|
|
1012
|
+
m.transform.deg += y;
|
|
1190
1013
|
break;
|
|
1191
1014
|
case "anticlocelise":
|
|
1192
|
-
|
|
1015
|
+
m.transform.deg -= y;
|
|
1193
1016
|
break;
|
|
1194
1017
|
}
|
|
1195
|
-
|
|
1018
|
+
m.transform.enableTransition = b;
|
|
1019
|
+
}, B = () => {
|
|
1020
|
+
a = Me((s) => {
|
|
1021
|
+
switch (s.code) {
|
|
1022
|
+
case Y.esc:
|
|
1023
|
+
x(!1);
|
|
1024
|
+
break;
|
|
1025
|
+
case Y.space:
|
|
1026
|
+
M();
|
|
1027
|
+
break;
|
|
1028
|
+
case Y.left:
|
|
1029
|
+
j();
|
|
1030
|
+
break;
|
|
1031
|
+
case Y.up:
|
|
1032
|
+
g("zoomIn");
|
|
1033
|
+
break;
|
|
1034
|
+
case Y.right:
|
|
1035
|
+
u();
|
|
1036
|
+
break;
|
|
1037
|
+
case Y.down:
|
|
1038
|
+
g("zoomOut");
|
|
1039
|
+
break;
|
|
1040
|
+
}
|
|
1041
|
+
}), i = Me((s) => {
|
|
1042
|
+
(s.wheelDelta ? s.wheelDelta : -s.detail) > 0 ? g("zoomIn", {
|
|
1043
|
+
zoomRate: 0.015,
|
|
1044
|
+
enableTransition: !1
|
|
1045
|
+
}) : g("zoomOut", {
|
|
1046
|
+
zoomRate: 0.015,
|
|
1047
|
+
enableTransition: !1
|
|
1048
|
+
});
|
|
1049
|
+
}), le(document, "keydown", a), le(document, je, i);
|
|
1050
|
+
}, V = () => {
|
|
1051
|
+
z.value = !1;
|
|
1052
|
+
}, ge = (s) => {
|
|
1053
|
+
z.value = !1, s.target.alt = "加载失败";
|
|
1054
|
+
}, U = Te(), ve = (s) => {
|
|
1055
|
+
if (z.value || s.button !== 0) return;
|
|
1056
|
+
s.preventDefault(), s.stopPropagation(), clearTimeout(U.value), S.value = !0;
|
|
1057
|
+
const {
|
|
1058
|
+
offsetX: I,
|
|
1059
|
+
offsetY: d
|
|
1060
|
+
} = m.transform, y = s.pageX, b = s.pageY;
|
|
1061
|
+
r = Me((A) => {
|
|
1062
|
+
m.transform = {
|
|
1063
|
+
...m.transform,
|
|
1064
|
+
offsetX: I + A.pageX - y,
|
|
1065
|
+
offsetY: d + A.pageY - b
|
|
1066
|
+
};
|
|
1067
|
+
}), le(document, "mousemove", r), le(document, "mouseup", () => {
|
|
1068
|
+
xe(document, "mousemove", r), p.value && k.value && (U.value = setTimeout(() => {
|
|
1069
|
+
S.value = !1;
|
|
1070
|
+
}));
|
|
1071
|
+
});
|
|
1196
1072
|
}, me = [{
|
|
1197
|
-
icon: ((
|
|
1073
|
+
icon: ((ie = e.icons) == null ? void 0 : ie.close) || f(tt, null, null),
|
|
1198
1074
|
onClick: (s) => {
|
|
1199
|
-
s.stopPropagation(),
|
|
1075
|
+
s.stopPropagation(), x(!1);
|
|
1200
1076
|
},
|
|
1201
1077
|
type: "close"
|
|
1202
1078
|
}, {
|
|
1203
|
-
icon: ((
|
|
1079
|
+
icon: ((re = e.icons) == null ? void 0 : re.zoomIn) || f(nt, null, null),
|
|
1204
1080
|
onClick: (s) => {
|
|
1205
|
-
s.stopPropagation(),
|
|
1081
|
+
s.stopPropagation(), g("zoomIn");
|
|
1206
1082
|
},
|
|
1207
1083
|
type: "zoomIn"
|
|
1208
1084
|
}, {
|
|
1209
|
-
icon: ((
|
|
1085
|
+
icon: ((E = e.icons) == null ? void 0 : E.zoomOut) || f(at, null, null),
|
|
1210
1086
|
onClick: (s) => {
|
|
1211
|
-
s.stopPropagation(),
|
|
1087
|
+
s.stopPropagation(), g("zoomOut");
|
|
1212
1088
|
},
|
|
1213
1089
|
type: "zoomOut"
|
|
1214
1090
|
}, {
|
|
1215
|
-
icon: ((Z = e.icons) == null ? void 0 : Z.rotateRight) ||
|
|
1091
|
+
icon: ((Z = e.icons) == null ? void 0 : Z.rotateRight) || f(it, null, null),
|
|
1216
1092
|
onClick: (s) => {
|
|
1217
|
-
s.stopPropagation(),
|
|
1093
|
+
s.stopPropagation(), g("anticlocelise");
|
|
1218
1094
|
},
|
|
1219
1095
|
type: "rotateRight"
|
|
1220
1096
|
}, {
|
|
1221
|
-
icon: ((
|
|
1097
|
+
icon: ((Ce = e.icons) == null ? void 0 : Ce.rotateLeft) || f(rt, null, null),
|
|
1222
1098
|
onClick: (s) => {
|
|
1223
|
-
s.stopPropagation(),
|
|
1099
|
+
s.stopPropagation(), g("clocelise");
|
|
1224
1100
|
},
|
|
1225
1101
|
type: "rotateLeft"
|
|
1226
1102
|
}];
|
|
1227
|
-
return
|
|
1228
|
-
|
|
1229
|
-
|
|
1103
|
+
return _(ee, () => {
|
|
1104
|
+
Ye(() => {
|
|
1105
|
+
F.value.complete || (z.value = !0);
|
|
1230
1106
|
});
|
|
1231
|
-
}),
|
|
1232
|
-
|
|
1233
|
-
}),
|
|
1234
|
-
s && (
|
|
1235
|
-
}),
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1107
|
+
}), _(h, (s) => {
|
|
1108
|
+
ae(), t("switch", s);
|
|
1109
|
+
}), _(p, (s) => {
|
|
1110
|
+
s && (k.value = s);
|
|
1111
|
+
}), _([() => p.value, () => P.value], ([s, I]) => {
|
|
1112
|
+
var d, y;
|
|
1113
|
+
s && I && (B(), (y = (d = P.value) == null ? void 0 : d.focus) == null || y.call(d));
|
|
1238
1114
|
}), n({
|
|
1239
|
-
setOpen:
|
|
1115
|
+
setOpen: $
|
|
1240
1116
|
}), () => {
|
|
1241
|
-
const s =
|
|
1242
|
-
return l(
|
|
1117
|
+
const s = $e(`${o}-fade`), I = $e(`${o}-zoom`);
|
|
1118
|
+
return l(f(_e, {
|
|
1243
1119
|
to: e.getContainer || "body",
|
|
1244
1120
|
disabled: !e.teleported
|
|
1245
1121
|
}, {
|
|
1246
|
-
default: () => [
|
|
1247
|
-
class: `${o}-root ${
|
|
1248
|
-
}, [
|
|
1249
|
-
default: () => [
|
|
1250
|
-
class: `${o}-mask ${
|
|
1251
|
-
}, null), [[
|
|
1252
|
-
}),
|
|
1253
|
-
ref:
|
|
1122
|
+
default: () => [p.value && f("div", {
|
|
1123
|
+
class: `${o}-root ${c.value}`
|
|
1124
|
+
}, [f(ke, s, {
|
|
1125
|
+
default: () => [ze(f("div", {
|
|
1126
|
+
class: `${o}-mask ${c.value}`
|
|
1127
|
+
}, null), [[Oe, p.value && k.value]])]
|
|
1128
|
+
}), f("div", {
|
|
1129
|
+
ref: P,
|
|
1254
1130
|
tabindex: -1,
|
|
1255
|
-
class: [`${o}-wrapper`, `${
|
|
1256
|
-
onClick: (
|
|
1257
|
-
}, [
|
|
1258
|
-
onAfterLeave: () =>
|
|
1131
|
+
class: [`${o}-wrapper`, `${c.value}`],
|
|
1132
|
+
onClick: (d) => e.onHideOnClickModal && he(d)
|
|
1133
|
+
}, [f(ke, We(I, {
|
|
1134
|
+
onAfterLeave: () => de()
|
|
1259
1135
|
}), {
|
|
1260
1136
|
default: () => {
|
|
1261
|
-
var
|
|
1262
|
-
return [
|
|
1263
|
-
class: `${o}-block ${
|
|
1264
|
-
}, [
|
|
1265
|
-
class: `${o}-content ${
|
|
1266
|
-
}, [
|
|
1267
|
-
class: `${o}-body ${
|
|
1268
|
-
}, [
|
|
1269
|
-
class: `${o}-operations-wrapper ${
|
|
1137
|
+
var d, y;
|
|
1138
|
+
return [ze(f("div", {
|
|
1139
|
+
class: `${o}-block ${c.value}`
|
|
1140
|
+
}, [f("div", {
|
|
1141
|
+
class: `${o}-content ${c.value}`
|
|
1142
|
+
}, [f("div", {
|
|
1143
|
+
class: `${o}-body ${c.value}`
|
|
1144
|
+
}, [f("div", {
|
|
1145
|
+
class: `${o}-operations-wrapper ${c.value}`,
|
|
1270
1146
|
onClick: (b) => b.stopPropagation()
|
|
1271
|
-
}, [
|
|
1272
|
-
class: `${o}-operations ${
|
|
1147
|
+
}, [f("ul", {
|
|
1148
|
+
class: `${o}-operations ${c.value}`
|
|
1273
1149
|
}, [me.map(({
|
|
1274
1150
|
icon: b,
|
|
1275
|
-
onClick:
|
|
1276
|
-
type:
|
|
1277
|
-
}) =>
|
|
1278
|
-
class: `${o}-operations-operation ${
|
|
1279
|
-
onClick:
|
|
1280
|
-
key:
|
|
1281
|
-
}, [
|
|
1282
|
-
class: `${o}-operations-icon ${
|
|
1283
|
-
})]))])]),
|
|
1284
|
-
class: `${o}-canvas ${
|
|
1285
|
-
}, [e.urlList.map((b,
|
|
1286
|
-
ref:
|
|
1287
|
-
class: `${o}-img ${
|
|
1151
|
+
onClick: A,
|
|
1152
|
+
type: pe
|
|
1153
|
+
}) => f("li", {
|
|
1154
|
+
class: `${o}-operations-operation ${c.value}`,
|
|
1155
|
+
onClick: A,
|
|
1156
|
+
key: pe
|
|
1157
|
+
}, [qe(b, {
|
|
1158
|
+
class: `${o}-operations-icon ${c.value}`
|
|
1159
|
+
})]))])]), f("div", {
|
|
1160
|
+
class: `${o}-canvas ${c.value}`
|
|
1161
|
+
}, [e.urlList.map((b, A) => f("img", {
|
|
1162
|
+
ref: F,
|
|
1163
|
+
class: `${o}-img ${c.value}`,
|
|
1288
1164
|
style: {
|
|
1289
|
-
...
|
|
1290
|
-
display:
|
|
1165
|
+
...te.value,
|
|
1166
|
+
display: A === h.value ? "block" : "none"
|
|
1291
1167
|
},
|
|
1292
1168
|
key: b,
|
|
1293
1169
|
src: b,
|
|
1294
|
-
onLoad: () =>
|
|
1295
|
-
onError: (
|
|
1296
|
-
onMousedown:
|
|
1297
|
-
}, null))]),
|
|
1298
|
-
class: [`${o}-switch-left`,
|
|
1299
|
-
onClick:
|
|
1300
|
-
}, [((
|
|
1301
|
-
class: [`${o}-switch-right`,
|
|
1302
|
-
onClick:
|
|
1303
|
-
}, [((
|
|
1170
|
+
onLoad: () => V(),
|
|
1171
|
+
onError: (pe) => ge(pe),
|
|
1172
|
+
onMousedown: ve
|
|
1173
|
+
}, null))]), J.value && f("div", {
|
|
1174
|
+
class: [`${o}-switch-left`, h.value === 0 && !e.infinite ? `${o}-switch-left-disabled` : "", `${c.value}`],
|
|
1175
|
+
onClick: () => j()
|
|
1176
|
+
}, [((d = e.icons) == null ? void 0 : d.left) || f(ot, null, null)]), J.value && f("div", {
|
|
1177
|
+
class: [`${o}-switch-right`, h.value === e.urlList.length - 1 && !e.infinite ? `${o}-switch-right-disabled` : "", `${c.value}`],
|
|
1178
|
+
onClick: () => u()
|
|
1179
|
+
}, [((y = e.icons) == null ? void 0 : y.right) || f(st, null, null)])])])]), [[Oe, p.value && k.value]])];
|
|
1304
1180
|
}
|
|
1305
1181
|
})])])]
|
|
1306
1182
|
}));
|
|
1307
1183
|
};
|
|
1308
1184
|
}
|
|
1309
|
-
}),
|
|
1185
|
+
}), Ie = {
|
|
1310
1186
|
width: "100%",
|
|
1311
1187
|
height: "100%"
|
|
1312
|
-
},
|
|
1188
|
+
}, Bt = (e) => ({
|
|
1313
1189
|
[e.componentCls]: {
|
|
1314
1190
|
display: "inline-block",
|
|
1315
1191
|
position: "relative",
|
|
1316
1192
|
overflow: "hidden",
|
|
1317
|
-
|
|
1318
|
-
...
|
|
1193
|
+
"&-inner": {
|
|
1194
|
+
...Ie,
|
|
1319
1195
|
verticalAlign: "top",
|
|
1320
1196
|
opacity: 1
|
|
1321
1197
|
},
|
|
1322
|
-
|
|
1323
|
-
...
|
|
1198
|
+
"&-placeholder": {
|
|
1199
|
+
...Ie,
|
|
1324
1200
|
backgroundColor: e.colorBgContainerDisabled,
|
|
1325
1201
|
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
|
|
1326
1202
|
backgroundRepeat: "no-repeat",
|
|
1327
1203
|
backgroundPosition: "center center",
|
|
1328
1204
|
backgroundSize: "30%"
|
|
1329
1205
|
},
|
|
1330
|
-
|
|
1331
|
-
...
|
|
1206
|
+
"&-error": {
|
|
1207
|
+
...Ie,
|
|
1332
1208
|
display: "flex",
|
|
1333
1209
|
alignItems: "center",
|
|
1334
1210
|
justifyContent: "center",
|
|
1335
1211
|
color: e.colorText,
|
|
1336
1212
|
backgroundColor: e.colorBgContainerDisabled
|
|
1337
1213
|
},
|
|
1338
|
-
|
|
1214
|
+
"&-preview": {
|
|
1339
1215
|
cursor: "pointer"
|
|
1340
1216
|
}
|
|
1341
1217
|
}
|
|
1342
|
-
}),
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
let Ge = "";
|
|
1347
|
-
const fe = /* @__PURE__ */ _e({
|
|
1348
|
-
props: ce,
|
|
1218
|
+
}), Vt = (e) => e && e.nodeType === Node.ELEMENT_NODE;
|
|
1219
|
+
let Be = "";
|
|
1220
|
+
const ce = /* @__PURE__ */ Ve({
|
|
1221
|
+
props: ue,
|
|
1349
1222
|
name: "GImage",
|
|
1350
1223
|
emits: ["error", "click", "load"],
|
|
1224
|
+
slots: Object,
|
|
1351
1225
|
setup(e, {
|
|
1352
1226
|
slots: t,
|
|
1353
1227
|
emit: n,
|
|
1354
1228
|
attrs: a
|
|
1355
1229
|
}) {
|
|
1356
|
-
const
|
|
1230
|
+
const i = Ge({
|
|
1357
1231
|
suffixCls: "image"
|
|
1358
|
-
}),
|
|
1359
|
-
|
|
1360
|
-
|
|
1232
|
+
}), {
|
|
1233
|
+
wrapSSR: r,
|
|
1234
|
+
hashId: o
|
|
1235
|
+
} = vt("Image", [Bt], i), l = C(), c = C(""), S = C(!1), p = C(!0), $ = C(!1), k = C(null), x = C();
|
|
1236
|
+
let z, h;
|
|
1237
|
+
const P = L(() => !q && e.fit ? {
|
|
1361
1238
|
"object-fit": e.fit
|
|
1362
|
-
} : {}),
|
|
1239
|
+
} : {}), F = L(() => {
|
|
1363
1240
|
const {
|
|
1364
|
-
previewSrcList:
|
|
1241
|
+
previewSrcList: u
|
|
1365
1242
|
} = e;
|
|
1366
|
-
return Array.isArray(
|
|
1367
|
-
}), W =
|
|
1243
|
+
return Array.isArray(u) && u.length > 0;
|
|
1244
|
+
}), W = L(() => {
|
|
1368
1245
|
const {
|
|
1369
|
-
src:
|
|
1370
|
-
previewSrcList:
|
|
1371
|
-
initialIndex:
|
|
1246
|
+
src: u,
|
|
1247
|
+
previewSrcList: M,
|
|
1248
|
+
initialIndex: g
|
|
1372
1249
|
} = e;
|
|
1373
|
-
if (
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1250
|
+
if (g || g === 0) return M.length >= g ? g : 0;
|
|
1251
|
+
let B = 0;
|
|
1252
|
+
const V = M.indexOf(u);
|
|
1253
|
+
return V >= 0 && (B = V), B;
|
|
1254
|
+
}), m = (u) => {
|
|
1255
|
+
c.value = e.src, p.value = !1, S.value = !1, n("load", u);
|
|
1256
|
+
}, J = (u) => {
|
|
1257
|
+
p.value = !1, S.value = !0, n("error", u);
|
|
1258
|
+
}, G = () => {
|
|
1259
|
+
if (q) return;
|
|
1260
|
+
p.value = !0, S.value = !1;
|
|
1261
|
+
const u = new Image();
|
|
1262
|
+
u.onload = (M) => m(M), u.onerror = J, Object.keys(a || {}).forEach((M) => {
|
|
1263
|
+
if (M.toLowerCase() === "onload") return;
|
|
1264
|
+
const g = (a || {})[M];
|
|
1265
|
+
u.setAttribute(M, g);
|
|
1266
|
+
}), u.src = e.src;
|
|
1267
|
+
}, K = mt(te, 200), ee = () => {
|
|
1268
|
+
q || !x.value || !K || (z(), x.value = void 0);
|
|
1380
1269
|
};
|
|
1381
|
-
function
|
|
1382
|
-
|
|
1270
|
+
function te() {
|
|
1271
|
+
lt(k.value, x.value) && (G(), ee());
|
|
1383
1272
|
}
|
|
1384
|
-
const
|
|
1385
|
-
if (q)
|
|
1386
|
-
|
|
1387
|
-
await Ue();
|
|
1273
|
+
const ne = async () => {
|
|
1274
|
+
if (q) return;
|
|
1275
|
+
await Ye();
|
|
1388
1276
|
const {
|
|
1389
|
-
scrollContainer:
|
|
1277
|
+
scrollContainer: u
|
|
1390
1278
|
} = e;
|
|
1391
|
-
|
|
1392
|
-
},
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
}, ge = (f) => {
|
|
1399
|
-
if (f.ctrlKey) {
|
|
1400
|
-
if (f.deltaY < 0)
|
|
1401
|
-
return f.preventDefault(), !1;
|
|
1402
|
-
if (f.deltaY > 0)
|
|
1403
|
-
return f.preventDefault(), !1;
|
|
1279
|
+
Vt(u) ? x.value = u : ut(u) && u !== "" ? x.value = document.querySelector(u) ?? void 0 : k.value && (x.value = ct(k.value)), x.value && (z = Ee(x, "scroll", K), setTimeout(() => te(), 200));
|
|
1280
|
+
}, de = (u) => {
|
|
1281
|
+
if (u.ctrlKey) {
|
|
1282
|
+
if (u.deltaY < 0)
|
|
1283
|
+
return u.preventDefault(), !1;
|
|
1284
|
+
if (u.deltaY > 0)
|
|
1285
|
+
return u.preventDefault(), !1;
|
|
1404
1286
|
}
|
|
1405
|
-
},
|
|
1406
|
-
!
|
|
1287
|
+
}, he = () => {
|
|
1288
|
+
!F.value || e.disablePreview || (h = Ee("wheel", de, {
|
|
1407
1289
|
passive: !1
|
|
1408
|
-
}),
|
|
1409
|
-
},
|
|
1410
|
-
|
|
1290
|
+
}), Be = document.body.style.overflow, document.body.style.overflow = "hidden", $.value = !0);
|
|
1291
|
+
}, ae = () => {
|
|
1292
|
+
h == null || h(), document.body.style.overflow = Be, $.value = !1;
|
|
1411
1293
|
};
|
|
1412
|
-
|
|
1413
|
-
e.lazy ? (
|
|
1294
|
+
_(() => e.src, () => {
|
|
1295
|
+
e.lazy ? (p.value = !0, S.value = !1, ee(), ne()) : G();
|
|
1414
1296
|
});
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1417
|
-
e.lazy ?
|
|
1297
|
+
const j = (u) => ft(u) ? u + "px" : u;
|
|
1298
|
+
return dt(() => {
|
|
1299
|
+
e.lazy ? ne() : G();
|
|
1418
1300
|
}), () => {
|
|
1419
1301
|
const {
|
|
1420
|
-
crossorigin:
|
|
1421
|
-
decoding:
|
|
1422
|
-
alt:
|
|
1423
|
-
sizes:
|
|
1424
|
-
srcset:
|
|
1425
|
-
usemap:
|
|
1302
|
+
crossorigin: u,
|
|
1303
|
+
decoding: M,
|
|
1304
|
+
alt: g,
|
|
1305
|
+
sizes: B,
|
|
1306
|
+
srcset: V,
|
|
1307
|
+
usemap: ge,
|
|
1426
1308
|
class: U,
|
|
1427
|
-
style:
|
|
1309
|
+
style: ve = {}
|
|
1428
1310
|
} = a, me = {
|
|
1429
|
-
crossorigin:
|
|
1430
|
-
decoding:
|
|
1431
|
-
alt:
|
|
1432
|
-
sizes:
|
|
1433
|
-
srcset:
|
|
1434
|
-
usemap:
|
|
1311
|
+
crossorigin: u,
|
|
1312
|
+
decoding: M,
|
|
1313
|
+
alt: g,
|
|
1314
|
+
sizes: B,
|
|
1315
|
+
srcset: V,
|
|
1316
|
+
usemap: ge,
|
|
1435
1317
|
style: {
|
|
1436
|
-
...
|
|
1437
|
-
height: e.height ?
|
|
1438
|
-
...T
|
|
1318
|
+
...P.value,
|
|
1319
|
+
height: e.height ? j(e.height) : void 0
|
|
1439
1320
|
}
|
|
1440
|
-
},
|
|
1441
|
-
return
|
|
1442
|
-
var
|
|
1443
|
-
|
|
1444
|
-
}),
|
|
1321
|
+
}, ie = Le(t, e, "fallback"), re = Le(t, e, "placeholder");
|
|
1322
|
+
return Qe(() => {
|
|
1323
|
+
var E, Z;
|
|
1324
|
+
F.value && $.value ? (E = l.value) == null || E.setOpen(!0) : (Z = l.value) == null || Z.setOpen(!1);
|
|
1325
|
+
}), r(f("div", {
|
|
1445
1326
|
class: {
|
|
1446
1327
|
[`${o.value}`]: !0,
|
|
1447
|
-
[`${
|
|
1448
|
-
[`${
|
|
1328
|
+
[`${i}`]: !0,
|
|
1329
|
+
[`${U}`]: !!U
|
|
1449
1330
|
},
|
|
1450
|
-
ref: (
|
|
1331
|
+
ref: (E) => k.value = E,
|
|
1451
1332
|
style: {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1333
|
+
width: e.width ? j(e.width) : void 0,
|
|
1334
|
+
height: e.height ? j(e.height) : void 0,
|
|
1335
|
+
display: e.lazy ? "block" : void 0,
|
|
1336
|
+
...ve
|
|
1456
1337
|
},
|
|
1457
1338
|
onClick: () => {
|
|
1458
1339
|
n("click");
|
|
1459
1340
|
}
|
|
1460
|
-
}, [
|
|
1461
|
-
class: `${
|
|
1462
|
-
}, null)
|
|
1463
|
-
class: `${
|
|
1464
|
-
}, [
|
|
1341
|
+
}, [p.value ? re || f("div", {
|
|
1342
|
+
class: `${i}-placeholder ${o.value}`
|
|
1343
|
+
}, null) : S.value ? ie || f("div", {
|
|
1344
|
+
class: `${i}-error ${o.value}`
|
|
1345
|
+
}, [Je("加载失败")]) : c.value && f("img", We(me, {
|
|
1465
1346
|
class: {
|
|
1466
1347
|
[`${o.value}`]: !0,
|
|
1467
|
-
[`${
|
|
1468
|
-
[`${
|
|
1469
|
-
[`${
|
|
1348
|
+
[`${e.imageClassName}`]: !!e.imageClassName,
|
|
1349
|
+
[`${i}-inner`]: !0,
|
|
1350
|
+
[`${i}-preview`]: F.value
|
|
1470
1351
|
},
|
|
1471
1352
|
alt: e.alt,
|
|
1472
|
-
src:
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
onClick: () => ve()
|
|
1476
|
-
}), null), c(qt, {
|
|
1353
|
+
src: c.value,
|
|
1354
|
+
onClick: () => he()
|
|
1355
|
+
}), null), f(jt, {
|
|
1477
1356
|
ref: l,
|
|
1478
1357
|
zIndex: e.zIndex,
|
|
1479
1358
|
infinite: e.infinite,
|
|
@@ -1481,15 +1360,17 @@ const fe = /* @__PURE__ */ _e({
|
|
|
1481
1360
|
urlList: e.previewSrcList,
|
|
1482
1361
|
getContainer: e.getContainer,
|
|
1483
1362
|
onHideOnClickModal: e.hideOnClickModal,
|
|
1484
|
-
onClose: () =>
|
|
1485
|
-
}, null)])
|
|
1363
|
+
onClose: () => ae()
|
|
1364
|
+
}, null)]));
|
|
1486
1365
|
};
|
|
1487
1366
|
}
|
|
1488
1367
|
});
|
|
1489
|
-
|
|
1490
|
-
|
|
1368
|
+
ce.isGImage = !0;
|
|
1369
|
+
ce.install = (e) => (e.component(ce.name, ce), e);
|
|
1491
1370
|
export {
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1371
|
+
ce as GImage,
|
|
1372
|
+
jt as ImageViewer,
|
|
1373
|
+
ce as default,
|
|
1374
|
+
ue as gImagePorps,
|
|
1375
|
+
pt as gImageViewProps
|
|
1495
1376
|
};
|