jmash-core 0.0.11 → 0.0.13
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/dist/401-LzXAVxnC.mjs +101 -0
- package/dist/404-BaS1xZmV.mjs +37 -0
- package/dist/{BarChart-CbBhpMpZ.mjs → BarChart-ClnlJEhi.mjs} +41 -41
- package/dist/{FileSaver.min-CivbhzMe.mjs → FileSaver.min-C7ddeQoo.mjs} +1 -1
- package/dist/{FunnelChart-Czy2TVI1.mjs → FunnelChart-CcCVox9E.mjs} +16 -15
- package/dist/{PieChart-B8Tay-HH.mjs → PieChart-BHM8amLk.mjs} +1 -1
- package/dist/{PieChart.vue_vue_type_script_setup_true_lang-CH5ME8e4.mjs → PieChart.vue_vue_type_script_setup_true_lang-BaJNQr7Z.mjs} +25 -24
- package/dist/{RadarChart-BzUQwTnX.mjs → RadarChart-ChaevZtZ.mjs} +1 -1
- package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-DC-Ww3Mu.mjs → RadarChart.vue_vue_type_script_setup_true_lang-DF4axEB-.mjs} +27 -26
- package/dist/{edit-DaxU7bBz.mjs → edit-5MpAgj0J.mjs} +1 -1
- package/dist/{edit-C0aHXOi3.mjs → edit-Bz0L-kJZ.mjs} +1 -1
- package/dist/{edit-B95ajyfH.mjs → edit-ClmR7gql.mjs} +1 -1
- package/dist/{edit-BJAAEDVd.mjs → edit-D2udSsbu.mjs} +1 -1
- package/dist/edit-DXSp7oE2.mjs +4 -0
- package/dist/{edit-CR7ZiKuo.mjs → edit-FahW6Usp.mjs} +51 -51
- package/dist/{edit-5ZpeysVY.mjs → edit-oUUjQ6s5.mjs} +47 -47
- package/dist/edit-zLDTi0zt.mjs +4 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-0Q5XHHkN.mjs → edit.vue_vue_type_script_setup_true_lang-BFSwE0WY.mjs} +24 -24
- package/dist/{edit.vue_vue_type_script_setup_true_lang-DqqWi384.mjs → edit.vue_vue_type_script_setup_true_lang-BRk4mulZ.mjs} +22 -22
- package/dist/{edit.vue_vue_type_script_setup_true_lang-CCq_E2KT.mjs → edit.vue_vue_type_script_setup_true_lang-BpmgWV6c.mjs} +14 -14
- package/dist/{edit.vue_vue_type_script_setup_true_lang-C-BRxRH6.mjs → edit.vue_vue_type_script_setup_true_lang-C5DH8_ra.mjs} +30 -30
- package/dist/edit.vue_vue_type_script_setup_true_lang-F-7AWta2.mjs +588 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-D4w7Aa9M.mjs → edit.vue_vue_type_script_setup_true_lang-yaBZyiFi.mjs} +25 -25
- package/dist/{el-card-acRFAeYD.mjs → el-card-CjFpAXC4.mjs} +1 -1
- package/dist/{el-col-BFrxkvh3.mjs → el-col-D9kCVYAq.mjs} +17 -17
- package/dist/{el-date-picker-CjE5H0IY.mjs → el-date-picker-_cuHa2hi.mjs} +474 -474
- package/dist/el-divider-8Ov9f55F.mjs +45 -0
- package/dist/{el-dropdown-item-SBcx6_kX.mjs → el-dropdown-item-CSpUSfWV.mjs} +95 -95
- package/dist/{el-tree-select-RwYP-GEn.mjs → el-tree-select-BUK1QB3u.mjs} +75 -75
- package/dist/{index-CQlxUoOf.mjs → index-BYYYSOkP.mjs} +1 -1
- package/dist/{index-Bqg1CGw2.mjs → index-BeFhB4ZJ.mjs} +1 -1
- package/dist/{index-B7zhho5d.mjs → index-BkPB5eHC.mjs} +92 -92
- package/dist/{index-CcXjdXcD.mjs → index-C34zVC-7.mjs} +67 -67
- package/dist/{index-BcstP65E.mjs → index-C68JBxAE.mjs} +100 -100
- package/dist/{index-ChzNa2kp.mjs → index-CPqNZOs9.mjs} +21463 -21235
- package/dist/{index-u66O7nvc.mjs → index-CXJ-WW3h.mjs} +112 -111
- package/dist/{index-DvrFzTq2.mjs → index-CYAfQz-w.mjs} +1 -1
- package/dist/index-Cuk7sDz9.mjs +277 -0
- package/dist/{index-Dyn0k8Ib.mjs → index-D8zb68MK.mjs} +64 -64
- package/dist/{index-DBmv4w5y.mjs → index-D9itg8P7.mjs} +1 -1
- package/dist/{index-DAIdsjwj.mjs → index-DHQQEEWW.mjs} +53 -53
- package/dist/{index-DQtth-qu.mjs → index-DW1L3U1A.mjs} +53 -53
- package/dist/{index-B-lo0ywJ.mjs → index-Dav45Y13.mjs} +72 -72
- package/dist/index-DhjUimfd.mjs +272 -0
- package/dist/{index-DQbHbpgW.mjs → index-GPbjfqQg.mjs} +4 -4
- package/dist/{index-hr-nwn6C.mjs → index-W4pvCYhJ.mjs} +1 -1
- package/dist/{index-SUlMvdOg.mjs → index-gaeN4E1_.mjs} +88 -88
- package/dist/index-hZzxBNan.mjs +3447 -0
- package/dist/{index-4UdK9Nb9.mjs → index-l9Oeu9G-.mjs} +49 -49
- package/dist/index.mjs +27 -28
- package/dist/index.vue_vue_type_script_setup_true_lang-DWjQT4jn.mjs +54 -0
- package/dist/picture-DRU19T9b.mjs +587 -0
- package/dist/position-Ba7wRAlR.mjs +23 -0
- package/dist/{profile-BfDHQ_n5.mjs → profile-3Wsx53aV.mjs} +25 -25
- package/dist/runAs-CE2R49GJ.mjs +4 -0
- package/dist/runAs.vue_vue_type_script_setup_true_lang-i0DdmfK1.mjs +113 -0
- package/dist/style.css +1 -1
- package/dist/{types-D2vHMNqn.mjs → types-D3sIBzF1.mjs} +13 -13
- package/dist/{updatePwd-Dc31cBOV.mjs → updatePwd-2Dc9-bnF.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-Do-jRGf0.mjs → updatePwd.vue_vue_type_script_setup_true_lang-3mhiAxD4.mjs} +9 -9
- package/dts/src/components/AppLink/index.vue.d.ts +19 -0
- package/dts/src/components/DictSelect/index.vue.d.ts +1 -1
- package/dts/src/components/Dictionary/index.vue.d.ts +1 -1
- package/dts/src/components/IconSelect/requireIcons.d.ts +1 -1
- package/dts/src/components/Pagination/index.vue.d.ts +3 -3
- package/dts/src/enums/DeviceEnum.d.ts +13 -0
- package/dts/src/enums/LayoutEnum.d.ts +17 -0
- package/dts/src/enums/MenuTypeEnum.d.ts +4 -1
- package/dts/src/enums/SidebarStatusEnum.d.ts +13 -0
- package/dts/src/enums/ThemeEnum.d.ts +17 -0
- package/dts/src/index.d.ts +10 -3
- package/dts/src/lang/index.d.ts +90 -0
- package/dts/src/lang/package/en.d.ts +42 -0
- package/dts/src/lang/package/zh-cn.d.ts +48 -0
- package/dts/src/layout/components/AppMain/index.vue.d.ts +2 -0
- package/dts/src/layout/components/NavBar/components/NavbarLeft.vue.d.ts +2 -0
- package/dts/src/layout/components/NavBar/components/NavbarRight.vue.d.ts +2 -0
- package/dts/src/layout/components/Settings/components/LayoutSelect.vue.d.ts +10 -0
- package/dts/src/layout/components/Settings/components/ThemeColorPicker.vue.d.ts +10 -0
- package/dts/src/layout/components/Sidebar/components/SidebarLogo.vue.d.ts +12 -0
- package/dts/src/layout/components/Sidebar/components/SidebarMenu.vue.d.ts +50 -0
- package/dts/src/layout/components/Sidebar/components/SidebarMenuItem.vue.d.ts +42 -0
- package/dts/src/layout/components/Sidebar/components/SidebarMenuItemTitle.vue.d.ts +23 -0
- package/dts/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue.d.ts +2 -0
- package/dts/src/stores/index.d.ts +5 -0
- package/dts/src/utils/color.d.ts +69 -0
- package/dts/src/utils/index.d.ts +9 -0
- package/dts/src/utils/nprogress.d.ts +4 -0
- package/dts/src/views/my/runAs.vue.d.ts +6 -0
- package/dts/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/401-BjFOoJaQ.mjs +0 -101
- package/dist/404-CT8Yk873.mjs +0 -37
- package/dist/anquanrizhi-BMAtNRi-.mjs +0 -4
- package/dist/api-DA2t0sYn.mjs +0 -4
- package/dist/bumenguanli-_DtFk-Tc.mjs +0 -4
- package/dist/caozuoguanliyuan-YxDi1qyM.mjs +0 -4
- package/dist/captcha-G9RskXh1.mjs +0 -4
- package/dist/caret-bottom-Lhe9M7aA.mjs +0 -59
- package/dist/cascader-CysbB3DR.mjs +0 -4
- package/dist/client-CmoE5d0v.mjs +0 -4
- package/dist/close-DwiHyvYJ.mjs +0 -4
- package/dist/close_all-ri0Fg4Yg.mjs +0 -4
- package/dist/close_left-DLmFYlJS.mjs +0 -4
- package/dist/close_other-B705ZMV6.mjs +0 -4
- package/dist/close_right-BUdNHbs5.mjs +0 -4
- package/dist/dict-C2cGjFov.mjs +0 -4
- package/dist/document-Bf2gTChB.mjs +0 -4
- package/dist/download-cG3k-vnb.mjs +0 -4
- package/dist/drag-CwjZNuUJ.mjs +0 -4
- package/dist/edit-CIq1RPVx.mjs +0 -4
- package/dist/edit-Di-ksvTh.mjs +0 -4
- package/dist/edit-II1vFfNu.mjs +0 -4
- package/dist/edit.vue_vue_type_script_setup_true_lang-VlMd6HAa.mjs +0 -575
- package/dist/email-B2AUCEGq.mjs +0 -4
- package/dist/exit-fullscreen-BJ7HY1Sq.mjs +0 -4
- package/dist/eye-DeDz_5CQ.mjs +0 -4
- package/dist/eye-open-Cm0N1Rcz.mjs +0 -4
- package/dist/fullscreen-BFXljl9l.mjs +0 -4
- package/dist/gangweiguanli-bkwyhEXB.mjs +0 -4
- package/dist/github-CL2t8fd5.mjs +0 -4
- package/dist/homepage-IeZtzO8Q.mjs +0 -4
- package/dist/icon-DwZ6Hkfk.mjs +0 -4
- package/dist/index-CF6p3ONN.mjs +0 -319
- package/dist/index-CJvo28Bb.mjs +0 -275
- package/dist/index-CS-ceXqM.mjs +0 -2580
- package/dist/ip-DOLbS1rT.mjs +0 -4
- package/dist/jiemianxijietubiao-26-mnbzByc9.mjs +0 -4
- package/dist/language-C1tgLxuP.mjs +0 -4
- package/dist/link-Cjm7RVX7.mjs +0 -4
- package/dist/log-ZFSIG9ZQ.mjs +0 -4
- package/dist/menu-B7SOjMUJ.mjs +0 -4
- package/dist/message-Bws5C_1u.mjs +0 -4
- package/dist/mokuaiguanli-nzRpK-Pe.mjs +0 -4
- package/dist/money-DM0ZKWD3.mjs +0 -4
- package/dist/monitor-CxsUJkcx.mjs +0 -4
- package/dist/order-DZ28J7CD.mjs +0 -4
- package/dist/password-BbtiGVLy.mjs +0 -4
- package/dist/peoples-3fyh79uv.mjs +0 -4
- package/dist/phone-CdpLww4_.mjs +0 -4
- package/dist/picture-877nN1qH.mjs +0 -598
- package/dist/project-DgVsw9u_.mjs +0 -4
- package/dist/publish-BCri5HbT.mjs +0 -4
- package/dist/quanxianguanli-Cpcc8C4D.mjs +0 -4
- package/dist/redis-fjUUmFu3.mjs +0 -4
- package/dist/refresh-BWNjEt3t.mjs +0 -4
- package/dist/role-BYKzPG5H.mjs +0 -4
- package/dist/security-BsMRfWoG.mjs +0 -4
- package/dist/shoujihao-BFt1tDJn.mjs +0 -4
- package/dist/shrink-kEdKK3G7.mjs +0 -4
- package/dist/size-jLonAeyJ.mjs +0 -4
- package/dist/system-BlPhikZo.mjs +0 -4
- package/dist/table-CCqA2qBP.mjs +0 -4
- package/dist/todolist-Ul73X2IJ.mjs +0 -4
- package/dist/tree-DrEt7UUZ.mjs +0 -4
- package/dist/user-B9bSWq2E.mjs +0 -4
- package/dist/visit-w_hKTLb6.mjs +0 -4
- package/dist/xingming-DHM4olm-.mjs +0 -4
- package/dist/yonghuguanli-B3vRkdqw.mjs +0 -4
- package/dist/youxiang-D68Zx-02.mjs +0 -4
- package/dist//345/210/227/350/241/250-nphA7BPW.mjs +0 -4
- package/dist//345/233/272/345/256/232_/345/233/276/351/222/211-CXYo1gbQ.mjs +0 -4
- package/dist//346/250/241/345/235/227-D528qA63.mjs +0 -4
- package/dist//347/234/274/347/235/233-BaPHKGgj.mjs +0 -4
- package/dist//351/227/255/347/234/274/347/235/233-D6BjbTd5.mjs +0 -4
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import { defineComponent as ne, markRaw as ve, ref as h, effectScope as ke, shallowRef as Ie, computed as y, watch as ue, nextTick as me, onMounted as pe, openBlock as w, createBlock as ce, Teleport as ze, createVNode as f, Transition as Le, withCtx as L, createElementVNode as p, normalizeClass as v, unref as e, normalizeStyle as de, withModifiers as Ce, createCommentVNode as E, createElementBlock as C, Fragment as ae, resolveDynamicComponent as Ee, renderList as Se, withDirectives as xe, vShow as Ne, renderSlot as te, useAttrs as Oe, toDisplayString as Te, mergeProps as $e } from "vue";
|
|
2
|
+
import { av as Ae, q as Re, b as ge, d as P, S as ye, aw as fe, ax as Me, ay as Ve, k as we, u as he, az as Be, E as O, y as Ye, aA as De, O as Xe, aB as Fe, aC as He, aD as Pe, aE as Ke, _ as be, aF as M, A as R, aG as je, w as _e, aH as We, c as H, aI as qe, aJ as Ge, g as Ze, aK as Je } from "./index-CPqNZOs9.mjs";
|
|
3
|
+
import { i as Ue } from "./position-Ba7wRAlR.mjs";
|
|
4
|
+
var Qe = "Expected a function";
|
|
5
|
+
function ie(u, b, o) {
|
|
6
|
+
var S = !0, s = !0;
|
|
7
|
+
if (typeof u != "function")
|
|
8
|
+
throw new TypeError(Qe);
|
|
9
|
+
return Ae(o) && (S = "leading" in o ? !!o.leading : S, s = "trailing" in o ? !!o.trailing : s), Re(u, b, {
|
|
10
|
+
leading: S,
|
|
11
|
+
maxWait: b,
|
|
12
|
+
trailing: s
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const et = ge({
|
|
16
|
+
urlList: {
|
|
17
|
+
type: P(Array),
|
|
18
|
+
default: () => ye([])
|
|
19
|
+
},
|
|
20
|
+
zIndex: {
|
|
21
|
+
type: Number
|
|
22
|
+
},
|
|
23
|
+
initialIndex: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0
|
|
26
|
+
},
|
|
27
|
+
infinite: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !0
|
|
30
|
+
},
|
|
31
|
+
hideOnClickModal: Boolean,
|
|
32
|
+
teleported: Boolean,
|
|
33
|
+
closeOnPressEscape: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
zoomRate: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 1.2
|
|
40
|
+
},
|
|
41
|
+
minScale: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0.2
|
|
44
|
+
},
|
|
45
|
+
maxScale: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 7
|
|
48
|
+
},
|
|
49
|
+
crossorigin: {
|
|
50
|
+
type: P(String)
|
|
51
|
+
}
|
|
52
|
+
}), tt = {
|
|
53
|
+
close: () => !0,
|
|
54
|
+
switch: (u) => fe(u),
|
|
55
|
+
rotate: (u) => fe(u)
|
|
56
|
+
}, at = ["src", "crossorigin"], nt = ne({
|
|
57
|
+
name: "ElImageViewer"
|
|
58
|
+
}), lt = /* @__PURE__ */ ne({
|
|
59
|
+
...nt,
|
|
60
|
+
props: et,
|
|
61
|
+
emits: tt,
|
|
62
|
+
setup(u, { expose: b, emit: o }) {
|
|
63
|
+
var S;
|
|
64
|
+
const s = u, g = {
|
|
65
|
+
CONTAIN: {
|
|
66
|
+
name: "contain",
|
|
67
|
+
icon: ve(Me)
|
|
68
|
+
},
|
|
69
|
+
ORIGINAL: {
|
|
70
|
+
name: "original",
|
|
71
|
+
icon: ve(Ve)
|
|
72
|
+
}
|
|
73
|
+
}, { t: le } = we(), i = he("image-viewer"), { nextZIndex: V } = Be(), x = h(), N = h([]), T = ke(), _ = h(!0), c = h(s.initialIndex), $ = Ie(g.CONTAIN), l = h({
|
|
74
|
+
scale: 1,
|
|
75
|
+
deg: 0,
|
|
76
|
+
offsetX: 0,
|
|
77
|
+
offsetY: 0,
|
|
78
|
+
enableTransition: !1
|
|
79
|
+
}), B = h((S = s.zIndex) != null ? S : V()), oe = y(() => {
|
|
80
|
+
const { urlList: a } = s;
|
|
81
|
+
return a.length <= 1;
|
|
82
|
+
}), K = y(() => c.value === 0), j = y(() => c.value === s.urlList.length - 1), Y = y(() => s.urlList[c.value]), se = y(() => [
|
|
83
|
+
i.e("btn"),
|
|
84
|
+
i.e("prev"),
|
|
85
|
+
i.is("disabled", !s.infinite && K.value)
|
|
86
|
+
]), W = y(() => [
|
|
87
|
+
i.e("btn"),
|
|
88
|
+
i.e("next"),
|
|
89
|
+
i.is("disabled", !s.infinite && j.value)
|
|
90
|
+
]), D = y(() => {
|
|
91
|
+
const { scale: a, deg: n, offsetX: r, offsetY: k, enableTransition: z } = l.value;
|
|
92
|
+
let m = r / a, I = k / a;
|
|
93
|
+
switch (n % 360) {
|
|
94
|
+
case 90:
|
|
95
|
+
case -270:
|
|
96
|
+
[m, I] = [I, -m];
|
|
97
|
+
break;
|
|
98
|
+
case 180:
|
|
99
|
+
case -180:
|
|
100
|
+
[m, I] = [-m, -I];
|
|
101
|
+
break;
|
|
102
|
+
case 270:
|
|
103
|
+
case -90:
|
|
104
|
+
[m, I] = [-I, m];
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
const A = {
|
|
108
|
+
transform: `scale(${a}) rotate(${n}deg) translate(${m}px, ${I}px)`,
|
|
109
|
+
transition: z ? "transform .3s" : ""
|
|
110
|
+
};
|
|
111
|
+
return $.value.name === g.CONTAIN.name && (A.maxWidth = A.maxHeight = "100%"), A;
|
|
112
|
+
});
|
|
113
|
+
function X() {
|
|
114
|
+
q(), o("close");
|
|
115
|
+
}
|
|
116
|
+
function re() {
|
|
117
|
+
const a = ie((r) => {
|
|
118
|
+
switch (r.code) {
|
|
119
|
+
case R.esc:
|
|
120
|
+
s.closeOnPressEscape && X();
|
|
121
|
+
break;
|
|
122
|
+
case R.space:
|
|
123
|
+
Q();
|
|
124
|
+
break;
|
|
125
|
+
case R.left:
|
|
126
|
+
ee();
|
|
127
|
+
break;
|
|
128
|
+
case R.up:
|
|
129
|
+
d("zoomIn");
|
|
130
|
+
break;
|
|
131
|
+
case R.right:
|
|
132
|
+
t();
|
|
133
|
+
break;
|
|
134
|
+
case R.down:
|
|
135
|
+
d("zoomOut");
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}), n = ie((r) => {
|
|
139
|
+
const k = r.deltaY || r.deltaX;
|
|
140
|
+
d(k < 0 ? "zoomIn" : "zoomOut", {
|
|
141
|
+
zoomRate: s.zoomRate,
|
|
142
|
+
enableTransition: !1
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
T.run(() => {
|
|
146
|
+
M(document, "keydown", a), M(document, "wheel", n);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function q() {
|
|
150
|
+
T.stop();
|
|
151
|
+
}
|
|
152
|
+
function G() {
|
|
153
|
+
_.value = !1;
|
|
154
|
+
}
|
|
155
|
+
function Z(a) {
|
|
156
|
+
_.value = !1, a.target.alt = le("el.image.error");
|
|
157
|
+
}
|
|
158
|
+
function J(a) {
|
|
159
|
+
if (_.value || a.button !== 0 || !x.value)
|
|
160
|
+
return;
|
|
161
|
+
l.value.enableTransition = !1;
|
|
162
|
+
const { offsetX: n, offsetY: r } = l.value, k = a.pageX, z = a.pageY, m = ie((A) => {
|
|
163
|
+
l.value = {
|
|
164
|
+
...l.value,
|
|
165
|
+
offsetX: n + A.pageX - k,
|
|
166
|
+
offsetY: r + A.pageY - z
|
|
167
|
+
};
|
|
168
|
+
}), I = M(document, "mousemove", m);
|
|
169
|
+
M(document, "mouseup", () => {
|
|
170
|
+
I();
|
|
171
|
+
}), a.preventDefault();
|
|
172
|
+
}
|
|
173
|
+
function U() {
|
|
174
|
+
l.value = {
|
|
175
|
+
scale: 1,
|
|
176
|
+
deg: 0,
|
|
177
|
+
offsetX: 0,
|
|
178
|
+
offsetY: 0,
|
|
179
|
+
enableTransition: !1
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function Q() {
|
|
183
|
+
if (_.value)
|
|
184
|
+
return;
|
|
185
|
+
const a = je(g), n = Object.values(g), r = $.value.name, z = (n.findIndex((m) => m.name === r) + 1) % a.length;
|
|
186
|
+
$.value = g[a[z]], U();
|
|
187
|
+
}
|
|
188
|
+
function F(a) {
|
|
189
|
+
const n = s.urlList.length;
|
|
190
|
+
c.value = (a + n) % n;
|
|
191
|
+
}
|
|
192
|
+
function ee() {
|
|
193
|
+
K.value && !s.infinite || F(c.value - 1);
|
|
194
|
+
}
|
|
195
|
+
function t() {
|
|
196
|
+
j.value && !s.infinite || F(c.value + 1);
|
|
197
|
+
}
|
|
198
|
+
function d(a, n = {}) {
|
|
199
|
+
if (_.value)
|
|
200
|
+
return;
|
|
201
|
+
const { minScale: r, maxScale: k } = s, { zoomRate: z, rotateDeg: m, enableTransition: I } = {
|
|
202
|
+
zoomRate: s.zoomRate,
|
|
203
|
+
rotateDeg: 90,
|
|
204
|
+
enableTransition: !0,
|
|
205
|
+
...n
|
|
206
|
+
};
|
|
207
|
+
switch (a) {
|
|
208
|
+
case "zoomOut":
|
|
209
|
+
l.value.scale > r && (l.value.scale = Number.parseFloat((l.value.scale / z).toFixed(3)));
|
|
210
|
+
break;
|
|
211
|
+
case "zoomIn":
|
|
212
|
+
l.value.scale < k && (l.value.scale = Number.parseFloat((l.value.scale * z).toFixed(3)));
|
|
213
|
+
break;
|
|
214
|
+
case "clockwise":
|
|
215
|
+
l.value.deg += m, o("rotate", l.value.deg);
|
|
216
|
+
break;
|
|
217
|
+
case "anticlockwise":
|
|
218
|
+
l.value.deg -= m, o("rotate", l.value.deg);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
l.value.enableTransition = I;
|
|
222
|
+
}
|
|
223
|
+
return ue(Y, () => {
|
|
224
|
+
me(() => {
|
|
225
|
+
const a = N.value[0];
|
|
226
|
+
a != null && a.complete || (_.value = !0);
|
|
227
|
+
});
|
|
228
|
+
}), ue(c, (a) => {
|
|
229
|
+
U(), o("switch", a);
|
|
230
|
+
}), pe(() => {
|
|
231
|
+
var a, n;
|
|
232
|
+
re(), (n = (a = x.value) == null ? void 0 : a.focus) == null || n.call(a);
|
|
233
|
+
}), b({
|
|
234
|
+
setActiveItem: F
|
|
235
|
+
}), (a, n) => (w(), ce(ze, {
|
|
236
|
+
to: "body",
|
|
237
|
+
disabled: !a.teleported
|
|
238
|
+
}, [
|
|
239
|
+
f(Le, {
|
|
240
|
+
name: "viewer-fade",
|
|
241
|
+
appear: ""
|
|
242
|
+
}, {
|
|
243
|
+
default: L(() => [
|
|
244
|
+
p("div", {
|
|
245
|
+
ref_key: "wrapper",
|
|
246
|
+
ref: x,
|
|
247
|
+
tabindex: -1,
|
|
248
|
+
class: v(e(i).e("wrapper")),
|
|
249
|
+
style: de({ zIndex: B.value })
|
|
250
|
+
}, [
|
|
251
|
+
p("div", {
|
|
252
|
+
class: v(e(i).e("mask")),
|
|
253
|
+
onClick: n[0] || (n[0] = Ce((r) => a.hideOnClickModal && X(), ["self"]))
|
|
254
|
+
}, null, 2),
|
|
255
|
+
E(" CLOSE "),
|
|
256
|
+
p("span", {
|
|
257
|
+
class: v([e(i).e("btn"), e(i).e("close")]),
|
|
258
|
+
onClick: X
|
|
259
|
+
}, [
|
|
260
|
+
f(e(O), null, {
|
|
261
|
+
default: L(() => [
|
|
262
|
+
f(e(Ye))
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
})
|
|
266
|
+
], 2),
|
|
267
|
+
E(" ARROW "),
|
|
268
|
+
e(oe) ? E("v-if", !0) : (w(), C(ae, { key: 0 }, [
|
|
269
|
+
p("span", {
|
|
270
|
+
class: v(e(se)),
|
|
271
|
+
onClick: ee
|
|
272
|
+
}, [
|
|
273
|
+
f(e(O), null, {
|
|
274
|
+
default: L(() => [
|
|
275
|
+
f(e(De))
|
|
276
|
+
]),
|
|
277
|
+
_: 1
|
|
278
|
+
})
|
|
279
|
+
], 2),
|
|
280
|
+
p("span", {
|
|
281
|
+
class: v(e(W)),
|
|
282
|
+
onClick: t
|
|
283
|
+
}, [
|
|
284
|
+
f(e(O), null, {
|
|
285
|
+
default: L(() => [
|
|
286
|
+
f(e(Xe))
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
})
|
|
290
|
+
], 2)
|
|
291
|
+
], 64)),
|
|
292
|
+
E(" ACTIONS "),
|
|
293
|
+
p("div", {
|
|
294
|
+
class: v([e(i).e("btn"), e(i).e("actions")])
|
|
295
|
+
}, [
|
|
296
|
+
p("div", {
|
|
297
|
+
class: v(e(i).e("actions__inner"))
|
|
298
|
+
}, [
|
|
299
|
+
f(e(O), {
|
|
300
|
+
onClick: n[1] || (n[1] = (r) => d("zoomOut"))
|
|
301
|
+
}, {
|
|
302
|
+
default: L(() => [
|
|
303
|
+
f(e(Fe))
|
|
304
|
+
]),
|
|
305
|
+
_: 1
|
|
306
|
+
}),
|
|
307
|
+
f(e(O), {
|
|
308
|
+
onClick: n[2] || (n[2] = (r) => d("zoomIn"))
|
|
309
|
+
}, {
|
|
310
|
+
default: L(() => [
|
|
311
|
+
f(e(He))
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
}),
|
|
315
|
+
p("i", {
|
|
316
|
+
class: v(e(i).e("actions__divider"))
|
|
317
|
+
}, null, 2),
|
|
318
|
+
f(e(O), { onClick: Q }, {
|
|
319
|
+
default: L(() => [
|
|
320
|
+
(w(), ce(Ee(e($).icon)))
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
}),
|
|
324
|
+
p("i", {
|
|
325
|
+
class: v(e(i).e("actions__divider"))
|
|
326
|
+
}, null, 2),
|
|
327
|
+
f(e(O), {
|
|
328
|
+
onClick: n[3] || (n[3] = (r) => d("anticlockwise"))
|
|
329
|
+
}, {
|
|
330
|
+
default: L(() => [
|
|
331
|
+
f(e(Pe))
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
}),
|
|
335
|
+
f(e(O), {
|
|
336
|
+
onClick: n[4] || (n[4] = (r) => d("clockwise"))
|
|
337
|
+
}, {
|
|
338
|
+
default: L(() => [
|
|
339
|
+
f(e(Ke))
|
|
340
|
+
]),
|
|
341
|
+
_: 1
|
|
342
|
+
})
|
|
343
|
+
], 2)
|
|
344
|
+
], 2),
|
|
345
|
+
E(" CANVAS "),
|
|
346
|
+
p("div", {
|
|
347
|
+
class: v(e(i).e("canvas"))
|
|
348
|
+
}, [
|
|
349
|
+
(w(!0), C(ae, null, Se(a.urlList, (r, k) => xe((w(), C("img", {
|
|
350
|
+
ref_for: !0,
|
|
351
|
+
ref: (z) => N.value[k] = z,
|
|
352
|
+
key: r,
|
|
353
|
+
src: r,
|
|
354
|
+
style: de(e(D)),
|
|
355
|
+
class: v(e(i).e("img")),
|
|
356
|
+
crossorigin: a.crossorigin,
|
|
357
|
+
onLoad: G,
|
|
358
|
+
onError: Z,
|
|
359
|
+
onMousedown: J
|
|
360
|
+
}, null, 46, at)), [
|
|
361
|
+
[Ne, k === c.value]
|
|
362
|
+
])), 128))
|
|
363
|
+
], 2),
|
|
364
|
+
te(a.$slots, "default")
|
|
365
|
+
], 6)
|
|
366
|
+
]),
|
|
367
|
+
_: 3
|
|
368
|
+
})
|
|
369
|
+
], 8, ["disabled"]));
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
var ot = /* @__PURE__ */ be(lt, [["__file", "image-viewer.vue"]]);
|
|
373
|
+
const st = _e(ot), rt = ge({
|
|
374
|
+
hideOnClickModal: Boolean,
|
|
375
|
+
src: {
|
|
376
|
+
type: String,
|
|
377
|
+
default: ""
|
|
378
|
+
},
|
|
379
|
+
fit: {
|
|
380
|
+
type: String,
|
|
381
|
+
values: ["", "contain", "cover", "fill", "none", "scale-down"],
|
|
382
|
+
default: ""
|
|
383
|
+
},
|
|
384
|
+
loading: {
|
|
385
|
+
type: String,
|
|
386
|
+
values: ["eager", "lazy"]
|
|
387
|
+
},
|
|
388
|
+
lazy: Boolean,
|
|
389
|
+
scrollContainer: {
|
|
390
|
+
type: P([String, Object])
|
|
391
|
+
},
|
|
392
|
+
previewSrcList: {
|
|
393
|
+
type: P(Array),
|
|
394
|
+
default: () => ye([])
|
|
395
|
+
},
|
|
396
|
+
previewTeleported: Boolean,
|
|
397
|
+
zIndex: {
|
|
398
|
+
type: Number
|
|
399
|
+
},
|
|
400
|
+
initialIndex: {
|
|
401
|
+
type: Number,
|
|
402
|
+
default: 0
|
|
403
|
+
},
|
|
404
|
+
infinite: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: !0
|
|
407
|
+
},
|
|
408
|
+
closeOnPressEscape: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !0
|
|
411
|
+
},
|
|
412
|
+
zoomRate: {
|
|
413
|
+
type: Number,
|
|
414
|
+
default: 1.2
|
|
415
|
+
},
|
|
416
|
+
minScale: {
|
|
417
|
+
type: Number,
|
|
418
|
+
default: 0.2
|
|
419
|
+
},
|
|
420
|
+
maxScale: {
|
|
421
|
+
type: Number,
|
|
422
|
+
default: 7
|
|
423
|
+
},
|
|
424
|
+
crossorigin: {
|
|
425
|
+
type: P(String)
|
|
426
|
+
}
|
|
427
|
+
}), it = {
|
|
428
|
+
load: (u) => u instanceof Event,
|
|
429
|
+
error: (u) => u instanceof Event,
|
|
430
|
+
switch: (u) => fe(u),
|
|
431
|
+
close: () => !0,
|
|
432
|
+
show: () => !0
|
|
433
|
+
}, ut = ["src", "loading", "crossorigin"], ct = { key: 0 }, dt = ne({
|
|
434
|
+
name: "ElImage",
|
|
435
|
+
inheritAttrs: !1
|
|
436
|
+
}), ft = /* @__PURE__ */ ne({
|
|
437
|
+
...dt,
|
|
438
|
+
props: rt,
|
|
439
|
+
emits: it,
|
|
440
|
+
setup(u, { emit: b }) {
|
|
441
|
+
const o = u;
|
|
442
|
+
let S = "";
|
|
443
|
+
const { t: s } = we(), g = he("image"), le = Oe(), i = We(), V = h(), x = h(!1), N = h(!0), T = h(!1), _ = h(), c = h(), $ = H && "loading" in HTMLImageElement.prototype;
|
|
444
|
+
let l, B;
|
|
445
|
+
const oe = y(() => [
|
|
446
|
+
g.e("inner"),
|
|
447
|
+
Y.value && g.e("preview"),
|
|
448
|
+
N.value && g.is("loading")
|
|
449
|
+
]), K = y(() => le.style), j = y(() => {
|
|
450
|
+
const { fit: t } = o;
|
|
451
|
+
return H && t ? { objectFit: t } : {};
|
|
452
|
+
}), Y = y(() => {
|
|
453
|
+
const { previewSrcList: t } = o;
|
|
454
|
+
return Array.isArray(t) && t.length > 0;
|
|
455
|
+
}), se = y(() => {
|
|
456
|
+
const { previewSrcList: t, initialIndex: d } = o;
|
|
457
|
+
let a = d;
|
|
458
|
+
return d > t.length - 1 && (a = 0), a;
|
|
459
|
+
}), W = y(() => o.loading === "eager" ? !1 : !$ && o.loading === "lazy" || o.lazy), D = () => {
|
|
460
|
+
H && (N.value = !0, x.value = !1, V.value = o.src);
|
|
461
|
+
};
|
|
462
|
+
function X(t) {
|
|
463
|
+
N.value = !1, x.value = !1, b("load", t);
|
|
464
|
+
}
|
|
465
|
+
function re(t) {
|
|
466
|
+
N.value = !1, x.value = !0, b("error", t);
|
|
467
|
+
}
|
|
468
|
+
function q() {
|
|
469
|
+
Ue(_.value, c.value) && (D(), J());
|
|
470
|
+
}
|
|
471
|
+
const G = qe(q, 200, !0);
|
|
472
|
+
async function Z() {
|
|
473
|
+
var t;
|
|
474
|
+
if (!H)
|
|
475
|
+
return;
|
|
476
|
+
await me();
|
|
477
|
+
const { scrollContainer: d } = o;
|
|
478
|
+
Ge(d) ? c.value = d : Ze(d) && d !== "" ? c.value = (t = document.querySelector(d)) != null ? t : void 0 : _.value && (c.value = Je(_.value)), c.value && (l = M(c, "scroll", G), setTimeout(() => q(), 100));
|
|
479
|
+
}
|
|
480
|
+
function J() {
|
|
481
|
+
!H || !c.value || !G || (l == null || l(), c.value = void 0);
|
|
482
|
+
}
|
|
483
|
+
function U(t) {
|
|
484
|
+
if (t.ctrlKey) {
|
|
485
|
+
if (t.deltaY < 0)
|
|
486
|
+
return t.preventDefault(), !1;
|
|
487
|
+
if (t.deltaY > 0)
|
|
488
|
+
return t.preventDefault(), !1;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
function Q() {
|
|
492
|
+
Y.value && (B = M("wheel", U, {
|
|
493
|
+
passive: !1
|
|
494
|
+
}), S = document.body.style.overflow, document.body.style.overflow = "hidden", T.value = !0, b("show"));
|
|
495
|
+
}
|
|
496
|
+
function F() {
|
|
497
|
+
B == null || B(), document.body.style.overflow = S, T.value = !1, b("close");
|
|
498
|
+
}
|
|
499
|
+
function ee(t) {
|
|
500
|
+
b("switch", t);
|
|
501
|
+
}
|
|
502
|
+
return ue(() => o.src, () => {
|
|
503
|
+
W.value ? (N.value = !0, x.value = !1, J(), Z()) : D();
|
|
504
|
+
}), pe(() => {
|
|
505
|
+
W.value ? Z() : D();
|
|
506
|
+
}), (t, d) => (w(), C("div", {
|
|
507
|
+
ref_key: "container",
|
|
508
|
+
ref: _,
|
|
509
|
+
class: v([e(g).b(), t.$attrs.class]),
|
|
510
|
+
style: de(e(K))
|
|
511
|
+
}, [
|
|
512
|
+
x.value ? te(t.$slots, "error", { key: 0 }, () => [
|
|
513
|
+
p("div", {
|
|
514
|
+
class: v(e(g).e("error"))
|
|
515
|
+
}, Te(e(s)("el.image.error")), 3)
|
|
516
|
+
]) : (w(), C(ae, { key: 1 }, [
|
|
517
|
+
V.value !== void 0 ? (w(), C("img", $e({ key: 0 }, e(i), {
|
|
518
|
+
src: V.value,
|
|
519
|
+
loading: t.loading,
|
|
520
|
+
style: e(j),
|
|
521
|
+
class: e(oe),
|
|
522
|
+
crossorigin: t.crossorigin,
|
|
523
|
+
onClick: Q,
|
|
524
|
+
onLoad: X,
|
|
525
|
+
onError: re
|
|
526
|
+
}), null, 16, ut)) : E("v-if", !0),
|
|
527
|
+
N.value ? (w(), C("div", {
|
|
528
|
+
key: 1,
|
|
529
|
+
class: v(e(g).e("wrapper"))
|
|
530
|
+
}, [
|
|
531
|
+
te(t.$slots, "placeholder", {}, () => [
|
|
532
|
+
p("div", {
|
|
533
|
+
class: v(e(g).e("placeholder"))
|
|
534
|
+
}, null, 2)
|
|
535
|
+
])
|
|
536
|
+
], 2)) : E("v-if", !0)
|
|
537
|
+
], 64)),
|
|
538
|
+
e(Y) ? (w(), C(ae, { key: 2 }, [
|
|
539
|
+
T.value ? (w(), ce(e(st), {
|
|
540
|
+
key: 0,
|
|
541
|
+
"z-index": t.zIndex,
|
|
542
|
+
"initial-index": e(se),
|
|
543
|
+
infinite: t.infinite,
|
|
544
|
+
"zoom-rate": t.zoomRate,
|
|
545
|
+
"min-scale": t.minScale,
|
|
546
|
+
"max-scale": t.maxScale,
|
|
547
|
+
"url-list": t.previewSrcList,
|
|
548
|
+
"hide-on-click-modal": t.hideOnClickModal,
|
|
549
|
+
teleported: t.previewTeleported,
|
|
550
|
+
"close-on-press-escape": t.closeOnPressEscape,
|
|
551
|
+
onClose: F,
|
|
552
|
+
onSwitch: ee
|
|
553
|
+
}, {
|
|
554
|
+
default: L(() => [
|
|
555
|
+
t.$slots.viewer ? (w(), C("div", ct, [
|
|
556
|
+
te(t.$slots, "viewer")
|
|
557
|
+
])) : E("v-if", !0)
|
|
558
|
+
]),
|
|
559
|
+
_: 3
|
|
560
|
+
}, 8, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "url-list", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : E("v-if", !0)
|
|
561
|
+
], 64)) : E("v-if", !0)
|
|
562
|
+
], 6));
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
var vt = /* @__PURE__ */ be(ft, [["__file", "image.vue"]]);
|
|
566
|
+
const kt = _e(vt), mt = {
|
|
567
|
+
viewBox: "0 0 1024 1024",
|
|
568
|
+
width: "1.2em",
|
|
569
|
+
height: "1.2em"
|
|
570
|
+
}, pt = /* @__PURE__ */ p("path", {
|
|
571
|
+
fill: "currentColor",
|
|
572
|
+
d: "M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"
|
|
573
|
+
}, null, -1), gt = /* @__PURE__ */ p("path", {
|
|
574
|
+
fill: "currentColor",
|
|
575
|
+
d: "M384 288q64 0 64 64t-64 64t-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472l122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888l49.92 39.936l-215.808 269.824l-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072l-.64-.512a32 32 0 0 0-44.8 5.952z"
|
|
576
|
+
}, null, -1), yt = [
|
|
577
|
+
pt,
|
|
578
|
+
gt
|
|
579
|
+
];
|
|
580
|
+
function wt(u, b) {
|
|
581
|
+
return w(), C("svg", mt, [...yt]);
|
|
582
|
+
}
|
|
583
|
+
const It = { name: "ep-picture", render: wt };
|
|
584
|
+
export {
|
|
585
|
+
kt as E,
|
|
586
|
+
It as _
|
|
587
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { c as o } from "./index-CPqNZOs9.mjs";
|
|
2
|
+
const l = (t, i) => {
|
|
3
|
+
if (!o || !t || !i)
|
|
4
|
+
return !1;
|
|
5
|
+
const e = t.getBoundingClientRect();
|
|
6
|
+
let n;
|
|
7
|
+
return i instanceof Element ? n = i.getBoundingClientRect() : n = {
|
|
8
|
+
top: 0,
|
|
9
|
+
right: window.innerWidth,
|
|
10
|
+
bottom: window.innerHeight,
|
|
11
|
+
left: 0
|
|
12
|
+
}, e.top < n.bottom && e.bottom > n.top && e.right > n.left && e.left < n.right;
|
|
13
|
+
}, s = (t) => {
|
|
14
|
+
let i, e;
|
|
15
|
+
return t.type === "touchend" ? (e = t.changedTouches[0].clientY, i = t.changedTouches[0].clientX) : t.type.startsWith("touch") ? (e = t.touches[0].clientY, i = t.touches[0].clientX) : (e = t.clientY, i = t.clientX), {
|
|
16
|
+
clientX: i,
|
|
17
|
+
clientY: e
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
s as g,
|
|
22
|
+
l as i
|
|
23
|
+
};
|