@web-utils/component 5.0.0-beta01 → 5.0.0-beta03
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/awesome-button/index.mjs +25 -31
- package/{utils/style.css → base.css} +1 -1
- package/chat/index.mjs +3 -12
- package/chunks/{EditableTree.C_IJBL5b.mjs → EditableTree.CV8b95tW.mjs} +130 -139
- package/chunks/{ElementBaseInfo.DyuFR6fE.mjs → ElementBaseInfo.lW0iwU10.mjs} +2 -3
- package/chunks/ElementDialog.DWhAJsUn.mjs +520 -0
- package/chunks/{ElementForm.ButuYDPA.mjs → ElementForm.C7yebHWH.mjs} +12 -39
- package/chunks/{ElementListeners.Dg3e_dmp.mjs → ElementListeners.B_SjC8dp.mjs} +10 -31
- package/chunks/{ElementMultiInstance.Dmi79FqA.mjs → ElementMultiInstance.Xw27Z5mm.mjs} +2 -3
- package/chunks/{ElementOtherConfig.C2AddGTp.mjs → ElementOtherConfig.DnNmAhKn.mjs} +0 -1
- package/chunks/{ElementProperties.CfV8UF7L.mjs → ElementProperties.DKr9JE_O.mjs} +3 -12
- package/chunks/{ElementTaskConfig.Bn7ycGGn.mjs → ElementTaskConfig.CPjsXlpS.mjs} +6 -10
- package/chunks/{FlowCondition.C6PdqOAW.mjs → FlowCondition.BA7GF34X.mjs} +4 -5
- package/chunks/{FlowDesigner.uJYFfKpR.mjs → FlowDesigner.DH1ypcUw.mjs} +17 -18
- package/chunks/{FormBlock.BEENc22F.mjs → FormBlock.D6kZl7sm.mjs} +8 -8
- package/chunks/FormCascader.BXL8lKww.mjs +1229 -0
- package/chunks/{FormInputTime.Bg3UIP8H.mjs → FormInputTime.DzTPiDNh.mjs} +339 -337
- package/chunks/{FormItem.H9OOvNzT.mjs → FormItem.B8iPLduv.mjs} +12 -13
- package/chunks/{FormItemGroup.D9eRy-cZ.mjs → FormItemGroup.CCGqEapT.mjs} +38 -31
- package/chunks/{FormSelect.CanodoAI.mjs → FormSelect.t0jbTL_K.mjs} +470 -467
- package/chunks/{FormSwitch.DTqdaFjv.mjs → FormSwitch.uoFQ-xp_.mjs} +53 -51
- package/chunks/{FormTemp.DiI5EfgK.mjs → FormTemp.CeHtEZQe.mjs} +11 -6
- package/chunks/{FyCurd.DMj1dMK9.mjs → FyCurd.DqJuCLNW.mjs} +22 -25
- package/chunks/{FyForm.vgR8ujEF.mjs → FyForm.CgyGhetD.mjs} +25 -21
- package/chunks/{FyFormDesign.DEWT6LsX.mjs → FyFormDesign.DIIK7mXK.mjs} +49 -128
- package/chunks/{FyUpload.B2QKfTxF.mjs → FyUpload.DoBEuYcC.mjs} +2 -2
- package/chunks/ImagePreview.DDFrZgo5.mjs +649 -0
- package/chunks/{Keyboard.ItiRy7Gb.mjs → Keyboard.DBspwbYo.mjs} +2 -2
- package/chunks/{MonacoEditor.Bd5Kui-Y.mjs → MonacoEditor.Bq9d6JSz.mjs} +65 -64
- package/chunks/{PageableTable.Bujb0NUx.mjs → PageableTable.DR-REJN5.mjs} +84 -83
- package/chunks/{SignalAndMessage.CYVzlFuL.mjs → SignalAndMessage.CL2u19it.mjs} +1 -10
- package/chunks/{TableColumn.DJYkznbJ.mjs → TableColumn.Cq9Bvevm.mjs} +34 -28
- package/chunks/{TableView.DyIdIxAg.mjs → TableView.DMWMaGLA.mjs} +26 -33
- package/chunks/ToolbarButton.AlTszc53.mjs +107 -0
- package/chunks/{UserTaskListeners.Bp-2qkHs.mjs → UserTaskListeners.Qfm8hKWP.mjs} +9 -27
- package/chunks/{VueCron.GfjodnyM.mjs → VueCron.BmPnLuu3.mjs} +163 -142
- package/chunks/{VueTreeSelect.9Ywl-I8e.mjs → VueTreeSelect.GHx4Z2lG.mjs} +48 -43
- package/chunks/button.gVyl7Y__.mjs +927 -0
- package/chunks/checkbox.AmhCpaBZ.mjs +438 -0
- package/chunks/chunk.A6TnG60p.mjs +13 -0
- package/chunks/confirmable-mixin.BZtxXY0h.mjs +273 -0
- package/chunks/constants.Dw7hXt67.mjs +4 -0
- package/chunks/{dictionary.DxZxP0ej.mjs → dictionary.BqVLM7Lf.mjs} +1 -1
- package/chunks/{event.eJ-c1Z3a.mjs → event.CmOTnori.mjs} +4 -7
- package/chunks/event.ZRs4J5TN.mjs +4 -0
- package/chunks/{focus-trap.DT4GnqQI.mjs → focus-trap.CuUc8N2C.mjs} +26 -26
- package/chunks/{form-input.D25eDRMq.mjs → form-input.DdSb45Tz.mjs} +3 -3
- package/chunks/{form-item.CgmUuw_n.mjs → form-item.fYYCXvCs.mjs} +77 -75
- package/chunks/icon.AJYLfX1m.mjs +26 -0
- package/chunks/{icon.CbS8-322.mjs → icon.niAg1zTC.mjs} +31 -39
- package/chunks/{init.DwpukyOB.mjs → init.CtUEiRbU.mjs} +6 -6
- package/chunks/{input.PejnqwSH.mjs → input.B_wW4aF-.mjs} +107 -106
- package/chunks/install.BJl2MN77.mjs +73 -0
- package/chunks/message-box.wGWcYSSd.mjs +463 -0
- package/chunks/{message.BCmee5N0.mjs → message.DnTACuzV.mjs} +76 -75
- package/chunks/{overlay.DubSnqma.mjs → overlay.Rhu_rfhx.mjs} +5 -5
- package/chunks/{radio.BotKXqJr.mjs → radio.BMkZBhl5.mjs} +45 -45
- package/chunks/{scroll.CzORc5Zk.mjs → scroll.BJIpzi2Q.mjs} +2 -2
- package/chunks/{scrollbar.CAmrlKi9.mjs → scrollbar.CvxOszy3.mjs} +4 -4
- package/chunks/{style.BmlGmjpO.mjs → style.CraPDfJA.mjs} +3 -3
- package/chunks/{tag.DPi-PLbb.mjs → tag.B6yUaGj-.mjs} +25 -25
- package/chunks/{teleport._VGEzK4d.mjs → teleport.87mkIv8m.mjs} +3 -3
- package/chunks/{tooltip.D50x7Rva.mjs → tooltip.Dzjs7LZ8.mjs} +108 -108
- package/chunks/typescript.D0a40c7B.mjs +4 -0
- package/chunks/{use-aria.BW7nWOl1.mjs → use-aria.B9uqqWAE.mjs} +2 -2
- package/chunks/{use-composition.mUaomyno.mjs → use-composition.BMPJBvYs.mjs} +4 -4
- package/chunks/{use-deprecated.BfDSbZS9.mjs → use-deprecated.vx6LTDA_.mjs} +2 -2
- package/chunks/use-empty-values.CxYKjLV9.mjs +81 -0
- package/chunks/use-form-item.DMDTkMq9.mjs +48 -0
- package/chunks/use-global-config.Dkt91Ob3.mjs +57 -0
- package/chunks/{use-id.CFO5NeoV.mjs → use-id.CyzdvfQn.mjs} +3 -3
- package/chunks/{use-empty-values.Dy_r78F6.mjs → use-locale.CBoQRFjH.mjs} +12 -87
- package/chunks/{use-size.DxrwTUwf.mjs → use-size.CoorvF12.mjs} +2 -2
- package/chunks/validator.Drv0r2Nb.mjs +5 -0
- package/chunks/{vnode.D_SioRnx.mjs → vnode.raM3wMJz.mjs} +2 -2
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/index.mjs +39 -38
- package/data-box/style.css +1 -1
- package/data-card/style.css +1 -1
- package/data-display/style.css +1 -1
- package/data-icons/style.css +1 -1
- package/data-imgtext/style.css +1 -1
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-progress/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +2 -6
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +7 -3
- package/dynamic-table/index.mjs +1 -2
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.mjs +1 -1
- package/element-dialog/style.css +1 -1
- package/empty-view/index.mjs +18 -20
- package/error-view/index.mjs +17 -19
- package/flex-column/index.mjs +11 -9
- package/flex-item/index.mjs +22 -16
- package/flex-row/index.mjs +11 -10
- package/flow/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/form-block/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +4 -4
- package/form-checkbox-group/index.mjs +6 -6
- package/form-date-picker/index.mjs +3 -3
- package/form-holder/index.mjs +2 -5
- package/form-input/index.mjs +4 -4
- package/form-input-cron-expression/index.mjs +4 -4
- package/form-input-email/index.mjs +10 -9
- package/form-input-id-card/index.mjs +10 -9
- package/form-input-phone-number/index.mjs +11 -10
- package/form-input-tag/index.mjs +2 -2
- package/form-input-time/index.mjs +1 -1
- package/form-item/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-radio-group/index.mjs +6 -6
- package/form-select/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +2 -2
- package/form-table-plus/index.mjs +4 -4
- package/form-textarea/index.mjs +4 -4
- package/form-tree-select/index.mjs +3 -3
- package/form-tree-select-multiple/index.mjs +3 -3
- package/form-view/index.mjs +13 -8
- package/fy-array/index.mjs +1 -1
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +2 -2
- package/fy-curd/index.mjs +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-dynamic/index.mjs +3 -7
- package/fy-form/index.mjs +1 -1
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +1 -1
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +1 -1
- package/fy-input-color/index.mjs +1 -2
- package/fy-input-icon/index.mjs +37 -32
- package/fy-input-map/index.mjs +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +1 -1
- package/fy-input-tree/index.mjs +3 -3
- package/fy-input-tree/style.css +1 -1
- package/fy-radio/index.mjs +2 -2
- package/fy-rate/index.mjs +2 -2
- package/fy-select/index.mjs +5 -5
- package/fy-slider/index.mjs +1 -1
- package/fy-switch/index.mjs +2 -2
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +1 -1
- package/guide-steps/index.mjs +1 -1
- package/helper-function.d.ts +3 -3
- package/helper-function.mjs +36 -20
- package/iframe-window/index.mjs +30 -29
- package/image-cropper/index.mjs +144 -163
- package/image-cropper/style.css +1 -1
- package/image-preview/index.mjs +2 -187
- package/index.d.ts +1 -2
- package/index.mjs +153 -154
- package/input-number-range/index.mjs +0 -2
- package/keyboard/index.mjs +1 -1
- package/license/index.mjs +1 -1
- package/monaco-editor/index.mjs +1 -1
- package/nav-bar/index.mjs +1 -1
- package/notice/index.mjs +1 -4
- package/package.json +12 -14
- package/pageable-table/index.mjs +1 -1
- package/pageable-view/index.mjs +2 -2
- package/photo-swipe/index.mjs +1 -1
- package/picker-table-view/index.mjs +4 -8
- package/present-view/index.mjs +18 -13
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +2 -2
- package/split-pane/index.mjs +1 -1
- package/stateful/index.mjs +18 -17
- package/static-pageable-table/index.mjs +1 -4
- package/sub-table/index.mjs +2 -5
- package/sub-table-plus/index.mjs +3 -6
- package/tab/index.mjs +1 -1
- package/tab-item/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-view/index.mjs +1 -1
- package/tag-render/index.mjs +28 -24
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +2 -146
- package/vue-cron/index.mjs +1 -1
- package/vue-qr-code/index.mjs +7 -6
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/watermark/index.mjs +13 -13
- package/web-types.json +265 -363
- package/x-input-tag/index.mjs +0 -3
- package/chunks/ElementDialog.C0IjriTW.mjs +0 -681
- package/chunks/FormCascader.CaM-oEhv.mjs +0 -1226
- package/chunks/checkbox.emIuFmnt.mjs +0 -437
- package/chunks/confirmable-mixin.BBil7dto.mjs +0 -1646
- package/chunks/event.B4iwtUNO.mjs +0 -4
- package/chunks/install.yLcn5MLL.mjs +0 -84
- package/chunks/typescript.DiWBU4nj.mjs +0 -4
- package/chunks/use-form-item.wsRjehHp.mjs +0 -47
- package/chunks/use-global-config.C9hs-O_x.mjs +0 -56
- package/chunks/validator.C4-z_t9p.mjs +0 -5
- package/login/index.mjs +0 -252
- package/login/style.css +0 -1
- /package/chunks/{FyUEditor.D_rEYfll.mjs → FyUEditor.uvZS8UgS.mjs} +0 -0
- /package/chunks/{RecordVideo.B35_dLty.mjs → RecordVideo.CKTY-gk9.mjs} +0 -0
- /package/chunks/{SplitPane.Dw96M0Yf.mjs → SplitPane.DNNid7WB.mjs} +0 -0
- /package/chunks/{Toolbar.DHuXJAoG.mjs → Toolbar.DytZ6fO0.mjs} +0 -0
- /package/chunks/{core.DJv6Qrae.mjs → core.Blrh_Fjl.mjs} +0 -0
- /package/chunks/{dataformat.Bfr4nOcA.mjs → dataformat.F7GtAoiN.mjs} +0 -0
- /package/chunks/{dic.DgDfnovD.mjs → dic.NZCGhtA7.mjs} +0 -0
- /package/chunks/{dictionary.5eKjWeAp.mjs → dictionary.DXYdZefs.mjs} +0 -0
- /package/chunks/{form-pick.Axem0gOO.mjs → form-pick.BEC7lrNH.mjs} +0 -0
- /package/chunks/{form-validate.B1KPCHqN.mjs → form-validate.JFOV_f-C.mjs} +0 -0
- /package/chunks/{packages.BGjydzjm.mjs → packages.CONbEH13.mjs} +0 -0
- /package/chunks/{permission.DgEVNWlh.mjs → permission.8WDtOmzA.mjs} +0 -0
- /package/chunks/{photo-swipe.BB0SJZg9.mjs → photo-swipe.BvBJGc5x.mjs} +0 -0
- /package/chunks/{slot.C6Ozd2e7.mjs → slot.CZCo32Cw.mjs} +0 -0
- /package/chunks/{sub-table-plus-props.B_lLth3j.mjs → sub-table-plus-props.DvS8aKT4.mjs} +0 -0
- /package/chunks/{tab-mixin.u0EZpx3j.mjs → tab-mixin.C9DSz8xu.mjs} +0 -0
- /package/chunks/{util.B3sjVZoZ.mjs → util.fjuzrmWz.mjs} +0 -0
- /package/chunks/{utilSelf.ZED4DmCU.mjs → utilSelf.Bv7FtUNb.mjs} +0 -0
- /package/chunks/{utils.Cs2fYBrT.mjs → utils.C37EhJ-u.mjs} +0 -0
- /package/chunks/{utils.DsGhtCIO.mjs → utils.C8RvIGLM.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper.7vrlOII_.mjs";
|
|
2
2
|
import { f as t, g as n, i as r } from "./util.g-WQEec9.mjs";
|
|
3
|
-
import { n as i, t as a } from "./event.
|
|
4
|
-
import { t as o } from "./packages.
|
|
3
|
+
import { n as i, t as a } from "./event.CmOTnori.mjs";
|
|
4
|
+
import { t as o } from "./packages.CONbEH13.mjs";
|
|
5
5
|
import { Fragment as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, normalizeClass as p, openBlock as m, renderSlot as h, resolveComponent as g, resolveDirective as _, resolveDynamicComponent as v, toDisplayString as y, withCtx as b, withDirectives as x, withModifiers as S } from "vue";
|
|
6
6
|
import { isBlank as C } from "@web-utils/core";
|
|
7
7
|
//#region src/components/fy-from/upload/canvas/index.js
|
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import "./chunk.A6TnG60p.mjs";
|
|
2
|
+
import { t as e } from "./_plugin-vue_export-helper.7vrlOII_.mjs";
|
|
3
|
+
import { g as t } from "./util.g-WQEec9.mjs";
|
|
4
|
+
import { t as n } from "./event.ZRs4J5TN.mjs";
|
|
5
|
+
import { _ as r, o as i, r as a, t as o } from "./install.BJl2MN77.mjs";
|
|
6
|
+
import { B as s, O as c, R as l, b as u, j as d } from "./style.CraPDfJA.mjs";
|
|
7
|
+
import { n as f } from "./use-locale.CBoQRFjH.mjs";
|
|
8
|
+
import { n as p } from "./vnode.raM3wMJz.mjs";
|
|
9
|
+
import { i as m, r as h, t as g } from "./icon.niAg1zTC.mjs";
|
|
10
|
+
import { Fragment as _, Transition as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createVNode as w, defineComponent as T, getCurrentInstance as E, h as D, inject as O, isVNode as k, normalizeClass as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as N, openBlock as P, provide as ee, reactive as F, ref as I, renderList as L, renderSlot as R, resolveComponent as z, resolveDynamicComponent as te, shallowRef as B, toDisplayString as ne, triggerRef as V, unref as H, useSlots as re, vShow as U, watch as W, withCtx as G, withDirectives as K, withModifiers as q } from "vue";
|
|
11
|
+
import { setPx as J } from "@web-utils/core";
|
|
12
|
+
import { throttle as Y } from "lodash-unified";
|
|
13
|
+
//#region node_modules/.pnpm/element-plus@2.13.6_typescr_b86181ecd25892dfea09546870d44c51/node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
|
|
14
|
+
var X = (e, t, n) => p(e.subTree).filter((e) => {
|
|
15
|
+
var n;
|
|
16
|
+
return k(e) && ((n = e.type) == null ? void 0 : n.name) === t && !!e.component;
|
|
17
|
+
}).map((e) => e.component.uid).map((e) => n[e]).filter((e) => !!e), ie = (e, t) => {
|
|
18
|
+
let n = B({}), r = B([]), i = /* @__PURE__ */ new WeakMap(), a = (e) => {
|
|
19
|
+
n.value[e.uid] = e, V(n), N(() => {
|
|
20
|
+
let t = e.getVnode().el, r = t.parentNode;
|
|
21
|
+
if (!i.has(r)) {
|
|
22
|
+
i.set(r, []);
|
|
23
|
+
let e = r.insertBefore.bind(r);
|
|
24
|
+
r.insertBefore = (t, a) => (i.get(r).some((e) => t === e || a === e) && V(n), e(t, a));
|
|
25
|
+
}
|
|
26
|
+
i.get(r).push(t);
|
|
27
|
+
});
|
|
28
|
+
}, o = (e) => {
|
|
29
|
+
delete n.value[e.uid], V(n);
|
|
30
|
+
let t = e.getVnode().el, r = t.parentNode, a = i.get(r), o = a.indexOf(t);
|
|
31
|
+
a.splice(o, 1);
|
|
32
|
+
}, s = () => {
|
|
33
|
+
r.value = X(e, t, n.value);
|
|
34
|
+
}, c = (e) => e.render();
|
|
35
|
+
return {
|
|
36
|
+
children: r,
|
|
37
|
+
addChild: a,
|
|
38
|
+
removeChild: o,
|
|
39
|
+
ChildrenSorter: T({ setup(e, { slots: t }) {
|
|
40
|
+
return () => (s(), t.default ? D(c, { render: t.default }) : null);
|
|
41
|
+
} })
|
|
42
|
+
};
|
|
43
|
+
}, Z = d({
|
|
44
|
+
initialIndex: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 0
|
|
47
|
+
},
|
|
48
|
+
height: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
trigger: {
|
|
53
|
+
type: String,
|
|
54
|
+
values: ["hover", "click"],
|
|
55
|
+
default: "hover"
|
|
56
|
+
},
|
|
57
|
+
autoplay: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !0
|
|
60
|
+
},
|
|
61
|
+
interval: {
|
|
62
|
+
type: Number,
|
|
63
|
+
default: 3e3
|
|
64
|
+
},
|
|
65
|
+
indicatorPosition: {
|
|
66
|
+
type: String,
|
|
67
|
+
values: [
|
|
68
|
+
"",
|
|
69
|
+
"none",
|
|
70
|
+
"outside"
|
|
71
|
+
],
|
|
72
|
+
default: ""
|
|
73
|
+
},
|
|
74
|
+
arrow: {
|
|
75
|
+
type: String,
|
|
76
|
+
values: [
|
|
77
|
+
"always",
|
|
78
|
+
"hover",
|
|
79
|
+
"never"
|
|
80
|
+
],
|
|
81
|
+
default: "hover"
|
|
82
|
+
},
|
|
83
|
+
type: {
|
|
84
|
+
type: String,
|
|
85
|
+
values: ["", "card"],
|
|
86
|
+
default: ""
|
|
87
|
+
},
|
|
88
|
+
cardScale: {
|
|
89
|
+
type: Number,
|
|
90
|
+
default: .83
|
|
91
|
+
},
|
|
92
|
+
loop: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: !0
|
|
95
|
+
},
|
|
96
|
+
direction: {
|
|
97
|
+
type: String,
|
|
98
|
+
values: ["horizontal", "vertical"],
|
|
99
|
+
default: "horizontal"
|
|
100
|
+
},
|
|
101
|
+
pauseOnHover: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: !0
|
|
104
|
+
},
|
|
105
|
+
motionBlur: Boolean
|
|
106
|
+
}), ae = { change: (e, t) => [e, t].every(l) }, oe = Symbol("carouselContextKey"), Q = "ElCarouselItem", $ = d({
|
|
107
|
+
name: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: ""
|
|
110
|
+
},
|
|
111
|
+
label: {
|
|
112
|
+
type: [String, Number],
|
|
113
|
+
default: ""
|
|
114
|
+
}
|
|
115
|
+
}), se = 300, ce = (e, t, i) => {
|
|
116
|
+
let { children: a, addChild: o, removeChild: s, ChildrenSorter: l } = ie(E(), Q), d = re(), f = I(-1), m = I(null), h = I(!1), g = I(), _ = I(0), v = I(!0), b = y(() => e.arrow !== "never" && !H(C)), x = y(() => a.value.some((e) => e.props.label.toString().length > 0)), S = y(() => e.type === "card"), C = y(() => e.direction === "vertical"), w = y(() => e.height === "auto" ? {
|
|
117
|
+
height: `${_.value}px`,
|
|
118
|
+
overflow: "hidden"
|
|
119
|
+
} : { height: e.height }), T = Y((e) => {
|
|
120
|
+
F(e);
|
|
121
|
+
}, se, { trailing: !0 }), D = Y((e) => {
|
|
122
|
+
G(e);
|
|
123
|
+
}, se), O = (e) => v.value ? f.value <= 1 ? e <= 1 : e > 1 : !0;
|
|
124
|
+
function A() {
|
|
125
|
+
m.value && (clearInterval(m.value), m.value = null);
|
|
126
|
+
}
|
|
127
|
+
function j() {
|
|
128
|
+
e.interval <= 0 || !e.autoplay || m.value || (m.value = setInterval(() => P(), e.interval));
|
|
129
|
+
}
|
|
130
|
+
let P = () => {
|
|
131
|
+
f.value < a.value.length - 1 ? f.value += 1 : e.loop && (f.value = 0);
|
|
132
|
+
};
|
|
133
|
+
function F(t) {
|
|
134
|
+
if (r(t)) {
|
|
135
|
+
let e = a.value.filter((e) => e.props.name === t);
|
|
136
|
+
e.length > 0 && (t = a.value.indexOf(e[0]));
|
|
137
|
+
}
|
|
138
|
+
if (t = Number(t), Number.isNaN(t) || t !== Math.floor(t)) {
|
|
139
|
+
c(i, "index must be integer.");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
let n = a.value.length, o = f.value;
|
|
143
|
+
t < 0 ? f.value = e.loop ? n - 1 : 0 : t >= n ? f.value = e.loop ? 0 : n - 1 : f.value = t, o === f.value && L(o), J();
|
|
144
|
+
}
|
|
145
|
+
function L(e) {
|
|
146
|
+
a.value.forEach((t, n) => {
|
|
147
|
+
t.translateItem(n, f.value, e);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function R(e, t) {
|
|
151
|
+
var n, r;
|
|
152
|
+
let i = H(a), o = i.length;
|
|
153
|
+
if (o === 0 || !e.states.inStage) return !1;
|
|
154
|
+
let s = t + 1, c = t - 1, l = o - 1, u = i[l].states.active, d = i[0].states.active, f = (n = i[s]) == null || (n = n.states) == null ? void 0 : n.active, p = (r = i[c]) == null || (r = r.states) == null ? void 0 : r.active;
|
|
155
|
+
return t === l && d || f ? "left" : t === 0 && u || p ? "right" : !1;
|
|
156
|
+
}
|
|
157
|
+
function z() {
|
|
158
|
+
h.value = !0, e.pauseOnHover && A();
|
|
159
|
+
}
|
|
160
|
+
function te() {
|
|
161
|
+
h.value = !1, j();
|
|
162
|
+
}
|
|
163
|
+
function ne(e) {
|
|
164
|
+
H(C) || a.value.forEach((t, n) => {
|
|
165
|
+
e === R(t, n) && (t.states.hover = !0);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function V() {
|
|
169
|
+
H(C) || a.value.forEach((e) => {
|
|
170
|
+
e.states.hover = !1;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function U(e) {
|
|
174
|
+
f.value = e;
|
|
175
|
+
}
|
|
176
|
+
function G(t) {
|
|
177
|
+
e.trigger === "hover" && t !== f.value && (f.value = t);
|
|
178
|
+
}
|
|
179
|
+
function K() {
|
|
180
|
+
F(f.value - 1);
|
|
181
|
+
}
|
|
182
|
+
function q() {
|
|
183
|
+
F(f.value + 1);
|
|
184
|
+
}
|
|
185
|
+
function J() {
|
|
186
|
+
A(), (!e.pauseOnHover || !h.value) && j();
|
|
187
|
+
}
|
|
188
|
+
function X(t) {
|
|
189
|
+
e.height === "auto" && (_.value = t);
|
|
190
|
+
}
|
|
191
|
+
function Z() {
|
|
192
|
+
var t;
|
|
193
|
+
let n = (t = d.default) == null ? void 0 : t.call(d);
|
|
194
|
+
if (!n) return null;
|
|
195
|
+
let r = p(n).filter((e) => k(e) && e.type.name === "ElCarouselItem");
|
|
196
|
+
return (r == null ? void 0 : r.length) === 2 && e.loop && !S.value ? (v.value = !0, r) : (v.value = !1, null);
|
|
197
|
+
}
|
|
198
|
+
W(() => f.value, (e, r) => {
|
|
199
|
+
L(r), v.value && (e %= 2, r %= 2), r > -1 && t(n, e, r);
|
|
200
|
+
});
|
|
201
|
+
let ae = y({
|
|
202
|
+
get: () => v.value ? f.value % 2 : f.value,
|
|
203
|
+
set: (e) => f.value = e
|
|
204
|
+
});
|
|
205
|
+
W(() => e.autoplay, (e) => {
|
|
206
|
+
e ? j() : A();
|
|
207
|
+
}), W(() => e.loop, () => {
|
|
208
|
+
F(f.value);
|
|
209
|
+
}), W(() => e.interval, () => {
|
|
210
|
+
J();
|
|
211
|
+
});
|
|
212
|
+
let $ = B();
|
|
213
|
+
return N(() => {
|
|
214
|
+
W(() => a.value, () => {
|
|
215
|
+
a.value.length > 0 && F(e.initialIndex);
|
|
216
|
+
}, { immediate: !0 }), $.value = u(g.value, () => {
|
|
217
|
+
L();
|
|
218
|
+
}), j();
|
|
219
|
+
}), M(() => {
|
|
220
|
+
A(), g.value && $.value && $.value.stop();
|
|
221
|
+
}), ee(oe, {
|
|
222
|
+
root: g,
|
|
223
|
+
isCardType: S,
|
|
224
|
+
isVertical: C,
|
|
225
|
+
items: a,
|
|
226
|
+
loop: e.loop,
|
|
227
|
+
cardScale: e.cardScale,
|
|
228
|
+
addItem: o,
|
|
229
|
+
removeItem: s,
|
|
230
|
+
setActiveItem: F,
|
|
231
|
+
setContainerHeight: X
|
|
232
|
+
}), {
|
|
233
|
+
root: g,
|
|
234
|
+
activeIndex: f,
|
|
235
|
+
exposeActiveIndex: ae,
|
|
236
|
+
arrowDisplay: b,
|
|
237
|
+
hasLabel: x,
|
|
238
|
+
hover: h,
|
|
239
|
+
isCardType: S,
|
|
240
|
+
items: a,
|
|
241
|
+
isVertical: C,
|
|
242
|
+
containerStyle: w,
|
|
243
|
+
isItemsTwoLength: v,
|
|
244
|
+
handleButtonEnter: ne,
|
|
245
|
+
handleButtonLeave: V,
|
|
246
|
+
handleIndicatorClick: U,
|
|
247
|
+
handleMouseEnter: z,
|
|
248
|
+
handleMouseLeave: te,
|
|
249
|
+
setActiveItem: F,
|
|
250
|
+
prev: K,
|
|
251
|
+
next: q,
|
|
252
|
+
PlaceholderItem: Z,
|
|
253
|
+
isTwoLengthShow: O,
|
|
254
|
+
ItemsSorter: l,
|
|
255
|
+
throttledArrowClick: T,
|
|
256
|
+
throttledIndicatorHover: D
|
|
257
|
+
};
|
|
258
|
+
}, le = ["aria-label"], ue = ["aria-label"], de = ["onMouseenter", "onClick"], fe = ["aria-label"], pe = { key: 0 }, me = {
|
|
259
|
+
key: 2,
|
|
260
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
261
|
+
version: "1.1",
|
|
262
|
+
style: { display: "none" }
|
|
263
|
+
}, he = "ElCarousel", ge = /* @__PURE__ */ T({
|
|
264
|
+
name: he,
|
|
265
|
+
__name: "carousel",
|
|
266
|
+
props: Z,
|
|
267
|
+
emits: ae,
|
|
268
|
+
setup(e, { expose: t, emit: n }) {
|
|
269
|
+
let r = e, { root: a, activeIndex: o, exposeActiveIndex: s, arrowDisplay: c, hasLabel: l, hover: u, isCardType: d, items: p, isVertical: T, containerStyle: E, handleButtonEnter: D, handleButtonLeave: O, handleIndicatorClick: k, handleMouseEnter: M, handleMouseLeave: N, setActiveItem: ee, prev: F, next: I, PlaceholderItem: z, isTwoLengthShow: te, ItemsSorter: B, throttledArrowClick: V, throttledIndicatorHover: re } = ce(r, n, he), W = i("carousel"), { t: J } = f(), Y = y(() => {
|
|
270
|
+
let e = [W.b(), W.m(r.direction)];
|
|
271
|
+
return H(d) && e.push(W.m("card")), e.push(W.is("vertical-outside", H(T) && r.indicatorPosition === "outside")), e;
|
|
272
|
+
}), X = y(() => {
|
|
273
|
+
let e = [W.e("indicators"), W.em("indicators", r.direction)];
|
|
274
|
+
return H(l) && e.push(W.em("indicators", "labels")), r.indicatorPosition === "outside" && e.push(W.em("indicators", "outside")), H(T) && e.push(W.em("indicators", "right")), e;
|
|
275
|
+
});
|
|
276
|
+
function ie(e) {
|
|
277
|
+
if (!r.motionBlur) return;
|
|
278
|
+
let t = H(T) ? `${W.namespace.value}-transitioning-vertical` : `${W.namespace.value}-transitioning`;
|
|
279
|
+
e.currentTarget.classList.add(t);
|
|
280
|
+
}
|
|
281
|
+
function Z(e) {
|
|
282
|
+
if (!r.motionBlur) return;
|
|
283
|
+
let t = H(T) ? `${W.namespace.value}-transitioning-vertical` : `${W.namespace.value}-transitioning`;
|
|
284
|
+
e.currentTarget.classList.remove(t);
|
|
285
|
+
}
|
|
286
|
+
return t({
|
|
287
|
+
activeIndex: s,
|
|
288
|
+
setActiveItem: ee,
|
|
289
|
+
prev: F,
|
|
290
|
+
next: I
|
|
291
|
+
}), (t, n) => (P(), S("div", {
|
|
292
|
+
ref_key: "root",
|
|
293
|
+
ref: a,
|
|
294
|
+
class: A(Y.value),
|
|
295
|
+
onMouseenter: n[6] || (n[6] = q((...e) => H(M) && H(M)(...e), ["stop"])),
|
|
296
|
+
onMouseleave: n[7] || (n[7] = q((...e) => H(N) && H(N)(...e), ["stop"]))
|
|
297
|
+
}, [
|
|
298
|
+
H(c) ? (P(), b(v, {
|
|
299
|
+
key: 0,
|
|
300
|
+
name: "carousel-arrow-left",
|
|
301
|
+
persisted: ""
|
|
302
|
+
}, {
|
|
303
|
+
default: G(() => [K(C("button", {
|
|
304
|
+
type: "button",
|
|
305
|
+
class: A([H(W).e("arrow"), H(W).em("arrow", "left")]),
|
|
306
|
+
"aria-label": H(J)("el.carousel.leftArrow"),
|
|
307
|
+
onMouseenter: n[0] || (n[0] = (e) => H(D)("left")),
|
|
308
|
+
onMouseleave: n[1] || (n[1] = (...e) => H(O) && H(O)(...e)),
|
|
309
|
+
onClick: n[2] || (n[2] = q((e) => H(V)(H(o) - 1), ["stop"]))
|
|
310
|
+
}, [w(H(g), null, {
|
|
311
|
+
default: G(() => [w(H(h))]),
|
|
312
|
+
_: 1
|
|
313
|
+
})], 42, le), [[U, (e.arrow === "always" || H(u)) && (e.loop || H(o) > 0)]])]),
|
|
314
|
+
_: 1
|
|
315
|
+
})) : x("v-if", !0),
|
|
316
|
+
H(c) ? (P(), b(v, {
|
|
317
|
+
key: 1,
|
|
318
|
+
name: "carousel-arrow-right",
|
|
319
|
+
persisted: ""
|
|
320
|
+
}, {
|
|
321
|
+
default: G(() => [K(C("button", {
|
|
322
|
+
type: "button",
|
|
323
|
+
class: A([H(W).e("arrow"), H(W).em("arrow", "right")]),
|
|
324
|
+
"aria-label": H(J)("el.carousel.rightArrow"),
|
|
325
|
+
onMouseenter: n[3] || (n[3] = (e) => H(D)("right")),
|
|
326
|
+
onMouseleave: n[4] || (n[4] = (...e) => H(O) && H(O)(...e)),
|
|
327
|
+
onClick: n[5] || (n[5] = q((e) => H(V)(H(o) + 1), ["stop"]))
|
|
328
|
+
}, [w(H(g), null, {
|
|
329
|
+
default: G(() => [w(H(m))]),
|
|
330
|
+
_: 1
|
|
331
|
+
})], 42, ue), [[U, (e.arrow === "always" || H(u)) && (e.loop || H(o) < H(p).length - 1)]])]),
|
|
332
|
+
_: 1
|
|
333
|
+
})) : x("v-if", !0),
|
|
334
|
+
C("div", {
|
|
335
|
+
class: A(H(W).e("container")),
|
|
336
|
+
style: j(H(E)),
|
|
337
|
+
onTransitionstart: ie,
|
|
338
|
+
onTransitionend: Z
|
|
339
|
+
}, [w(H(z)), R(t.$slots, "default")], 38),
|
|
340
|
+
w(H(B), null, {
|
|
341
|
+
default: G(() => [e.indicatorPosition === "none" ? x("v-if", !0) : (P(), S("ul", {
|
|
342
|
+
key: 0,
|
|
343
|
+
class: A(X.value)
|
|
344
|
+
}, [(P(!0), S(_, null, L(H(p), (t, n) => K((P(), S("li", {
|
|
345
|
+
key: n,
|
|
346
|
+
class: A([
|
|
347
|
+
H(W).e("indicator"),
|
|
348
|
+
H(W).em("indicator", e.direction),
|
|
349
|
+
H(W).is("active", n === H(o))
|
|
350
|
+
]),
|
|
351
|
+
onMouseenter: (e) => H(re)(n),
|
|
352
|
+
onClick: q((e) => H(k)(n), ["stop"])
|
|
353
|
+
}, [C("button", {
|
|
354
|
+
class: A(H(W).e("button")),
|
|
355
|
+
"aria-label": H(J)("el.carousel.indicator", { index: n + 1 })
|
|
356
|
+
}, [H(l) ? (P(), S("span", pe, ne(t.props.label), 1)) : x("v-if", !0)], 10, fe)], 42, de)), [[U, H(te)(n)]])), 128))], 2))]),
|
|
357
|
+
_: 1
|
|
358
|
+
}),
|
|
359
|
+
e.motionBlur ? (P(), S("svg", me, [...n[8] || (n[8] = [C("defs", null, [C("filter", { id: "elCarouselHorizontal" }, [C("feGaussianBlur", {
|
|
360
|
+
in: "SourceGraphic",
|
|
361
|
+
stdDeviation: "12,0"
|
|
362
|
+
})]), C("filter", { id: "elCarouselVertical" }, [C("feGaussianBlur", {
|
|
363
|
+
in: "SourceGraphic",
|
|
364
|
+
stdDeviation: "0,10"
|
|
365
|
+
})])], -1)])])) : x("v-if", !0)
|
|
366
|
+
], 34));
|
|
367
|
+
}
|
|
368
|
+
}), _e = (e) => {
|
|
369
|
+
let t = O(oe), n = E();
|
|
370
|
+
t || c(Q, "usage: <el-carousel></el-carousel-item></el-carousel>"), n || c(Q, "compositional hook can only be invoked inside setups");
|
|
371
|
+
let r = I(), i = I(!1), a = I(0), o = I(1), l = I(!1), u = I(!1), d = I(!1), f = I(!1), { isCardType: p, isVertical: m, cardScale: h } = t;
|
|
372
|
+
function g(e, t, n) {
|
|
373
|
+
let r = n - 1, i = t - 1, a = t + 1, o = n / 2;
|
|
374
|
+
return t === 0 && e === r ? -1 : t === r && e === 0 ? n : e < i && t - e >= o ? n + 1 : e > a && e - t >= o ? -2 : e;
|
|
375
|
+
}
|
|
376
|
+
function _(e, n) {
|
|
377
|
+
var r, i;
|
|
378
|
+
let a = H(m) ? ((r = t.root.value) == null ? void 0 : r.offsetHeight) || 0 : ((i = t.root.value) == null ? void 0 : i.offsetWidth) || 0;
|
|
379
|
+
return d.value ? a * ((2 - h) * (e - n) + 1) / 4 : e < n ? -(1 + h) * a / 4 : (3 + h) * a / 4;
|
|
380
|
+
}
|
|
381
|
+
function v(e, n, r) {
|
|
382
|
+
let i = t.root.value;
|
|
383
|
+
return i ? ((r ? i.offsetHeight : i.offsetWidth) || 0) * (e - n) : 0;
|
|
384
|
+
}
|
|
385
|
+
let y = (e, n, i) => {
|
|
386
|
+
let c = H(p), y = t.items.value.length ?? NaN, b = e === n;
|
|
387
|
+
!c && !s(i) && (f.value = b || e === i), !b && y > 2 && t.loop && (e = g(e, n, y));
|
|
388
|
+
let x = H(m);
|
|
389
|
+
l.value = b, c ? (d.value = Math.round(Math.abs(e - n)) <= 1, a.value = _(e, n), o.value = H(l) ? 1 : h) : a.value = v(e, n, x), u.value = !0, b && r.value && t.setContainerHeight(r.value.offsetHeight);
|
|
390
|
+
};
|
|
391
|
+
function b() {
|
|
392
|
+
if (t && H(p)) {
|
|
393
|
+
let e = t.items.value.findIndex(({ uid: e }) => e === n.uid);
|
|
394
|
+
t.setActiveItem(e);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
let x = {
|
|
398
|
+
props: e,
|
|
399
|
+
states: F({
|
|
400
|
+
hover: i,
|
|
401
|
+
translate: a,
|
|
402
|
+
scale: o,
|
|
403
|
+
active: l,
|
|
404
|
+
ready: u,
|
|
405
|
+
inStage: d,
|
|
406
|
+
animating: f
|
|
407
|
+
}),
|
|
408
|
+
uid: n.uid,
|
|
409
|
+
getVnode: () => n.vnode,
|
|
410
|
+
translateItem: y
|
|
411
|
+
};
|
|
412
|
+
return t.addItem(x), M(() => {
|
|
413
|
+
t.removeItem(x);
|
|
414
|
+
}), {
|
|
415
|
+
carouselItemRef: r,
|
|
416
|
+
active: l,
|
|
417
|
+
animating: f,
|
|
418
|
+
hover: i,
|
|
419
|
+
inStage: d,
|
|
420
|
+
isVertical: m,
|
|
421
|
+
translate: a,
|
|
422
|
+
isCardType: p,
|
|
423
|
+
scale: o,
|
|
424
|
+
ready: u,
|
|
425
|
+
handleItemClick: b
|
|
426
|
+
};
|
|
427
|
+
}, ve = /* @__PURE__ */ T({
|
|
428
|
+
name: Q,
|
|
429
|
+
__name: "carousel-item",
|
|
430
|
+
props: $,
|
|
431
|
+
setup(e) {
|
|
432
|
+
let t = e, n = i("carousel"), { carouselItemRef: r, active: a, animating: o, hover: s, inStage: c, isVertical: l, translate: u, isCardType: d, scale: f, ready: p, handleItemClick: m } = _e(t), h = y(() => [
|
|
433
|
+
n.e("item"),
|
|
434
|
+
n.is("active", a.value),
|
|
435
|
+
n.is("in-stage", c.value),
|
|
436
|
+
n.is("hover", s.value),
|
|
437
|
+
n.is("animating", o.value),
|
|
438
|
+
{
|
|
439
|
+
[n.em("item", "card")]: d.value,
|
|
440
|
+
[n.em("item", "card-vertical")]: d.value && l.value
|
|
441
|
+
}
|
|
442
|
+
]), g = y(() => ({ transform: [`${`translate${H(l) ? "Y" : "X"}`}(${H(u)}px)`, `scale(${H(f)})`].join(" ") }));
|
|
443
|
+
return (e, t) => K((P(), S("div", {
|
|
444
|
+
ref_key: "carouselItemRef",
|
|
445
|
+
ref: r,
|
|
446
|
+
class: A(h.value),
|
|
447
|
+
style: j(g.value),
|
|
448
|
+
onClick: t[0] || (t[0] = (...e) => H(m) && H(m)(...e))
|
|
449
|
+
}, [H(d) ? K((P(), S("div", {
|
|
450
|
+
key: 0,
|
|
451
|
+
class: A(H(n).e("mask"))
|
|
452
|
+
}, null, 2)), [[U, !H(a)]]) : x("v-if", !0), R(e.$slots, "default")], 6)), [[U, H(p)]]);
|
|
453
|
+
}
|
|
454
|
+
}), ye = {
|
|
455
|
+
name: "ImagePreview",
|
|
456
|
+
components: {
|
|
457
|
+
ElCarousel: o(ge, { CarouselItem: ve }),
|
|
458
|
+
ElCarouselItem: a(ve)
|
|
459
|
+
},
|
|
460
|
+
props: {
|
|
461
|
+
visible: Boolean,
|
|
462
|
+
beforeClose: Function,
|
|
463
|
+
closeOnClickModal: Boolean,
|
|
464
|
+
click: Function,
|
|
465
|
+
modal: Boolean,
|
|
466
|
+
datas: {
|
|
467
|
+
type: Array,
|
|
468
|
+
default: () => []
|
|
469
|
+
},
|
|
470
|
+
beginIndex: Number
|
|
471
|
+
},
|
|
472
|
+
emits: ["close"],
|
|
473
|
+
data() {
|
|
474
|
+
return {
|
|
475
|
+
left: 0,
|
|
476
|
+
top: 0,
|
|
477
|
+
scale: 1,
|
|
478
|
+
rotate: 0,
|
|
479
|
+
index: this.beginIndex
|
|
480
|
+
};
|
|
481
|
+
},
|
|
482
|
+
computed: {
|
|
483
|
+
styleBoxName() {
|
|
484
|
+
return {
|
|
485
|
+
marginLeft: J(this.left),
|
|
486
|
+
marginTop: J(this.top)
|
|
487
|
+
};
|
|
488
|
+
},
|
|
489
|
+
styleName() {
|
|
490
|
+
return {
|
|
491
|
+
transform: `scale(${this.scale}) rotate(${this.rotate}deg)`,
|
|
492
|
+
maxWidth: "100%",
|
|
493
|
+
maxHeight: "100%"
|
|
494
|
+
};
|
|
495
|
+
},
|
|
496
|
+
isRrrow() {
|
|
497
|
+
return this.datas.length > 1;
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
methods: {
|
|
501
|
+
getName(e) {
|
|
502
|
+
return e.substring(e.lastIndexOf("/") + 1);
|
|
503
|
+
},
|
|
504
|
+
handlePrint() {
|
|
505
|
+
this.$Print(`#avue-image-preview__${this.index}`);
|
|
506
|
+
},
|
|
507
|
+
handlePrev() {
|
|
508
|
+
this.$refs.carousel.prev(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
509
|
+
},
|
|
510
|
+
handleNext() {
|
|
511
|
+
this.$refs.carousel.next(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
512
|
+
},
|
|
513
|
+
stopItem() {
|
|
514
|
+
this.left = 0, this.top = 0, this.$refs.item.forEach((e) => {
|
|
515
|
+
var t;
|
|
516
|
+
(t = e.pause) == null || t.call(e);
|
|
517
|
+
});
|
|
518
|
+
},
|
|
519
|
+
isMediaType(e) {
|
|
520
|
+
return t(e.url, e.type);
|
|
521
|
+
},
|
|
522
|
+
subScale() {
|
|
523
|
+
this.scale !== .2 && (this.scale = parseFloat((this.scale - .2).toFixed(2)));
|
|
524
|
+
},
|
|
525
|
+
addScale() {
|
|
526
|
+
this.scale = parseFloat((this.scale + .2).toFixed(2));
|
|
527
|
+
},
|
|
528
|
+
handleChange() {
|
|
529
|
+
this.scale = 1, this.rotate = 0;
|
|
530
|
+
},
|
|
531
|
+
move(e) {
|
|
532
|
+
let t = e.clientX, n = e.clientY;
|
|
533
|
+
document.onmousemove = (e) => {
|
|
534
|
+
let r = e.clientX - t, i = e.clientY - n;
|
|
535
|
+
t = e.clientX, n = e.clientY, this.left += r * 2, this.top += i * 2;
|
|
536
|
+
}, document.onmouseup = () => {
|
|
537
|
+
document.onmousemove = null, document.onmouseup = null;
|
|
538
|
+
};
|
|
539
|
+
},
|
|
540
|
+
handleClick(e, t, n = !1) {
|
|
541
|
+
typeof this.click == "function" ? this.click(e, t) : n && window.open(e.url);
|
|
542
|
+
},
|
|
543
|
+
close() {
|
|
544
|
+
typeof this.beforeClose == "function" && this.beforeClose(this.datas, this.index), this.$emit("close", this.datas, this.index);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}, be = {
|
|
548
|
+
key: 0,
|
|
549
|
+
class: "avue-image-preview"
|
|
550
|
+
}, xe = {
|
|
551
|
+
ref: "box",
|
|
552
|
+
class: "avue-image-preview__box"
|
|
553
|
+
}, Se = ["id", "onClick"], Ce = { class: "el-image-viewer__btn el-image-viewer__actions" }, we = { class: "el-image-viewer__actions__inner" };
|
|
554
|
+
function Te(e, t, n, r, i, a) {
|
|
555
|
+
let o = z("ElCarouselItem"), s = z("ElCarousel");
|
|
556
|
+
return n.visible ? (P(), S("div", be, [
|
|
557
|
+
n.modal ? (P(), S("div", {
|
|
558
|
+
key: 0,
|
|
559
|
+
class: "avue-image-preview__mask",
|
|
560
|
+
onClick: t[0] || (t[0] = (...e) => a.close && a.close(...e))
|
|
561
|
+
})) : x("v-if", !0),
|
|
562
|
+
C("span", {
|
|
563
|
+
class: "el-image-viewer__btn el-image-viewer__close",
|
|
564
|
+
onClick: t[1] || (t[1] = (...e) => a.close && a.close(...e))
|
|
565
|
+
}, [...t[10] || (t[10] = [C("i", { class: "el-icon-circle-close" }, null, -1)])]),
|
|
566
|
+
a.isRrrow ? (P(), S("span", {
|
|
567
|
+
key: 1,
|
|
568
|
+
class: "el-image-viewer__btn el-image-viewer__prev",
|
|
569
|
+
onClick: t[2] || (t[2] = (e) => a.handlePrev())
|
|
570
|
+
}, [...t[11] || (t[11] = [C("i", { class: "el-icon-arrow-left" }, null, -1)])])) : x("v-if", !0),
|
|
571
|
+
a.isRrrow ? (P(), S("span", {
|
|
572
|
+
key: 2,
|
|
573
|
+
class: "el-image-viewer__btn el-image-viewer__next",
|
|
574
|
+
onClick: t[3] || (t[3] = (e) => a.handleNext())
|
|
575
|
+
}, [...t[12] || (t[12] = [C("i", { class: "el-icon-arrow-right" }, null, -1)])])) : x("v-if", !0),
|
|
576
|
+
C("div", xe, [w(s, {
|
|
577
|
+
ref: "carousel",
|
|
578
|
+
"show-indicators": !1,
|
|
579
|
+
"initial-index": i.index,
|
|
580
|
+
"initial-swipe": i.index,
|
|
581
|
+
interval: 0,
|
|
582
|
+
arrow: "never",
|
|
583
|
+
"indicator-position": "none",
|
|
584
|
+
onChange: a.handleChange
|
|
585
|
+
}, {
|
|
586
|
+
default: G(() => [(P(!0), S(_, null, L(n.datas, (e, r) => (P(), b(o, {
|
|
587
|
+
key: r,
|
|
588
|
+
onClick: t[4] || (t[4] = q((e) => n.closeOnClickModal ? a.close() : "", ["self"]))
|
|
589
|
+
}, {
|
|
590
|
+
default: G(() => [a.isMediaType(e) ? (P(), b(te(a.isMediaType(e)), {
|
|
591
|
+
key: 0,
|
|
592
|
+
id: `avue-image-preview__${r}`,
|
|
593
|
+
ref_for: !0,
|
|
594
|
+
ref: "item",
|
|
595
|
+
src: e.url,
|
|
596
|
+
style: j([a.styleName, a.styleBoxName]),
|
|
597
|
+
controls: "controls",
|
|
598
|
+
ondragstart: "return false",
|
|
599
|
+
onClick: (t) => a.handleClick(e, r),
|
|
600
|
+
onMousedown: a.move
|
|
601
|
+
}, null, 40, [
|
|
602
|
+
"id",
|
|
603
|
+
"src",
|
|
604
|
+
"style",
|
|
605
|
+
"onClick",
|
|
606
|
+
"onMousedown"
|
|
607
|
+
])) : (P(), S("div", {
|
|
608
|
+
key: 1,
|
|
609
|
+
id: `avue-image-preview__${r}`,
|
|
610
|
+
class: "avue-image-preview__file",
|
|
611
|
+
onClick: (t) => a.handleClick(e, r, !0)
|
|
612
|
+
}, [C("span", null, [t[13] || (t[13] = C("i", { class: "el-icon-document" }, null, -1)), C("p", null, ne(e.name || a.getName(e.url)), 1)])], 8, Se))]),
|
|
613
|
+
_: 2
|
|
614
|
+
}, 1024))), 128))]),
|
|
615
|
+
_: 1
|
|
616
|
+
}, 8, [
|
|
617
|
+
"initial-index",
|
|
618
|
+
"initial-swipe",
|
|
619
|
+
"onChange"
|
|
620
|
+
])], 512),
|
|
621
|
+
C("div", Ce, [C("div", we, [
|
|
622
|
+
C("i", {
|
|
623
|
+
class: "el-icon-zoom-out",
|
|
624
|
+
onClick: t[5] || (t[5] = (...e) => a.subScale && a.subScale(...e))
|
|
625
|
+
}),
|
|
626
|
+
C("i", {
|
|
627
|
+
class: "el-icon-zoom-in",
|
|
628
|
+
onClick: t[6] || (t[6] = (...e) => a.addScale && a.addScale(...e))
|
|
629
|
+
}),
|
|
630
|
+
t[14] || (t[14] = C("i", { class: "el-image-viewer__actions__divider" }, null, -1)),
|
|
631
|
+
C("i", {
|
|
632
|
+
class: "el-icon-printer",
|
|
633
|
+
onClick: t[7] || (t[7] = (...e) => a.handlePrint && a.handlePrint(...e))
|
|
634
|
+
}),
|
|
635
|
+
t[15] || (t[15] = C("i", { class: "el-image-viewer__actions__divider" }, null, -1)),
|
|
636
|
+
C("i", {
|
|
637
|
+
class: "el-icon-refresh-left",
|
|
638
|
+
onClick: t[8] || (t[8] = (e) => i.rotate -= 90)
|
|
639
|
+
}),
|
|
640
|
+
C("i", {
|
|
641
|
+
class: "el-icon-refresh-right",
|
|
642
|
+
onClick: t[9] || (t[9] = (e) => i.rotate += 90)
|
|
643
|
+
})
|
|
644
|
+
])])
|
|
645
|
+
])) : x("v-if", !0);
|
|
646
|
+
}
|
|
647
|
+
var Ee = /* @__PURE__ */ e(ye, [["render", Te]]);
|
|
648
|
+
//#endregion
|
|
649
|
+
export { Ee as t };
|