@lingshugroup/web-plus 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +90 -89
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +26 -21
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +192 -178
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-176a2821"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-176a2821"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var te=Object.defineProperty;var
|
|
1
|
+
"use strict";var te=Object.defineProperty;var r=(z,V)=>te(z,"name",{value:V,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.cjs"),oe=require("../../_hooks/useNamespace/index.cjs"),se=require("../../_hooks/useZIndex/index.cjs"),E=require("../../_constants/aria/index.cjs"),h=require("../../_utils/check/index.cjs"),re=require("../../_utils/types/index.cjs"),ae=require("../types/index.cjs"),le=require("../../_constants/prviewType/index.cjs"),d=require("../../icon/Index.vue/index.cjs"),D=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.cjs"),j=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),ie=["src"],ce=["src"],ue=e.defineComponent({name:"LSImage"}),de=e.defineComponent({...ue,props:ae.imageViewerProps,emits:le.previewEmits,setup(z,{expose:V,emit:Z}){const v={CONTAIN:{name:"FullScreen"},ORIGINAL:{name:"ScaleToOriginal"}},H=h.isFirefox()?"DOMMouseScroll":"mousewheel",l=z,w=Z,S=e.useAttrs(),s=oe.useNamespace("image"),{nextZIndex:P}=se.useZIndex(),I=e.ref(),T=e.ref([]),B=e.effectScope(),k=e.ref(!0),f=e.ref(l.initialIndex),N=e.shallowRef(v.CONTAIN),a=e.reactive({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"}),G=e.computed(()=>{const{source:n}=l||{};return h.isString(n)||n.length<=1}),L=e.computed(()=>f.value===0),M=e.computed(()=>{const n=l.source;return f.value===n.length-1}),W=e.computed(()=>(l.source||{})[f.value]),q=e.computed(()=>{const{scale:n,deg:o,offsetX:t,offsetY:i,enableTransition:u,width:b,height:x,objectFit:C}=a;let m=t/n,p=i/n;switch(o%360){case 90:case-270:[m,p]=[p,-m];break;case 180:case-180:[m,p]=[-m,-p];break;case 270:case-90:[m,p]=[-p,m];break}const g={transform:`scale(${n}) rotate(${o}deg) translate(${m}px, ${p}px)`,transition:u?"transform .3s":""};return N.value.name===v.CONTAIN.name&&(g.maxWidth=g.maxHeight="100%"),g.width=b,g.height=x,g.objectFit=C,g}),J=e.computed(()=>h.isNumber(l.zIndex)?l.zIndex:P()),K=r(()=>{l.onClose&&l.onClose(),w("update:source",[])},"closeFunc");function y(){U(),K()}r(y,"hide");function Q(){const n=D.default(t=>{switch(t.code){case E.EVENT_CODE.esc:l.closeOnPressEscape&&y();break;case E.EVENT_CODE.space:X();break;case E.EVENT_CODE.left:Y();break;case E.EVENT_CODE.up:c("zoomIn");break;case E.EVENT_CODE.right:_();break;case E.EVENT_CODE.down:c("zoomOut");break}}),o=D.default(t=>{(t.wheelDelta?t.wheelDelta:-t.detail)>0?c("zoomIn",{zoomRate:1.2,enableTransition:!1}):c("zoomOut",{zoomRate:1.2,enableTransition:!1})});B.run(()=>{F.useEventListener(document,"keydown",n),F.useEventListener(document,H,o)})}r(Q,"registerEventListener");function U(){B.stop()}r(U,"unregisterEventListener");function $(){k.value=!1,w("loadComplete")}r($,"handleImgLoad");function A(n){k.value=!1,n.target.alt="ls.image.error",w("loadError")}r(A,"handleImgError");function R(n){if(k.value||n.button!==0||!I.value)return;a.enableTransition=!1;const{offsetX:o,offsetY:t}=a,i=n.pageX,u=n.pageY,b=D.default(C=>{a.offsetX=o+C.pageX-i,a.offsetY=t+C.pageY-u}),x=F.useEventListener(document,"mousemove",b);F.useEventListener(document,"mouseup",()=>{x()}),n.preventDefault()}r(R,"handleMouseDown");function ee(){j.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"})}r(ee,"reset");function ne(){j.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"100%",height:"100%",objectFit:"cover"})}r(ne,"fullScreen");function X(){if(k.value)return;const n=re.keysOf(v),o=Object.values(v),t=N.value.name,u=(o.findIndex(b=>b.name===t)+1)%n.length;N.value=v[n[u]],t===v.CONTAIN.name?ne():ee()}r(X,"toggleMode");function O(n){const t=l.source.length;f.value=(n+t)%t}r(O,"setActiveItem");function Y(){L.value&&!l.infinite||O(f.value-1)}r(Y,"prev");function _(){M.value&&!l.infinite||O(f.value+1)}r(_,"next");function c(n,o={}){if(k.value)return;const{zoomRate:t,rotateDeg:i,enableTransition:u}={zoomRate:1.4,rotateDeg:90,enableTransition:!0,...o};switch(n){case"zoomOut":a.scale>.2&&(a.scale=Number.parseFloat((a.scale/t).toFixed(3)));break;case"zoomIn":a.scale<7&&(a.scale=Number.parseFloat((a.scale*t).toFixed(3)));break;case"clockwise":a.deg+=i;break;case"anticlockwise":a.deg-=i;break;case"download":w("download",S.downloadData);break}a.enableTransition=u}return r(c,"handleActions"),e.watch(W,()=>{e.nextTick(()=>{const n=T.value[0];n!=null&&n.complete||(k.value=!0)})}),e.watch(f,n=>{w("switch",n)}),e.onMounted(()=>{var n,o;Q(),(o=(n=I.value)==null?void 0:n.focus)==null||o.call(n)}),V({setActiveItem:O}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!n.teleported},[e.createVNode(e.Transition,{name:"viewer-fade",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapper",ref:I,tabindex:-1,class:e.normalizeClass(e.unref(s).e("wrapper")),style:e.normalizeStyle({zIndex:e.unref(J)})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("mask")),onClick:o[0]||(o[0]=e.withModifiers(t=>n.hideOnClickModal&&y(),["self"]))},null,2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("close")]),onClick:y},[e.createVNode(d.default,{name:"Close",size:24,color:"#FFF"})],2),e.unref(G)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("prev"),e.unref(s).is("disabled",!n.infinite&&e.unref(L))]),onClick:Y},[e.createVNode(d.default,{name:"ArrowLeft",size:24,color:"#FFF"})],2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("next"),e.unref(s).is("disabled",!n.infinite&&e.unref(M))]),onClick:_},[e.createVNode(d.default,{name:"ArrowRight",size:24,color:"#FFF"})],2)],64)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("actions")])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("actions__inner"))},[e.createVNode(d.default,{name:"ZoomOut",size:24,color:"#FFF",onClick:o[1]||(o[1]=t=>c("zoomOut"))}),e.createVNode(d.default,{name:"ZoomIn",size:24,color:"#FFF",onClick:o[2]||(o[2]=t=>c("zoomIn"))}),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{name:e.unref(N).name,size:24,color:"#FFF",onClick:X},null,8,["name"]),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{name:"RefreshLeft",size:24,color:"#FFF",onClick:o[3]||(o[3]=t=>c("anticlockwise"))}),e.createVNode(d.default,{name:"RefreshRight",size:24,color:"#FFF",onClick:o[4]||(o[4]=t=>c("clockwise"))}),e.unref(S).hasDownload?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(d.default,{name:"Download",size:24,color:"#FFF",onClick:o[5]||(o[5]=t=>c("download"))})],64)):e.createCommentVNode("",!0)],2)],2),n.source?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(s).e("canvas"))},[e.unref(h.isArray)(n.source)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.source,(t,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("img",{ref_for:!0,ref:r(u=>e.unref(T)[i]=u,"ref"),key:t,src:t,style:e.normalizeStyle(e.unref(q)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:$,onError:A,onMousedown:R},null,46,ie)),[[e.vShow,i===e.unref(f)]])),128)):(e.openBlock(),e.createElementBlock("img",{ref:r(t=>e.unref(T)[0]=t,"ref"),key:n.source,src:n.source,style:e.normalizeStyle(e.unref(q)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:$,onError:A,onMousedown:R},null,46,ce))],2)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"viewer",{},void 0,!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],6)]),_:3})],8,["disabled"]))]))}});exports.default=de;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (L, S) =>
|
|
3
|
-
import { defineComponent as
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var a = (L, S) => pe(L, "name", { value: S, configurable: !0 });
|
|
3
|
+
import { defineComponent as te, useAttrs as ve, ref as O, effectScope as ge, shallowRef as we, reactive as be, computed as z, watch as U, nextTick as ke, onMounted as Fe, openBlock as g, createElementBlock as k, createBlock as he, Teleport as Ie, createVNode as u, Transition as ze, withCtx as Ce, createElementVNode as d, normalizeClass as i, unref as o, normalizeStyle as X, withModifiers as Ne, Fragment as Y, createCommentVNode as j, renderList as Te, withDirectives as xe, vShow as ye, renderSlot as ee } from "vue";
|
|
4
4
|
import { useEventListener as E } from "../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.js";
|
|
5
5
|
import { useNamespace as Oe } from "../../_hooks/useNamespace/index.js";
|
|
6
6
|
import { useZIndex as Ee } from "../../_hooks/useZIndex/index.js";
|
|
@@ -8,17 +8,17 @@ import { EVENT_CODE as C } from "../../_constants/aria/index.js";
|
|
|
8
8
|
import { isString as Le, isNumber as Se, isArray as De, isFirefox as Ae } from "../../_utils/check/index.js";
|
|
9
9
|
import { keysOf as Me } from "../../_utils/types/index.js";
|
|
10
10
|
import { imageViewerProps as Re } from "../types/index.js";
|
|
11
|
-
import { previewEmits as
|
|
11
|
+
import { previewEmits as $e } from "../../_constants/prviewType/index.js";
|
|
12
12
|
import p from "../../icon/Index.vue/index.js";
|
|
13
13
|
import V from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.js";
|
|
14
|
-
import
|
|
15
|
-
const
|
|
14
|
+
import oe from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
15
|
+
const Xe = ["src"], Ye = ["src"], je = te({
|
|
16
16
|
name: "LSImage"
|
|
17
|
-
}), eo = /* @__PURE__ */
|
|
17
|
+
}), eo = /* @__PURE__ */ te({
|
|
18
18
|
...je,
|
|
19
19
|
props: Re,
|
|
20
|
-
emits:
|
|
21
|
-
setup(L, { expose: S, emit:
|
|
20
|
+
emits: $e,
|
|
21
|
+
setup(L, { expose: S, emit: ne }) {
|
|
22
22
|
const F = {
|
|
23
23
|
CONTAIN: {
|
|
24
24
|
name: "FullScreen"
|
|
@@ -26,7 +26,7 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
26
26
|
ORIGINAL: {
|
|
27
27
|
name: "ScaleToOriginal"
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, se = Ae() ? "DOMMouseScroll" : "mousewheel", l = L, N = ne, Z = ve(), s = Oe("image"), { nextZIndex: ae } = Ee(), D = O(), A = O([]), H = ge(), h = O(!0), v = O(l.initialIndex), x = we(F.CONTAIN), r = be({
|
|
30
30
|
scale: 1,
|
|
31
31
|
deg: 0,
|
|
32
32
|
offsetX: 0,
|
|
@@ -35,42 +35,42 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
35
35
|
width: "auto",
|
|
36
36
|
height: "auto",
|
|
37
37
|
objectFit: "none"
|
|
38
|
-
}),
|
|
38
|
+
}), re = z(() => {
|
|
39
39
|
const { source: e } = l || {};
|
|
40
40
|
return Le(e) || e.length <= 1;
|
|
41
41
|
}), B = z(() => v.value === 0), P = z(() => {
|
|
42
42
|
const e = l.source;
|
|
43
43
|
return v.value === e.length - 1;
|
|
44
|
-
}),
|
|
45
|
-
const { scale: e, deg: n, offsetX: t, offsetY: c, enableTransition: f, width:
|
|
46
|
-
let
|
|
44
|
+
}), ie = z(() => (l.source || {})[v.value]), G = z(() => {
|
|
45
|
+
const { scale: e, deg: n, offsetX: t, offsetY: c, enableTransition: f, width: T, height: $, objectFit: y } = r;
|
|
46
|
+
let w = t / e, b = c / e;
|
|
47
47
|
switch (n % 360) {
|
|
48
48
|
case 90:
|
|
49
49
|
case -270:
|
|
50
|
-
[
|
|
50
|
+
[w, b] = [b, -w];
|
|
51
51
|
break;
|
|
52
52
|
case 180:
|
|
53
53
|
case -180:
|
|
54
|
-
[
|
|
54
|
+
[w, b] = [-w, -b];
|
|
55
55
|
break;
|
|
56
56
|
case 270:
|
|
57
57
|
case -90:
|
|
58
|
-
[
|
|
58
|
+
[w, b] = [-b, w];
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
61
|
const I = {
|
|
62
|
-
transform: `scale(${e}) rotate(${n}deg) translate(${
|
|
62
|
+
transform: `scale(${e}) rotate(${n}deg) translate(${w}px, ${b}px)`,
|
|
63
63
|
transition: f ? "transform .3s" : ""
|
|
64
64
|
};
|
|
65
|
-
return
|
|
66
|
-
}),
|
|
67
|
-
l.onClose && l.onClose(),
|
|
65
|
+
return x.value.name === F.CONTAIN.name && (I.maxWidth = I.maxHeight = "100%"), I.width = T, I.height = $, I.objectFit = y, I;
|
|
66
|
+
}), le = z(() => Se(l.zIndex) ? l.zIndex : ae()), ce = /* @__PURE__ */ a(() => {
|
|
67
|
+
l.onClose && l.onClose(), N("update:source", []);
|
|
68
68
|
}, "closeFunc");
|
|
69
69
|
function M() {
|
|
70
|
-
|
|
70
|
+
de(), ce();
|
|
71
71
|
}
|
|
72
72
|
a(M, "hide");
|
|
73
|
-
function
|
|
73
|
+
function ue() {
|
|
74
74
|
const e = V((t) => {
|
|
75
75
|
switch (t.code) {
|
|
76
76
|
case C.esc:
|
|
@@ -83,54 +83,54 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
83
83
|
K();
|
|
84
84
|
break;
|
|
85
85
|
case C.up:
|
|
86
|
-
|
|
86
|
+
m("zoomIn");
|
|
87
87
|
break;
|
|
88
88
|
case C.right:
|
|
89
89
|
Q();
|
|
90
90
|
break;
|
|
91
91
|
case C.down:
|
|
92
|
-
|
|
92
|
+
m("zoomOut");
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
}), n = V((t) => {
|
|
96
|
-
(t.wheelDelta ? t.wheelDelta : -t.detail) > 0 ?
|
|
96
|
+
(t.wheelDelta ? t.wheelDelta : -t.detail) > 0 ? m("zoomIn", {
|
|
97
97
|
zoomRate: 1.2,
|
|
98
98
|
enableTransition: !1
|
|
99
|
-
}) :
|
|
99
|
+
}) : m("zoomOut", {
|
|
100
100
|
zoomRate: 1.2,
|
|
101
101
|
enableTransition: !1
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
H.run(() => {
|
|
105
|
-
E(document, "keydown", e), E(document,
|
|
105
|
+
E(document, "keydown", e), E(document, se, n);
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
a(
|
|
109
|
-
function
|
|
108
|
+
a(ue, "registerEventListener");
|
|
109
|
+
function de() {
|
|
110
110
|
H.stop();
|
|
111
111
|
}
|
|
112
|
-
a(
|
|
113
|
-
function
|
|
114
|
-
h.value = !1,
|
|
112
|
+
a(de, "unregisterEventListener");
|
|
113
|
+
function W() {
|
|
114
|
+
h.value = !1, N("loadComplete");
|
|
115
115
|
}
|
|
116
|
-
a(
|
|
117
|
-
function
|
|
118
|
-
h.value = !1, e.target.alt = "ls.image.error",
|
|
116
|
+
a(W, "handleImgLoad");
|
|
117
|
+
function _(e) {
|
|
118
|
+
h.value = !1, e.target.alt = "ls.image.error", N("loadError");
|
|
119
119
|
}
|
|
120
|
-
a(
|
|
120
|
+
a(_, "handleImgError");
|
|
121
121
|
function q(e) {
|
|
122
122
|
if (h.value || e.button !== 0 || !D.value) return;
|
|
123
123
|
r.enableTransition = !1;
|
|
124
|
-
const { offsetX: n, offsetY: t } = r, c = e.pageX, f = e.pageY,
|
|
124
|
+
const { offsetX: n, offsetY: t } = r, c = e.pageX, f = e.pageY, T = V((y) => {
|
|
125
125
|
r.offsetX = n + y.pageX - c, r.offsetY = t + y.pageY - f;
|
|
126
|
-
}),
|
|
126
|
+
}), $ = E(document, "mousemove", T);
|
|
127
127
|
E(document, "mouseup", () => {
|
|
128
|
-
|
|
128
|
+
$();
|
|
129
129
|
}), e.preventDefault();
|
|
130
130
|
}
|
|
131
131
|
a(q, "handleMouseDown");
|
|
132
132
|
function me() {
|
|
133
|
-
|
|
133
|
+
oe(r, {
|
|
134
134
|
scale: 1,
|
|
135
135
|
deg: 0,
|
|
136
136
|
offsetX: 0,
|
|
@@ -142,8 +142,8 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
a(me, "reset");
|
|
145
|
-
function
|
|
146
|
-
|
|
145
|
+
function fe() {
|
|
146
|
+
oe(r, {
|
|
147
147
|
scale: 1,
|
|
148
148
|
deg: 0,
|
|
149
149
|
offsetX: 0,
|
|
@@ -154,11 +154,11 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
154
154
|
objectFit: "cover"
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
a(
|
|
157
|
+
a(fe, "fullScreen");
|
|
158
158
|
function J() {
|
|
159
159
|
if (h.value) return;
|
|
160
|
-
const e = Me(F), n = Object.values(F), t =
|
|
161
|
-
|
|
160
|
+
const e = Me(F), n = Object.values(F), t = x.value.name, f = (n.findIndex((T) => T.name === t) + 1) % e.length;
|
|
161
|
+
x.value = F[e[f]], t === F.CONTAIN.name ? fe() : me();
|
|
162
162
|
}
|
|
163
163
|
a(J, "toggleMode");
|
|
164
164
|
function R(e) {
|
|
@@ -174,7 +174,7 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
174
174
|
P.value && !l.infinite || R(v.value + 1);
|
|
175
175
|
}
|
|
176
176
|
a(Q, "next");
|
|
177
|
-
function
|
|
177
|
+
function m(e, n = {}) {
|
|
178
178
|
if (h.value) return;
|
|
179
179
|
const { zoomRate: t, rotateDeg: c, enableTransition: f } = {
|
|
180
180
|
zoomRate: 1.4,
|
|
@@ -196,46 +196,46 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
196
196
|
r.deg -= c;
|
|
197
197
|
break;
|
|
198
198
|
case "download":
|
|
199
|
-
|
|
199
|
+
N("download", Z.downloadData);
|
|
200
200
|
break;
|
|
201
201
|
}
|
|
202
202
|
r.enableTransition = f;
|
|
203
203
|
}
|
|
204
|
-
return a(
|
|
204
|
+
return a(m, "handleActions"), U(ie, () => {
|
|
205
205
|
ke(() => {
|
|
206
206
|
const e = A.value[0];
|
|
207
207
|
e != null && e.complete || (h.value = !0);
|
|
208
208
|
});
|
|
209
209
|
}), U(v, (e) => {
|
|
210
|
-
|
|
211
|
-
}),
|
|
210
|
+
N("switch", e);
|
|
211
|
+
}), Fe(() => {
|
|
212
212
|
var e, n;
|
|
213
|
-
|
|
213
|
+
ue(), (n = (e = D.value) == null ? void 0 : e.focus) == null || n.call(e);
|
|
214
214
|
}), S({
|
|
215
215
|
/** @description manually switch image */
|
|
216
216
|
setActiveItem: R
|
|
217
|
-
}), (e, n) => (g(),
|
|
218
|
-
(g(),
|
|
217
|
+
}), (e, n) => (g(), k("div", null, [
|
|
218
|
+
(g(), he(Ie, {
|
|
219
219
|
to: "body",
|
|
220
220
|
disabled: !e.teleported
|
|
221
221
|
}, [
|
|
222
|
-
u(
|
|
222
|
+
u(ze, {
|
|
223
223
|
name: "viewer-fade",
|
|
224
224
|
appear: ""
|
|
225
225
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
|
|
226
|
+
default: Ce(() => [
|
|
227
|
+
d("div", {
|
|
228
228
|
ref_key: "wrapper",
|
|
229
229
|
ref: D,
|
|
230
230
|
tabindex: -1,
|
|
231
231
|
class: i(o(s).e("wrapper")),
|
|
232
|
-
style:
|
|
232
|
+
style: X({ zIndex: o(le) })
|
|
233
233
|
}, [
|
|
234
|
-
|
|
234
|
+
d("div", {
|
|
235
235
|
class: i(o(s).e("mask")),
|
|
236
|
-
onClick: n[0] || (n[0] =
|
|
236
|
+
onClick: n[0] || (n[0] = Ne((t) => e.hideOnClickModal && M(), ["self"]))
|
|
237
237
|
}, null, 2),
|
|
238
|
-
|
|
238
|
+
d("span", {
|
|
239
239
|
class: i([o(s).e("btn"), o(s).e("close")]),
|
|
240
240
|
onClick: M
|
|
241
241
|
}, [
|
|
@@ -245,8 +245,8 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
245
245
|
color: "#FFF"
|
|
246
246
|
})
|
|
247
247
|
], 2),
|
|
248
|
-
o(
|
|
249
|
-
|
|
248
|
+
o(re) ? j("", !0) : (g(), k(Y, { key: 0 }, [
|
|
249
|
+
d("span", {
|
|
250
250
|
class: i([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(B))]),
|
|
251
251
|
onClick: K
|
|
252
252
|
}, [
|
|
@@ -256,7 +256,7 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
256
256
|
color: "#FFF"
|
|
257
257
|
})
|
|
258
258
|
], 2),
|
|
259
|
-
|
|
259
|
+
d("span", {
|
|
260
260
|
class: i([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(P))]),
|
|
261
261
|
onClick: Q
|
|
262
262
|
}, [
|
|
@@ -267,89 +267,90 @@ const Ye = ["src"], $e = ["src"], je = oe({
|
|
|
267
267
|
})
|
|
268
268
|
], 2)
|
|
269
269
|
], 64)),
|
|
270
|
-
|
|
270
|
+
d("div", {
|
|
271
271
|
class: i([o(s).e("btn"), o(s).e("actions")])
|
|
272
272
|
}, [
|
|
273
|
-
|
|
273
|
+
d("div", {
|
|
274
274
|
class: i(o(s).e("actions__inner"))
|
|
275
275
|
}, [
|
|
276
276
|
u(p, {
|
|
277
277
|
name: "ZoomOut",
|
|
278
278
|
size: 24,
|
|
279
279
|
color: "#FFF",
|
|
280
|
-
onClick: n[1] || (n[1] = (t) =>
|
|
280
|
+
onClick: n[1] || (n[1] = (t) => m("zoomOut"))
|
|
281
281
|
}),
|
|
282
282
|
u(p, {
|
|
283
283
|
name: "ZoomIn",
|
|
284
284
|
size: 24,
|
|
285
285
|
color: "#FFF",
|
|
286
|
-
onClick: n[2] || (n[2] = (t) =>
|
|
286
|
+
onClick: n[2] || (n[2] = (t) => m("zoomIn"))
|
|
287
287
|
}),
|
|
288
|
-
|
|
288
|
+
d("i", {
|
|
289
289
|
class: i(o(s).e("actions__divider"))
|
|
290
290
|
}, null, 2),
|
|
291
291
|
u(p, {
|
|
292
|
-
name: o(
|
|
292
|
+
name: o(x).name,
|
|
293
293
|
size: 24,
|
|
294
294
|
color: "#FFF",
|
|
295
295
|
onClick: J
|
|
296
296
|
}, null, 8, ["name"]),
|
|
297
|
-
|
|
297
|
+
d("i", {
|
|
298
298
|
class: i(o(s).e("actions__divider"))
|
|
299
299
|
}, null, 2),
|
|
300
300
|
u(p, {
|
|
301
301
|
name: "RefreshLeft",
|
|
302
302
|
size: 24,
|
|
303
303
|
color: "#FFF",
|
|
304
|
-
onClick: n[3] || (n[3] = (t) =>
|
|
304
|
+
onClick: n[3] || (n[3] = (t) => m("anticlockwise"))
|
|
305
305
|
}),
|
|
306
306
|
u(p, {
|
|
307
307
|
name: "RefreshRight",
|
|
308
308
|
size: 24,
|
|
309
309
|
color: "#FFF",
|
|
310
|
-
onClick: n[4] || (n[4] = (t) =>
|
|
310
|
+
onClick: n[4] || (n[4] = (t) => m("clockwise"))
|
|
311
311
|
}),
|
|
312
|
-
o(Z).hasDownload ? (g(),
|
|
313
|
-
|
|
312
|
+
o(Z).hasDownload ? (g(), k(Y, { key: 0 }, [
|
|
313
|
+
d("i", {
|
|
314
314
|
class: i(o(s).e("actions__divider"))
|
|
315
315
|
}, null, 2),
|
|
316
316
|
u(p, {
|
|
317
317
|
name: "Download",
|
|
318
318
|
size: 24,
|
|
319
319
|
color: "#FFF",
|
|
320
|
-
onClick: n[5] || (n[5] = (t) =>
|
|
320
|
+
onClick: n[5] || (n[5] = (t) => m("download"))
|
|
321
321
|
})
|
|
322
322
|
], 64)) : j("", !0)
|
|
323
323
|
], 2)
|
|
324
324
|
], 2),
|
|
325
|
-
e.source ? (g(),
|
|
325
|
+
e.source ? (g(), k("div", {
|
|
326
326
|
key: 1,
|
|
327
327
|
class: i(o(s).e("canvas"))
|
|
328
328
|
}, [
|
|
329
|
-
o(De)(e.source) ? (g(!0),
|
|
329
|
+
o(De)(e.source) ? (g(!0), k(Y, { key: 0 }, Te(e.source, (t, c) => xe((g(), k("img", {
|
|
330
330
|
ref_for: !0,
|
|
331
331
|
ref: /* @__PURE__ */ a((f) => o(A)[c] = f, "ref"),
|
|
332
332
|
key: t,
|
|
333
333
|
src: t,
|
|
334
|
-
style:
|
|
334
|
+
style: X(o(G)),
|
|
335
335
|
class: i(o(s).e("img")),
|
|
336
|
-
onLoad:
|
|
337
|
-
onError:
|
|
336
|
+
onLoad: W,
|
|
337
|
+
onError: _,
|
|
338
338
|
onMousedown: q
|
|
339
|
-
}, null, 46,
|
|
340
|
-
[
|
|
341
|
-
])), 128)) : (g(),
|
|
339
|
+
}, null, 46, Xe)), [
|
|
340
|
+
[ye, c === o(v)]
|
|
341
|
+
])), 128)) : (g(), k("img", {
|
|
342
342
|
ref: /* @__PURE__ */ a((t) => o(A)[0] = t, "ref"),
|
|
343
343
|
key: e.source,
|
|
344
344
|
src: e.source,
|
|
345
|
-
style:
|
|
345
|
+
style: X(o(G)),
|
|
346
346
|
class: i(o(s).e("img")),
|
|
347
|
-
onLoad:
|
|
348
|
-
onError:
|
|
347
|
+
onLoad: W,
|
|
348
|
+
onError: _,
|
|
349
349
|
onMousedown: q
|
|
350
|
-
}, null, 46,
|
|
350
|
+
}, null, 46, Ye))
|
|
351
351
|
], 2)) : j("", !0),
|
|
352
|
-
|
|
352
|
+
ee(e.$slots, "viewer", {}, void 0, !0),
|
|
353
|
+
ee(e.$slots, "default", {}, void 0, !0)
|
|
353
354
|
], 6)
|
|
354
355
|
]),
|
|
355
356
|
_: 3
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-b39735de"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const _ = /* @__PURE__ */
|
|
3
|
+
import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-b39735de"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var t=(o,r)=>f(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";var f=Object.defineProperty;var t=(o,r)=>f(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../Image.vue/index.cjs"),v=require("../../_hooks/usePreviewHook/index.cjs"),g=require("../../_constants/prviewType/index.cjs"),C=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),w=e.defineComponent({name:"LSPreviewImage"}),P=e.defineComponent({...w,name:"LSPreviewImage",components:{LSImage:d.default},inheritAttrs:!1,props:e.mergeModels(g.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(o,{emit:r}){const l=r,i=o,s=e.useModel(o,"modelValue"),{comClass:u,defAttrs:m,closeLoading:a}=v.default(i,s),c=t(()=>{a(),l("loadComplete")},"loadComplete"),p=t(()=>{a(),l("loadError")},"loadError");return(n,_)=>s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(u))},[e.createVNode(d.default,e.mergeProps(e.unref(C.default)(e.unref(m),n.$attrs),{onLoadComplete:c,onLoadError:p}),{viewer:e.withCtx(()=>[e.renderSlot(n.$slots,"viewer",{},void 0,!0)]),_:3},16)],2)):e.createCommentVNode("",!0)}});exports.default=P;
|
|
@@ -1,43 +1,48 @@
|
|
|
1
|
-
var
|
|
2
|
-
var r = (e, o) =>
|
|
3
|
-
import { defineComponent as d, mergeModels as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
var C = Object.defineProperty;
|
|
2
|
+
var r = (e, o) => C(e, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { defineComponent as d, mergeModels as n, useModel as w, openBlock as g, createElementBlock as L, normalizeClass as P, unref as t, createVNode as V, mergeProps as E, withCtx as _, renderSlot as k, createCommentVNode as S } from "vue";
|
|
4
|
+
import i from "../Image.vue/index.js";
|
|
5
|
+
import h from "../../_hooks/usePreviewHook/index.js";
|
|
6
6
|
import { lsPreviewProp as B } from "../../_constants/prviewType/index.js";
|
|
7
7
|
import I from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
8
8
|
const M = d({
|
|
9
9
|
name: "LSPreviewImage"
|
|
10
|
-
}),
|
|
10
|
+
}), H = /* @__PURE__ */ d({
|
|
11
11
|
...M,
|
|
12
12
|
name: "LSPreviewImage",
|
|
13
13
|
components: {
|
|
14
|
-
LSImage:
|
|
14
|
+
LSImage: i
|
|
15
15
|
},
|
|
16
16
|
inheritAttrs: !1,
|
|
17
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ n(B, {
|
|
18
18
|
modelValue: {
|
|
19
19
|
type: Boolean
|
|
20
20
|
},
|
|
21
21
|
modelModifiers: {}
|
|
22
22
|
}),
|
|
23
|
-
emits: /* @__PURE__ */
|
|
23
|
+
emits: /* @__PURE__ */ n(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
24
24
|
setup(e, { emit: o }) {
|
|
25
|
-
const m = o,
|
|
26
|
-
|
|
27
|
-
}, "loadComplete"),
|
|
28
|
-
|
|
25
|
+
const m = o, p = e, l = w(e, "modelValue"), { comClass: c, defAttrs: u, closeLoading: s } = h(p, l), f = /* @__PURE__ */ r(() => {
|
|
26
|
+
s(), m("loadComplete");
|
|
27
|
+
}, "loadComplete"), v = /* @__PURE__ */ r(() => {
|
|
28
|
+
s(), m("loadError");
|
|
29
29
|
}, "loadError");
|
|
30
|
-
return (
|
|
30
|
+
return (a, y) => l.value ? (g(), L("div", {
|
|
31
31
|
key: 0,
|
|
32
|
-
class:
|
|
32
|
+
class: P(t(c))
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
onLoadComplete:
|
|
36
|
-
onLoadError:
|
|
37
|
-
}),
|
|
38
|
-
|
|
34
|
+
V(i, E(t(I)(t(u), a.$attrs), {
|
|
35
|
+
onLoadComplete: f,
|
|
36
|
+
onLoadError: v
|
|
37
|
+
}), {
|
|
38
|
+
viewer: _(() => [
|
|
39
|
+
k(a.$slots, "viewer", {}, void 0, !0)
|
|
40
|
+
]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 16)
|
|
43
|
+
], 2)) : S("", !0);
|
|
39
44
|
}
|
|
40
45
|
});
|
|
41
46
|
export {
|
|
42
|
-
|
|
47
|
+
H as default
|
|
43
48
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-95a290df"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-95a290df"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|