@opentinyvue/vue-image-viewer 2.22.0 → 3.22.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/lib/index.js +1 -1
- package/lib/mobile-first.js +650 -507
- package/lib/pc.js +211 -151
- package/package.json +8 -8
- package/src/index.d.ts +227 -1
- package/src/mobile-first.vue.d.ts +64 -1
- package/src/pc.vue.d.ts +58 -1
package/lib/mobile-first.js
CHANGED
|
@@ -6,36 +6,40 @@ import DropdownMenu from '@opentinyvue/vue-dropdown-menu';
|
|
|
6
6
|
import DropdownItem from '@opentinyvue/vue-dropdown-item';
|
|
7
7
|
import ActionSheet from '@opentinyvue/vue-action-sheet';
|
|
8
8
|
import { iconClose, iconChevronLeft, iconChevronRight, iconZoomOut, iconZoomIn, iconFullscreen, iconMinscreen, iconRepeat, iconRefres, iconDel, iconDownload, iconArrowLeft, iconArrowRight, iconEditorMenuRight, iconPicture } from '@opentinyvue/vue-icon';
|
|
9
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, createVNode, Transition, withCtx, normalizeClass, normalizeStyle, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode, createBlock, resolveDynamicComponent, createTextVNode, withDirectives } from 'vue';
|
|
9
10
|
|
|
10
|
-
function
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hook = injectStyles;
|
|
11
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
12
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
13
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
14
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
15
|
+
t && (r = t);
|
|
16
|
+
var o = 0;
|
|
17
|
+
return function() {
|
|
18
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
19
|
+
};
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
} else {
|
|
30
|
-
var existing = options.beforeCreate;
|
|
31
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
32
|
-
}
|
|
21
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22
|
+
}
|
|
23
|
+
function _unsupportedIterableToArray(r, a) {
|
|
24
|
+
if (r) {
|
|
25
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
26
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
27
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
33
28
|
}
|
|
34
|
-
return {
|
|
35
|
-
exports: scriptExports,
|
|
36
|
-
options
|
|
37
|
-
};
|
|
38
29
|
}
|
|
30
|
+
function _arrayLikeToArray(r, a) {
|
|
31
|
+
(null == a || a > r.length) && (a = r.length);
|
|
32
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
36
|
+
var target = sfc.__vccOpts || sfc;
|
|
37
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
38
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
39
|
+
target[key] = val;
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
39
43
|
|
|
40
44
|
function _extends() {
|
|
41
45
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
@@ -141,7 +145,7 @@ var mapDirective = function mapDirective2() {
|
|
|
141
145
|
return deactives;
|
|
142
146
|
};
|
|
143
147
|
var touchDeactives = mapDirective();
|
|
144
|
-
var
|
|
148
|
+
var _sfc_main = defineComponent({
|
|
145
149
|
emits: ["close", "update:preview-visible", "delete", "change", "newImageList"],
|
|
146
150
|
props: [].concat(props, ["urlList", "zIndex", "onSwitch", "onClose", "showIndex", "isThumbnail", "isMenuView", "modalView", "modalHeight", "bgColor", "keepStyle"]),
|
|
147
151
|
components: {
|
|
@@ -175,496 +179,635 @@ var __vue2_script = defineComponent({
|
|
|
175
179
|
});
|
|
176
180
|
}
|
|
177
181
|
});
|
|
178
|
-
var
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
182
|
+
var _hoisted_1 = {
|
|
183
|
+
key: 0,
|
|
184
|
+
"data-tag": "tiny-image-viewer"
|
|
185
|
+
};
|
|
186
|
+
var _hoisted_2 = ["onClick"];
|
|
187
|
+
var _hoisted_3 = ["src"];
|
|
188
|
+
var _hoisted_4 = ["title"];
|
|
189
|
+
var _hoisted_5 = ["onClick"];
|
|
190
|
+
var _hoisted_6 = ["title"];
|
|
191
|
+
var _hoisted_7 = {
|
|
192
|
+
class: "flex-auto h-full relative",
|
|
193
|
+
"data-tag": "tiny-image-tools"
|
|
194
|
+
};
|
|
195
|
+
var _hoisted_8 = /* @__PURE__ */ createElementVNode(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
"data-tag": "tiny-image-pc-mask",
|
|
199
|
+
class: "absolute w-full h-full top-0 left-0 bg-color-bg-7"
|
|
200
|
+
},
|
|
201
|
+
null,
|
|
202
|
+
-1
|
|
203
|
+
/* HOISTED */
|
|
204
|
+
);
|
|
205
|
+
var _hoisted_9 = {
|
|
206
|
+
"data-tag": "tiny-image-pc-actions",
|
|
207
|
+
class: "z-[1] absolute inline-flex items-center justify-center box-border select-none left-1/2 bottom-12 -translate-x-1/2 w-80 h-10 px-4 bg-color-bg-7 rounded cursor-pointer"
|
|
208
|
+
};
|
|
209
|
+
var _hoisted_10 = {
|
|
210
|
+
class: "w-full h-full text-justify cursor-default text-2xl flex items-center justify-between fill-color-bg-1"
|
|
211
|
+
};
|
|
212
|
+
var _hoisted_11 = ["href"];
|
|
213
|
+
var _hoisted_12 = {
|
|
214
|
+
key: 1,
|
|
215
|
+
"data-tag": "tiny-image-pc-index",
|
|
216
|
+
class: "z-10 absolute flex items-center justify-center box-border left-1/2 -translate-x-1/2 px-4 bottom-5"
|
|
217
|
+
};
|
|
218
|
+
var _hoisted_13 = {
|
|
219
|
+
class: "h-4.5 inline-flex items-center text-color-text-primary"
|
|
220
|
+
};
|
|
221
|
+
var _hoisted_14 = {
|
|
222
|
+
"data-tag": "tiny-image-pc-canvas",
|
|
223
|
+
class: "z-10 flex w-full h-full items-center justify-center"
|
|
224
|
+
};
|
|
225
|
+
var _hoisted_15 = ["src"];
|
|
226
|
+
var _hoisted_16 = {
|
|
227
|
+
class: "bg-color-bg-1 w-screen h-screen overflow-auto"
|
|
228
|
+
};
|
|
229
|
+
var _hoisted_17 = ["onTouchstart"];
|
|
230
|
+
var _hoisted_18 = ["src"];
|
|
231
|
+
var _hoisted_19 = ["title"];
|
|
232
|
+
var _hoisted_20 = {
|
|
233
|
+
key: 1,
|
|
234
|
+
"data-tag": "tiny-image-mobile-common",
|
|
235
|
+
class: "w-screen h-screen fixed top-0 left-0 z-50 sm:hidden"
|
|
236
|
+
};
|
|
237
|
+
var _hoisted_21 = /* @__PURE__ */ createElementVNode(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
"data-tag": "tiny-image-mobile-mask",
|
|
241
|
+
class: "absolute w-full h-full top-0 left-0 bg-black"
|
|
242
|
+
},
|
|
243
|
+
null,
|
|
244
|
+
-1
|
|
245
|
+
/* HOISTED */
|
|
246
|
+
);
|
|
247
|
+
var _hoisted_22 = {
|
|
248
|
+
"data-tag": "tiny-image-mobile-index",
|
|
249
|
+
class: "left-0 right-0 top-0 bottom-0 fixed"
|
|
250
|
+
};
|
|
251
|
+
var _hoisted_23 = {
|
|
252
|
+
key: 0,
|
|
253
|
+
class: "absolute flex items-center justify-center box-border left-1/2 -translate-x-1/2 px-4 bottom-12"
|
|
254
|
+
};
|
|
255
|
+
var _hoisted_24 = {
|
|
256
|
+
class: "h-4.5 inline-flex items-center text-color-bg-1"
|
|
257
|
+
};
|
|
258
|
+
var _hoisted_25 = {
|
|
259
|
+
"data-tag": "tiny-image-mobile-canvas",
|
|
260
|
+
ref: "canvasBox",
|
|
261
|
+
class: "w-full h-full"
|
|
262
|
+
};
|
|
263
|
+
var _hoisted_26 = {
|
|
264
|
+
class: "absolute top-0 left-0 right-0 bottom-0 text-center transition-transform inline-block duration-300"
|
|
265
|
+
};
|
|
266
|
+
var _hoisted_27 = ["src"];
|
|
267
|
+
var _hoisted_28 = {
|
|
268
|
+
key: 0,
|
|
269
|
+
"data-tag": "tiny-image-isthumbnail-preview",
|
|
270
|
+
class: "w-screen h-screen fixed top-0 left-0 z-50 sm:hidden"
|
|
271
|
+
};
|
|
272
|
+
var _hoisted_29 = /* @__PURE__ */ createElementVNode(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
"data-tag": "tiny-image-mobile-mask",
|
|
276
|
+
class: "absolute w-full h-full top-0 left-0 bg-black"
|
|
277
|
+
},
|
|
278
|
+
null,
|
|
279
|
+
-1
|
|
280
|
+
/* HOISTED */
|
|
281
|
+
);
|
|
282
|
+
var _hoisted_30 = {
|
|
283
|
+
"data-tag": "tiny-image-isthumbnail-index",
|
|
284
|
+
class: "left-0 right-0 top-0 bottom-0 fixed"
|
|
285
|
+
};
|
|
286
|
+
var _hoisted_31 = {
|
|
287
|
+
key: 0,
|
|
288
|
+
class: "absolute flex items-center justify-center box-border left-1/2 -translate-x-1/2 px-4 bottom-12"
|
|
289
|
+
};
|
|
290
|
+
var _hoisted_32 = {
|
|
291
|
+
class: "h-4.5 inline-flex items-center text-color-bg-1"
|
|
292
|
+
};
|
|
293
|
+
var _hoisted_33 = {
|
|
294
|
+
"data-tag": "tiny-image-isthumbnail-canvas",
|
|
295
|
+
ref: "thumbnailCanvasBox",
|
|
296
|
+
class: "w-full h-full"
|
|
297
|
+
};
|
|
298
|
+
var _hoisted_34 = {
|
|
299
|
+
class: "absolute top-0 left-0 right-0 bottom-0 text-center transition-transform inline-block duration-300"
|
|
300
|
+
};
|
|
301
|
+
var _hoisted_35 = ["src"];
|
|
302
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
303
|
+
var _component_icon_picture = resolveComponent("icon-picture");
|
|
304
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
305
|
+
var _component_icon_zoom_out = resolveComponent("icon-zoom-out");
|
|
306
|
+
var _component_icon_zoom_in = resolveComponent("icon-zoom-in");
|
|
307
|
+
var _component_icon_refres = resolveComponent("icon-refres");
|
|
308
|
+
var _component_icon_repeat = resolveComponent("icon-repeat");
|
|
309
|
+
var _component_icon_del = resolveComponent("icon-del");
|
|
310
|
+
var _component_icon_download = resolveComponent("icon-download");
|
|
311
|
+
var _component_icon_editor_menu_right = resolveComponent("icon-editor-menu-right");
|
|
312
|
+
var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
|
|
313
|
+
var _component_tiny_dropdown_menu = resolveComponent("tiny-dropdown-menu");
|
|
314
|
+
var _component_tiny_dropdown = resolveComponent("tiny-dropdown");
|
|
315
|
+
var _component_icon_arrow_left = resolveComponent("icon-arrow-left");
|
|
316
|
+
var _component_icon_arrow_right = resolveComponent("icon-arrow-right");
|
|
317
|
+
var _component_tiny_action_sheet = resolveComponent("tiny-action-sheet");
|
|
318
|
+
var _directive_swipeleft = resolveDirective("swipeleft");
|
|
319
|
+
var _directive_swiperight = resolveDirective("swiperight");
|
|
320
|
+
return _ctx.state.showImageViewer ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(Transition, {
|
|
321
|
+
name: "viewer-fade"
|
|
322
|
+
}, {
|
|
323
|
+
default: withCtx(function() {
|
|
324
|
+
return [_ctx.state.showImageViewer ? (openBlock(), createElementBlock(
|
|
325
|
+
"div",
|
|
326
|
+
{
|
|
327
|
+
key: 0,
|
|
328
|
+
"data-tag": "tiny-image-body",
|
|
329
|
+
class: normalizeClass(["left-0 right-0 top-0 bottom-0 hidden sm:flex z-10", _ctx.modalView ? "" : "fixed"]),
|
|
330
|
+
style: normalizeStyle({
|
|
331
|
+
"z-index": _ctx.state.zIndex,
|
|
332
|
+
"height": _ctx.modalView && _ctx.modalHeight + "px"
|
|
333
|
+
})
|
|
334
|
+
},
|
|
335
|
+
[_ctx.state.isThumbnail ? (openBlock(), createElementBlock(
|
|
336
|
+
"div",
|
|
337
|
+
{
|
|
338
|
+
key: 0,
|
|
339
|
+
"data-tag": "tiny-isthumbnail",
|
|
340
|
+
ref: "isThumbnailContent",
|
|
341
|
+
class: normalizeClass(["flex-none w-[12%] h-full flex flex-col overflow-y-scroll items-center scrollbar-size-0", _ctx.bgColor !== "white" ? "bg-color-icon-primary" : ""]),
|
|
342
|
+
style: normalizeStyle({
|
|
343
|
+
backgroundColor: _ctx.bgColor === "white" && _ctx.bgColor
|
|
344
|
+
})
|
|
345
|
+
},
|
|
346
|
+
[(openBlock(true), createElementBlock(
|
|
347
|
+
Fragment,
|
|
348
|
+
null,
|
|
349
|
+
renderList(_ctx.state.urlList, function(item, i) {
|
|
350
|
+
return openBlock(), createElementBlock("div", {
|
|
351
|
+
key: i,
|
|
352
|
+
class: "w-[88%] [&:not(:last-child)]:mb-2 [&:first-of-type]:mt-2",
|
|
353
|
+
ref_for: true,
|
|
354
|
+
ref: "isThumbnail_" + i
|
|
355
|
+
}, [createElementVNode("div", {
|
|
356
|
+
onClick: function onClick($event) {
|
|
357
|
+
return _ctx.activeItems(i);
|
|
358
|
+
},
|
|
359
|
+
class: normalizeClass(["rounded cursor-pointer p-1", {
|
|
360
|
+
"bg-color-brand": _ctx.state.currentIndex === i
|
|
361
|
+
}])
|
|
362
|
+
}, [createElementVNode("img", {
|
|
363
|
+
class: "max-h-full max-w-full aspect-square bg-current rounded",
|
|
364
|
+
ref_for: true,
|
|
365
|
+
ref: "img_" + i,
|
|
366
|
+
src: item.url
|
|
367
|
+
}, null, 8, _hoisted_3), createElementVNode("div", {
|
|
368
|
+
title: item.name || item.url,
|
|
369
|
+
class: normalizeClass(["px-1 mt-1 sm:text-xs text-sm leading-5 overflow-hidden whitespace-nowrap text-ellipsis", _ctx.bgColor === "white" ? _ctx.state.currentIndex !== i ? "text-color-text-primary" : "text-color-bg-1" : "text-color-bg-1"])
|
|
370
|
+
}, toDisplayString(item.name), 11, _hoisted_4)], 10, _hoisted_2)]);
|
|
371
|
+
}),
|
|
372
|
+
128
|
|
373
|
+
/* KEYED_FRAGMENT */
|
|
374
|
+
))],
|
|
375
|
+
6
|
|
376
|
+
/* CLASS, STYLE */
|
|
377
|
+
)) : createCommentVNode("v-if", true), _ctx.state.isMenuView ? (openBlock(), createElementBlock(
|
|
378
|
+
"div",
|
|
379
|
+
{
|
|
380
|
+
key: 1,
|
|
381
|
+
"data-tag": "tiny-is-menu-view",
|
|
382
|
+
ref: "isMenuViewContent",
|
|
383
|
+
class: normalizeClass(["flex-none w-[12%] h-full flex flex-col overflow-y-scroll items-center scrollbar-size-0", _ctx.bgColor !== "white" ? "bg-color-icon-primary" : "bg-color-bg-1"])
|
|
361
384
|
},
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
return
|
|
367
|
-
|
|
385
|
+
[(openBlock(true), createElementBlock(
|
|
386
|
+
Fragment,
|
|
387
|
+
null,
|
|
388
|
+
renderList(_ctx.state.urlList, function(items, i) {
|
|
389
|
+
return openBlock(), createElementBlock("div", {
|
|
390
|
+
key: i,
|
|
391
|
+
class: "w-[88%]"
|
|
392
|
+
}, [createElementVNode("div", {
|
|
393
|
+
onClick: function onClick($event) {
|
|
394
|
+
return _ctx.activeItems(i);
|
|
395
|
+
},
|
|
396
|
+
ref_for: true,
|
|
397
|
+
ref: "isMenuView_" + i,
|
|
398
|
+
class: normalizeClass(["[&:first-of-type]:mt-2.5 rounded cursor-pointer flex mx-1 h-9 items-center", {
|
|
399
|
+
"bg-color-brand": _ctx.state.currentIndex === i
|
|
400
|
+
}])
|
|
401
|
+
}, [createVNode(_component_icon_picture, {
|
|
402
|
+
class: normalizeClass(["max-h-full max-w-full w-[9%] h-auto my-2.5 mx-1.5 object-none", _ctx.bgColor === "white" ? _ctx.state.menuItemIndex !== i ? "fill-color-text-primary" : "fill-color-bg-1" : "fill-color-bg-1"]),
|
|
403
|
+
ref_for: true,
|
|
404
|
+
ref: "img_" + i,
|
|
405
|
+
src: items.url
|
|
406
|
+
}, null, 8, ["class", "src"]), createElementVNode("div", {
|
|
407
|
+
title: items.name || items.url,
|
|
408
|
+
class: normalizeClass(["w-[67%] sm:text-xs text-sm leading-5 overflow-hidden whitespace-nowrap text-ellipsis", _ctx.bgColor === "white" ? _ctx.state.menuItemIndex !== i ? "text-color-text-primary" : "text-color-bg-1" : "text-color-bg-1"])
|
|
409
|
+
}, toDisplayString(items.name), 11, _hoisted_6)], 10, _hoisted_5)]);
|
|
410
|
+
}),
|
|
411
|
+
128
|
|
412
|
+
/* KEYED_FRAGMENT */
|
|
413
|
+
))],
|
|
414
|
+
2
|
|
415
|
+
/* CLASS */
|
|
416
|
+
)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_7, [_hoisted_8, _ctx.modalView || !_ctx.state.isThumbnail && !_ctx.state.isMenuView ? (openBlock(), createElementBlock("span", {
|
|
417
|
+
key: 0,
|
|
418
|
+
"data-tag": "tiny-image-pc-close",
|
|
419
|
+
class: "z-[1] flex absolute items-center justify-center rounded-full box-border select-none top-20 right-20 bottom-10 text-xl cursor-pointer w-8 h-8 hover:bg-color-text-primary active:bg-color-border fill-color-bg-1 bg-color-border",
|
|
420
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
421
|
+
return _ctx.hide && _ctx.hide.apply(_ctx, arguments);
|
|
422
|
+
})
|
|
423
|
+
}, [createVNode(_component_icon_close, {
|
|
424
|
+
class: "fill-color-bg-1 cursor-pointer"
|
|
425
|
+
})])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_9, [createElementVNode("div", _hoisted_10, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.mode.icon), {
|
|
426
|
+
class: "cursor-pointer",
|
|
427
|
+
onClick: _ctx.toggleMode
|
|
428
|
+
}, null, 8, ["onClick"])), createVNode(_component_icon_zoom_out, {
|
|
429
|
+
class: "cursor-pointer",
|
|
430
|
+
onClick: _cache[1] || (_cache[1] = function($event) {
|
|
431
|
+
return _ctx.handleActions("zoomOut");
|
|
432
|
+
})
|
|
433
|
+
}), createVNode(_component_icon_zoom_in, {
|
|
434
|
+
class: "cursor-pointer",
|
|
435
|
+
onClick: _cache[2] || (_cache[2] = function($event) {
|
|
436
|
+
return _ctx.handleActions("zoomIn");
|
|
437
|
+
})
|
|
438
|
+
}), createVNode(_component_icon_refres, {
|
|
439
|
+
class: "cursor-pointer",
|
|
440
|
+
onClick: _cache[3] || (_cache[3] = function($event) {
|
|
441
|
+
return _ctx.handleActions("clocelise");
|
|
442
|
+
})
|
|
443
|
+
}), createVNode(_component_icon_repeat, {
|
|
444
|
+
class: "cursor-pointer",
|
|
445
|
+
onClick: _cache[4] || (_cache[4] = function($event) {
|
|
446
|
+
return _ctx.handleActions("anticlocelise");
|
|
447
|
+
})
|
|
448
|
+
}), createVNode(_component_icon_del, {
|
|
449
|
+
class: "cursor-pointer",
|
|
450
|
+
onClick: _cache[5] || (_cache[5] = function($event) {
|
|
451
|
+
return _ctx.handleActions("delImage");
|
|
452
|
+
})
|
|
453
|
+
}), createElementVNode("a", {
|
|
454
|
+
href: "" + _ctx.state.currentImg,
|
|
455
|
+
target: "_blank",
|
|
456
|
+
rel: "noopener noreferrer",
|
|
457
|
+
download: "",
|
|
458
|
+
class: "cursor-pointer inline-flex fill-color-bg-1"
|
|
459
|
+
}, [createVNode(_component_icon_download)], 8, _hoisted_11), createVNode(_component_tiny_dropdown, {
|
|
460
|
+
"show-self-icon": "",
|
|
461
|
+
class: "flex",
|
|
462
|
+
onItemClick: _ctx.itemClick
|
|
463
|
+
}, {
|
|
464
|
+
dropdown: withCtx(function() {
|
|
465
|
+
return [createVNode(_component_tiny_dropdown_menu, {
|
|
466
|
+
"checked-status": "",
|
|
467
|
+
placement: "top"
|
|
468
|
+
}, {
|
|
469
|
+
default: withCtx(function(_ref) {
|
|
470
|
+
var selectedIndex = _ref.selectedIndex;
|
|
471
|
+
return [createVNode(_component_tiny_dropdown_item, {
|
|
368
472
|
"current-index": 0,
|
|
369
|
-
|
|
370
|
-
"item-data": !
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
473
|
+
selected: selectedIndex === "0" && !_ctx.state.isThumbnail && !_ctx.state.isMenuView,
|
|
474
|
+
"item-data": !_ctx.state.isThumbnail && !_ctx.state.isMenuView ? "4" : "1"
|
|
475
|
+
}, {
|
|
476
|
+
default: withCtx(function() {
|
|
477
|
+
return [createTextVNode(
|
|
478
|
+
toDisplayString(_ctx.state.isThumbnail || _ctx.state.isMenuView ? _ctx.t("ui.imageViewer.hide") : _ctx.t("ui.imageViewer.show")),
|
|
479
|
+
1
|
|
480
|
+
/* TEXT */
|
|
481
|
+
)];
|
|
482
|
+
}),
|
|
483
|
+
_: 2
|
|
484
|
+
/* DYNAMIC */
|
|
485
|
+
}, 1032, ["selected", "item-data"]), createVNode(_component_tiny_dropdown_item, {
|
|
374
486
|
"current-index": 1,
|
|
375
|
-
|
|
487
|
+
selected: selectedIndex === "1" || _ctx.state.isThumbnail,
|
|
376
488
|
"item-data": "2"
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
489
|
+
}, {
|
|
490
|
+
default: withCtx(function() {
|
|
491
|
+
return [createTextVNode(
|
|
492
|
+
toDisplayString(_ctx.t("ui.imageViewer.thumbnail")),
|
|
493
|
+
1
|
|
494
|
+
/* TEXT */
|
|
495
|
+
)];
|
|
496
|
+
}),
|
|
497
|
+
_: 2
|
|
498
|
+
/* DYNAMIC */
|
|
499
|
+
}, 1032, ["selected"]), createVNode(_component_tiny_dropdown_item, {
|
|
380
500
|
"current-index": 2,
|
|
381
|
-
|
|
501
|
+
selected: selectedIndex === "2" || _ctx.state.isMenuView,
|
|
382
502
|
"item-data": "3"
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
503
|
+
}, {
|
|
504
|
+
default: withCtx(function() {
|
|
505
|
+
return [createTextVNode(
|
|
506
|
+
toDisplayString(_ctx.t("ui.imageViewer.menu")),
|
|
507
|
+
1
|
|
508
|
+
/* TEXT */
|
|
509
|
+
)];
|
|
510
|
+
}),
|
|
511
|
+
_: 2
|
|
512
|
+
/* DYNAMIC */
|
|
513
|
+
}, 1032, ["selected"])];
|
|
514
|
+
}),
|
|
515
|
+
_: 1
|
|
516
|
+
/* STABLE */
|
|
517
|
+
})];
|
|
518
|
+
}),
|
|
519
|
+
default: withCtx(function() {
|
|
520
|
+
return [createElementVNode("span", null, [createVNode(_component_icon_editor_menu_right)])];
|
|
521
|
+
}),
|
|
522
|
+
_: 1
|
|
523
|
+
/* STABLE */
|
|
524
|
+
}, 8, ["onItemClick"]), createVNode(_component_icon_arrow_left, {
|
|
525
|
+
onClick: _ctx.prev,
|
|
526
|
+
class: normalizeClass(["cursor-pointer", {
|
|
527
|
+
"is-disabled": !_ctx.state.infinite && _ctx.state.isFirst
|
|
528
|
+
}])
|
|
529
|
+
}, null, 8, ["onClick", "class"]), createVNode(_component_icon_arrow_right, {
|
|
530
|
+
onClick: _ctx.next,
|
|
531
|
+
class: normalizeClass(["cursor-pointer", {
|
|
532
|
+
"is-disabled": !_ctx.state.infinite && _ctx.state.isLast
|
|
533
|
+
}])
|
|
534
|
+
}, null, 8, ["onClick", "class"])])]), _ctx.showIndex ? (openBlock(), createElementBlock("div", _hoisted_12, [createElementVNode(
|
|
535
|
+
"span",
|
|
536
|
+
_hoisted_13,
|
|
537
|
+
toDisplayString(_ctx.state.index + 1 + "/" + _ctx.state.urlList.length),
|
|
538
|
+
1
|
|
539
|
+
/* TEXT */
|
|
540
|
+
)])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_14, [(openBlock(true), createElementBlock(
|
|
541
|
+
Fragment,
|
|
542
|
+
null,
|
|
543
|
+
renderList(_ctx.state.urlList, function(url, i) {
|
|
544
|
+
return openBlock(), createElementBlock(
|
|
545
|
+
Fragment,
|
|
546
|
+
null,
|
|
547
|
+
[i === _ctx.state.index ? (openBlock(), createElementBlock("img", {
|
|
548
|
+
ref_for: true,
|
|
549
|
+
ref: "img_" + i,
|
|
550
|
+
key: i,
|
|
551
|
+
src: _ctx.state.currentImg,
|
|
552
|
+
style: normalizeStyle(_ctx.state.imgStyle),
|
|
553
|
+
onError: _cache[6] || (_cache[6] = function() {
|
|
554
|
+
return _ctx.handleImgError && _ctx.handleImgError.apply(_ctx, arguments);
|
|
555
|
+
}),
|
|
556
|
+
onMousedown: _cache[7] || (_cache[7] = function() {
|
|
557
|
+
return _ctx.handleMouseDown && _ctx.handleMouseDown.apply(_ctx, arguments);
|
|
558
|
+
}),
|
|
559
|
+
onLoad: _cache[8] || (_cache[8] = function() {
|
|
560
|
+
return _ctx.handleImgLoad && _ctx.handleImgLoad.apply(_ctx, arguments);
|
|
561
|
+
})
|
|
562
|
+
}, null, 44, _hoisted_15)) : createCommentVNode("v-if", true)],
|
|
563
|
+
64
|
|
564
|
+
/* STABLE_FRAGMENT */
|
|
565
|
+
);
|
|
566
|
+
}),
|
|
567
|
+
256
|
|
568
|
+
/* UNKEYED_FRAGMENT */
|
|
569
|
+
))])])],
|
|
570
|
+
6
|
|
571
|
+
/* CLASS, STYLE */
|
|
572
|
+
)) : createCommentVNode("v-if", true)];
|
|
573
|
+
}),
|
|
574
|
+
_: 1
|
|
575
|
+
/* STABLE */
|
|
576
|
+
}), createVNode(Transition, {
|
|
577
|
+
name: "viewer-fade"
|
|
578
|
+
}, {
|
|
579
|
+
default: withCtx(function() {
|
|
580
|
+
return [_ctx.state.isThumbnail ? (openBlock(), createElementBlock(
|
|
581
|
+
"div",
|
|
582
|
+
{
|
|
583
|
+
key: 0,
|
|
584
|
+
"data-tag": "tiny-image-mobile-thumbnail-list",
|
|
585
|
+
class: normalizeClass(["w-screen h-screen fixed top-0 left-0 sm:hidden z-40", {
|
|
586
|
+
"hidden": _ctx.state.hiddenThumbnail
|
|
587
|
+
}])
|
|
588
|
+
},
|
|
589
|
+
[createElementVNode("div", _hoisted_16, [(openBlock(true), createElementBlock(
|
|
590
|
+
Fragment,
|
|
591
|
+
null,
|
|
592
|
+
renderList(_ctx.state.urlList, function(item, i) {
|
|
593
|
+
return openBlock(), createElementBlock("div", {
|
|
594
|
+
class: "px-4 pt-4 [&:last-of-type]:mb-5 cursor-pointer",
|
|
595
|
+
key: i,
|
|
596
|
+
onTouchstart: function onTouchstart($event) {
|
|
597
|
+
return _ctx.imagePreview(i);
|
|
598
|
+
}
|
|
599
|
+
}, [createElementVNode("img", {
|
|
600
|
+
class: "bg-current w-full h-auto",
|
|
601
|
+
ref_for: true,
|
|
602
|
+
ref: "img_" + i,
|
|
603
|
+
src: item.url
|
|
604
|
+
}, null, 8, _hoisted_18), createElementVNode("div", {
|
|
605
|
+
title: item.name || item.url,
|
|
606
|
+
class: "color-text-primary mt-2 sm:text-xs text-sm leading-5 overflow-hidden whitespace-nowrap text-ellipsis text-color-text-primary"
|
|
607
|
+
}, toDisplayString(item.name), 9, _hoisted_19)], 40, _hoisted_17);
|
|
608
|
+
}),
|
|
609
|
+
128
|
|
610
|
+
/* KEYED_FRAGMENT */
|
|
611
|
+
))])],
|
|
612
|
+
2
|
|
613
|
+
/* CLASS */
|
|
614
|
+
)) : !_ctx.state.isMenuView ? (openBlock(), createElementBlock("div", _hoisted_20, [_hoisted_21, withDirectives((openBlock(), createElementBlock("div", _hoisted_22, [_ctx.showIndex ? (openBlock(), createElementBlock("div", _hoisted_23, [createElementVNode(
|
|
615
|
+
"span",
|
|
616
|
+
_hoisted_24,
|
|
617
|
+
toDisplayString(_ctx.state.index + 1 + "/" + _ctx.state.urlList.length),
|
|
618
|
+
1
|
|
619
|
+
/* TEXT */
|
|
620
|
+
)])) : createCommentVNode("v-if", true), createElementVNode(
|
|
621
|
+
"div",
|
|
622
|
+
_hoisted_25,
|
|
623
|
+
[createElementVNode(
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
class: "h-full flex items-center justify-center",
|
|
627
|
+
style: normalizeStyle({
|
|
628
|
+
"width": _ctx.state.imageAllWidth + "px",
|
|
629
|
+
"transition-duration": _ctx.state.imageTransition + "ms",
|
|
630
|
+
transform: "translateX(" + _ctx.state.imageTransformSize + "px)"
|
|
631
|
+
})
|
|
632
|
+
},
|
|
633
|
+
[(openBlock(true), createElementBlock(
|
|
634
|
+
Fragment,
|
|
635
|
+
null,
|
|
636
|
+
renderList(_ctx.urlList, function(url, i) {
|
|
637
|
+
return openBlock(), createElementBlock(
|
|
638
|
+
"div",
|
|
639
|
+
{
|
|
640
|
+
"data-tag": "tiny-image-mobile-viewer-item",
|
|
641
|
+
class: "relative shrink h-full",
|
|
642
|
+
ref_for: true,
|
|
643
|
+
ref: "viewerItem",
|
|
644
|
+
key: i,
|
|
645
|
+
style: normalizeStyle(Object.assign({
|
|
646
|
+
width: _ctx.state.imageItemWidth + "px"
|
|
647
|
+
}, i === _ctx.state.index ? _ctx.state.imgStyle : ""))
|
|
648
|
+
},
|
|
649
|
+
[createElementVNode("div", _hoisted_26, [i === _ctx.state.index ? (openBlock(), createElementBlock("img", {
|
|
650
|
+
key: i,
|
|
651
|
+
class: normalizeClass(["block w-full h-full object-contain", {
|
|
652
|
+
"object-fill": _ctx.state.fullScreen
|
|
653
|
+
}]),
|
|
654
|
+
ref_for: true,
|
|
655
|
+
ref: "img_" + i,
|
|
656
|
+
src: _ctx.state.currentImg,
|
|
657
|
+
style: normalizeStyle(_ctx.state.imgStyle),
|
|
658
|
+
onMousedown: _cache[9] || (_cache[9] = function() {
|
|
659
|
+
return _ctx.handleMouseDown && _ctx.handleMouseDown.apply(_ctx, arguments);
|
|
660
|
+
}),
|
|
661
|
+
onError: _cache[10] || (_cache[10] = function() {
|
|
662
|
+
return _ctx.handleImgError && _ctx.handleImgError.apply(_ctx, arguments);
|
|
663
|
+
}),
|
|
664
|
+
onLoad: _cache[11] || (_cache[11] = function() {
|
|
665
|
+
return _ctx.handleImgLoad && _ctx.handleImgLoad.apply(_ctx, arguments);
|
|
666
|
+
}),
|
|
667
|
+
onTouchstart: _cache[12] || (_cache[12] = function() {
|
|
668
|
+
return _ctx.touchstart && _ctx.touchstart.apply(_ctx, arguments);
|
|
669
|
+
}),
|
|
670
|
+
onTouchmove: _cache[13] || (_cache[13] = function() {
|
|
671
|
+
return _ctx.touchmove && _ctx.touchmove.apply(_ctx, arguments);
|
|
672
|
+
}),
|
|
673
|
+
onTouchend: _cache[14] || (_cache[14] = function() {
|
|
674
|
+
return _ctx.touchend && _ctx.touchend.apply(_ctx, arguments);
|
|
675
|
+
})
|
|
676
|
+
}, null, 46, _hoisted_27)) : createCommentVNode("v-if", true)])],
|
|
677
|
+
4
|
|
678
|
+
/* STYLE */
|
|
679
|
+
);
|
|
680
|
+
}),
|
|
681
|
+
128
|
|
682
|
+
/* KEYED_FRAGMENT */
|
|
683
|
+
))],
|
|
684
|
+
4
|
|
685
|
+
/* STYLE */
|
|
686
|
+
)],
|
|
687
|
+
512
|
|
688
|
+
/* NEED_PATCH */
|
|
689
|
+
)])), [[_directive_swipeleft, _ctx.swipeLeft], [_directive_swiperight, _ctx.swipeRight]])])) : createCommentVNode("v-if", true)];
|
|
690
|
+
}),
|
|
691
|
+
_: 1
|
|
692
|
+
/* STABLE */
|
|
693
|
+
}), createVNode(Transition, {
|
|
694
|
+
name: "viewer-fade"
|
|
695
|
+
}, {
|
|
696
|
+
default: withCtx(function() {
|
|
697
|
+
return [_ctx.state.isImagePreview ? (openBlock(), createElementBlock("div", _hoisted_28, [_hoisted_29, withDirectives((openBlock(), createElementBlock("div", _hoisted_30, [_ctx.showIndex ? (openBlock(), createElementBlock("div", _hoisted_31, [createElementVNode(
|
|
698
|
+
"span",
|
|
699
|
+
_hoisted_32,
|
|
700
|
+
toDisplayString(_ctx.state.index + 1 + "/" + _ctx.state.urlList.length),
|
|
701
|
+
1
|
|
702
|
+
/* TEXT */
|
|
703
|
+
)])) : createCommentVNode("v-if", true), createElementVNode(
|
|
704
|
+
"div",
|
|
705
|
+
_hoisted_33,
|
|
706
|
+
[createElementVNode(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
class: "h-full flex items-center justify-center",
|
|
710
|
+
style: normalizeStyle({
|
|
711
|
+
"width": _ctx.state.imageAllWidth + "px",
|
|
712
|
+
"transition-duration": _ctx.state.imageTransition + "ms",
|
|
713
|
+
transform: "translateX(" + _ctx.state.imageTransformSize + "px)"
|
|
714
|
+
})
|
|
715
|
+
},
|
|
716
|
+
[(openBlock(true), createElementBlock(
|
|
717
|
+
Fragment,
|
|
718
|
+
null,
|
|
719
|
+
renderList(_ctx.state.urlList, function(url, i) {
|
|
720
|
+
return openBlock(), createElementBlock(
|
|
721
|
+
"div",
|
|
722
|
+
{
|
|
723
|
+
"data-tag": "tiny-image-isthumbnail-viewer-item",
|
|
724
|
+
class: "relative shrink h-full",
|
|
725
|
+
ref_for: true,
|
|
726
|
+
ref: "viewerItem",
|
|
727
|
+
key: i,
|
|
728
|
+
style: normalizeStyle(Object.assign({
|
|
729
|
+
width: _ctx.state.imageItemWidth + "px"
|
|
730
|
+
}, i === _ctx.state.index ? _ctx.state.imgStyle : ""))
|
|
731
|
+
},
|
|
732
|
+
[createElementVNode("div", _hoisted_34, [(openBlock(), createElementBlock("img", {
|
|
733
|
+
key: i,
|
|
734
|
+
class: normalizeClass(["block w-full h-full object-contain", {
|
|
735
|
+
"object-fill": _ctx.state.fullScreen
|
|
736
|
+
}]),
|
|
737
|
+
ref_for: true,
|
|
738
|
+
ref: "img_" + i,
|
|
739
|
+
src: _ctx.state.currentImg,
|
|
740
|
+
style: normalizeStyle(_ctx.state.imgStyle),
|
|
741
|
+
onMousedown: _cache[15] || (_cache[15] = function() {
|
|
742
|
+
return _ctx.handleMouseDown && _ctx.handleMouseDown.apply(_ctx, arguments);
|
|
743
|
+
}),
|
|
744
|
+
onError: _cache[16] || (_cache[16] = function() {
|
|
745
|
+
return _ctx.handleImgError && _ctx.handleImgError.apply(_ctx, arguments);
|
|
746
|
+
}),
|
|
747
|
+
onLoad: _cache[17] || (_cache[17] = function() {
|
|
748
|
+
return _ctx.handleImgLoad && _ctx.handleImgLoad.apply(_ctx, arguments);
|
|
749
|
+
}),
|
|
750
|
+
onTouchstart: _cache[18] || (_cache[18] = function() {
|
|
751
|
+
return _ctx.touchstart && _ctx.touchstart.apply(_ctx, arguments);
|
|
752
|
+
}),
|
|
753
|
+
onTouchmove: _cache[19] || (_cache[19] = function() {
|
|
754
|
+
return _ctx.touchmove && _ctx.touchmove.apply(_ctx, arguments);
|
|
755
|
+
}),
|
|
756
|
+
onTouchend: _cache[20] || (_cache[20] = function() {
|
|
757
|
+
return _ctx.touchend && _ctx.touchend.apply(_ctx, arguments);
|
|
758
|
+
})
|
|
759
|
+
}, null, 46, _hoisted_35))])],
|
|
760
|
+
4
|
|
761
|
+
/* STYLE */
|
|
762
|
+
);
|
|
763
|
+
}),
|
|
764
|
+
128
|
|
765
|
+
/* KEYED_FRAGMENT */
|
|
766
|
+
))],
|
|
767
|
+
4
|
|
768
|
+
/* STYLE */
|
|
769
|
+
)],
|
|
770
|
+
512
|
|
771
|
+
/* NEED_PATCH */
|
|
772
|
+
)])), [[_directive_swipeleft, _ctx.swipeLeft], [_directive_swiperight, _ctx.swipeRight]])])) : createCommentVNode("v-if", true)];
|
|
773
|
+
}),
|
|
774
|
+
_: 1
|
|
775
|
+
/* STABLE */
|
|
776
|
+
}), createVNode(_component_tiny_action_sheet, {
|
|
777
|
+
type: "action",
|
|
778
|
+
menus: [{
|
|
779
|
+
type: "save",
|
|
780
|
+
label: _ctx.t("ui.imageViewer.save")
|
|
483
781
|
}, {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
value: _vm.swipeRight,
|
|
487
|
-
expression: "swipeRight"
|
|
488
|
-
}],
|
|
489
|
-
staticClass: "left-0 right-0 top-0 bottom-0 fixed",
|
|
490
|
-
attrs: {
|
|
491
|
-
"data-tag": "tiny-image-mobile-index"
|
|
492
|
-
}
|
|
493
|
-
}, [_vm.showIndex ? _c("div", {
|
|
494
|
-
staticClass: "absolute flex items-center justify-center box-border left-1/2 -translate-x-1/2 px-4 bottom-12"
|
|
495
|
-
}, [_c("span", {
|
|
496
|
-
staticClass: "h-4.5 inline-flex items-center text-color-bg-1"
|
|
497
|
-
}, [_vm._v(" " + _vm._s(_vm.state.index + 1 + "/" + _vm.state.urlList.length) + " ")])]) : _vm._e(), _c("div", {
|
|
498
|
-
ref: "canvasBox",
|
|
499
|
-
staticClass: "w-full h-full",
|
|
500
|
-
attrs: {
|
|
501
|
-
"data-tag": "tiny-image-mobile-canvas"
|
|
502
|
-
}
|
|
503
|
-
}, [_c("div", {
|
|
504
|
-
staticClass: "h-full flex items-center justify-center",
|
|
505
|
-
style: {
|
|
506
|
-
"width": _vm.state.imageAllWidth + "px",
|
|
507
|
-
"transition-duration": _vm.state.imageTransition + "ms",
|
|
508
|
-
transform: "translateX(" + _vm.state.imageTransformSize + "px)"
|
|
509
|
-
}
|
|
510
|
-
}, _vm._l(_vm.urlList, function(url, i) {
|
|
511
|
-
return _c("div", {
|
|
512
|
-
key: i,
|
|
513
|
-
ref: "viewerItem",
|
|
514
|
-
refInFor: true,
|
|
515
|
-
staticClass: "relative shrink h-full",
|
|
516
|
-
style: Object.assign({
|
|
517
|
-
width: _vm.state.imageItemWidth + "px"
|
|
518
|
-
}, i === _vm.state.index ? _vm.state.imgStyle : ""),
|
|
519
|
-
attrs: {
|
|
520
|
-
"data-tag": "tiny-image-mobile-viewer-item"
|
|
521
|
-
}
|
|
522
|
-
}, [_c("div", {
|
|
523
|
-
staticClass: "absolute top-0 left-0 right-0 bottom-0 text-center transition-transform inline-block duration-300"
|
|
524
|
-
}, [i === _vm.state.index ? _c("img", {
|
|
525
|
-
key: i,
|
|
526
|
-
ref: "img_" + i,
|
|
527
|
-
refInFor: true,
|
|
528
|
-
class: ["block w-full h-full object-contain", {
|
|
529
|
-
"object-fill": _vm.state.fullScreen
|
|
530
|
-
}],
|
|
531
|
-
style: _vm.state.imgStyle,
|
|
532
|
-
attrs: {
|
|
533
|
-
"src": _vm.state.currentImg
|
|
534
|
-
},
|
|
535
|
-
on: {
|
|
536
|
-
"mousedown": _vm.handleMouseDown,
|
|
537
|
-
"error": _vm.handleImgError,
|
|
538
|
-
"load": _vm.handleImgLoad,
|
|
539
|
-
"touchstart": _vm.touchstart,
|
|
540
|
-
"touchmove": _vm.touchmove,
|
|
541
|
-
"touchend": _vm.touchend
|
|
542
|
-
}
|
|
543
|
-
}) : _vm._e()])]);
|
|
544
|
-
}), 0)])])]) : _vm._e()]), _c("transition", {
|
|
545
|
-
attrs: {
|
|
546
|
-
"name": "viewer-fade"
|
|
547
|
-
}
|
|
548
|
-
}, [_vm.state.isImagePreview ? _c("div", {
|
|
549
|
-
staticClass: "w-screen h-screen fixed top-0 left-0 z-50 sm:hidden",
|
|
550
|
-
attrs: {
|
|
551
|
-
"data-tag": "tiny-image-isthumbnail-preview"
|
|
552
|
-
}
|
|
553
|
-
}, [_c("div", {
|
|
554
|
-
staticClass: "absolute w-full h-full top-0 left-0 bg-black",
|
|
555
|
-
attrs: {
|
|
556
|
-
"data-tag": "tiny-image-mobile-mask"
|
|
557
|
-
}
|
|
558
|
-
}), _c("div", {
|
|
559
|
-
directives: [{
|
|
560
|
-
name: "swipeleft",
|
|
561
|
-
rawName: "v-swipeleft",
|
|
562
|
-
value: _vm.swipeLeft,
|
|
563
|
-
expression: "swipeLeft"
|
|
782
|
+
type: "thumbnail",
|
|
783
|
+
label: _ctx.t("ui.imageViewer.thumbnail")
|
|
564
784
|
}, {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
value: _vm.swipeRight,
|
|
568
|
-
expression: "swipeRight"
|
|
785
|
+
type: "del",
|
|
786
|
+
label: _ctx.t("ui.imageViewer.del")
|
|
569
787
|
}],
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
attrs: {
|
|
582
|
-
"data-tag": "tiny-image-isthumbnail-canvas"
|
|
583
|
-
}
|
|
584
|
-
}, [_c("div", {
|
|
585
|
-
staticClass: "h-full flex items-center justify-center",
|
|
586
|
-
style: {
|
|
587
|
-
"width": _vm.state.imageAllWidth + "px",
|
|
588
|
-
"transition-duration": _vm.state.imageTransition + "ms",
|
|
589
|
-
transform: "translateX(" + _vm.state.imageTransformSize + "px)"
|
|
590
|
-
}
|
|
591
|
-
}, _vm._l(_vm.state.urlList, function(url, i) {
|
|
592
|
-
return _c("div", {
|
|
593
|
-
key: i,
|
|
594
|
-
ref: "viewerItem",
|
|
595
|
-
refInFor: true,
|
|
596
|
-
staticClass: "relative shrink h-full",
|
|
597
|
-
style: Object.assign({
|
|
598
|
-
width: _vm.state.imageItemWidth + "px"
|
|
599
|
-
}, i === _vm.state.index ? _vm.state.imgStyle : ""),
|
|
600
|
-
attrs: {
|
|
601
|
-
"data-tag": "tiny-image-isthumbnail-viewer-item"
|
|
602
|
-
}
|
|
603
|
-
}, [_c("div", {
|
|
604
|
-
staticClass: "absolute top-0 left-0 right-0 bottom-0 text-center transition-transform inline-block duration-300"
|
|
605
|
-
}, [_c("img", {
|
|
606
|
-
key: i,
|
|
607
|
-
ref: "img_" + i,
|
|
608
|
-
refInFor: true,
|
|
609
|
-
class: ["block w-full h-full object-contain", {
|
|
610
|
-
"object-fill": _vm.state.fullScreen
|
|
611
|
-
}],
|
|
612
|
-
style: _vm.state.imgStyle,
|
|
613
|
-
attrs: {
|
|
614
|
-
"src": _vm.state.currentImg
|
|
615
|
-
},
|
|
616
|
-
on: {
|
|
617
|
-
"mousedown": _vm.handleMouseDown,
|
|
618
|
-
"error": _vm.handleImgError,
|
|
619
|
-
"load": _vm.handleImgLoad,
|
|
620
|
-
"touchstart": _vm.touchstart,
|
|
621
|
-
"touchmove": _vm.touchmove,
|
|
622
|
-
"touchend": _vm.touchend
|
|
623
|
-
}
|
|
624
|
-
})])]);
|
|
625
|
-
}), 0)])])]) : _vm._e()]), _c("tiny-action-sheet", {
|
|
626
|
-
attrs: {
|
|
627
|
-
"type": "action",
|
|
628
|
-
"menus": [{
|
|
629
|
-
type: "save",
|
|
630
|
-
label: _vm.t("ui.imageViewer.save")
|
|
631
|
-
}, {
|
|
632
|
-
type: "thumbnail",
|
|
633
|
-
label: _vm.t("ui.imageViewer.thumbnail")
|
|
634
|
-
}, {
|
|
635
|
-
type: "del",
|
|
636
|
-
label: _vm.t("ui.imageViewer.del")
|
|
637
|
-
}],
|
|
638
|
-
"visible": _vm.state.boxVisibility
|
|
639
|
-
},
|
|
640
|
-
on: {
|
|
641
|
-
"update:visible": function updateVisible($event) {
|
|
642
|
-
_vm.state.boxVisibility = $event;
|
|
643
|
-
},
|
|
644
|
-
"click": _vm.selectOption
|
|
645
|
-
},
|
|
646
|
-
scopedSlots: _vm._u([{
|
|
647
|
-
key: "default",
|
|
648
|
-
fn: function fn(data) {
|
|
649
|
-
return [_c("div", {
|
|
650
|
-
class: [{
|
|
788
|
+
visible: _ctx.state.boxVisibility,
|
|
789
|
+
"onUpdate:visible": _cache[21] || (_cache[21] = function($event) {
|
|
790
|
+
return _ctx.state.boxVisibility = $event;
|
|
791
|
+
}),
|
|
792
|
+
onClick: _ctx.selectOption
|
|
793
|
+
}, {
|
|
794
|
+
default: withCtx(function(data) {
|
|
795
|
+
return [createElementVNode(
|
|
796
|
+
"div",
|
|
797
|
+
{
|
|
798
|
+
class: normalizeClass([{
|
|
651
799
|
"text-color-error": data.data.type === "del"
|
|
652
|
-
}]
|
|
653
|
-
},
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
for (var o in __cssModules) {
|
|
663
|
-
this[o] = __cssModules[o];
|
|
664
|
-
}
|
|
800
|
+
}])
|
|
801
|
+
},
|
|
802
|
+
toDisplayString(data.data.label),
|
|
803
|
+
3
|
|
804
|
+
/* TEXT, CLASS */
|
|
805
|
+
)];
|
|
806
|
+
}),
|
|
807
|
+
_: 1
|
|
808
|
+
/* STABLE */
|
|
809
|
+
}, 8, ["menus", "visible", "onClick"])])) : createCommentVNode("v-if", true);
|
|
665
810
|
}
|
|
666
|
-
var mobileFirst = /* @__PURE__ */
|
|
667
|
-
return __component__.exports;
|
|
668
|
-
}();
|
|
811
|
+
var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
669
812
|
|
|
670
813
|
export { mobileFirst as default };
|