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