images-viewer-vue3
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -123,3 +123,3 @@ var g = Object.defineProperty; | ||
removeStyleProperty() { | ||
this.currentImage && (this.currentImage.style.removeProperty("top"), this.currentImage.style.removeProperty("left"), this.currentImage.style.removeProperty("position"), this.currentImage.style.removeProperty("transform")); | ||
this.currentImage && (this.currentImage.style.removeProperty("top"), this.currentImage.style.removeProperty("left"), this.currentImage.style.removeProperty("position"), this.currentImage.style.removeProperty("transform"), this.currentImage = null); | ||
} | ||
@@ -126,0 +126,0 @@ destroyed() { |
@@ -33,6 +33,10 @@ declare const _default: import('vue').DefineComponent<{ | ||
}; | ||
onClose: { | ||
handleChange: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
handleClose: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
language: { | ||
@@ -44,2 +48,3 @@ type: StringConstructor; | ||
"on-close": (...args: any[]) => void; | ||
"on-change": (...args: any[]) => void; | ||
"onUpdate:value": (...args: any[]) => void; | ||
@@ -78,6 +83,10 @@ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{ | ||
}; | ||
onClose: { | ||
handleChange: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
handleClose: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
language: { | ||
@@ -89,2 +98,3 @@ type: StringConstructor; | ||
"onOn-close"?: ((...args: any[]) => any) | undefined; | ||
"onOn-change"?: ((...args: any[]) => any) | undefined; | ||
"onOnUpdate:value"?: ((...args: any[]) => any) | undefined; | ||
@@ -98,5 +108,6 @@ }, { | ||
onUpdateCurrent: Function; | ||
onClose: Function; | ||
handleChange: Function; | ||
handleClose: Function; | ||
language: string; | ||
}, {}>; | ||
export default _default; |
import o from "./index.vue2.js"; | ||
/* empty css */ | ||
import e from "../_virtual/_plugin-vue_export-helper.js"; | ||
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f696c6e5"]]); | ||
import r from "../_virtual/_plugin-vue_export-helper.js"; | ||
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3d327580"]]); | ||
export { | ||
a as default | ||
}; |
@@ -1,10 +0,10 @@ | ||
import { defineComponent as s1, ref as k, watch as l1, nextTick as n1, onBeforeUnmount as a1, openBlock as l, createElementBlock as a, normalizeClass as E, unref as o, createElementVNode as i, toDisplayString as d, createCommentVNode as z, createBlock as c1, withModifiers as v, createTextVNode as r1, Fragment as v1, renderList as u1, createVNode as d1, pushScopeId as h1, popScopeId as g1 } from "vue"; | ||
import { useAction as m1 } from "./useAction.js"; | ||
import { getUserAgent as q, debounce as p1 } from "../utils/index.js"; | ||
import { FlipAnimate as O } from "./flip-animate.js"; | ||
import _1 from "./HotKeys.vue.js"; | ||
import f1 from "./Loading.vue.js"; | ||
import { useCusShortKey as X } from "../utils/hotkeys.js"; | ||
import { messages as z1 } from "../langs/index.js"; | ||
const n = (h) => (h1("data-v-f696c6e5"), h = h(), g1(), h), w1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
import { defineComponent as i1, ref as k, watch as X, nextTick as l1, onBeforeUnmount as o1, openBlock as s, createElementBlock as a, normalizeClass as C, unref as l, createElementVNode as i, toDisplayString as m, createCommentVNode as w, createBlock as s1, withModifiers as d, createTextVNode as n1, Fragment as a1, renderList as c1, createVNode as r1, pushScopeId as v1, popScopeId as u1 } from "vue"; | ||
import { useAction as d1 } from "./useAction.js"; | ||
import { getUserAgent as Y, debounce as h1 } from "../utils/index.js"; | ||
import { FlipAnimate as j } from "./flip-animate.js"; | ||
import g1 from "./HotKeys.vue.js"; | ||
import m1 from "./Loading.vue.js"; | ||
import { useCusShortKey as G } from "../utils/hotkeys.js"; | ||
import { messages as p1 } from "../langs/index.js"; | ||
const n = (h) => (v1("data-v-3d327580"), h = h(), u1(), h), _1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
class: "close-icon icon-is-hover", | ||
@@ -23,5 +23,8 @@ viewBox: "0 0 1024 1024", | ||
}) | ||
], -1)), k1 = [ | ||
w1 | ||
], y1 = { class: "inner-image-wrap" }, C1 = { key: 0 }, M1 = { style: { color: "orange", "text-decoration": "solid" } }, x1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
], -1)), f1 = [ | ||
_1 | ||
], z1 = { class: "inner-image-wrap" }, w1 = { | ||
key: 0, | ||
style: { "user-select": "text" } | ||
}, k1 = { style: { color: "orange", "text-decoration": "solid" } }, C1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
class: "icon-is-hover cus-cursor", | ||
@@ -36,5 +39,5 @@ viewBox: "0 0 1024 1024", | ||
}) | ||
], -1)), B1 = [ | ||
x1 | ||
], b1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
], -1)), y1 = [ | ||
C1 | ||
], x1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("svg", { | ||
class: "icon-is-hover cus-cursor", | ||
@@ -49,49 +52,59 @@ viewBox: "0 0 1024 1024", | ||
}) | ||
], -1)), V1 = [ | ||
b1 | ||
], I1 = { class: "nav-image-viewer__wrap" }, S1 = { class: "navbar-control__wrap" }, L1 = { | ||
], -1)), M1 = [ | ||
x1 | ||
], b1 = { class: "nav-image-viewer__wrap" }, B1 = { | ||
value: "10", | ||
selected: "" | ||
}, A1 = { value: "15" }, H1 = { value: "20" }, R1 = { value: "30" }, E1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, V1 = { value: "15" }, I1 = { value: "20" }, S1 = { value: "30" }, L1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M476.48 903.36C248.96 903.36 64 718.4 64 491.2S248.96 78.72 476.48 78.72s412.48 184.96 412.48 412.48-185.28 412.16-412.48 412.16z m0-741.12c-181.44 0-328.96 147.52-328.96 328.96s147.52 328.96 328.96 328.96 328.96-147.52 328.96-328.96S657.6 162.24 476.48 162.24z", | ||
fill: "#eee" | ||
}, null, -1)), N1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), A1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM643.84 532.8H309.12c-23.04 0-41.6-18.56-41.6-41.6s18.56-41.6 41.6-41.6h334.72c23.04 0 41.6 18.56 41.6 41.6s-18.56 41.6-41.6 41.6z", | ||
fill: "#eee" | ||
}, null, -1)), U1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), H1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M476.48 700.16c-23.04 0-41.6-18.56-41.6-41.6V323.84c0-23.04 18.56-41.6 41.6-41.6s41.6 18.56 41.6 41.6v334.72c0 23.04-18.56 41.6-41.6 41.6z", | ||
fill: "#eee" | ||
}, null, -1)), P1 = [ | ||
E1, | ||
N1, | ||
U1 | ||
], T1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), R1 = [ | ||
L1, | ||
A1, | ||
H1 | ||
], E1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M485.76 921.92C253.12 921.92 64 732.8 64 500.48 64 267.84 253.12 78.72 485.76 78.72s421.76 189.12 421.76 421.76c-0.32 232.32-189.44 421.44-421.76 421.44z m0-759.68c-186.56 0-338.24 151.68-338.24 338.24s151.68 338.24 338.24 338.24 338.24-151.68 338.24-338.24S672 162.24 485.76 162.24z", | ||
fill: "#eee" | ||
}, null, -1)), K1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), N1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM657.28 542.08H314.24c-23.04 0-41.6-18.56-41.6-41.6 0-23.04 18.56-41.6 41.6-41.6h343.04c23.04 0 41.6 18.56 41.6 41.6 0 23.04-18.56 41.6-41.6 41.6z", | ||
fill: "#eee" | ||
}, null, -1)), F1 = [ | ||
T1, | ||
K1 | ||
], $1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), T1 = [ | ||
E1, | ||
N1 | ||
], U1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M981.675 313.572c-25.714-60.758-62.464-115.257-109.227-162.02S771.186 68.039 710.428 42.325C647.51 15.815 580.836 2.275 512 2.275s-135.51 13.54-198.428 40.05c-60.758 25.714-115.257 62.464-162.02 109.227-25.486 25.486-48.014 53.248-67.356 83.172V188.87c0-22.528-18.432-40.96-40.96-40.96s-40.96 18.432-40.96 40.96v327.68c0 22.528 18.432 40.96 40.96 40.96s40.96-18.432 40.96-40.96v-57.116c4.778-39.595 15.018-78.166 30.72-115.143 21.731-51.314 52.792-97.394 92.387-136.989s85.675-70.77 136.989-92.387C397.426 92.5 453.86 81.01 512 81.01c58.254 0 114.688 11.378 167.708 33.906 51.314 21.731 97.394 52.792 136.989 92.387s70.77 85.675 92.387 136.989C931.5 397.426 942.99 453.86 942.99 512c0 58.254-11.378 114.688-33.906 167.708-21.731 51.314-52.792 97.394-92.387 136.989s-85.675 70.77-136.989 92.387C626.574 931.5 570.14 942.99 512 942.99c-73.5 0-146.09-18.773-209.806-54.386-61.895-34.588-114.802-84.309-153.145-144.042-11.72-18.318-36.068-23.666-54.386-11.833-18.318 11.719-23.666 36.067-11.833 54.386 45.284 70.542 107.862 129.365 181.02 170.211 75.322 42.098 161.224 64.398 248.15 64.398 68.836 0 135.51-13.54 198.428-40.05 60.758-25.713 115.257-62.463 162.02-109.226 46.763-46.763 83.513-101.262 109.227-162.02 26.51-62.919 40.05-129.592 40.05-198.428s-13.54-135.51-40.05-198.428z", | ||
fill: "#eee" | ||
}, null, -1)), D1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), P1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M242.802 584.249c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z", | ||
fill: "#eee" | ||
}, null, -1)), W1 = [ | ||
$1, | ||
D1 | ||
], q1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), F1 = [ | ||
U1, | ||
P1 | ||
], K1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M512 1021.724c-68.836 0-135.51-13.54-198.428-40.05-60.758-25.713-115.257-62.463-162.02-109.226S68.039 771.186 42.325 710.428C15.815 647.51 2.275 580.836 2.275 512s13.54-135.51 40.05-198.428c25.714-60.758 62.464-115.257 109.227-162.02s101.262-83.513 162.02-109.227C376.49 15.815 443.164 2.275 512 2.275s135.51 13.54 198.428 40.05c60.758 25.714 115.257 62.464 162.02 109.227s83.513 101.262 109.227 162.02c26.51 62.919 40.05 129.592 40.05 198.428 0 21.732-17.636 39.367-39.368 39.367S942.99 533.732 942.99 512c0-58.254-11.378-114.688-33.906-167.708-21.731-51.314-52.792-97.394-92.387-136.989s-85.675-70.77-136.989-92.387C626.574 92.5 570.14 81.01 512 81.01c-58.254 0-114.688 11.378-167.708 33.906-51.314 21.731-97.394 52.792-136.989 92.387s-70.77 85.675-92.387 136.989C92.5 397.426 81.01 453.86 81.01 512c0 58.254 11.378 114.688 33.906 167.708 21.731 51.314 52.792 97.394 92.387 136.989s85.675 70.77 136.989 92.387C397.426 931.5 453.86 942.99 512 942.99c73.5 0 146.09-18.773 209.806-54.386 61.895-34.588 114.802-84.309 153.145-144.042 11.72-18.318 36.068-23.666 54.386-11.833 18.318 11.719 23.666 36.067 11.833 54.386-45.284 70.542-107.862 129.365-181.02 170.211-75.322 42.098-161.224 64.398-248.15 64.398z", | ||
fill: "#eee" | ||
}, null, -1)), O1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), $1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M980.764 557.511c-22.528 0-40.96-18.432-40.96-40.96v-327.68c0-22.528 18.432-40.96 40.96-40.96s40.96 18.432 40.96 40.96v327.68c0 22.528-18.432 40.96-40.96 40.96zM242.802 584.25c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z", | ||
fill: "#eee" | ||
}, null, -1)), D1 = [ | ||
K1, | ||
$1 | ||
], W1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M573.248 832v88h-96V832h96zM128 224a64 64 0 0 1 45.248 18.752l229.504 229.504a64 64 0 0 1 0 90.496l-229.504 229.504A64 64 0 0 1 64 747.008V288a64 64 0 0 1 64-64z m781.248-5.504a64 64 0 0 1 63.552 56.576l0.448 7.424v459.008a64 64 0 0 1-103.232 50.56l-6.016-5.312-229.504-229.504a64 64 0 0 1-5.312-84.48l5.312-6.016L864 237.248a64 64 0 0 1 45.248-18.752zM128 288v459.008l229.504-229.504L128 288z m445.248 368v88h-96V656h96z m0-176v88h-96V480h96z m0-176v88h-96V304h96z m0-176v88h-96V128h96z", | ||
fill: "#eee" | ||
}, null, -1)), q1 = [ | ||
W1 | ||
], O1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M660.48 106.24L512 291.84l-149.12-185.6h297.6M768 69.12c1.28-19.2-13.44-36.48-33.28-37.12H289.28c-19.2 1.28-33.92 17.92-33.28 37.12 0 8.96 3.2 17.92 8.32 24.96l222.72 277.76a30.72 30.72 0 0 0 49.28 0l222.72-277.76c6.4-7.04 8.96-16 8.96-24.96zM768 954.88c1.28 19.2-13.44 36.48-33.28 37.12H289.28a35.52 35.52 0 0 1-33.28-37.12c0-8.96 3.2-17.92 8.32-24.96l222.72-277.76a30.72 30.72 0 0 1 49.28 0l222.72 277.76c6.4 7.04 8.96 16 8.96 24.96zM800 480h64v64h-64zM928 480h64v64h-64zM672 480h64v64h-64zM544 480h64v64h-64zM416 480h64v64h-64zM288 480h64v64h-64zM160 480h64v64h-64zM32 480h64v64h-64z", | ||
fill: "#eee" | ||
}, null, -1)), X1 = [ | ||
q1, | ||
O1 | ||
], Y1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M573.248 832v88h-96V832h96zM128 224a64 64 0 0 1 45.248 18.752l229.504 229.504a64 64 0 0 1 0 90.496l-229.504 229.504A64 64 0 0 1 64 747.008V288a64 64 0 0 1 64-64z m781.248-5.504a64 64 0 0 1 63.552 56.576l0.448 7.424v459.008a64 64 0 0 1-103.232 50.56l-6.016-5.312-229.504-229.504a64 64 0 0 1-5.312-84.48l5.312-6.016L864 237.248a64 64 0 0 1 45.248-18.752zM128 288v459.008l229.504-229.504L128 288z m445.248 368v88h-96V656h96z m0-176v88h-96V480h96z m0-176v88h-96V304h96z m0-176v88h-96V128h96z", | ||
d: "M863.153113 702.196507h116.959605a43.887282 43.887282 0 0 1 0 87.774563H863.153113A73.182042 73.182042 0 0 0 789.97107 863.153113v116.959605a43.887282 43.887282 0 0 1-87.774563 0V863.153113A160.956606 160.956606 0 0 1 863.153113 702.196507z m0-380.393014h116.959605a43.887282 43.887282 0 0 0 0-87.774563H863.153113A73.182042 73.182042 0 0 1 789.97107 160.956606V43.887282a43.887282 43.887282 0 0 0-87.774563 0v117.069324a160.846887 160.846887 0 0 0 160.956606 160.846887z m-702.196507 0H43.887282a43.887282 43.887282 0 0 1 0-87.774563h117.069324a73.072324 73.072324 0 0 0 73.072324-73.072324V43.887282a43.887282 43.887282 0 0 1 87.774563 0v117.069324a160.846887 160.846887 0 0 1-160.846887 160.846887z m0 380.393014H43.887282a43.887282 43.887282 0 0 0 0 87.774563h117.069324a73.182042 73.182042 0 0 1 73.072324 73.182043v116.959605a43.887282 43.887282 0 0 0 87.774563 0V863.153113A160.846887 160.846887 0 0 0 160.956606 702.196507z", | ||
fill: "#eee" | ||
@@ -101,34 +114,24 @@ }, null, -1)), j1 = [ | ||
], G1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M660.48 106.24L512 291.84l-149.12-185.6h297.6M768 69.12c1.28-19.2-13.44-36.48-33.28-37.12H289.28c-19.2 1.28-33.92 17.92-33.28 37.12 0 8.96 3.2 17.92 8.32 24.96l222.72 277.76a30.72 30.72 0 0 0 49.28 0l222.72-277.76c6.4-7.04 8.96-16 8.96-24.96zM768 954.88c1.28 19.2-13.44 36.48-33.28 37.12H289.28a35.52 35.52 0 0 1-33.28-37.12c0-8.96 3.2-17.92 8.32-24.96l222.72-277.76a30.72 30.72 0 0 1 49.28 0l222.72 277.76c6.4 7.04 8.96 16 8.96 24.96zM800 480h64v64h-64zM928 480h64v64h-64zM672 480h64v64h-64zM544 480h64v64h-64zM416 480h64v64h-64zM288 480h64v64h-64zM160 480h64v64h-64zM32 480h64v64h-64z", | ||
fill: "#eee" | ||
}, null, -1)), J1 = [ | ||
G1 | ||
], Q1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M863.153113 702.196507h116.959605a43.887282 43.887282 0 0 1 0 87.774563H863.153113A73.182042 73.182042 0 0 0 789.97107 863.153113v116.959605a43.887282 43.887282 0 0 1-87.774563 0V863.153113A160.956606 160.956606 0 0 1 863.153113 702.196507z m0-380.393014h116.959605a43.887282 43.887282 0 0 0 0-87.774563H863.153113A73.182042 73.182042 0 0 1 789.97107 160.956606V43.887282a43.887282 43.887282 0 0 0-87.774563 0v117.069324a160.846887 160.846887 0 0 0 160.956606 160.846887z m-702.196507 0H43.887282a43.887282 43.887282 0 0 1 0-87.774563h117.069324a73.072324 73.072324 0 0 0 73.072324-73.072324V43.887282a43.887282 43.887282 0 0 1 87.774563 0v117.069324a160.846887 160.846887 0 0 1-160.846887 160.846887z m0 380.393014H43.887282a43.887282 43.887282 0 0 0 0 87.774563h117.069324a73.182042 73.182042 0 0 1 73.072324 73.182043v116.959605a43.887282 43.887282 0 0 0 87.774563 0V863.153113A160.846887 160.846887 0 0 0 160.956606 702.196507z", | ||
fill: "#eee" | ||
}, null, -1)), Z1 = [ | ||
Q1 | ||
], e2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M768.35456 416a256 256 0 1 0-512 0 192 192 0 1 0 0 384v64a256 256 0 0 1-58.88-505.216 320.128 320.128 0 0 1 629.76 0A256.128 256.128 0 0 1 768.35456 864v-64a192 192 0 0 0 0-384z m-512 384h64v64H256.35456v-64z m448 0h64v64h-64v-64z", | ||
fill: "#eee" | ||
}, null, -1)), t2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), J1 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M539.04256 845.248V512.192a32.448 32.448 0 0 0-32-32.192c-17.664 0-32 14.912-32 32.192v333.056l-36.096-36.096a32.192 32.192 0 0 0-45.056 0.192 31.616 31.616 0 0 0-0.192 45.056l90.88 90.944a31.36 31.36 0 0 0 22.528 9.088 30.08 30.08 0 0 0 22.4-9.088l90.88-90.88a32.192 32.192 0 0 0-0.192-45.12 31.616 31.616 0 0 0-45.056-0.192l-36.096 36.096z", | ||
fill: "#eee" | ||
}, null, -1)), i2 = [ | ||
e2, | ||
t2 | ||
], o2 = { | ||
}, null, -1)), Q1 = [ | ||
G1, | ||
J1 | ||
], Z1 = { | ||
key: 0, | ||
class: "navbar-thumbnail__wrap" | ||
}, s2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, e2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M758.656 937.344a32 32 0 1 1-45.31199999 45.312l-448.00000001-448.128a32 32 0 0 1 0-45.248l448.00000001-447.936a32 32 0 1 1 45.31199999 45.312l-425.408 425.28000001L758.656 937.344z", | ||
fill: "#eee" | ||
}, null, -1)), l2 = [ | ||
s2 | ||
], n2 = { class: "navbar-list-group" }, a2 = ["id", "src"], c2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
}, null, -1)), t2 = [ | ||
e2 | ||
], i2 = { class: "navbar-list-group" }, l2 = ["id", "src"], o2 = /* @__PURE__ */ n(() => /* @__PURE__ */ i("path", { | ||
d: "M265.344 86.656a32 32 0 1 1 45.312-45.312l448 448.128a32 32 0 0 1 0 45.248l-448 447.936a32 32 0 1 1-45.312-45.312l425.408-425.28L265.344 86.656z", | ||
fill: "#eee" | ||
}, null, -1)), r2 = [ | ||
c2 | ||
], f2 = /* @__PURE__ */ s1({ | ||
}, null, -1)), s2 = [ | ||
o2 | ||
], p2 = /* @__PURE__ */ i1({ | ||
__name: "index", | ||
@@ -165,3 +168,3 @@ props: { | ||
}, | ||
onClose: { | ||
handleChange: { | ||
type: Function, | ||
@@ -171,2 +174,7 @@ default: () => () => { | ||
}, | ||
handleClose: { | ||
type: Function, | ||
default: () => () => { | ||
} | ||
}, | ||
language: { | ||
@@ -177,110 +185,113 @@ type: String, | ||
}, | ||
emits: ["on-close", "onUpdate:value"], | ||
setup(h, { emit: Y }) { | ||
const g = h, _ = (s = "") => { | ||
const e = z1[g.language]; | ||
emits: ["on-close", "on-change", "onUpdate:value"], | ||
setup(h, { emit: n2 }) { | ||
const u = h, f = (o = "") => { | ||
const e = p1[u.language]; | ||
if (e) { | ||
const { imagev: c } = e; | ||
var t = {}; | ||
return Object.keys(c).forEach((u) => { | ||
t[`imagev.${u}`] = c[u]; | ||
}), t[s]; | ||
return Object.keys(c).forEach((g) => { | ||
t[`imagev.${g}`] = c[g]; | ||
}), t[o]; | ||
} else | ||
return console.warn(`[images-viewer-vue3]:The current language '${g.language}' is not supported`), "unknown"; | ||
return console.warn(`[images-viewer-vue3]:The current language '${u.language}' is not supported`), "unknown"; | ||
}, { | ||
changePageSize: N, | ||
destroyedExe: U, | ||
destroyedExe: T, | ||
resetStyle: y, | ||
downloads: P, | ||
loadImageErrorText: C, | ||
loading: j, | ||
downloads: U, | ||
loadImageErrorText: P, | ||
loading: J, | ||
imageRef: r, | ||
imageVieverWidgetRef: G, | ||
loadImage: T, | ||
imageVieverWidgetRef: Q, | ||
loadImage: F, | ||
errorImage: K, | ||
zoomIn: M, | ||
zoomOut: x, | ||
inevrtY: B, | ||
inevrtX: b, | ||
zoomIn: x, | ||
zoomOut: M, | ||
inevrtY: b, | ||
inevrtX: B, | ||
clockwise: V, | ||
counterclockwise: I, | ||
closeViewer: J, | ||
closeViewer: Z, | ||
prevPage: S, | ||
nextPage: L, | ||
pageData: w, | ||
initPage: Q, | ||
currentPage: Z, | ||
totalPage: e1 | ||
} = m1(g.images), t1 = Y, A = k(""), H = k(!1); | ||
function m(s, e, t = !0) { | ||
X({ | ||
[s]: (c, u) => { | ||
e(), R(c, u, t); | ||
pageData: z, | ||
initPage: a2, | ||
currentPage: $, | ||
totalPage: e1, | ||
currentIndex: v | ||
} = d1(u.images, u.current), A = k(""), H = k(!1); | ||
function p(o, e, t = !0) { | ||
G({ | ||
[o]: (c, g) => { | ||
e(), R(c, g, t); | ||
} | ||
}); | ||
} | ||
m("right", $), m("left", F), m("ctrl+right", L), m("ctrl+left", S), m("ctrl+i+y", B), m("ctrl+i+x", b), m("ctrl+c+r", V), m("ctrl+c+l", I), m("ctrl+z", y), m("esc", W), X({ "ctrl+*": (s, e) => { | ||
switch (s.key) { | ||
p("right", W), p("left", D), p("ctrl+right", L), p("ctrl+left", S), p("ctrl+i+y", b), p("ctrl+i+x", B), p("ctrl+c+r", V), p("ctrl+c+l", I), p("ctrl+z", y), p("esc", O), G({ "ctrl+*": (o, e) => { | ||
switch (o.key) { | ||
case "-": | ||
x(s), R(s, e, !0, "ctrl + " + s.key); | ||
M(o), R(o, e, !0, "ctrl + " + o.key); | ||
break; | ||
case "+": | ||
M(s), R(s, e, !0, "ctrl + " + s.key); | ||
x(o), R(o, e, !0, "ctrl + " + o.key); | ||
break; | ||
} | ||
} }); | ||
function R(s, e, t = !1, c = "") { | ||
t && s.preventDefault(); | ||
const { key: u } = e; | ||
A.value = c || u, H.value = !0, setTimeout(() => { | ||
function R(o, e, t = !1, c = "") { | ||
t && o.preventDefault(); | ||
const { key: g } = e; | ||
A.value = c || g, H.value = !0, setTimeout(() => { | ||
H.value = !1; | ||
}, 2e3); | ||
} | ||
const f = k(""), p = k(0); | ||
l1(() => g.current, (s, e) => { | ||
if (s) { | ||
const t = w.value.findIndex((c) => c === g.current); | ||
t !== -1 && (p.value = t), n1().then((c) => { | ||
if (r.value) | ||
if (g.image === void 0) | ||
r.value.src = s; | ||
else { | ||
const u = g.image.getBoundingClientRect(); | ||
f.value = r.value.src = g.image.src; | ||
const o1 = r.value.getBoundingClientRect(); | ||
O(r.value, u, o1); | ||
} | ||
}), Q(1, 10); | ||
} | ||
const _ = k(""), E = k(-1); | ||
X(() => u.current, (o, e) => { | ||
o && l1().then((t) => { | ||
if (r.value) | ||
if (u.image === void 0) | ||
r.value.src = o; | ||
else { | ||
const c = u.image.getBoundingClientRect(); | ||
_.value = r.value.src = u.image.src; | ||
const g = r.value.getBoundingClientRect(); | ||
j(r.value, c, g); | ||
} | ||
}); | ||
}, { | ||
deep: !0, | ||
immediate: !0 | ||
}), X(() => $.value, (o, e) => { | ||
if (o) { | ||
const t = z.value.findIndex((c) => c.index === E.value); | ||
t === -1 ? v.value = -1 : v.value = t; | ||
} | ||
}); | ||
function F() { | ||
r.value && p.value > 0 && (p.value--, f.value = r.value.src = w.value[p.value]); | ||
function D() { | ||
r.value && v.value > 0 && (v.value--, _.value = r.value.src = z.value[v.value].url, u.handleChange({ image: _.value, index: v.value })); | ||
} | ||
function $() { | ||
r.value && p.value < w.value.length - 1 && (p.value++, f.value = r.value.src = w.value[p.value]); | ||
function W() { | ||
r.value && v.value < z.value.length - 1 && (v.value++, _.value = r.value.src = z.value[v.value].url, u.handleChange({ image: _.value, index: v.value })); | ||
} | ||
const D = p1(i1, 360); | ||
function i1(s) { | ||
if (C.value = "", !!r.value && s.target) { | ||
const e = s.target, t = e.getBoundingClientRect(), c = Number(e.id); | ||
p.value = c, f.value = r.value.src = e.src; | ||
const u = r.value.getBoundingClientRect(); | ||
O(r.value, t, u), g.onUpdateCurrent(e.src, c); | ||
const q = h1(t1, 360); | ||
function t1(o) { | ||
if (P.value = "", !!r.value && o.target) { | ||
const e = o.target, t = e.getBoundingClientRect(); | ||
E.value = Number(e.id), v.value = z.value.findIndex((g) => g.index === E.value), _.value = r.value.src = e.src; | ||
const c = r.value.getBoundingClientRect(); | ||
u.handleChange({ image: _.value, index: v.value }), j(r.value, t, c), u.onUpdateCurrent(e.src, v.value); | ||
} | ||
} | ||
function W() { | ||
U(), g.onClose(), J(), t1("on-close"), f.value = ""; | ||
function O() { | ||
T(), u.handleClose(), Z(), _.value = ""; | ||
} | ||
return a1(() => { | ||
U(); | ||
}), (s, e) => (l(), a("div", { | ||
return o1(() => { | ||
T(); | ||
}), (o, e) => (s(), a("div", { | ||
ref_key: "imageVieverWidgetRef", | ||
ref: G, | ||
class: E([ | ||
ref: Q, | ||
class: C([ | ||
"images-viewer-container__wrap", | ||
{ "is-active": h.visible }, | ||
{ "nav-scroll-style__wrap": !o(q)() } | ||
{ "nav-scroll-style__wrap": !l(Y)() } | ||
]) | ||
@@ -290,9 +301,9 @@ }, [ | ||
class: "image-viewer-close__btn", | ||
onClick: W | ||
}, k1), | ||
i("div", y1, [ | ||
o(C) ? (l(), a("div", C1, [ | ||
i("p", M1, d(o(C)), 1), | ||
i("p", null, d(f.value), 1) | ||
])) : z("", !0), | ||
onClick: O | ||
}, f1), | ||
i("div", z1, [ | ||
l(P) ? (s(), a("div", w1, [ | ||
i("p", k1, m(f("imagev.loadErrorText")), 1), | ||
i("p", null, m(_.value), 1) | ||
])) : w("", !0), | ||
i("img", { | ||
@@ -303,5 +314,5 @@ ref_key: "imageRef", | ||
onLoad: e[0] || (e[0] = //@ts-ignore | ||
(...t) => o(T) && o(T)(...t)), | ||
(...t) => l(F) && l(F)(...t)), | ||
onError: e[1] || (e[1] = //@ts-ignore | ||
(...t) => o(K) && o(K)(...t)), | ||
(...t) => l(K) && l(K)(...t)), | ||
src: "", | ||
@@ -311,24 +322,29 @@ alt: "picture", | ||
}, null, 544), | ||
o(j) ? (l(), c1(f1, { key: 1 })) : z("", !0) | ||
l(J) ? (s(), s1(m1, { key: 1 })) : w("", !0) | ||
]), | ||
h.images.length >= 2 ? (l(), a("div", { | ||
h.images.length >= 2 ? (s(), a("div", { | ||
key: 0, | ||
class: "viewer-previous-icon", | ||
onClick: v(F, ["stop", "prevent"]) | ||
}, B1)) : z("", !0), | ||
h.images.length >= 2 ? (l(), a("div", { | ||
onClick: d(D, ["stop", "prevent"]) | ||
}, y1)) : w("", !0), | ||
h.images.length >= 2 ? (s(), a("div", { | ||
key: 1, | ||
class: "viewer-next-icon", | ||
onClick: v($, ["stop", "prevent"]) | ||
}, V1)) : z("", !0), | ||
i("div", I1, [ | ||
i("div", S1, [ | ||
h.images.length >= 10 ? (l(), a("div", { | ||
onClick: d(W, ["stop", "prevent"]) | ||
}, M1)) : w("", !0), | ||
i("div", b1, [ | ||
i("div", { | ||
class: C([ | ||
"navbar-control__wrap", | ||
{ "padding-b": h.images.length < 2 } | ||
]) | ||
}, [ | ||
h.images.length >= 10 ? (s(), a("div", { | ||
key: 0, | ||
class: E(["pagination-wrap", { position: !o(q)() }]) | ||
class: C(["pagination-wrap", { position: !l(Y)() }]) | ||
}, [ | ||
i("span", null, " " + d(h.images.length) + " " + d(_("imagev.pictures")) + " ", 1), | ||
i("span", null, "/ " + d(o(e1)) + " " + d(_("imagev.page")) + " ", 1), | ||
i("span", null, "/ " + d(_("imagev.current")) + " " + d(o(Z)), 1), | ||
r1(" "), | ||
i("span", null, " " + m(h.images.length) + " " + m(f("imagev.pictures")) + " ", 1), | ||
i("span", null, "/ " + m(l(e1)) + " " + m(f("imagev.page")) + " ", 1), | ||
i("span", null, "/ " + m(f("imagev.current")) + " " + m(l($)), 1), | ||
n1(" "), | ||
i("select", { | ||
@@ -339,15 +355,15 @@ class: "page-size-select", | ||
onChange: e[2] || (e[2] = //@ts-ignore | ||
(...t) => o(N) && o(N)(...t)) | ||
(...t) => l(N) && l(N)(...t)) | ||
}, [ | ||
i("option", L1, "10/" + d(_("imagev.page")), 1), | ||
i("option", A1, "15/" + d(_("imagev.page")), 1), | ||
i("option", H1, "20/" + d(_("imagev.page")), 1), | ||
i("option", R1, "30/" + d(_("imagev.page")), 1) | ||
i("option", B1, "10/" + m(f("imagev.page")), 1), | ||
i("option", V1, "15/" + m(f("imagev.page")), 1), | ||
i("option", I1, "20/" + m(f("imagev.page")), 1), | ||
i("option", S1, "30/" + m(f("imagev.page")), 1) | ||
], 32) | ||
], 2)) : z("", !0), | ||
], 2)) : w("", !0), | ||
i("div", null, [ | ||
(l(), a("svg", { | ||
onClick: e[3] || (e[3] = v( | ||
(s(), a("svg", { | ||
onClick: e[3] || (e[3] = d( | ||
//@ts-ignore | ||
(...t) => o(M) && o(M)(...t), | ||
(...t) => l(x) && l(x)(...t), | ||
["stop", "prevent"] | ||
@@ -359,7 +375,7 @@ )), | ||
height: "25" | ||
}, P1)), | ||
(l(), a("svg", { | ||
onClick: e[4] || (e[4] = v( | ||
}, R1)), | ||
(s(), a("svg", { | ||
onClick: e[4] || (e[4] = d( | ||
//@ts-ignore | ||
(...t) => o(x) && o(x)(...t), | ||
(...t) => l(M) && l(M)(...t), | ||
["stop", "prevent"] | ||
@@ -371,7 +387,7 @@ )), | ||
height: "25" | ||
}, F1)), | ||
(l(), a("svg", { | ||
onClick: e[5] || (e[5] = v( | ||
}, T1)), | ||
(s(), a("svg", { | ||
onClick: e[5] || (e[5] = d( | ||
//@ts-ignore | ||
(...t) => o(I) && o(I)(...t), | ||
(...t) => l(I) && l(I)(...t), | ||
["stop", "prevent"] | ||
@@ -383,7 +399,7 @@ )), | ||
height: "25" | ||
}, W1)), | ||
(l(), a("svg", { | ||
onClick: e[6] || (e[6] = v( | ||
}, F1)), | ||
(s(), a("svg", { | ||
onClick: e[6] || (e[6] = d( | ||
//@ts-ignore | ||
(...t) => o(V) && o(V)(...t), | ||
(...t) => l(V) && l(V)(...t), | ||
["stop", "prevent"] | ||
@@ -395,7 +411,7 @@ )), | ||
height: "25" | ||
}, X1)), | ||
(l(), a("svg", { | ||
onClick: e[7] || (e[7] = v( | ||
}, D1)), | ||
(s(), a("svg", { | ||
onClick: e[7] || (e[7] = d( | ||
//@ts-ignore | ||
(...t) => o(b) && o(b)(...t), | ||
(...t) => l(B) && l(B)(...t), | ||
["stop", "prevent"] | ||
@@ -407,7 +423,7 @@ )), | ||
height: "25" | ||
}, j1)), | ||
(l(), a("svg", { | ||
onClick: e[8] || (e[8] = v( | ||
}, q1)), | ||
(s(), a("svg", { | ||
onClick: e[8] || (e[8] = d( | ||
//@ts-ignore | ||
(...t) => o(B) && o(B)(...t), | ||
(...t) => l(b) && l(b)(...t), | ||
["stop", "prevent"] | ||
@@ -419,7 +435,7 @@ )), | ||
height: "25" | ||
}, J1)), | ||
(l(), a("svg", { | ||
onClick: e[9] || (e[9] = v( | ||
}, X1)), | ||
(s(), a("svg", { | ||
onClick: e[9] || (e[9] = d( | ||
//@ts-ignore | ||
(...t) => o(y) && o(y)(...t), | ||
(...t) => l(y) && l(y)(...t), | ||
["stop", "prevent"] | ||
@@ -431,7 +447,7 @@ )), | ||
height: "20" | ||
}, Z1)), | ||
(l(), a("svg", { | ||
onClick: e[10] || (e[10] = v( | ||
}, j1)), | ||
(s(), a("svg", { | ||
onClick: e[10] || (e[10] = d( | ||
//@ts-ignore | ||
(...t) => o(P) && o(P)(...t), | ||
(...t) => l(U) && l(U)(...t), | ||
["stop", "prevent"] | ||
@@ -443,10 +459,10 @@ )), | ||
height: "25" | ||
}, i2)) | ||
}, Q1)) | ||
]) | ||
]), | ||
h.images.length >= 2 ? (l(), a("div", o2, [ | ||
(l(), a("svg", { | ||
onClick: e[11] || (e[11] = v( | ||
], 2), | ||
h.images.length >= 2 ? (s(), a("div", Z1, [ | ||
(s(), a("svg", { | ||
onClick: e[11] || (e[11] = d( | ||
//@ts-ignore | ||
(...t) => o(S) && o(S)(...t), | ||
(...t) => l(S) && l(S)(...t), | ||
["stop", "prevent"] | ||
@@ -458,20 +474,20 @@ )), | ||
height: "25" | ||
}, l2)), | ||
i("div", n2, [ | ||
(l(!0), a(v1, null, u1(o(w), (t, c) => (l(), a("img", { | ||
id: `${c}`, | ||
class: E(["navbar-image__item", { "nav-active-current__img": p.value === c }]), | ||
}, t2)), | ||
i("div", i2, [ | ||
(s(!0), a(a1, null, c1(l(z), (t, c) => (s(), a("img", { | ||
id: `${t.index}`, | ||
class: C(["navbar-image__item", { "nav-active-current__img": l(v) === c }]), | ||
key: c, | ||
src: t, | ||
onClick: e[12] || (e[12] = v( | ||
src: t.url, | ||
onClick: e[12] || (e[12] = d( | ||
//@ts-ignore | ||
(...u) => o(D) && o(D)(...u), | ||
(...g) => l(q) && l(q)(...g), | ||
["stop", "prevent"] | ||
)) | ||
}, null, 10, a2))), 128)) | ||
}, null, 10, l2))), 128)) | ||
]), | ||
(l(), a("svg", { | ||
onClick: e[13] || (e[13] = v( | ||
(s(), a("svg", { | ||
onClick: e[13] || (e[13] = d( | ||
//@ts-ignore | ||
(...t) => o(L) && o(L)(...t), | ||
(...t) => l(L) && l(L)(...t), | ||
["stop", "prevent"] | ||
@@ -483,6 +499,6 @@ )), | ||
height: "25" | ||
}, r2)) | ||
])) : z("", !0) | ||
}, s2)) | ||
])) : w("", !0) | ||
]), | ||
d1(_1, { | ||
r1(g1, { | ||
hotkey: A.value, | ||
@@ -496,3 +512,3 @@ "onUpdate:hotkey": e[14] || (e[14] = (t) => A.value = t), | ||
export { | ||
f2 as default | ||
p2 as default | ||
}; |
@@ -1,2 +0,2 @@ | ||
export declare const useAction: (images: string[]) => { | ||
export declare const useAction: (images: string[], currentUrl: string) => { | ||
changePageSize: (evt: Event) => void; | ||
@@ -19,3 +19,6 @@ destroyedExe: () => void; | ||
closeViewer: () => void; | ||
pageData: import('vue').Ref<string[]>; | ||
pageData: import('vue').Ref<{ | ||
index: number; | ||
url: string; | ||
}[]>; | ||
prevPage: () => void; | ||
@@ -26,2 +29,3 @@ nextPage: () => void; | ||
totalPage: import('vue').Ref<number>; | ||
currentIndex: import('vue').Ref<number>; | ||
}; |
import B from "./core.js"; | ||
import { downloadExe as D, getUserAgent as T } from "../utils/index.js"; | ||
import { ref as i, onMounted as U } from "vue"; | ||
const b = (h) => { | ||
const u = i(null), o = i(null), r = i(""), s = i(!0), a = B.getInStance(), l = i(1), c = i(10), g = i(0), d = i([]); | ||
function f(t) { | ||
a.horizontalInvert(); | ||
import { downloadExe as U, getUserAgent as W } from "../utils/index.js"; | ||
import { ref as l, onMounted as X } from "vue"; | ||
const F = (i, x) => { | ||
const v = l(null), a = l(null), s = l(""), c = l(!0), o = B.getInStance(), r = l(1), I = l(-1), g = l(10), h = l(0), d = l([]), m = l([]); | ||
function P(e) { | ||
o.horizontalInvert(); | ||
} | ||
function w(t) { | ||
a.verticalInvert(); | ||
function S(e) { | ||
o.verticalInvert(); | ||
} | ||
function p(t) { | ||
a.zoomIn(); | ||
function z(e) { | ||
o.zoomIn(); | ||
} | ||
function x(t) { | ||
a.zoomOut(); | ||
function A(e) { | ||
o.zoomOut(); | ||
} | ||
function I(t) { | ||
a.rotate("+"); | ||
function O(e) { | ||
o.rotate("+"); | ||
} | ||
function y(t) { | ||
a.rotate("-"); | ||
function R(e) { | ||
o.rotate("-"); | ||
} | ||
const P = () => { | ||
a.destroyed(), o.value; | ||
}, z = (t) => { | ||
const C = () => { | ||
o.destroyed(), a.value; | ||
}, D = (e) => { | ||
var n; | ||
const e = (n = o.value) == null ? void 0 : n.src; | ||
D(e); | ||
}, R = () => { | ||
a.destroyed(); | ||
}, C = () => { | ||
a.removeStyleProperty(); | ||
}, E = (t) => { | ||
a.setImage(o.value); | ||
const e = new Image(); | ||
if (e.src = o.value && o.value.src, o.value && u.value) { | ||
const n = u.value.getBoundingClientRect(); | ||
T() ? (o.value.style.width = n.width + "px", o.value.style.height = n.height / 2 + "px") : e.width < n.width && e.height < n.height ? (o.value.style.width = e.width + "px", o.value.style.height = e.height + "px") : (o.value.style.width = n.width / 1.3 + "px", o.value.style.height = n.height / 1.3 + "px"); | ||
const t = (n = a.value) == null ? void 0 : n.src; | ||
U(t); | ||
}, E = () => { | ||
v.value = null, a.value = null, s.value = "", c.value = !0, r.value = 1, I.value = -1, g.value = 10, h.value = 0, d.value = [], m.value = []; | ||
}, V = () => { | ||
o.removeStyleProperty(); | ||
}, k = (e) => { | ||
o.setImage(a.value); | ||
const t = new Image(); | ||
if (t.src = a.value && a.value.src, a.value && v.value) { | ||
const n = v.value.getBoundingClientRect(); | ||
W() ? (a.value.style.width = n.width + "px", a.value.style.height = n.height / 2 + "px") : t.width < n.width && t.height < n.height ? (a.value.style.width = t.width + "px", a.value.style.height = t.height + "px") : (a.value.style.width = n.width / 1.3 + "px", a.value.style.height = n.height / 1.3 + "px"); | ||
} | ||
r.value = "", s.value = !1; | ||
}, S = (t) => { | ||
s.value = !1, r.value = "加载图片失败,请仔细检测图片地址!"; | ||
}, V = () => { | ||
l.value > 1 && (l.value--, v(l.value, c.value)); | ||
}, k = () => { | ||
l.value < g.value && (l.value++, v(l.value, c.value)); | ||
}, A = (t, e) => { | ||
l.value = t, c.value = e, v(t, e); | ||
}, v = (t, e) => { | ||
var n = h.length; | ||
g.value = Math.ceil(n / e); | ||
var m = e * (t - 1), O = m + e; | ||
d.value = h.slice(m, O); | ||
}, M = (t) => { | ||
const { value: e } = t.target; | ||
v(1, +e); | ||
}; | ||
return v(1, 10), U(() => { | ||
s.value = "", c.value = !1; | ||
}, J = (e) => { | ||
c.value = !1, s.value = "加载图片失败,请仔细检测图片地址!"; | ||
}, M = () => { | ||
r.value > 1 && (r.value--, f(r.value, g.value)); | ||
}, N = () => { | ||
r.value < h.value && (r.value++, f(r.value, g.value)); | ||
}, p = (e, t) => { | ||
r.value = e, g.value = t, f(e, t); | ||
}, f = (e, t) => { | ||
var n = m.value.length; | ||
h.value = Math.ceil(n / t); | ||
var w = t * (e - 1), u = w + t; | ||
d.value = m.value.slice(w, u), I.value = d.value.findIndex((y) => y.url === x); | ||
}, T = (e) => { | ||
const { value: t } = e.target; | ||
f(1, +t); | ||
}, j = () => new Promise((e, t) => { | ||
if (Array.isArray(i) && i.length > 0) { | ||
const n = i.filter((u) => u == null || u === ""), w = i.filter((u) => u).map((u, y) => ({ | ||
index: y, | ||
url: u | ||
})); | ||
n.length && console.warn(`images-viewer-vue3:The image parameter 'images' contains illegal characters:[${JSON.stringify(n)}]`), e({ data: w }); | ||
} else e({ data: [] }); | ||
}); | ||
return (async () => { | ||
await j().then((e) => { | ||
m.value = e.data; | ||
}).catch((e) => { | ||
console.log("images-viewer-vue3:", JSON.stringify(e)); | ||
}), p(1, 10); | ||
})(), X(() => { | ||
}), { | ||
changePageSize: M, | ||
destroyedExe: R, | ||
resetStyle: C, | ||
downloads: z, | ||
loadImageErrorText: r, | ||
loading: s, | ||
errorImage: S, | ||
loadImage: E, | ||
imageRef: o, | ||
imageVieverWidgetRef: u, | ||
inevrtY: f, | ||
inevrtX: w, | ||
zoomIn: p, | ||
zoomOut: x, | ||
clockwise: I, | ||
counterclockwise: y, | ||
closeViewer: P, | ||
changePageSize: T, | ||
destroyedExe: E, | ||
resetStyle: V, | ||
downloads: D, | ||
loadImageErrorText: s, | ||
loading: c, | ||
errorImage: J, | ||
loadImage: k, | ||
imageRef: a, | ||
imageVieverWidgetRef: v, | ||
inevrtY: P, | ||
inevrtX: S, | ||
zoomIn: z, | ||
zoomOut: A, | ||
clockwise: O, | ||
counterclockwise: R, | ||
closeViewer: C, | ||
pageData: d, | ||
prevPage: V, | ||
nextPage: k, | ||
initPage: A, | ||
currentPage: l, | ||
totalPage: g | ||
prevPage: M, | ||
nextPage: N, | ||
initPage: p, | ||
currentPage: r, | ||
totalPage: h, | ||
currentIndex: I | ||
}; | ||
}; | ||
export { | ||
b as useAction | ||
F as useAction | ||
}; |
@@ -7,3 +7,4 @@ import { App } from 'vue'; | ||
declare function onClose(): void; | ||
declare function onUpdate(fn?: Function): void; | ||
declare const ImageViewerVue3: import('vue').DefineComponent<{}, {}, any>; | ||
export { imageViewerApi, VImageViewer, ImageViewerVue3, onClose }; | ||
export { imageViewerApi, VImageViewer, ImageViewerVue3, onClose, onUpdate }; |
@@ -1,16 +0,17 @@ | ||
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-f696c6e5]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-f696c6e5]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-f696c6e5]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-f696c6e5]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-f696c6e5]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-f696c6e5]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5],.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-f696c6e5]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-f696c6e5]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-f696c6e5]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-f696c6e5]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-f696c6e5]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-f696c6e5]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-f696c6e5]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-f696c6e5]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-f696c6e5]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-f696c6e5]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-f696c6e5]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-f696c6e5]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]:hover{opacity:1}.cus-transition[data-v-f696c6e5]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-f696c6e5]{border:1px solid var(--active-icon-color);opacity:1!important}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();import { createVNode as t, render as a } from "vue"; | ||
import n from "./components/viewer.vue.js"; | ||
import d from "./components/index.vue.js"; | ||
import g from "./directive/v-image-viewer.js"; | ||
import s from "./components/core.js"; | ||
import { versions as c } from "./utils/index.js"; | ||
let m; | ||
const r = s.getInStance(); | ||
function p(e, i) { | ||
i && r.setConfigOptions(i), console.log(`images-viewer-vue3_v${c}`), e.directive("image-viewer", g), e.component("ImagesViewerVue3", n), e.config.globalProperties.$imageViewerApi = l; | ||
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-3d327580]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-3d327580]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-3d327580]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-3d327580]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-3d327580]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-3d327580]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580],.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-3d327580]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-3d327580]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-3d327580]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-3d327580]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-3d327580]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-3d327580]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-3d327580]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-3d327580]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-3d327580]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap.padding-b[data-v-3d327580]{padding-bottom:.2rem}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-3d327580]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-3d327580]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-3d327580]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]:hover{opacity:1}.cus-transition[data-v-3d327580]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-3d327580]{border:1px solid var(--active-icon-color);opacity:1!important}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();import { createVNode as g, render as c } from "vue"; | ||
import m from "./components/viewer.vue.js"; | ||
import l from "./components/index.vue.js"; | ||
import s from "./directive/v-image-viewer.js"; | ||
import u from "./components/core.js"; | ||
import { versions as f } from "./utils/index.js"; | ||
let n; | ||
const r = u.getInStance(); | ||
var t; | ||
function x(e, i) { | ||
i && r.setConfigOptions(i), console.log(`images-viewer-vue3_v${f}`), e.directive("image-viewer", s), e.component("ImagesViewerVue3", m), e.config.globalProperties.$imageViewerApi = v; | ||
} | ||
function l(e) { | ||
function v(e) { | ||
const i = r.getConfigOptions(); | ||
var o = null; | ||
o ? o && document.body.removeChild(o) : (m = t(d, { | ||
o ? o && document.body.removeChild(o) : (n = g(l, { | ||
visible: !0, | ||
@@ -23,18 +24,25 @@ current: e.current, | ||
language: i.language || "zh", | ||
onClose: () => { | ||
o && document.body.removeChild(o); | ||
handleChange: ({ image: a, index: d }) => { | ||
t(a, d); | ||
}, | ||
handleClose: () => { | ||
w(); | ||
} | ||
}), o = document.createElement("div"), o.style.zIndex = i.zIndex + "", o.classList.add("image-viewer-vue3__root"), a(m, o), document.body.appendChild(o)); | ||
}), o = document.createElement("div"), o.style.zIndex = i.zIndex + "", o.classList.add("image-viewer-vue3__root"), c(n, o), document.body.appendChild(o)); | ||
} | ||
function C() { | ||
function w() { | ||
const e = document.querySelector(".image-viewer-vue3__root"); | ||
e && document.body.removeChild(e), r.destroyed(); | ||
} | ||
const y = n; | ||
function y(e) { | ||
e && (t = e); | ||
} | ||
const b = m; | ||
export { | ||
y as ImageViewerVue3, | ||
g as VImageViewer, | ||
p as default, | ||
l as imageViewerApi, | ||
C as onClose | ||
b as ImageViewerVue3, | ||
s as VImageViewer, | ||
x as default, | ||
v as imageViewerApi, | ||
w as onClose, | ||
y as onUpdate | ||
}; |
@@ -6,4 +6,5 @@ declare const _default: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
}; | ||
export default _default; |
@@ -5,3 +5,4 @@ const e = { | ||
page: "Page", | ||
current: "Current page" | ||
current: "Current page", | ||
loadErrorText: "Failed to load the image, please check the image access path carefully!" | ||
} | ||
@@ -8,0 +9,0 @@ }; |
@@ -7,2 +7,3 @@ export declare const messages: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
@@ -15,2 +16,3 @@ }; | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
@@ -17,0 +19,0 @@ }; |
@@ -6,4 +6,5 @@ declare const _default: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
}; | ||
export default _default; |
@@ -5,3 +5,4 @@ const e = { | ||
page: "页", | ||
current: "当前页" | ||
current: "当前页", | ||
loadErrorText: "加载图片失败,请仔细检测图片访问路径!" | ||
} | ||
@@ -8,0 +9,0 @@ }; |
@@ -27,2 +27,11 @@ type fromType = 'api' | 'directive' | 'component'; | ||
} | ||
export type ImageObjectTypes = { | ||
index: number; | ||
url: string; | ||
}; | ||
export type AsyncSetImageReturnType = Promise<{ | ||
data: ImageObjectTypes[]; | ||
} | { | ||
data: []; | ||
}>; | ||
export {}; |
@@ -19,2 +19,2 @@ /** | ||
export declare const getUserAgent: () => boolean; | ||
export declare const versions = "1.0.9"; | ||
export declare const versions = "1.0.10"; |
@@ -23,3 +23,3 @@ const c = (t, n) => { | ||
return n && (e = !0), ("ontouchstart" in window || navigator.maxTouchPoints > 0) && (e = !0), e; | ||
}, u = "1.0.9"; | ||
}, u = "1.0.10"; | ||
export { | ||
@@ -26,0 +26,0 @@ c as debounce, |
@@ -1,1 +0,1 @@ | ||
"use strict";var g=Object.defineProperty;var m=(c,e,t)=>e in c?g(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t;var a=(c,e,t)=>m(c,typeof e!="symbol"?e+"":e,t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=class l{constructor(){a(this,"currentImage",null);a(this,"totalRotate",0);a(this,"isMouseDown",!1);a(this,"config",{scaleRatio:1,rotateRatio:90,isEnableDrag:!0,isEnableWheel:!0,zIndex:2e3,language:"zh"})}static getInStance(){return!this.viewer&&(this.viewer=new l),this.viewer.initialize(),this.viewer}initialize(){this.config.isEnableWheel&&window.addEventListener("wheel",this.onWheel.bind(this))}onWheel(e){e.deltaY<0&&this.zoomIn(),e.deltaY>=0&&this.zoomOut()}setConfigOptions(e){this.config=Object.assign(this.config,e)}getConfigOptions(){return this.config}horizontalInvert(){this.setInvert("scaleY")}verticalInvert(){this.setInvert("scaleX")}setInvert(e="scaleX"){if(!e||!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp(`${e}\\(([^)]+)\\)`);if(s.test(t)){const o=t.match(s),i=(o&&parseInt(o[1]))===1?-1:1;t=t.replace(s,`${e}(${i})`)}else t+=` ${e}(-1)`;this.currentImage.style.transform=t}zoomIn(){this.setZoom("+")}zoomOut(){this.setZoom("-")}rotate(e="+"){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("rotate\\(([^)]+)\\)","i");s.test(t)?(e==="+"?this.totalRotate+=this.config.rotateRatio:this.totalRotate-=this.config.rotateRatio,t=t.replace(s,`rotate(${this.totalRotate}deg)`)):(e==="+"?this.totalRotate=this.config.rotateRatio:this.totalRotate=-this.config.rotateRatio,t+=` rotate(${this.totalRotate}deg)`),this.currentImage.style.transform=t}setZoom(e="+"){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("scale\\(([^)]+)\\)","i");s.test(t)?(e==="+"?this.config.scaleRatio+=.1:this.config.scaleRatio>=.3&&(this.config.scaleRatio-=.1),t=t.replace(s,`scale(${this.config.scaleRatio})`)):(e==="+"?this.config.scaleRatio+=.1:this.config.scaleRatio>=.3&&(this.config.scaleRatio-=.1),t+=` scale(${this.config.scaleRatio})`),this.currentImage.style.transform=t}setImage(e){this.currentImage=e,this.currentImage&&this.config.isEnableDrag&&(this.currentImage.onmousedown=this.onMouseMove.bind(this),this.currentImage.ontouchstart=this.onTouchstart.bind(this))}onMouseMove(e){if(!this.currentImage)return;const t=this;this.isMouseDown=!0,this.currentImage.style.position="absolute";const s=e.clientX-this.currentImage.offsetLeft,o=e.clientY-this.currentImage.offsetTop;return document.onmousemove=function(n){if(n=n||window.event,t.isMouseDown){let i=n.clientX-s,r=n.clientY-o;t.currentImage&&(t.currentImage.style.left=`${i}px`),t.currentImage&&(t.currentImage.style.top=`${r}px`)}},document.onmouseup=function(){t.isMouseDown=!1,document.onmousemove=null,document.onmouseup=null},!1}onTouchstart(e){if(!this.currentImage)return;console.log(e,"onTouchstart");const t=this;this.isMouseDown=!0;const s=e.touches[0];this.currentImage.style.position="absolute";const o=s.clientX-this.currentImage.offsetLeft,n=s.clientY-this.currentImage.offsetTop;e.touches.length===2&&(this.config.scaleRatio=this.getDistance(e.touches[0],e.touches[1])),document.ontouchmove=function(i){if(t.isMouseDown){const r=i.touches[0];let u=r.clientX-o,f=r.clientY-n;t.currentImage&&(t.currentImage.style.left=`${u}px`),t.currentImage&&(t.currentImage.style.top=`${f}px`)}if(i.touches.length===2&&t.config.scaleRatio){const r=t.getDistance(i.touches[0],i.touches[1]),u=r/t.config.scaleRatio;r>t.config.scaleRatio,t.setMobileZoom(u),i.preventDefault()}},document.ontouchend=function(){t.isMouseDown=!1},document.ontouchcancel=function(){t.isMouseDown=!1}}setMobileZoom(e=0){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("scale\\(([^)]+)\\)","i");s.test(t)?t=t.replace(s,`scale(${e})`):t+=` scale(${e})`,this.currentImage.style.transform=t}getDistance(e,t){const s=t.clientX-e.clientX,o=t.clientY-e.clientY;return Math.sqrt(s*s+o*o)}static addTotal(){this.total+=3}removeStyleProperty(){this.currentImage&&(this.currentImage.style.removeProperty("top"),this.currentImage.style.removeProperty("left"),this.currentImage.style.removeProperty("position"),this.currentImage.style.removeProperty("transform"))}destroyed(){window.removeEventListener("wheel",this.onWheel.bind(this)),this.removeStyleProperty(),this.currentImage=null}};a(l,"viewer"),a(l,"total",0);let h=l;exports.default=h; | ||
"use strict";var g=Object.defineProperty;var m=(c,e,t)=>e in c?g(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t;var a=(c,e,t)=>m(c,typeof e!="symbol"?e+"":e,t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=class l{constructor(){a(this,"currentImage",null);a(this,"totalRotate",0);a(this,"isMouseDown",!1);a(this,"config",{scaleRatio:1,rotateRatio:90,isEnableDrag:!0,isEnableWheel:!0,zIndex:2e3,language:"zh"})}static getInStance(){return!this.viewer&&(this.viewer=new l),this.viewer.initialize(),this.viewer}initialize(){this.config.isEnableWheel&&window.addEventListener("wheel",this.onWheel.bind(this))}onWheel(e){e.deltaY<0&&this.zoomIn(),e.deltaY>=0&&this.zoomOut()}setConfigOptions(e){this.config=Object.assign(this.config,e)}getConfigOptions(){return this.config}horizontalInvert(){this.setInvert("scaleY")}verticalInvert(){this.setInvert("scaleX")}setInvert(e="scaleX"){if(!e||!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp(`${e}\\(([^)]+)\\)`);if(s.test(t)){const o=t.match(s),i=(o&&parseInt(o[1]))===1?-1:1;t=t.replace(s,`${e}(${i})`)}else t+=` ${e}(-1)`;this.currentImage.style.transform=t}zoomIn(){this.setZoom("+")}zoomOut(){this.setZoom("-")}rotate(e="+"){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("rotate\\(([^)]+)\\)","i");s.test(t)?(e==="+"?this.totalRotate+=this.config.rotateRatio:this.totalRotate-=this.config.rotateRatio,t=t.replace(s,`rotate(${this.totalRotate}deg)`)):(e==="+"?this.totalRotate=this.config.rotateRatio:this.totalRotate=-this.config.rotateRatio,t+=` rotate(${this.totalRotate}deg)`),this.currentImage.style.transform=t}setZoom(e="+"){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("scale\\(([^)]+)\\)","i");s.test(t)?(e==="+"?this.config.scaleRatio+=.1:this.config.scaleRatio>=.3&&(this.config.scaleRatio-=.1),t=t.replace(s,`scale(${this.config.scaleRatio})`)):(e==="+"?this.config.scaleRatio+=.1:this.config.scaleRatio>=.3&&(this.config.scaleRatio-=.1),t+=` scale(${this.config.scaleRatio})`),this.currentImage.style.transform=t}setImage(e){this.currentImage=e,this.currentImage&&this.config.isEnableDrag&&(this.currentImage.onmousedown=this.onMouseMove.bind(this),this.currentImage.ontouchstart=this.onTouchstart.bind(this))}onMouseMove(e){if(!this.currentImage)return;const t=this;this.isMouseDown=!0,this.currentImage.style.position="absolute";const s=e.clientX-this.currentImage.offsetLeft,o=e.clientY-this.currentImage.offsetTop;return document.onmousemove=function(n){if(n=n||window.event,t.isMouseDown){let i=n.clientX-s,r=n.clientY-o;t.currentImage&&(t.currentImage.style.left=`${i}px`),t.currentImage&&(t.currentImage.style.top=`${r}px`)}},document.onmouseup=function(){t.isMouseDown=!1,document.onmousemove=null,document.onmouseup=null},!1}onTouchstart(e){if(!this.currentImage)return;console.log(e,"onTouchstart");const t=this;this.isMouseDown=!0;const s=e.touches[0];this.currentImage.style.position="absolute";const o=s.clientX-this.currentImage.offsetLeft,n=s.clientY-this.currentImage.offsetTop;e.touches.length===2&&(this.config.scaleRatio=this.getDistance(e.touches[0],e.touches[1])),document.ontouchmove=function(i){if(t.isMouseDown){const r=i.touches[0];let u=r.clientX-o,f=r.clientY-n;t.currentImage&&(t.currentImage.style.left=`${u}px`),t.currentImage&&(t.currentImage.style.top=`${f}px`)}if(i.touches.length===2&&t.config.scaleRatio){const r=t.getDistance(i.touches[0],i.touches[1]),u=r/t.config.scaleRatio;r>t.config.scaleRatio,t.setMobileZoom(u),i.preventDefault()}},document.ontouchend=function(){t.isMouseDown=!1},document.ontouchcancel=function(){t.isMouseDown=!1}}setMobileZoom(e=0){if(!this.currentImage)return;let t=this.currentImage.style.transform;const s=new RegExp("scale\\(([^)]+)\\)","i");s.test(t)?t=t.replace(s,`scale(${e})`):t+=` scale(${e})`,this.currentImage.style.transform=t}getDistance(e,t){const s=t.clientX-e.clientX,o=t.clientY-e.clientY;return Math.sqrt(s*s+o*o)}static addTotal(){this.total+=3}removeStyleProperty(){this.currentImage&&(this.currentImage.style.removeProperty("top"),this.currentImage.style.removeProperty("left"),this.currentImage.style.removeProperty("position"),this.currentImage.style.removeProperty("transform"),this.currentImage=null)}destroyed(){window.removeEventListener("wheel",this.onWheel.bind(this)),this.removeStyleProperty(),this.currentImage=null}};a(l,"viewer"),a(l,"total",0);let h=l;exports.default=h; |
@@ -33,6 +33,10 @@ declare const _default: import('vue').DefineComponent<{ | ||
}; | ||
onClose: { | ||
handleChange: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
handleClose: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
language: { | ||
@@ -44,2 +48,3 @@ type: StringConstructor; | ||
"on-close": (...args: any[]) => void; | ||
"on-change": (...args: any[]) => void; | ||
"onUpdate:value": (...args: any[]) => void; | ||
@@ -78,6 +83,10 @@ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{ | ||
}; | ||
onClose: { | ||
handleChange: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
handleClose: { | ||
type: FunctionConstructor; | ||
default: () => () => void; | ||
}; | ||
language: { | ||
@@ -89,2 +98,3 @@ type: StringConstructor; | ||
"onOn-close"?: ((...args: any[]) => any) | undefined; | ||
"onOn-change"?: ((...args: any[]) => any) | undefined; | ||
"onOnUpdate:value"?: ((...args: any[]) => any) | undefined; | ||
@@ -98,5 +108,6 @@ }, { | ||
onUpdateCurrent: Function; | ||
onClose: Function; | ||
handleChange: Function; | ||
handleClose: Function; | ||
language: string; | ||
}, {}>; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-f696c6e5"]]);exports.default=u; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-3d327580"]]);exports.default=u; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),G=require("./useAction.js"),C=require("../utils/index.js"),q=require("./flip-animate.js"),J=require("./HotKeys.vue.js"),Q=require("./Loading.vue.js"),P=require("../utils/hotkeys.js"),Z=require("../langs/index.js"),l=c=>(e.pushScopeId("data-v-f696c6e5"),c=c(),e.popScopeId(),c),e1=l(()=>e.createElementVNode("svg",{class:"close-icon icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M835.2 854.4c-12.8 0-22.4-3.2-32-12.8L211.2 256C192 240 192 211.2 208 195.2s44.8-16 60.8 0L864 780.8c16 16 16 44.8 0 60.8-6.4 9.6-16 12.8-28.8 12.8z",fill:"#eee"}),e.createElementVNode("path",{d:"M236.8 848c-12.8 0-22.4-3.2-32-12.8-16-16-16-44.8 0-60.8l604.8-576c16-16 44.8-16 60.8 0s16 44.8 0 60.8l-604.8 576c-9.6 9.6-19.2 12.8-28.8 12.8z",fill:"#eee"})],-1)),t1=[e1],o1={class:"inner-image-wrap"},n1={key:0},l1={style:{color:"orange","text-decoration":"solid"}},i1=l(()=>e.createElementVNode("svg",{class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M758.656 937.344a32 32 0 1 1-45.31199999 45.312l-448.00000001-448.128a32 32 0 0 1 0-45.248l448.00000001-447.936a32 32 0 1 1 45.31199999 45.312l-425.408 425.28000001L758.656 937.344z",fill:"#eee"})],-1)),s1=[i1],r1=l(()=>e.createElementVNode("svg",{class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M265.344 86.656a32 32 0 1 1 45.312-45.312l448 448.128a32 32 0 0 1 0 45.248l-448 447.936a32 32 0 1 1-45.312-45.312l425.408-425.28L265.344 86.656z",fill:"#eee"})],-1)),c1=[r1],a1={class:"nav-image-viewer__wrap"},u1={class:"navbar-control__wrap"},d1={value:"10",selected:""},v1={value:"15"},m1={value:"20"},h1={value:"30"},g1=l(()=>e.createElementVNode("path",{d:"M476.48 903.36C248.96 903.36 64 718.4 64 491.2S248.96 78.72 476.48 78.72s412.48 184.96 412.48 412.48-185.28 412.16-412.48 412.16z m0-741.12c-181.44 0-328.96 147.52-328.96 328.96s147.52 328.96 328.96 328.96 328.96-147.52 328.96-328.96S657.6 162.24 476.48 162.24z",fill:"#eee"},null,-1)),p1=l(()=>e.createElementVNode("path",{d:"M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM643.84 532.8H309.12c-23.04 0-41.6-18.56-41.6-41.6s18.56-41.6 41.6-41.6h334.72c23.04 0 41.6 18.56 41.6 41.6s-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),f1=l(()=>e.createElementVNode("path",{d:"M476.48 700.16c-23.04 0-41.6-18.56-41.6-41.6V323.84c0-23.04 18.56-41.6 41.6-41.6s41.6 18.56 41.6 41.6v334.72c0 23.04-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),_1=[g1,p1,f1],k1=l(()=>e.createElementVNode("path",{d:"M485.76 921.92C253.12 921.92 64 732.8 64 500.48 64 267.84 253.12 78.72 485.76 78.72s421.76 189.12 421.76 421.76c-0.32 232.32-189.44 421.44-421.76 421.44z m0-759.68c-186.56 0-338.24 151.68-338.24 338.24s151.68 338.24 338.24 338.24 338.24-151.68 338.24-338.24S672 162.24 485.76 162.24z",fill:"#eee"},null,-1)),z1=l(()=>e.createElementVNode("path",{d:"M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM657.28 542.08H314.24c-23.04 0-41.6-18.56-41.6-41.6 0-23.04 18.56-41.6 41.6-41.6h343.04c23.04 0 41.6 18.56 41.6 41.6 0 23.04-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),E1=[k1,z1],V1=l(()=>e.createElementVNode("path",{d:"M981.675 313.572c-25.714-60.758-62.464-115.257-109.227-162.02S771.186 68.039 710.428 42.325C647.51 15.815 580.836 2.275 512 2.275s-135.51 13.54-198.428 40.05c-60.758 25.714-115.257 62.464-162.02 109.227-25.486 25.486-48.014 53.248-67.356 83.172V188.87c0-22.528-18.432-40.96-40.96-40.96s-40.96 18.432-40.96 40.96v327.68c0 22.528 18.432 40.96 40.96 40.96s40.96-18.432 40.96-40.96v-57.116c4.778-39.595 15.018-78.166 30.72-115.143 21.731-51.314 52.792-97.394 92.387-136.989s85.675-70.77 136.989-92.387C397.426 92.5 453.86 81.01 512 81.01c58.254 0 114.688 11.378 167.708 33.906 51.314 21.731 97.394 52.792 136.989 92.387s70.77 85.675 92.387 136.989C931.5 397.426 942.99 453.86 942.99 512c0 58.254-11.378 114.688-33.906 167.708-21.731 51.314-52.792 97.394-92.387 136.989s-85.675 70.77-136.989 92.387C626.574 931.5 570.14 942.99 512 942.99c-73.5 0-146.09-18.773-209.806-54.386-61.895-34.588-114.802-84.309-153.145-144.042-11.72-18.318-36.068-23.666-54.386-11.833-18.318 11.719-23.666 36.067-11.833 54.386 45.284 70.542 107.862 129.365 181.02 170.211 75.322 42.098 161.224 64.398 248.15 64.398 68.836 0 135.51-13.54 198.428-40.05 60.758-25.713 115.257-62.463 162.02-109.226 46.763-46.763 83.513-101.262 109.227-162.02 26.51-62.919 40.05-129.592 40.05-198.428s-13.54-135.51-40.05-198.428z",fill:"#eee"},null,-1)),w1=l(()=>e.createElementVNode("path",{d:"M242.802 584.249c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z",fill:"#eee"},null,-1)),B1=[V1,w1],y1=l(()=>e.createElementVNode("path",{d:"M512 1021.724c-68.836 0-135.51-13.54-198.428-40.05-60.758-25.713-115.257-62.463-162.02-109.226S68.039 771.186 42.325 710.428C15.815 647.51 2.275 580.836 2.275 512s13.54-135.51 40.05-198.428c25.714-60.758 62.464-115.257 109.227-162.02s101.262-83.513 162.02-109.227C376.49 15.815 443.164 2.275 512 2.275s135.51 13.54 198.428 40.05c60.758 25.714 115.257 62.464 162.02 109.227s83.513 101.262 109.227 162.02c26.51 62.919 40.05 129.592 40.05 198.428 0 21.732-17.636 39.367-39.368 39.367S942.99 533.732 942.99 512c0-58.254-11.378-114.688-33.906-167.708-21.731-51.314-52.792-97.394-92.387-136.989s-85.675-70.77-136.989-92.387C626.574 92.5 570.14 81.01 512 81.01c-58.254 0-114.688 11.378-167.708 33.906-51.314 21.731-97.394 52.792-136.989 92.387s-70.77 85.675-92.387 136.989C92.5 397.426 81.01 453.86 81.01 512c0 58.254 11.378 114.688 33.906 167.708 21.731 51.314 52.792 97.394 92.387 136.989s85.675 70.77 136.989 92.387C397.426 931.5 453.86 942.99 512 942.99c73.5 0 146.09-18.773 209.806-54.386 61.895-34.588 114.802-84.309 153.145-144.042 11.72-18.318 36.068-23.666 54.386-11.833 18.318 11.719 23.666 36.067 11.833 54.386-45.284 70.542-107.862 129.365-181.02 170.211-75.322 42.098-161.224 64.398-248.15 64.398z",fill:"#eee"},null,-1)),M1=l(()=>e.createElementVNode("path",{d:"M980.764 557.511c-22.528 0-40.96-18.432-40.96-40.96v-327.68c0-22.528 18.432-40.96 40.96-40.96s40.96 18.432 40.96 40.96v327.68c0 22.528-18.432 40.96-40.96 40.96zM242.802 584.25c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z",fill:"#eee"},null,-1)),N1=[y1,M1],C1=l(()=>e.createElementVNode("path",{d:"M573.248 832v88h-96V832h96zM128 224a64 64 0 0 1 45.248 18.752l229.504 229.504a64 64 0 0 1 0 90.496l-229.504 229.504A64 64 0 0 1 64 747.008V288a64 64 0 0 1 64-64z m781.248-5.504a64 64 0 0 1 63.552 56.576l0.448 7.424v459.008a64 64 0 0 1-103.232 50.56l-6.016-5.312-229.504-229.504a64 64 0 0 1-5.312-84.48l5.312-6.016L864 237.248a64 64 0 0 1 45.248-18.752zM128 288v459.008l229.504-229.504L128 288z m445.248 368v88h-96V656h96z m0-176v88h-96V480h96z m0-176v88h-96V304h96z m0-176v88h-96V128h96z",fill:"#eee"},null,-1)),x1=[C1],S1=l(()=>e.createElementVNode("path",{d:"M660.48 106.24L512 291.84l-149.12-185.6h297.6M768 69.12c1.28-19.2-13.44-36.48-33.28-37.12H289.28c-19.2 1.28-33.92 17.92-33.28 37.12 0 8.96 3.2 17.92 8.32 24.96l222.72 277.76a30.72 30.72 0 0 0 49.28 0l222.72-277.76c6.4-7.04 8.96-16 8.96-24.96zM768 954.88c1.28 19.2-13.44 36.48-33.28 37.12H289.28a35.52 35.52 0 0 1-33.28-37.12c0-8.96 3.2-17.92 8.32-24.96l222.72-277.76a30.72 30.72 0 0 1 49.28 0l222.72 277.76c6.4 7.04 8.96 16 8.96 24.96zM800 480h64v64h-64zM928 480h64v64h-64zM672 480h64v64h-64zM544 480h64v64h-64zM416 480h64v64h-64zM288 480h64v64h-64zM160 480h64v64h-64zM32 480h64v64h-64z",fill:"#eee"},null,-1)),b1=[S1],A1=l(()=>e.createElementVNode("path",{d:"M863.153113 702.196507h116.959605a43.887282 43.887282 0 0 1 0 87.774563H863.153113A73.182042 73.182042 0 0 0 789.97107 863.153113v116.959605a43.887282 43.887282 0 0 1-87.774563 0V863.153113A160.956606 160.956606 0 0 1 863.153113 702.196507z m0-380.393014h116.959605a43.887282 43.887282 0 0 0 0-87.774563H863.153113A73.182042 73.182042 0 0 1 789.97107 160.956606V43.887282a43.887282 43.887282 0 0 0-87.774563 0v117.069324a160.846887 160.846887 0 0 0 160.956606 160.846887z m-702.196507 0H43.887282a43.887282 43.887282 0 0 1 0-87.774563h117.069324a73.072324 73.072324 0 0 0 73.072324-73.072324V43.887282a43.887282 43.887282 0 0 1 87.774563 0v117.069324a160.846887 160.846887 0 0 1-160.846887 160.846887z m0 380.393014H43.887282a43.887282 43.887282 0 0 0 0 87.774563h117.069324a73.182042 73.182042 0 0 1 73.072324 73.182043v116.959605a43.887282 43.887282 0 0 0 87.774563 0V863.153113A160.846887 160.846887 0 0 0 160.956606 702.196507z",fill:"#eee"},null,-1)),I1=[A1],D1=l(()=>e.createElementVNode("path",{d:"M768.35456 416a256 256 0 1 0-512 0 192 192 0 1 0 0 384v64a256 256 0 0 1-58.88-505.216 320.128 320.128 0 0 1 629.76 0A256.128 256.128 0 0 1 768.35456 864v-64a192 192 0 0 0 0-384z m-512 384h64v64H256.35456v-64z m448 0h64v64h-64v-64z",fill:"#eee"},null,-1)),L1=l(()=>e.createElementVNode("path",{d:"M539.04256 845.248V512.192a32.448 32.448 0 0 0-32-32.192c-17.664 0-32 14.912-32 32.192v333.056l-36.096-36.096a32.192 32.192 0 0 0-45.056 0.192 31.616 31.616 0 0 0-0.192 45.056l90.88 90.944a31.36 31.36 0 0 0 22.528 9.088 30.08 30.08 0 0 0 22.4-9.088l90.88-90.88a32.192 32.192 0 0 0-0.192-45.12 31.616 31.616 0 0 0-45.056-0.192l-36.096 36.096z",fill:"#eee"},null,-1)),H1=[D1,L1],R1={key:0,class:"navbar-thumbnail__wrap"},q1=l(()=>e.createElementVNode("path",{d:"M758.656 937.344a32 32 0 1 1-45.31199999 45.312l-448.00000001-448.128a32 32 0 0 1 0-45.248l448.00000001-447.936a32 32 0 1 1 45.31199999 45.312l-425.408 425.28000001L758.656 937.344z",fill:"#eee"},null,-1)),P1=[q1],T1={class:"navbar-list-group"},U1=["id","src"],K1=l(()=>e.createElementVNode("path",{d:"M265.344 86.656a32 32 0 1 1 45.312-45.312l448 448.128a32 32 0 0 1 0 45.248l-448 447.936a32 32 0 1 1-45.312-45.312l425.408-425.28L265.344 86.656z",fill:"#eee"},null,-1)),F1=[K1],$1=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1},current:{type:String,default:()=>""},images:{type:Array,default:()=>[]},zIndex:{type:Number,default:()=>2e3},image:{type:HTMLImageElement,required:!1},from:{type:String,default:()=>""},onUpdateCurrent:{type:Function,default:()=>()=>{}},onClose:{type:Function,default:()=>()=>{}},language:{type:String,default:()=>"zh"}},emits:["on-close","onUpdate:value"],setup(c,{emit:T}){const a=c,v=(n="")=>{const t=Z.messages[a.language];if(t){const{imagev:i}=t;var o={};return Object.keys(i).forEach(r=>{o[`imagev.${r}`]=i[r]}),o[n]}else return console.warn(`[images-viewer-vue3]:The current language '${a.language}' is not supported`),"unknown"},{changePageSize:x,destroyedExe:S,resetStyle:g,downloads:b,loadImageErrorText:p,loading:U,imageRef:s,imageVieverWidgetRef:K,loadImage:A,errorImage:I,zoomIn:f,zoomOut:_,inevrtY:k,inevrtX:z,clockwise:E,counterclockwise:V,closeViewer:F,prevPage:w,nextPage:B,pageData:h,initPage:$,currentPage:O,totalPage:W}=G.useAction(a.images),j=T,y=e.ref(""),M=e.ref(!1);function u(n,t,o=!0){P.useCusShortKey({[n]:(i,r)=>{t(),N(i,r,o)}})}u("right",L),u("left",D),u("ctrl+right",B),u("ctrl+left",w),u("ctrl+i+y",k),u("ctrl+i+x",z),u("ctrl+c+r",E),u("ctrl+c+l",V),u("ctrl+z",g),u("esc",R),P.useCusShortKey({"ctrl+*":(n,t)=>{switch(n.key){case"-":_(n),N(n,t,!0,"ctrl + "+n.key);break;case"+":f(n),N(n,t,!0,"ctrl + "+n.key);break}}});function N(n,t,o=!1,i=""){o&&n.preventDefault();const{key:r}=t;y.value=i||r,M.value=!0,setTimeout(()=>{M.value=!1},2e3)}const m=e.ref(""),d=e.ref(0);e.watch(()=>a.current,(n,t)=>{if(n){const o=h.value.findIndex(i=>i===a.current);o!==-1&&(d.value=o),e.nextTick().then(i=>{if(s.value)if(a.image===void 0)s.value.src=n;else{const r=a.image.getBoundingClientRect();m.value=s.value.src=a.image.src;const Y=s.value.getBoundingClientRect();q.FlipAnimate(s.value,r,Y)}}),$(1,10)}},{deep:!0,immediate:!0});function D(){s.value&&d.value>0&&(d.value--,m.value=s.value.src=h.value[d.value])}function L(){s.value&&d.value<h.value.length-1&&(d.value++,m.value=s.value.src=h.value[d.value])}const H=C.debounce(X,360);function X(n){if(p.value="",!!s.value&&n.target){const t=n.target,o=t.getBoundingClientRect(),i=Number(t.id);d.value=i,m.value=s.value.src=t.src;const r=s.value.getBoundingClientRect();q.FlipAnimate(s.value,o,r),a.onUpdateCurrent(t.src,i)}}function R(){S(),a.onClose(),F(),j("on-close"),m.value=""}return e.onBeforeUnmount(()=>{S()}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"imageVieverWidgetRef",ref:K,class:e.normalizeClass(["images-viewer-container__wrap",{"is-active":c.visible},{"nav-scroll-style__wrap":!e.unref(C.getUserAgent)()}])},[e.createElementVNode("div",{class:"image-viewer-close__btn",onClick:R},t1),e.createElementVNode("div",o1,[e.unref(p)?(e.openBlock(),e.createElementBlock("div",n1,[e.createElementVNode("p",l1,e.toDisplayString(e.unref(p)),1),e.createElementVNode("p",null,e.toDisplayString(m.value),1)])):e.createCommentVNode("",!0),e.createElementVNode("img",{ref_key:"imageRef",ref:s,class:"inner-viewer__image cus-transition",onLoad:t[0]||(t[0]=(...o)=>e.unref(A)&&e.unref(A)(...o)),onError:t[1]||(t[1]=(...o)=>e.unref(I)&&e.unref(I)(...o)),src:"",alt:"picture",style:{width:"120px",height:"120px"}},null,544),e.unref(U)?(e.openBlock(),e.createBlock(Q.default,{key:1})):e.createCommentVNode("",!0)]),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"viewer-previous-icon",onClick:e.withModifiers(D,["stop","prevent"])},s1)):e.createCommentVNode("",!0),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",{key:1,class:"viewer-next-icon",onClick:e.withModifiers(L,["stop","prevent"])},c1)):e.createCommentVNode("",!0),e.createElementVNode("div",a1,[e.createElementVNode("div",u1,[c.images.length>=10?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pagination-wrap",{position:!e.unref(C.getUserAgent)()}])},[e.createElementVNode("span",null," "+e.toDisplayString(c.images.length)+" "+e.toDisplayString(v("imagev.pictures"))+" ",1),e.createElementVNode("span",null,"/ "+e.toDisplayString(e.unref(W))+" "+e.toDisplayString(v("imagev.page"))+" ",1),e.createElementVNode("span",null,"/ "+e.toDisplayString(v("imagev.current"))+" "+e.toDisplayString(e.unref(O)),1),e.createTextVNode(" "),e.createElementVNode("select",{class:"page-size-select",name:"select",id:"page-size-select",onChange:t[2]||(t[2]=(...o)=>e.unref(x)&&e.unref(x)(...o))},[e.createElementVNode("option",d1,"10/"+e.toDisplayString(v("imagev.page")),1),e.createElementVNode("option",v1,"15/"+e.toDisplayString(v("imagev.page")),1),e.createElementVNode("option",m1,"20/"+e.toDisplayString(v("imagev.page")),1),e.createElementVNode("option",h1,"30/"+e.toDisplayString(v("imagev.page")),1)],32)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(),e.createElementBlock("svg",{onClick:t[3]||(t[3]=e.withModifiers((...o)=>e.unref(f)&&e.unref(f)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},_1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[4]||(t[4]=e.withModifiers((...o)=>e.unref(_)&&e.unref(_)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},E1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[5]||(t[5]=e.withModifiers((...o)=>e.unref(V)&&e.unref(V)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},B1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[6]||(t[6]=e.withModifiers((...o)=>e.unref(E)&&e.unref(E)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},N1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[7]||(t[7]=e.withModifiers((...o)=>e.unref(z)&&e.unref(z)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},x1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[8]||(t[8]=e.withModifiers((...o)=>e.unref(k)&&e.unref(k)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},b1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[9]||(t[9]=e.withModifiers((...o)=>e.unref(g)&&e.unref(g)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"20",height:"20"},I1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[10]||(t[10]=e.withModifiers((...o)=>e.unref(b)&&e.unref(b)(...o),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},H1))])]),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",R1,[(e.openBlock(),e.createElementBlock("svg",{onClick:t[11]||(t[11]=e.withModifiers((...o)=>e.unref(w)&&e.unref(w)(...o),["stop","prevent"])),class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},P1)),e.createElementVNode("div",T1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),(o,i)=>(e.openBlock(),e.createElementBlock("img",{id:`${i}`,class:e.normalizeClass(["navbar-image__item",{"nav-active-current__img":d.value===i}]),key:i,src:o,onClick:t[12]||(t[12]=e.withModifiers((...r)=>e.unref(H)&&e.unref(H)(...r),["stop","prevent"]))},null,10,U1))),128))]),(e.openBlock(),e.createElementBlock("svg",{onClick:t[13]||(t[13]=e.withModifiers((...o)=>e.unref(B)&&e.unref(B)(...o),["stop","prevent"])),class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},F1))])):e.createCommentVNode("",!0)]),e.createVNode(J.default,{hotkey:y.value,"onUpdate:hotkey":t[14]||(t[14]=o=>y.value=o),isActiveKey:M.value},null,8,["hotkey","isActiveKey"])],2))}});exports.default=$1; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),j=require("./useAction.js"),N=require("../utils/index.js"),P=require("./flip-animate.js"),X=require("./HotKeys.vue.js"),Y=require("./Loading.vue.js"),U=require("../utils/hotkeys.js"),G=require("../langs/index.js"),l=c=>(e.pushScopeId("data-v-3d327580"),c=c(),e.popScopeId(),c),J=l(()=>e.createElementVNode("svg",{class:"close-icon icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M835.2 854.4c-12.8 0-22.4-3.2-32-12.8L211.2 256C192 240 192 211.2 208 195.2s44.8-16 60.8 0L864 780.8c16 16 16 44.8 0 60.8-6.4 9.6-16 12.8-28.8 12.8z",fill:"#eee"}),e.createElementVNode("path",{d:"M236.8 848c-12.8 0-22.4-3.2-32-12.8-16-16-16-44.8 0-60.8l604.8-576c16-16 44.8-16 60.8 0s16 44.8 0 60.8l-604.8 576c-9.6 9.6-19.2 12.8-28.8 12.8z",fill:"#eee"})],-1)),Q=[J],Z={class:"inner-image-wrap"},e1={key:0,style:{"user-select":"text"}},t1={style:{color:"orange","text-decoration":"solid"}},n1=l(()=>e.createElementVNode("svg",{class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M758.656 937.344a32 32 0 1 1-45.31199999 45.312l-448.00000001-448.128a32 32 0 0 1 0-45.248l448.00000001-447.936a32 32 0 1 1 45.31199999 45.312l-425.408 425.28000001L758.656 937.344z",fill:"#eee"})],-1)),o1=[n1],l1=l(()=>e.createElementVNode("svg",{class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},[e.createElementVNode("path",{d:"M265.344 86.656a32 32 0 1 1 45.312-45.312l448 448.128a32 32 0 0 1 0 45.248l-448 447.936a32 32 0 1 1-45.312-45.312l425.408-425.28L265.344 86.656z",fill:"#eee"})],-1)),i1=[l1],s1={class:"nav-image-viewer__wrap"},a1={value:"10",selected:""},r1={value:"15"},c1={value:"20"},u1={value:"30"},d1=l(()=>e.createElementVNode("path",{d:"M476.48 903.36C248.96 903.36 64 718.4 64 491.2S248.96 78.72 476.48 78.72s412.48 184.96 412.48 412.48-185.28 412.16-412.48 412.16z m0-741.12c-181.44 0-328.96 147.52-328.96 328.96s147.52 328.96 328.96 328.96 328.96-147.52 328.96-328.96S657.6 162.24 476.48 162.24z",fill:"#eee"},null,-1)),v1=l(()=>e.createElementVNode("path",{d:"M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM643.84 532.8H309.12c-23.04 0-41.6-18.56-41.6-41.6s18.56-41.6 41.6-41.6h334.72c23.04 0 41.6 18.56 41.6 41.6s-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),h1=l(()=>e.createElementVNode("path",{d:"M476.48 700.16c-23.04 0-41.6-18.56-41.6-41.6V323.84c0-23.04 18.56-41.6 41.6-41.6s41.6 18.56 41.6 41.6v334.72c0 23.04-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),m1=[d1,v1,h1],g1=l(()=>e.createElementVNode("path",{d:"M485.76 921.92C253.12 921.92 64 732.8 64 500.48 64 267.84 253.12 78.72 485.76 78.72s421.76 189.12 421.76 421.76c-0.32 232.32-189.44 421.44-421.76 421.44z m0-759.68c-186.56 0-338.24 151.68-338.24 338.24s151.68 338.24 338.24 338.24 338.24-151.68 338.24-338.24S672 162.24 485.76 162.24z",fill:"#eee"},null,-1)),f1=l(()=>e.createElementVNode("path",{d:"M918.4 945.28c-9.28 0-18.56-2.88-26.24-9.28l-156.48-126.4c-17.92-14.4-20.8-40.64-6.08-58.56 14.4-17.92 40.64-20.8 58.56-6.08l156.48 126.4c17.92 14.4 20.8 40.64 6.08 58.56-8.32 9.92-20.16 15.36-32.32 15.36zM657.28 542.08H314.24c-23.04 0-41.6-18.56-41.6-41.6 0-23.04 18.56-41.6 41.6-41.6h343.04c23.04 0 41.6 18.56 41.6 41.6 0 23.04-18.56 41.6-41.6 41.6z",fill:"#eee"},null,-1)),p1=[g1,f1],_1=l(()=>e.createElementVNode("path",{d:"M981.675 313.572c-25.714-60.758-62.464-115.257-109.227-162.02S771.186 68.039 710.428 42.325C647.51 15.815 580.836 2.275 512 2.275s-135.51 13.54-198.428 40.05c-60.758 25.714-115.257 62.464-162.02 109.227-25.486 25.486-48.014 53.248-67.356 83.172V188.87c0-22.528-18.432-40.96-40.96-40.96s-40.96 18.432-40.96 40.96v327.68c0 22.528 18.432 40.96 40.96 40.96s40.96-18.432 40.96-40.96v-57.116c4.778-39.595 15.018-78.166 30.72-115.143 21.731-51.314 52.792-97.394 92.387-136.989s85.675-70.77 136.989-92.387C397.426 92.5 453.86 81.01 512 81.01c58.254 0 114.688 11.378 167.708 33.906 51.314 21.731 97.394 52.792 136.989 92.387s70.77 85.675 92.387 136.989C931.5 397.426 942.99 453.86 942.99 512c0 58.254-11.378 114.688-33.906 167.708-21.731 51.314-52.792 97.394-92.387 136.989s-85.675 70.77-136.989 92.387C626.574 931.5 570.14 942.99 512 942.99c-73.5 0-146.09-18.773-209.806-54.386-61.895-34.588-114.802-84.309-153.145-144.042-11.72-18.318-36.068-23.666-54.386-11.833-18.318 11.719-23.666 36.067-11.833 54.386 45.284 70.542 107.862 129.365 181.02 170.211 75.322 42.098 161.224 64.398 248.15 64.398 68.836 0 135.51-13.54 198.428-40.05 60.758-25.713 115.257-62.463 162.02-109.226 46.763-46.763 83.513-101.262 109.227-162.02 26.51-62.919 40.05-129.592 40.05-198.428s-13.54-135.51-40.05-198.428z",fill:"#eee"},null,-1)),k1=l(()=>e.createElementVNode("path",{d:"M242.802 584.249c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z",fill:"#eee"},null,-1)),z1=[_1,k1],E1=l(()=>e.createElementVNode("path",{d:"M512 1021.724c-68.836 0-135.51-13.54-198.428-40.05-60.758-25.713-115.257-62.463-162.02-109.226S68.039 771.186 42.325 710.428C15.815 647.51 2.275 580.836 2.275 512s13.54-135.51 40.05-198.428c25.714-60.758 62.464-115.257 109.227-162.02s101.262-83.513 162.02-109.227C376.49 15.815 443.164 2.275 512 2.275s135.51 13.54 198.428 40.05c60.758 25.714 115.257 62.464 162.02 109.227s83.513 101.262 109.227 162.02c26.51 62.919 40.05 129.592 40.05 198.428 0 21.732-17.636 39.367-39.368 39.367S942.99 533.732 942.99 512c0-58.254-11.378-114.688-33.906-167.708-21.731-51.314-52.792-97.394-92.387-136.989s-85.675-70.77-136.989-92.387C626.574 92.5 570.14 81.01 512 81.01c-58.254 0-114.688 11.378-167.708 33.906-51.314 21.731-97.394 52.792-136.989 92.387s-70.77 85.675-92.387 136.989C92.5 397.426 81.01 453.86 81.01 512c0 58.254 11.378 114.688 33.906 167.708 21.731 51.314 52.792 97.394 92.387 136.989s85.675 70.77 136.989 92.387C397.426 931.5 453.86 942.99 512 942.99c73.5 0 146.09-18.773 209.806-54.386 61.895-34.588 114.802-84.309 153.145-144.042 11.72-18.318 36.068-23.666 54.386-11.833 18.318 11.719 23.666 36.067 11.833 54.386-45.284 70.542-107.862 129.365-181.02 170.211-75.322 42.098-161.224 64.398-248.15 64.398z",fill:"#eee"},null,-1)),V1=l(()=>e.createElementVNode("path",{d:"M980.764 557.511c-22.528 0-40.96-18.432-40.96-40.96v-327.68c0-22.528 18.432-40.96 40.96-40.96s40.96 18.432 40.96 40.96v327.68c0 22.528-18.432 40.96-40.96 40.96zM242.802 584.25c10.809-2.845 21.731 3.3 25.372 13.88 3.982 11.606 11.264 20.14 21.732 25.715 8.078 4.437 17.18 6.599 27.306 6.599 18.888 0 35.044-7.851 48.356-23.666 13.312-15.701 22.756-37.205 28.33-85.447-8.76 13.88-19.683 23.666-32.654 29.354-12.97 5.69-26.965 8.42-41.87 8.42-30.378 0-54.272-9.444-72.021-28.33-17.636-18.888-26.51-43.122-26.51-72.932 0-28.558 8.76-53.59 26.169-75.321 17.408-21.618 43.121-32.54 77.14-32.54 45.853 0 77.484 20.593 94.892 61.895 9.67 22.641 14.45 51.086 14.45 85.22 0 38.456-5.803 72.59-17.409 102.285-19.228 49.494-51.769 74.183-97.621 74.183-30.72 0-54.158-8.078-70.087-24.12-11.378-11.492-18.66-25.032-21.96-40.733-2.275-10.923 4.552-21.731 15.36-24.576l1.025 0.114z m117.19-84.65c10.696-8.534 16.044-23.439 16.044-44.715 0-19.115-4.78-33.337-14.45-42.667s-21.846-13.995-36.75-13.995c-15.93 0-28.672 5.348-38.002 16.043-9.33 10.695-14.109 25.031-14.109 42.894 0 16.953 4.096 30.379 12.402 40.391 8.192 10.013 21.39 14.905 39.367 14.905 12.97 0 24.804-4.323 35.499-12.857z m305.153-98.646c14.108 25.941 21.049 61.44 21.049 106.61 0 42.78-6.372 78.165-19.115 106.154-18.432 40.164-48.697 60.189-90.567 60.189-37.774 0-65.877-16.384-84.423-49.266-15.36-27.42-23.097-64.17-23.097-110.364 0-35.727 4.665-66.447 13.88-92.047 17.295-47.786 48.584-71.68 93.868-71.68 40.846 0 70.314 16.84 88.405 50.404zM619.406 598.13c10.695-15.815 15.93-45.398 15.93-88.747 0-31.175-3.87-56.889-11.492-77.027-7.737-20.14-22.642-30.265-44.829-30.265-20.366 0-35.271 9.557-44.715 28.672-9.443 19.114-14.108 47.331-14.108 84.537 0 27.989 2.958 50.517 8.988 67.584 9.216 25.94 25.032 39.025 47.332 39.025 17.863 0 32.2-7.964 42.894-23.78z m224.029-228.125c12.743 12.857 19.114 28.445 19.114 46.877 0 19-6.599 34.93-19.91 47.559-13.199 12.743-28.673 19.115-46.195 19.115-19.456 0-35.498-6.6-47.9-19.798-12.402-13.198-18.66-28.558-18.66-46.194 0-18.773 6.6-34.588 19.684-47.445 13.084-12.857 28.786-19.342 46.876-19.342 18.546 0 34.248 6.485 46.99 19.228z m-72.59 72.59c7.054 7.055 15.587 10.582 25.6 10.582 9.557 0 17.976-3.527 25.144-10.581 7.168-7.055 10.695-15.588 10.695-25.714 0-9.671-3.527-18.09-10.58-25.145-7.055-7.054-15.475-10.581-25.26-10.581s-18.318 3.527-25.486 10.58c-7.168 7.055-10.695 15.588-10.695 25.715-0.114 9.557 3.413 17.977 10.581 25.145z",fill:"#eee"},null,-1)),w1=[E1,V1],y1=l(()=>e.createElementVNode("path",{d:"M573.248 832v88h-96V832h96zM128 224a64 64 0 0 1 45.248 18.752l229.504 229.504a64 64 0 0 1 0 90.496l-229.504 229.504A64 64 0 0 1 64 747.008V288a64 64 0 0 1 64-64z m781.248-5.504a64 64 0 0 1 63.552 56.576l0.448 7.424v459.008a64 64 0 0 1-103.232 50.56l-6.016-5.312-229.504-229.504a64 64 0 0 1-5.312-84.48l5.312-6.016L864 237.248a64 64 0 0 1 45.248-18.752zM128 288v459.008l229.504-229.504L128 288z m445.248 368v88h-96V656h96z m0-176v88h-96V480h96z m0-176v88h-96V304h96z m0-176v88h-96V128h96z",fill:"#eee"},null,-1)),B1=[y1],C1=l(()=>e.createElementVNode("path",{d:"M660.48 106.24L512 291.84l-149.12-185.6h297.6M768 69.12c1.28-19.2-13.44-36.48-33.28-37.12H289.28c-19.2 1.28-33.92 17.92-33.28 37.12 0 8.96 3.2 17.92 8.32 24.96l222.72 277.76a30.72 30.72 0 0 0 49.28 0l222.72-277.76c6.4-7.04 8.96-16 8.96-24.96zM768 954.88c1.28 19.2-13.44 36.48-33.28 37.12H289.28a35.52 35.52 0 0 1-33.28-37.12c0-8.96 3.2-17.92 8.32-24.96l222.72-277.76a30.72 30.72 0 0 1 49.28 0l222.72 277.76c6.4 7.04 8.96 16 8.96 24.96zM800 480h64v64h-64zM928 480h64v64h-64zM672 480h64v64h-64zM544 480h64v64h-64zM416 480h64v64h-64zM288 480h64v64h-64zM160 480h64v64h-64zM32 480h64v64h-64z",fill:"#eee"},null,-1)),M1=[C1],N1=l(()=>e.createElementVNode("path",{d:"M863.153113 702.196507h116.959605a43.887282 43.887282 0 0 1 0 87.774563H863.153113A73.182042 73.182042 0 0 0 789.97107 863.153113v116.959605a43.887282 43.887282 0 0 1-87.774563 0V863.153113A160.956606 160.956606 0 0 1 863.153113 702.196507z m0-380.393014h116.959605a43.887282 43.887282 0 0 0 0-87.774563H863.153113A73.182042 73.182042 0 0 1 789.97107 160.956606V43.887282a43.887282 43.887282 0 0 0-87.774563 0v117.069324a160.846887 160.846887 0 0 0 160.956606 160.846887z m-702.196507 0H43.887282a43.887282 43.887282 0 0 1 0-87.774563h117.069324a73.072324 73.072324 0 0 0 73.072324-73.072324V43.887282a43.887282 43.887282 0 0 1 87.774563 0v117.069324a160.846887 160.846887 0 0 1-160.846887 160.846887z m0 380.393014H43.887282a43.887282 43.887282 0 0 0 0 87.774563h117.069324a73.182042 73.182042 0 0 1 73.072324 73.182043v116.959605a43.887282 43.887282 0 0 0 87.774563 0V863.153113A160.846887 160.846887 0 0 0 160.956606 702.196507z",fill:"#eee"},null,-1)),x1=[N1],S1=l(()=>e.createElementVNode("path",{d:"M768.35456 416a256 256 0 1 0-512 0 192 192 0 1 0 0 384v64a256 256 0 0 1-58.88-505.216 320.128 320.128 0 0 1 629.76 0A256.128 256.128 0 0 1 768.35456 864v-64a192 192 0 0 0 0-384z m-512 384h64v64H256.35456v-64z m448 0h64v64h-64v-64z",fill:"#eee"},null,-1)),b1=l(()=>e.createElementVNode("path",{d:"M539.04256 845.248V512.192a32.448 32.448 0 0 0-32-32.192c-17.664 0-32 14.912-32 32.192v333.056l-36.096-36.096a32.192 32.192 0 0 0-45.056 0.192 31.616 31.616 0 0 0-0.192 45.056l90.88 90.944a31.36 31.36 0 0 0 22.528 9.088 30.08 30.08 0 0 0 22.4-9.088l90.88-90.88a32.192 32.192 0 0 0-0.192-45.12 31.616 31.616 0 0 0-45.056-0.192l-36.096 36.096z",fill:"#eee"},null,-1)),A1=[S1,b1],I1={key:0,class:"navbar-thumbnail__wrap"},D1=l(()=>e.createElementVNode("path",{d:"M758.656 937.344a32 32 0 1 1-45.31199999 45.312l-448.00000001-448.128a32 32 0 0 1 0-45.248l448.00000001-447.936a32 32 0 1 1 45.31199999 45.312l-425.408 425.28000001L758.656 937.344z",fill:"#eee"},null,-1)),L1=[D1],H1={class:"navbar-list-group"},R1=["id","src"],q1=l(()=>e.createElementVNode("path",{d:"M265.344 86.656a32 32 0 1 1 45.312-45.312l448 448.128a32 32 0 0 1 0 45.248l-448 447.936a32 32 0 1 1-45.312-45.312l425.408-425.28L265.344 86.656z",fill:"#eee"},null,-1)),T1=[q1],P1=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1},current:{type:String,default:()=>""},images:{type:Array,default:()=>[]},zIndex:{type:Number,default:()=>2e3},image:{type:HTMLImageElement,required:!1},from:{type:String,default:()=>""},onUpdateCurrent:{type:Function,default:()=>()=>{}},handleChange:{type:Function,default:()=>()=>{}},handleClose:{type:Function,default:()=>()=>{}},language:{type:String,default:()=>"zh"}},emits:["on-close","on-change","onUpdate:value"],setup(c,{emit:U1}){const r=c,h=(o="")=>{const t=G.messages[r.language];if(t){const{imagev:i}=t;var n={};return Object.keys(i).forEach(u=>{n[`imagev.${u}`]=i[u]}),n[o]}else return console.warn(`[images-viewer-vue3]:The current language '${r.language}' is not supported`),"unknown"},{changePageSize:x,destroyedExe:S,resetStyle:g,downloads:b,loadImageErrorText:A,loading:F,imageRef:s,imageVieverWidgetRef:K,loadImage:I,errorImage:D,zoomIn:f,zoomOut:p,inevrtY:_,inevrtX:k,clockwise:z,counterclockwise:E,closeViewer:$,prevPage:V,nextPage:w,pageData:m,initPage:F1,currentPage:L,totalPage:O,currentIndex:a}=j.useAction(r.images,r.current),y=e.ref(""),B=e.ref(!1);function d(o,t,n=!0){U.useCusShortKey({[o]:(i,u)=>{t(),C(i,u,n)}})}d("right",R),d("left",H),d("ctrl+right",w),d("ctrl+left",V),d("ctrl+i+y",_),d("ctrl+i+x",k),d("ctrl+c+r",z),d("ctrl+c+l",E),d("ctrl+z",g),d("esc",T),U.useCusShortKey({"ctrl+*":(o,t)=>{switch(o.key){case"-":p(o),C(o,t,!0,"ctrl + "+o.key);break;case"+":f(o),C(o,t,!0,"ctrl + "+o.key);break}}});function C(o,t,n=!1,i=""){n&&o.preventDefault();const{key:u}=t;y.value=i||u,B.value=!0,setTimeout(()=>{B.value=!1},2e3)}const v=e.ref(""),M=e.ref(-1);e.watch(()=>r.current,(o,t)=>{o&&e.nextTick().then(n=>{if(s.value)if(r.image===void 0)s.value.src=o;else{const i=r.image.getBoundingClientRect();v.value=s.value.src=r.image.src;const u=s.value.getBoundingClientRect();P.FlipAnimate(s.value,i,u)}})},{deep:!0,immediate:!0}),e.watch(()=>L.value,(o,t)=>{if(o){const n=m.value.findIndex(i=>i.index===M.value);n===-1?a.value=-1:a.value=n}});function H(){s.value&&a.value>0&&(a.value--,v.value=s.value.src=m.value[a.value].url,r.handleChange({image:v.value,index:a.value}))}function R(){s.value&&a.value<m.value.length-1&&(a.value++,v.value=s.value.src=m.value[a.value].url,r.handleChange({image:v.value,index:a.value}))}const q=N.debounce(W,360);function W(o){if(A.value="",!!s.value&&o.target){const t=o.target,n=t.getBoundingClientRect();M.value=Number(t.id),a.value=m.value.findIndex(u=>u.index===M.value),v.value=s.value.src=t.src;const i=s.value.getBoundingClientRect();r.handleChange({image:v.value,index:a.value}),P.FlipAnimate(s.value,n,i),r.onUpdateCurrent(t.src,a.value)}}function T(){S(),r.handleClose(),$(),v.value=""}return e.onBeforeUnmount(()=>{S()}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"imageVieverWidgetRef",ref:K,class:e.normalizeClass(["images-viewer-container__wrap",{"is-active":c.visible},{"nav-scroll-style__wrap":!e.unref(N.getUserAgent)()}])},[e.createElementVNode("div",{class:"image-viewer-close__btn",onClick:T},Q),e.createElementVNode("div",Z,[e.unref(A)?(e.openBlock(),e.createElementBlock("div",e1,[e.createElementVNode("p",t1,e.toDisplayString(h("imagev.loadErrorText")),1),e.createElementVNode("p",null,e.toDisplayString(v.value),1)])):e.createCommentVNode("",!0),e.createElementVNode("img",{ref_key:"imageRef",ref:s,class:"inner-viewer__image cus-transition",onLoad:t[0]||(t[0]=(...n)=>e.unref(I)&&e.unref(I)(...n)),onError:t[1]||(t[1]=(...n)=>e.unref(D)&&e.unref(D)(...n)),src:"",alt:"picture",style:{width:"120px",height:"120px"}},null,544),e.unref(F)?(e.openBlock(),e.createBlock(Y.default,{key:1})):e.createCommentVNode("",!0)]),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"viewer-previous-icon",onClick:e.withModifiers(H,["stop","prevent"])},o1)):e.createCommentVNode("",!0),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",{key:1,class:"viewer-next-icon",onClick:e.withModifiers(R,["stop","prevent"])},i1)):e.createCommentVNode("",!0),e.createElementVNode("div",s1,[e.createElementVNode("div",{class:e.normalizeClass(["navbar-control__wrap",{"padding-b":c.images.length<2}])},[c.images.length>=10?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pagination-wrap",{position:!e.unref(N.getUserAgent)()}])},[e.createElementVNode("span",null," "+e.toDisplayString(c.images.length)+" "+e.toDisplayString(h("imagev.pictures"))+" ",1),e.createElementVNode("span",null,"/ "+e.toDisplayString(e.unref(O))+" "+e.toDisplayString(h("imagev.page"))+" ",1),e.createElementVNode("span",null,"/ "+e.toDisplayString(h("imagev.current"))+" "+e.toDisplayString(e.unref(L)),1),e.createTextVNode(" "),e.createElementVNode("select",{class:"page-size-select",name:"select",id:"page-size-select",onChange:t[2]||(t[2]=(...n)=>e.unref(x)&&e.unref(x)(...n))},[e.createElementVNode("option",a1,"10/"+e.toDisplayString(h("imagev.page")),1),e.createElementVNode("option",r1,"15/"+e.toDisplayString(h("imagev.page")),1),e.createElementVNode("option",c1,"20/"+e.toDisplayString(h("imagev.page")),1),e.createElementVNode("option",u1,"30/"+e.toDisplayString(h("imagev.page")),1)],32)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(),e.createElementBlock("svg",{onClick:t[3]||(t[3]=e.withModifiers((...n)=>e.unref(f)&&e.unref(f)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},m1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[4]||(t[4]=e.withModifiers((...n)=>e.unref(p)&&e.unref(p)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},p1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[5]||(t[5]=e.withModifiers((...n)=>e.unref(E)&&e.unref(E)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},z1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[6]||(t[6]=e.withModifiers((...n)=>e.unref(z)&&e.unref(z)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},w1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[7]||(t[7]=e.withModifiers((...n)=>e.unref(k)&&e.unref(k)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},B1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[8]||(t[8]=e.withModifiers((...n)=>e.unref(_)&&e.unref(_)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},M1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[9]||(t[9]=e.withModifiers((...n)=>e.unref(g)&&e.unref(g)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"20",height:"20"},x1)),(e.openBlock(),e.createElementBlock("svg",{onClick:t[10]||(t[10]=e.withModifiers((...n)=>e.unref(b)&&e.unref(b)(...n),["stop","prevent"])),class:"tool-item-icon__btn icon-is-hover",viewBox:"0 0 1024 1024",width:"25",height:"25"},A1))])],2),c.images.length>=2?(e.openBlock(),e.createElementBlock("div",I1,[(e.openBlock(),e.createElementBlock("svg",{onClick:t[11]||(t[11]=e.withModifiers((...n)=>e.unref(V)&&e.unref(V)(...n),["stop","prevent"])),class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},L1)),e.createElementVNode("div",H1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(n,i)=>(e.openBlock(),e.createElementBlock("img",{id:`${n.index}`,class:e.normalizeClass(["navbar-image__item",{"nav-active-current__img":e.unref(a)===i}]),key:i,src:n.url,onClick:t[12]||(t[12]=e.withModifiers((...u)=>e.unref(q)&&e.unref(q)(...u),["stop","prevent"]))},null,10,R1))),128))]),(e.openBlock(),e.createElementBlock("svg",{onClick:t[13]||(t[13]=e.withModifiers((...n)=>e.unref(w)&&e.unref(w)(...n),["stop","prevent"])),class:"icon-is-hover cus-cursor",viewBox:"0 0 1024 1024",width:"25",height:"25"},T1))])):e.createCommentVNode("",!0)]),e.createVNode(X.default,{hotkey:y.value,"onUpdate:hotkey":t[14]||(t[14]=n=>y.value=n),isActiveKey:B.value},null,8,["hotkey","isActiveKey"])],2))}});exports.default=P1; |
@@ -1,2 +0,2 @@ | ||
export declare const useAction: (images: string[]) => { | ||
export declare const useAction: (images: string[], currentUrl: string) => { | ||
changePageSize: (evt: Event) => void; | ||
@@ -19,3 +19,6 @@ destroyedExe: () => void; | ||
closeViewer: () => void; | ||
pageData: import('vue').Ref<string[]>; | ||
pageData: import('vue').Ref<{ | ||
index: number; | ||
url: string; | ||
}[]>; | ||
prevPage: () => void; | ||
@@ -26,2 +29,3 @@ nextPage: () => void; | ||
totalPage: import('vue').Ref<number>; | ||
currentIndex: import('vue').Ref<number>; | ||
}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./core.js"),m=require("../utils/index.js"),l=require("vue"),V=d=>{const i=l.ref(null),n=l.ref(null),c=l.ref(""),s=l.ref(!0),a=T.default.getInStance(),u=l.ref(1),v=l.ref(10),g=l.ref(0),h=l.ref([]);function w(t){a.horizontalInvert()}function y(t){a.verticalInvert()}function x(t){a.zoomIn()}function I(t){a.zoomOut()}function p(t){a.rotate("+")}function P(t){a.rotate("-")}const S=()=>{a.destroyed(),n.value},z=t=>{var o;const e=(o=n.value)==null?void 0:o.src;m.downloadExe(e)},R=()=>{a.destroyed()},q=()=>{a.removeStyleProperty()},A=t=>{a.setImage(n.value);const e=new Image;if(e.src=n.value&&n.value.src,n.value&&i.value){const o=i.value.getBoundingClientRect();m.getUserAgent()?(n.value.style.width=o.width+"px",n.value.style.height=o.height/2+"px"):e.width<o.width&&e.height<o.height?(n.value.style.width=e.width+"px",n.value.style.height=e.height+"px"):(n.value.style.width=o.width/1.3+"px",n.value.style.height=o.height/1.3+"px")}c.value="",s.value=!1},E=t=>{s.value=!1,c.value="加载图片失败,请仔细检测图片地址!"},M=()=>{u.value>1&&(u.value--,r(u.value,v.value))},O=()=>{u.value<g.value&&(u.value++,r(u.value,v.value))},b=(t,e)=>{u.value=t,v.value=e,r(t,e)},r=(t,e)=>{var o=d.length;g.value=Math.ceil(o/e);var f=e*(t-1),C=f+e;h.value=d.slice(f,C)},k=t=>{const{value:e}=t.target;r(1,+e)};return r(1,10),l.onMounted(()=>{}),{changePageSize:k,destroyedExe:R,resetStyle:q,downloads:z,loadImageErrorText:c,loading:s,errorImage:E,loadImage:A,imageRef:n,imageVieverWidgetRef:i,inevrtY:w,inevrtX:y,zoomIn:x,zoomOut:I,clockwise:p,counterclockwise:P,closeViewer:S,pageData:h,prevPage:M,nextPage:O,initPage:b,currentPage:u,totalPage:g}};exports.useAction=V; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./core.js"),p=require("../utils/index.js"),l=require("vue"),B=(i,P)=>{const s=l.ref(null),a=l.ref(null),v=l.ref(""),c=l.ref(!0),o=V.default.getInStance(),r=l.ref(1),y=l.ref(-1),g=l.ref(10),d=l.ref(0),f=l.ref([]),h=l.ref([]);function S(e){o.horizontalInvert()}function A(e){o.verticalInvert()}function O(e){o.zoomIn()}function z(e){o.zoomOut()}function R(e){o.rotate("+")}function q(e){o.rotate("-")}const D=()=>{o.destroyed(),a.value},E=e=>{var n;const t=(n=a.value)==null?void 0:n.src;p.downloadExe(t)},M=()=>{s.value=null,a.value=null,v.value="",c.value=!0,r.value=1,y.value=-1,g.value=10,d.value=0,f.value=[],h.value=[]},T=()=>{o.removeStyleProperty()},b=e=>{o.setImage(a.value);const t=new Image;if(t.src=a.value&&a.value.src,a.value&&s.value){const n=s.value.getBoundingClientRect();p.getUserAgent()?(a.value.style.width=n.width+"px",a.value.style.height=n.height/2+"px"):t.width<n.width&&t.height<n.height?(a.value.style.width=t.width+"px",a.value.style.height=t.height+"px"):(a.value.style.width=n.width/1.3+"px",a.value.style.height=n.height/1.3+"px")}v.value="",c.value=!1},j=e=>{c.value=!1,v.value="加载图片失败,请仔细检测图片地址!"},k=()=>{r.value>1&&(r.value--,m(r.value,g.value))},C=()=>{r.value<d.value&&(r.value++,m(r.value,g.value))},x=(e,t)=>{r.value=e,g.value=t,m(e,t)},m=(e,t)=>{var n=h.value.length;d.value=Math.ceil(n/t);var w=t*(e-1),u=w+t;f.value=h.value.slice(w,u),y.value=f.value.findIndex(I=>I.url===P)},J=e=>{const{value:t}=e.target;m(1,+t)},N=()=>new Promise((e,t)=>{if(Array.isArray(i)&&i.length>0){const n=i.filter(u=>u==null||u===""),w=i.filter(u=>u).map((u,I)=>({index:I,url:u}));n.length&&console.warn(`images-viewer-vue3:The image parameter 'images' contains illegal characters:[${JSON.stringify(n)}]`),e({data:w})}else e({data:[]})});return(async()=>{await N().then(e=>{h.value=e.data}).catch(e=>{console.log("images-viewer-vue3:",JSON.stringify(e))}),x(1,10)})(),l.onMounted(()=>{}),{changePageSize:J,destroyedExe:M,resetStyle:T,downloads:E,loadImageErrorText:v,loading:c,errorImage:j,loadImage:b,imageRef:a,imageVieverWidgetRef:s,inevrtY:S,inevrtX:A,zoomIn:O,zoomOut:z,clockwise:R,counterclockwise:q,closeViewer:D,pageData:f,prevPage:k,nextPage:C,initPage:x,currentPage:r,totalPage:d,currentIndex:y}};exports.useAction=B; |
@@ -7,3 +7,4 @@ import { App } from 'vue'; | ||
declare function onClose(): void; | ||
declare function onUpdate(fn?: Function): void; | ||
declare const ImageViewerVue3: import('vue').DefineComponent<{}, {}, any>; | ||
export { imageViewerApi, VImageViewer, ImageViewerVue3, onClose }; | ||
export { imageViewerApi, VImageViewer, ImageViewerVue3, onClose, onUpdate }; |
@@ -1,1 +0,1 @@ | ||
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-f696c6e5]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-f696c6e5]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-f696c6e5]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-f696c6e5]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-f696c6e5]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-f696c6e5]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5],.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-f696c6e5]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-f696c6e5]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-f696c6e5]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-f696c6e5]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-f696c6e5]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-f696c6e5]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-f696c6e5]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-f696c6e5]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-f696c6e5]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-f696c6e5]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-f696c6e5]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-f696c6e5]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]:hover{opacity:1}.cus-transition[data-v-f696c6e5]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-f696c6e5]{border:1px solid var(--active-icon-color);opacity:1!important}\n@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-f696c6e5]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-f696c6e5] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-f696c6e5]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-f696c6e5]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-f696c6e5]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-f696c6e5]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-f696c6e5]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5],.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-f696c6e5]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-f696c6e5]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-f696c6e5]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-f696c6e5]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-f696c6e5]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-f696c6e5]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-f696c6e5]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-f696c6e5]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-f696c6e5]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-f696c6e5]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-f696c6e5]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-f696c6e5]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-f696c6e5]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-f696c6e5]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-f696c6e5]:hover{opacity:1}.cus-transition[data-v-f696c6e5]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-f696c6e5]{border:1px solid var(--active-icon-color);opacity:1!important}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),u=require("./components/viewer.vue.js"),l=require("./components/index.vue.js"),d=require("./directive/v-image-viewer.js"),s=require("./components/core.js"),c=require("./utils/index.js");let t;const r=s.default.getInStance();function m(e,o){o&&r.setConfigOptions(o),console.log(`images-viewer-vue3_v${c.versions}`),e.directive("image-viewer",d.default),e.component("ImagesViewerVue3",u.default),e.config.globalProperties.$imageViewerApi=a}function a(e){const o=r.getConfigOptions();var i=null;i?i&&document.body.removeChild(i):(t=n.createVNode(l.default,{visible:!0,current:e.current,images:e.images||[],zIndex:o.zIndex,image:e.imageDom,from:e.from||"api",language:o.language||"zh",onClose:()=>{i&&document.body.removeChild(i)}}),i=document.createElement("div"),i.style.zIndex=o.zIndex+"",i.classList.add("image-viewer-vue3__root"),n.render(t,i),document.body.appendChild(i))}function g(){const e=document.querySelector(".image-viewer-vue3__root");e&&document.body.removeChild(e),r.destroyed()}const v=u.default;exports.VImageViewer=d.default;exports.ImageViewerVue3=v;exports.default=m;exports.imageViewerApi=a;exports.onClose=g; | ||
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-3d327580]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-3d327580]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-3d327580]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-3d327580]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-3d327580]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-3d327580]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580],.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-3d327580]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-3d327580]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-3d327580]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-3d327580]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-3d327580]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-3d327580]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-3d327580]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-3d327580]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-3d327580]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap.padding-b[data-v-3d327580]{padding-bottom:.2rem}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-3d327580]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-3d327580]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-3d327580]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]:hover{opacity:1}.cus-transition[data-v-3d327580]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-3d327580]{border:1px solid var(--active-icon-color);opacity:1!important}\n@charset \"UTF-8\";.hotkey-tip__wrap[data-v-47ab4d4f]{padding:.5rem;border-radius:.66rem;background:#000c;bottom:10px;left:10px;position:fixed;opacity:0;transition:opacity .3s ease-in-out}.hotkey-tip__wrap.is-active_key[data-v-47ab4d4f]{opacity:.8}.hotkey-tip__wrap .item-key[data-v-47ab4d4f]{border-radius:.2rem;display:inline-block;text-transform:capitalize;margin-inline-start:.2em;margin-inline-end:.2em;margin-block-start:.2em;margin-block-end:.2em;color:#eee}.loading-image__wrap .item1[data-v-7c175f68]{animation-delay:var(--i);background:#10ac84;box-shadow:0 0 15px #10ac84}.loading-image__wrap .item2[data-v-7c175f68]{animation-delay:var(--i);background:#14ffec;box-shadow:0 0 15px #14ffec}.loading-image__wrap .item3[data-v-7c175f68]{animation-delay:var(--i);background:#c62a88;box-shadow:0 0 15px #c62a88}.loading-image__wrap span[data-v-7c175f68]{display:inline-block;width:calc(var(--load-size, 40) * 1px);aspect-ratio:1;border-radius:50%;margin:0 6px;animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite;-webkit-animation:loading-7c175f68 1.4s cubic-bezier(0,.55,.45,1) infinite}@-webkit-keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes loading-7c175f68{0%,80%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}40%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.image-viewer-vue3__root[data-v-3d327580]{position:fixed;top:0;right:0;bottom:0;left:0}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar{width:6px;height:6px;background:#f7f7f7}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-track{border-radius:10px}.nav-scroll-style__wrap[data-v-3d327580] ::-webkit-scrollbar-thumb{background-color:#4593fb5e}.images-viewer-container__wrap[data-v-3d327580]{--active-icon-color: #3A8DF5;--active-text-color: var(--text-color, #eee);background:#0009;position:absolute;left:0;top:0;bottom:0;width:100%;height:100%;max-height:100%;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;overflow:hidden;opacity:0;transition:opacity 1s ease}.images-viewer-container__wrap.is-active[data-v-3d327580]{opacity:1}.images-viewer-container__wrap .image-viewer-close__btn[data-v-3d327580]{position:absolute;top:15px;right:15px;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10;cursor:pointer}.images-viewer-container__wrap .icon-is-hover:hover path[data-v-3d327580]{fill:var(--active-icon-color)}.images-viewer-container__wrap .close-icon[data-v-3d327580]{transition:fill .3s ease}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580],.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{position:fixed;background:#0000004d;border-radius:50%;width:44px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;z-index:10}.images-viewer-container__wrap .viewer-previous-icon[data-v-3d327580]{top:40%;left:0}.images-viewer-container__wrap .viewer-next-icon[data-v-3d327580]{top:40%;right:0}.images-viewer-container__wrap .inner-image-wrap[data-v-3d327580]{width:100%;height:100%;transform-origin:top left;display:flex;flex-direction:column;justify-content:center;align-items:center;perspective:1000px;transform-style:preserve-3d;overflow:hidden;color:var(--active-text-color)}.images-viewer-container__wrap .inner-image-wrap>.inner-viewer__image[data-v-3d327580]{flex:0 1 auto;z-index:1;-webkit-user-select:none;user-select:none;width:auto;height:auto;object-fit:cover}.images-viewer-container__wrap .nav-image-viewer__wrap[data-v-3d327580]{overflow:hidden;position:absolute;bottom:0;left:0;right:0;text-align:center}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap[data-v-3d327580]{padding-top:5px;position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .tool-item-icon__btn[data-v-3d327580]{margin:0 4px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap[data-v-3d327580]{display:flex;align-items:center;color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select[data-v-3d327580]{border-radius:4px;outline:none;background:transparent;color:#eee;border-color:#eee}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .pagination-wrap .page-size-select option[data-v-3d327580]{color:#333}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap .position[data-v-3d327580]{position:absolute;left:20px}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-control__wrap.padding-b[data-v-3d327580]{padding-bottom:.2rem}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap[data-v-3d327580]{background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:hidden}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group[data-v-3d327580]{height:3rem;margin-top:3px;margin-bottom:3px;list-style:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;overflow-x:auto;overflow-y:hidden;padding:0;box-sizing:border-box;line-height:1}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]{display:block;height:2.3rem;width:3rem;object-fit:cover;transition:all .3s ease;opacity:.5;margin:0 .1rem;border:2px solid transparent;padding:3px;border-radius:3px;cursor:pointer}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item.nav-active-current__img[data-v-3d327580]{opacity:1;border:2px solid var(--active-icon-color)}.images-viewer-container__wrap .nav-image-viewer__wrap .navbar-thumbnail__wrap .navbar-list-group .navbar-image__item[data-v-3d327580]:hover{opacity:1}.cus-transition[data-v-3d327580]{transform:scale(1);transition:transform .3s ease}.is-active-border-color[data-v-3d327580]{border:1px solid var(--active-icon-color);opacity:1!important}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),a=require("./components/viewer.vue.js"),m=require("./components/index.vue.js"),u=require("./directive/v-image-viewer.js"),v=require("./components/core.js"),f=require("./utils/index.js");let t;const r=v.default.getInStance();var d;function w(e,o){o&&r.setConfigOptions(o),console.log(`images-viewer-vue3_v${f.versions}`),e.directive("image-viewer",u.default),e.component("ImagesViewerVue3",a.default),e.config.globalProperties.$imageViewerApi=l}function l(e){const o=r.getConfigOptions();var i=null;i?i&&document.body.removeChild(i):(t=n.createVNode(m.default,{visible:!0,current:e.current,images:e.images||[],zIndex:o.zIndex,image:e.imageDom,from:e.from||"api",language:o.language||"zh",handleChange:({image:c,index:g})=>{d(c,g)},handleClose:()=>{s()}}),i=document.createElement("div"),i.style.zIndex=o.zIndex+"",i.classList.add("image-viewer-vue3__root"),n.render(t,i),document.body.appendChild(i))}function s(){const e=document.querySelector(".image-viewer-vue3__root");e&&document.body.removeChild(e),r.destroyed()}function V(e){e&&(d=e)}const C=a.default;exports.VImageViewer=u.default;exports.ImageViewerVue3=C;exports.default=w;exports.imageViewerApi=l;exports.onClose=s;exports.onUpdate=V; |
@@ -6,4 +6,5 @@ declare const _default: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
}; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={imagev:{pictures:"Pictures",page:"Page",current:"Current page"}};exports.default=e; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={imagev:{pictures:"Pictures",page:"Page",current:"Current page",loadErrorText:"Failed to load the image, please check the image access path carefully!"}};exports.default=e; |
@@ -7,2 +7,3 @@ export declare const messages: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
@@ -15,2 +16,3 @@ }; | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
@@ -17,0 +19,0 @@ }; |
@@ -6,4 +6,5 @@ declare const _default: { | ||
current: string; | ||
loadErrorText: string; | ||
}; | ||
}; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={imagev:{pictures:"张图片",page:"页",current:"当前页"}};exports.default=e; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={imagev:{pictures:"张图片",page:"页",current:"当前页",loadErrorText:"加载图片失败,请仔细检测图片访问路径!"}};exports.default=e; |
@@ -27,2 +27,11 @@ type fromType = 'api' | 'directive' | 'component'; | ||
} | ||
export type ImageObjectTypes = { | ||
index: number; | ||
url: string; | ||
}; | ||
export type AsyncSetImageReturnType = Promise<{ | ||
data: ImageObjectTypes[]; | ||
} | { | ||
data: []; | ||
}>; | ||
export {}; |
@@ -19,2 +19,2 @@ /** | ||
export declare const getUserAgent: () => boolean; | ||
export declare const versions = "1.0.9"; | ||
export declare const versions = "1.0.10"; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(t,n)=>{let e;return function(){let o=this,r=arguments;e&&clearTimeout(e),e=setTimeout(function(){t.apply(o,r)},n)}},a=()=>{var t=new Date,n=t.getFullYear(),e=t.getMonth()+1,o=t.getDate(),r=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return`${n}${e}${o}_${r}${i}${s}`},c=(t,n)=>{fetch(t).then(e=>e.blob()).then(e=>{var o=document.createElement("a");o.style.display="none",document.body.appendChild(o);var r=window.URL.createObjectURL(e);o.href=r,o.download=a(),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o)})},l=()=>{const t=navigator.userAgent||navigator.vendor||window.opera,n=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t.toLowerCase());let e=!1;return n&&(e=!0),("ontouchstart"in window||navigator.maxTouchPoints>0)&&(e=!0),e},u="1.0.9";exports.debounce=d;exports.downloadExe=c;exports.getTimeStamp=a;exports.getUserAgent=l;exports.versions=u; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(t,n)=>{let e;return function(){let o=this,r=arguments;e&&clearTimeout(e),e=setTimeout(function(){t.apply(o,r)},n)}},a=()=>{var t=new Date,n=t.getFullYear(),e=t.getMonth()+1,o=t.getDate(),r=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return`${n}${e}${o}_${r}${i}${s}`},c=(t,n)=>{fetch(t).then(e=>e.blob()).then(e=>{var o=document.createElement("a");o.style.display="none",document.body.appendChild(o);var r=window.URL.createObjectURL(e);o.href=r,o.download=a(),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o)})},l=()=>{const t=navigator.userAgent||navigator.vendor||window.opera,n=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t.toLowerCase());let e=!1;return n&&(e=!0),("ontouchstart"in window||navigator.maxTouchPoints>0)&&(e=!0),e},u="1.0.10";exports.debounce=d;exports.downloadExe=c;exports.getTimeStamp=a;exports.getUserAgent=l;exports.versions=u; |
{ | ||
"name": "images-viewer-vue3", | ||
"scope": "ImagesViewerVue3", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "A lightweight image viewer for Vue3", | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -85,4 +85,9 @@ [![npm version](https://img.shields.io/npm/v/images-viewer-vue3.svg)](https://npmjs.org/package/images-viewer-vue3) | ||
<script setup lang="ts"> | ||
import { imageViewerApi } from 'images-viewer-vue3' | ||
import { imageViewerApi, onUpdate } from 'images-viewer-vue3' | ||
// Monitor current picture information | ||
onUpdate((image:string, index: number) => { | ||
console.log(image, index) | ||
}) | ||
const previewImage = (evt) => { | ||
@@ -89,0 +94,0 @@ if (!evt.target) return |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
276145
2804
122