x-next 1.6.0 → 1.8.0
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/AI_USAGE.md +182 -4
- package/CHANGELOG.md +74 -0
- package/dist/_hooks/use-chart-size.d.ts +25 -0
- package/dist/_utils/chart/index.d.ts +6 -0
- package/dist/_utils/chart/padding.d.ts +15 -0
- package/dist/_utils/chart/path.d.ts +34 -0
- package/dist/_utils/chart/scale.d.ts +55 -0
- package/dist/components/_components/chart/ChartAxis.d.ts +85 -0
- package/dist/components/_components/chart/ChartLegend.d.ts +26 -0
- package/dist/components/_components/chart/ChartTooltip.d.ts +76 -0
- package/dist/components/_components/chart/colors.d.ts +10 -0
- package/dist/components/_components/chart/interface.d.ts +38 -0
- package/dist/components/bar-chart/BarChart.d.ts +278 -0
- package/dist/components/bar-chart/helpers/layout.d.ts +55 -0
- package/dist/components/bar-chart/index.d.ts +600 -0
- package/dist/components/bar-chart/interface.d.ts +74 -0
- package/dist/components/bar-chart/props.d.ts +145 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/draggable/Draggable.d.ts +1 -1
- package/dist/components/draggable/index.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +6 -6
- package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +5 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
- package/dist/components/dropdown/index.d.ts +29 -29
- package/dist/components/form/FormItem.vue.d.ts +12 -12
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +24 -24
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/index.d.ts +6 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/grid/Row.vue.d.ts +3 -3
- package/dist/components/grid/index.d.ts +9 -9
- package/dist/components/heatmap/Heatmap.d.ts +10 -0
- package/dist/components/heatmap/index.d.ts +30 -0
- package/dist/components/image/Image.vue.d.ts +125 -17
- package/dist/components/image/ImagePreview.vue.d.ts +97 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
- package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
- package/dist/components/image/index.d.ts +712 -124
- package/dist/components/image/interface.d.ts +9 -1
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/line-chart/LineChart.d.ts +295 -0
- package/dist/components/line-chart/helpers/layout.d.ts +74 -0
- package/dist/components/line-chart/index.d.ts +614 -0
- package/dist/components/line-chart/interface.d.ts +76 -0
- package/dist/components/line-chart/props.d.ts +173 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/pie-chart/PieChart.d.ts +219 -0
- package/dist/components/pie-chart/index.d.ts +470 -0
- package/dist/components/pie-chart/interface.d.ts +58 -0
- package/dist/components/pie-chart/props.d.ts +107 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trend-chart/components/TrendChart.d.ts +19 -96
- package/dist/components/trend-chart/index.d.ts +33 -187
- package/dist/components/trend-chart/props.d.ts +9 -78
- package/dist/components/trend-chart/themes.d.ts +0 -1
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +372 -0
- package/dist/components/upload/context.d.ts +28 -0
- package/dist/components/upload/index.d.ts +656 -0
- package/dist/components/upload/interface.d.ts +110 -0
- package/dist/components/upload/props.d.ts +321 -0
- package/dist/components/upload/upload-list-item.d.ts +15 -0
- package/dist/components/upload/upload-list.d.ts +11 -0
- package/dist/components/upload/upload-picture-item.d.ts +20 -0
- package/dist/components/upload/upload-trigger.d.ts +8 -0
- package/dist/components/upload/utils.d.ts +48 -0
- package/dist/es/_hooks/use-chart-size.js +25 -0
- package/dist/es/_styles/palette-aliases.js +7 -4
- package/dist/es/_utils/chart/padding.js +22 -0
- package/dist/es/_utils/chart/path.js +69 -0
- package/dist/es/_utils/chart/scale.js +77 -0
- package/dist/es/components/_components/chart/ChartAxis.js +79 -0
- package/dist/es/components/_components/chart/ChartLegend.js +53 -0
- package/dist/es/components/_components/chart/ChartTooltip.js +64 -0
- package/dist/es/components/_components/chart/colors.js +12 -0
- package/dist/es/components/bar-chart/BarChart.js +470 -0
- package/dist/es/components/bar-chart/helpers/layout.js +53 -0
- package/dist/es/components/bar-chart/index.js +8 -0
- package/dist/es/components/bar-chart/props.js +148 -0
- package/dist/es/components/heatmap/Heatmap.js +244 -169
- package/dist/es/components/image/Image.vue.js +55 -45
- package/dist/es/components/image/Image.vue2.js +113 -92
- package/dist/es/components/image/ImagePreview.vue.js +66 -53
- package/dist/es/components/image/ImagePreview.vue2.js +219 -171
- package/dist/es/components/image/ImagePreviewAction.js +12 -15
- package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
- package/dist/es/components/image/hooks/use-image-drag.js +16 -14
- package/dist/es/components/index.js +136 -128
- package/dist/es/components/line-chart/LineChart.js +532 -0
- package/dist/es/components/line-chart/helpers/layout.js +80 -0
- package/dist/es/components/line-chart/index.js +8 -0
- package/dist/es/components/line-chart/props.js +178 -0
- package/dist/es/components/pie-chart/PieChart.js +397 -0
- package/dist/es/components/pie-chart/index.js +8 -0
- package/dist/es/components/pie-chart/props.js +104 -0
- package/dist/es/components/trend-chart/components/TrendChart.js +143 -183
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +85 -81
- package/dist/es/components/trend-chart/props.js +28 -74
- package/dist/es/components/trend-chart/themes.js +30 -31
- package/dist/es/components/upload/Upload.js +420 -0
- package/dist/es/components/upload/context.js +4 -0
- package/dist/es/components/upload/index.js +8 -0
- package/dist/es/components/upload/props.js +321 -0
- package/dist/es/components/upload/upload-list-item.js +138 -0
- package/dist/es/components/upload/upload-list.js +48 -0
- package/dist/es/components/upload/upload-picture-item.js +109 -0
- package/dist/es/components/upload/upload-trigger.js +89 -0
- package/dist/es/components/upload/utils.js +195 -0
- package/dist/es/icons/_self/upload-icons.js +103 -0
- package/dist/es/index.js +197 -189
- package/dist/es/locale/en-US.js +30 -1
- package/dist/es/locale/zh-CN.js +30 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/upload-icons.d.ts +523 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +45 -0
- package/dist/style/bar-chart.css +1 -0
- package/dist/style/bar-chart.js +2 -0
- package/dist/style/base.css +1 -1
- package/dist/style/heatmap.css +1 -1
- package/dist/style/image.css +1 -1
- package/dist/style/line-chart.css +1 -0
- package/dist/style/line-chart.js +2 -0
- package/dist/style/pie-chart.css +1 -0
- package/dist/style/pie-chart.js +2 -0
- package/dist/style/upload.css +1 -0
- package/dist/style/upload.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
- package/volar.d.ts +4 -0
- package/dist/components/trend-chart/components/trend-chart-grid.d.ts +0 -55
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +0 -26
- package/dist/components/trend-chart/helpers/genPath.d.ts +0 -8
- package/dist/components/trend-chart/helpers/getPadding.d.ts +0 -8
- package/dist/components/trend-chart/helpers/validatePadding.d.ts +0 -2
- package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
- package/dist/es/components/trend-chart/components/trend-chart-grid.js +0 -62
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +0 -75
- package/dist/es/components/trend-chart/helpers/genPath.js +0 -22
- package/dist/es/components/trend-chart/helpers/getPadding.js +0 -21
- package/dist/es/components/trend-chart/helpers/validatePadding.js +0 -7
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
let
|
|
15
|
-
const
|
|
1
|
+
import { defineComponent as q, toRefs as H, inject as J, ref as Q, computed as i, reactive as X, watch as C, nextTick as Y, onBeforeUnmount as Z } from "vue";
|
|
2
|
+
import $ from "../../icons/default/close-circle-fill.js";
|
|
3
|
+
import ee from "../../icons/animation/animation-loading.js";
|
|
4
|
+
import te from "./image-footer.vue.js";
|
|
5
|
+
import re from "./ImagePreview.vue.js";
|
|
6
|
+
import ie from "./hooks/use-image-load-status.js";
|
|
7
|
+
import { normalizeImageSizeProp as F } from "./utils/index.js";
|
|
8
|
+
import { omit as oe } from "../../_utils/omit.js";
|
|
9
|
+
import ae from "../../_hooks/use-merge-state.js";
|
|
10
|
+
import { PreviewGroupInjectionKey as le } from "./context.js";
|
|
11
|
+
import { isBoolean as ne } from "../../_utils/is.js";
|
|
12
|
+
import { getClassNameMixin as ue } from "../../_utils/config.js";
|
|
13
|
+
import { useLocale as se } from "../../locale/index.js";
|
|
14
|
+
let ve = 0;
|
|
15
|
+
const Le = q({
|
|
16
16
|
name: "Image",
|
|
17
17
|
components: {
|
|
18
|
-
IconImageClose:
|
|
19
|
-
IconLoading:
|
|
20
|
-
ImageFooter:
|
|
21
|
-
ImagePreview:
|
|
18
|
+
IconImageClose: $,
|
|
19
|
+
IconLoading: ee,
|
|
20
|
+
ImageFooter: te,
|
|
21
|
+
ImagePreview: re
|
|
22
22
|
},
|
|
23
23
|
inheritAttrs: !1,
|
|
24
24
|
props: {
|
|
@@ -140,15 +140,17 @@ const be = K({
|
|
|
140
140
|
type: [String, Array, Object]
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
emits:
|
|
143
|
+
emits: {
|
|
144
144
|
/**
|
|
145
145
|
* @zh 预览的打开和关闭事件
|
|
146
146
|
* @en Preview opening and closing events
|
|
147
147
|
* @param {boolean} visible
|
|
148
148
|
*/
|
|
149
|
-
"preview-visible-change",
|
|
150
|
-
"update:previewVisible"
|
|
151
|
-
|
|
149
|
+
"preview-visible-change": (o) => !0,
|
|
150
|
+
"update:previewVisible": (o) => !0,
|
|
151
|
+
load: (o) => !0,
|
|
152
|
+
error: (o) => !0
|
|
153
|
+
},
|
|
152
154
|
/**
|
|
153
155
|
* @zh 自定义错误状态的图标
|
|
154
156
|
* @en Customize the icon of error content.
|
|
@@ -169,92 +171,111 @@ const be = K({
|
|
|
169
171
|
* @en Extra content at the bottom
|
|
170
172
|
* @slot extra
|
|
171
173
|
*/
|
|
172
|
-
setup(
|
|
174
|
+
setup(o, { attrs: c, slots: j, emit: a }) {
|
|
173
175
|
const {
|
|
174
|
-
height:
|
|
175
|
-
width:
|
|
176
|
-
hideFooter:
|
|
177
|
-
title:
|
|
178
|
-
description:
|
|
179
|
-
src:
|
|
180
|
-
footerPosition:
|
|
181
|
-
defaultPreviewVisible:
|
|
182
|
-
previewVisible:
|
|
183
|
-
preview:
|
|
184
|
-
previewProps:
|
|
185
|
-
} =
|
|
186
|
-
width:
|
|
187
|
-
height:
|
|
188
|
-
})),
|
|
189
|
-
|
|
176
|
+
height: p,
|
|
177
|
+
width: d,
|
|
178
|
+
hideFooter: g,
|
|
179
|
+
title: w,
|
|
180
|
+
description: y,
|
|
181
|
+
src: n,
|
|
182
|
+
footerPosition: s,
|
|
183
|
+
defaultPreviewVisible: k,
|
|
184
|
+
previewVisible: N,
|
|
185
|
+
preview: h,
|
|
186
|
+
previewProps: b
|
|
187
|
+
} = H(o), t = J(le, void 0), { t: z } = se(), l = ue("image"), v = Q(), { isLoaded: S, isError: P, isLoading: L, setLoadStatus: f } = ie(), m = i(() => ({
|
|
188
|
+
width: F(d == null ? void 0 : d.value),
|
|
189
|
+
height: F(p == null ? void 0 : p.value)
|
|
190
|
+
})), A = i(() => o.fit ? { objectFit: o.fit } : {}), E = i(() => [
|
|
191
|
+
l.block,
|
|
190
192
|
{
|
|
191
|
-
[
|
|
192
|
-
[
|
|
193
|
+
[l.element("loading")]: L.value,
|
|
194
|
+
[l.element("loading-error")]: P.value,
|
|
193
195
|
// isLoaded / showFooter 是 ref,这里必须解引用;
|
|
194
196
|
// 直接写对象引用会让条件恒为真,没有 footer 的图片也带上定位类
|
|
195
|
-
[
|
|
196
|
-
[
|
|
197
|
+
[l.element("with-footer-inner")]: u.value && s.value === "inner",
|
|
198
|
+
[l.element("with-footer-outer")]: u.value && s.value === "outer"
|
|
199
|
+
},
|
|
200
|
+
c.class
|
|
201
|
+
]), O = i(() => [
|
|
202
|
+
{
|
|
203
|
+
...m.value,
|
|
204
|
+
height: u.value && s.value === "outer" ? void 0 : m.value.height
|
|
197
205
|
},
|
|
198
|
-
|
|
199
|
-
]),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
value: j
|
|
206
|
+
c.style
|
|
207
|
+
]), K = i(() => ({
|
|
208
|
+
height: u.value && s.value === "outer" ? m.value.height : void 0
|
|
209
|
+
})), u = i(() => w != null && w.value || y != null && y.value || j.extra ? ne(g.value) ? !g.value && S.value : g.value === "never" : !1), M = i(() => oe(c, ["class", "style", "src"])), [T, B] = ae(
|
|
210
|
+
k.value,
|
|
211
|
+
X({
|
|
212
|
+
value: N
|
|
206
213
|
})
|
|
207
|
-
),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
), U = i(() => !(t != null && t.preview) && h.value), I = i(() => h.value && S.value);
|
|
215
|
+
C(
|
|
216
|
+
n,
|
|
217
|
+
(e) => {
|
|
218
|
+
f(e ? "loading" : "error"), Y(() => {
|
|
219
|
+
const r = v.value;
|
|
220
|
+
r != null && r.complete && r.naturalWidth > 0 && e === o.src && f("loaded");
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
{ immediate: !0, flush: "sync" }
|
|
224
|
+
);
|
|
225
|
+
const V = ve++;
|
|
226
|
+
if (t) {
|
|
227
|
+
let e;
|
|
228
|
+
C(
|
|
215
229
|
[() => {
|
|
216
|
-
var
|
|
217
|
-
return (((
|
|
218
|
-
},
|
|
219
|
-
([
|
|
220
|
-
|
|
230
|
+
var r;
|
|
231
|
+
return (((r = b == null ? void 0 : b.value) == null ? void 0 : r.src) ?? (n == null ? void 0 : n.value)) || "";
|
|
232
|
+
}, h],
|
|
233
|
+
([r, W]) => {
|
|
234
|
+
e = t.registerImageUrl(V, r, W);
|
|
221
235
|
},
|
|
222
236
|
{ immediate: !0 }
|
|
223
|
-
),
|
|
237
|
+
), Z(() => e == null ? void 0 : e());
|
|
224
238
|
}
|
|
225
|
-
function
|
|
226
|
-
|
|
239
|
+
function x(e) {
|
|
240
|
+
e.target !== v.value || !n.value || (f("loaded"), a("load", e));
|
|
227
241
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
242
|
+
function D(e) {
|
|
243
|
+
e.target === v.value && (f("error"), a("error", e));
|
|
230
244
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
245
|
+
function _() {
|
|
246
|
+
I.value && (t != null && t.preview ? t.preview(V) : (a("preview-visible-change", !0), a("update:previewVisible", !0), B(!0)));
|
|
247
|
+
}
|
|
248
|
+
function G(e) {
|
|
249
|
+
!I.value || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), _());
|
|
233
250
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
251
|
+
function R() {
|
|
252
|
+
a("preview-visible-change", !1), a("update:previewVisible", !1), B(!1);
|
|
236
253
|
}
|
|
237
254
|
return {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
+
t: z,
|
|
256
|
+
refImg: v,
|
|
257
|
+
className: l,
|
|
258
|
+
wrapperClassNames: E,
|
|
259
|
+
wrapperStyles: O,
|
|
260
|
+
overlayStyles: K,
|
|
261
|
+
showFooter: u,
|
|
262
|
+
imgProps: M,
|
|
263
|
+
imgStyle: m,
|
|
264
|
+
isLoaded: S,
|
|
265
|
+
isError: P,
|
|
266
|
+
isLoading: L,
|
|
267
|
+
mergedPreviewVisible: T,
|
|
268
|
+
mergePreview: U,
|
|
269
|
+
canOpenPreview: I,
|
|
270
|
+
onImgLoaded: x,
|
|
271
|
+
onImgLoadError: D,
|
|
272
|
+
onImgClick: _,
|
|
273
|
+
onImgKeydown: G,
|
|
274
|
+
onPreviewClose: R,
|
|
275
|
+
fitStyle: A
|
|
255
276
|
};
|
|
256
277
|
}
|
|
257
278
|
});
|
|
258
279
|
export {
|
|
259
|
-
|
|
280
|
+
Le as default
|
|
260
281
|
};
|
|
@@ -1,105 +1,118 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as i, openBlock as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function B(e, a, T, W, z,
|
|
6
|
-
const
|
|
7
|
-
return e.mounted ? (
|
|
1
|
+
import L from "./ImagePreview.vue2.js";
|
|
2
|
+
import { resolveComponent as i, openBlock as s, createBlock as d, Teleport as I, createElementVNode as m, mergeProps as g, createVNode as t, Transition as u, withCtx as p, withDirectives as $, normalizeClass as l, vShow as N, createElementBlock as n, withModifiers as E, normalizeStyle as y, createCommentVNode as r, toDisplayString as v, renderSlot as P, normalizeProps as V } from "vue";
|
|
3
|
+
import A from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const D = ["aria-label", "aria-busy"], M = ["src", "alt", "aria-hidden"], S = ["aria-label"];
|
|
5
|
+
function B(e, a, T, W, z, K) {
|
|
6
|
+
const b = i("IconLoading"), k = i("IconImageClose"), f = i("PreviewToolbar"), w = i("IconClose"), C = i("PreviewArrow");
|
|
7
|
+
return e.mounted ? (s(), d(I, {
|
|
8
8
|
key: 0,
|
|
9
9
|
to: e.container || "body",
|
|
10
10
|
disabled: e.teleportDisabled
|
|
11
11
|
}, [
|
|
12
|
-
|
|
13
|
-
class:
|
|
14
|
-
style:
|
|
15
|
-
}, [
|
|
16
|
-
t(
|
|
12
|
+
m("div", g(e.rootAttrs, {
|
|
13
|
+
class: [e.classNames, e.$attrs.class],
|
|
14
|
+
style: [e.wrapperStyles, e.$attrs.style]
|
|
15
|
+
}), [
|
|
16
|
+
t(u, {
|
|
17
17
|
name: "image-fade",
|
|
18
18
|
onBeforeEnter: a[0] || (a[0] = (o) => o.parentElement && (o.parentElement.style.display = "block")),
|
|
19
19
|
onAfterLeave: a[1] || (a[1] = (o) => o.parentElement && (o.parentElement.style.display = ""))
|
|
20
20
|
}, {
|
|
21
|
-
default:
|
|
22
|
-
|
|
23
|
-
class:
|
|
21
|
+
default: p(() => [
|
|
22
|
+
$(m("div", {
|
|
23
|
+
class: l(e.className.element("mask"))
|
|
24
24
|
}, null, 2), [
|
|
25
|
-
[
|
|
25
|
+
[N, e.mergedVisible]
|
|
26
26
|
])
|
|
27
27
|
]),
|
|
28
28
|
_: 1
|
|
29
29
|
}),
|
|
30
|
-
e.mergedVisible ? (
|
|
30
|
+
e.mergedVisible ? (s(), n("div", {
|
|
31
31
|
key: 0,
|
|
32
32
|
ref: "refWrapper",
|
|
33
33
|
tabindex: "0",
|
|
34
34
|
role: "dialog",
|
|
35
35
|
"aria-modal": "true",
|
|
36
|
-
"aria-label": e.t("imagePreview.previewLabel", { index: 1, total: 1 }),
|
|
37
|
-
|
|
36
|
+
"aria-label": e.$attrs["aria-label"] || e.t("imagePreview.previewLabel", { index: 1, total: 1 }),
|
|
37
|
+
"aria-busy": e.isLoading || void 0,
|
|
38
|
+
class: l(e.className.element("wrapper")),
|
|
38
39
|
onClick: a[6] || (a[6] = (...o) => e.onMaskClick && e.onMaskClick(...o)),
|
|
39
|
-
onWheel: a[7] || (a[7] =
|
|
40
|
+
onWheel: a[7] || (a[7] = E((...o) => e.onWheel && e.onWheel(...o), ["prevent", "stop"])),
|
|
41
|
+
onKeydown: a[8] || (a[8] = (...o) => e.onDialogKeydown && e.onDialogKeydown(...o))
|
|
40
42
|
}, [
|
|
41
|
-
|
|
42
|
-
class:
|
|
43
|
-
style:
|
|
43
|
+
m("div", {
|
|
44
|
+
class: l(e.className.element("img-container")),
|
|
45
|
+
style: y({ transform: `scale(${e.scale}, ${e.scale})` }),
|
|
44
46
|
onClick: a[4] || (a[4] = (...o) => e.onMaskClick && e.onMaskClick(...o))
|
|
45
47
|
}, [
|
|
46
|
-
(
|
|
48
|
+
(s(), n("img", {
|
|
47
49
|
ref: "refImage",
|
|
48
50
|
key: e.src,
|
|
49
51
|
src: e.src,
|
|
50
|
-
|
|
52
|
+
alt: e.t("imagePreview.openLabel"),
|
|
53
|
+
"aria-hidden": !e.isLoaded || void 0,
|
|
54
|
+
class: l([
|
|
51
55
|
e.className.element("img"),
|
|
52
56
|
{
|
|
53
57
|
[e.className.modifier("img-moving")]: e.moving
|
|
54
58
|
}
|
|
55
59
|
]),
|
|
56
|
-
style:
|
|
57
|
-
transform: `translate(${e.translate[0]}px, ${e.translate[1]}px) rotate(${e.rotate}deg)
|
|
60
|
+
style: y({
|
|
61
|
+
transform: `translate(${e.translate[0]}px, ${e.translate[1]}px) rotate(${e.rotate}deg)`,
|
|
62
|
+
visibility: e.isLoaded ? "visible" : "hidden"
|
|
58
63
|
}),
|
|
59
64
|
onLoad: a[2] || (a[2] = (...o) => e.onImgLoad && e.onImgLoad(...o)),
|
|
60
65
|
onError: a[3] || (a[3] = (...o) => e.onImgError && e.onImgError(...o))
|
|
61
|
-
}, null, 46,
|
|
66
|
+
}, null, 46, M))
|
|
62
67
|
], 6),
|
|
63
|
-
e.isLoading ? (
|
|
68
|
+
e.isLoading ? (s(), n("div", {
|
|
64
69
|
key: 0,
|
|
65
|
-
class:
|
|
70
|
+
class: l(e.className.element("loading"))
|
|
66
71
|
}, [
|
|
67
|
-
t(
|
|
68
|
-
], 2)) :
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
t(b)
|
|
73
|
+
], 2)) : r("", !0),
|
|
74
|
+
e.isError ? (s(), n("div", {
|
|
75
|
+
key: 1,
|
|
76
|
+
class: l(e.className.element("error")),
|
|
77
|
+
role: "status"
|
|
78
|
+
}, [
|
|
79
|
+
t(k),
|
|
80
|
+
m("span", null, v(e.t("imagePreview.loadError")), 1)
|
|
81
|
+
], 2)) : r("", !0),
|
|
82
|
+
t(u, { name: "image-fade" }, {
|
|
83
|
+
default: p(() => [
|
|
84
|
+
e.scaleValueVisible ? (s(), n("div", {
|
|
72
85
|
key: 0,
|
|
73
|
-
class:
|
|
74
|
-
},
|
|
86
|
+
class: l(e.className.element("scale-value"))
|
|
87
|
+
}, v((e.scale * 100).toFixed(0)) + "% ", 3)) : r("", !0)
|
|
75
88
|
]),
|
|
76
89
|
_: 1
|
|
77
90
|
}),
|
|
78
|
-
e.isLoaded && e.actionsLayout.length ? (
|
|
79
|
-
key:
|
|
91
|
+
e.isLoaded && (e.actionsLayout.length || e.$slots.actions) ? (s(), d(f, {
|
|
92
|
+
key: 2,
|
|
80
93
|
actions: e.actions,
|
|
81
94
|
"actions-layout": e.actionsLayout
|
|
82
95
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
96
|
+
default: p(() => [
|
|
97
|
+
P(e.$slots, "actions")
|
|
85
98
|
]),
|
|
86
99
|
_: 3
|
|
87
|
-
}, 8, ["actions", "actions-layout"])) :
|
|
88
|
-
e.closable ? (
|
|
89
|
-
key:
|
|
100
|
+
}, 8, ["actions", "actions-layout"])) : r("", !0),
|
|
101
|
+
e.closable ? (s(), n("button", {
|
|
102
|
+
key: 3,
|
|
90
103
|
type: "button",
|
|
91
|
-
class:
|
|
104
|
+
class: l(e.className.element("close-btn")),
|
|
92
105
|
"aria-label": e.t("imagePreview.closeLabel"),
|
|
93
106
|
onClick: a[5] || (a[5] = (...o) => e.onCloseClick && e.onCloseClick(...o))
|
|
94
107
|
}, [
|
|
95
|
-
t(
|
|
96
|
-
], 10,
|
|
97
|
-
e.inGroup ? (
|
|
98
|
-
], 42,
|
|
99
|
-
],
|
|
100
|
-
], 8, ["to", "disabled"])) :
|
|
108
|
+
t(w)
|
|
109
|
+
], 10, S)) : r("", !0),
|
|
110
|
+
e.inGroup ? (s(), d(C, V(g({ key: 4 }, e.groupArrowProps)), null, 16)) : r("", !0)
|
|
111
|
+
], 42, D)) : r("", !0)
|
|
112
|
+
], 16)
|
|
113
|
+
], 8, ["to", "disabled"])) : r("", !0);
|
|
101
114
|
}
|
|
102
|
-
const
|
|
115
|
+
const q = /* @__PURE__ */ A(L, [["render", B]]);
|
|
103
116
|
export {
|
|
104
|
-
|
|
117
|
+
q as default
|
|
105
118
|
};
|