@web-utils/component 3.0.6 → 3.1.1
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/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.mjs +394 -405
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/image-preview/index.mjs
CHANGED
|
@@ -1,147 +1,18 @@
|
|
|
1
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
2
|
var l = Object.getOwnPropertySymbols;
|
|
3
3
|
var _ = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var r = (
|
|
5
|
-
for (var t in
|
|
6
|
-
_.call(
|
|
4
|
+
var r = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, c = (i, e) => {
|
|
5
|
+
for (var t in e || (e = {}))
|
|
6
|
+
_.call(e, t) && r(i, t, e[t]);
|
|
7
7
|
if (l)
|
|
8
|
-
for (var t of l(
|
|
9
|
-
h.call(
|
|
10
|
-
return
|
|
8
|
+
for (var t of l(e))
|
|
9
|
+
h.call(e, t) && r(i, t, e[t]);
|
|
10
|
+
return i;
|
|
11
11
|
};
|
|
12
|
-
import { i as
|
|
12
|
+
import { i as v } from "../chunks/util.ae730cde.mjs";
|
|
13
13
|
import { setPx as u } from "@web-utils/core";
|
|
14
|
-
import
|
|
15
|
-
import { n as
|
|
16
|
-
var w = function() {
|
|
17
|
-
var e = this, i = e.$createElement, t = e._self._c || i;
|
|
18
|
-
return e.isShow ? t("div", {
|
|
19
|
-
staticClass: "avue-image-preview"
|
|
20
|
-
}, [e.ops.modal ? t("div", {
|
|
21
|
-
staticClass: "avue-image-preview__mask",
|
|
22
|
-
on: {
|
|
23
|
-
click: e.close
|
|
24
|
-
}
|
|
25
|
-
}) : e._e(), t("span", {
|
|
26
|
-
staticClass: "el-image-viewer__btn el-image-viewer__close",
|
|
27
|
-
on: {
|
|
28
|
-
click: e.close
|
|
29
|
-
}
|
|
30
|
-
}, [t("i", {
|
|
31
|
-
staticClass: "el-icon-circle-close"
|
|
32
|
-
})]), e.isRrrow ? t("span", {
|
|
33
|
-
staticClass: "el-image-viewer__btn el-image-viewer__prev",
|
|
34
|
-
on: {
|
|
35
|
-
click: function(s) {
|
|
36
|
-
return e.handlePrev();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}, [t("i", {
|
|
40
|
-
staticClass: "el-icon-arrow-left"
|
|
41
|
-
})]) : e._e(), e.isRrrow ? t("span", {
|
|
42
|
-
staticClass: "el-image-viewer__btn el-image-viewer__next",
|
|
43
|
-
on: {
|
|
44
|
-
click: function(s) {
|
|
45
|
-
return e.handleNext();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, [t("i", {
|
|
49
|
-
staticClass: "el-icon-arrow-right"
|
|
50
|
-
})]) : e._e(), t("div", {
|
|
51
|
-
ref: "box",
|
|
52
|
-
staticClass: "avue-image-preview__box"
|
|
53
|
-
}, [t("ElCarousel", {
|
|
54
|
-
ref: "carousel",
|
|
55
|
-
attrs: {
|
|
56
|
-
"show-indicators": !1,
|
|
57
|
-
"initial-index": e.index,
|
|
58
|
-
"initial-swipe": e.index,
|
|
59
|
-
interval: 0,
|
|
60
|
-
arrow: "never",
|
|
61
|
-
"indicator-position": "none"
|
|
62
|
-
},
|
|
63
|
-
on: {
|
|
64
|
-
change: e.handleChange
|
|
65
|
-
}
|
|
66
|
-
}, e._l(e.datas, function(s, a) {
|
|
67
|
-
return t("ElCarouselItem", {
|
|
68
|
-
key: a,
|
|
69
|
-
nativeOn: {
|
|
70
|
-
click: function(n) {
|
|
71
|
-
if (n.target !== n.currentTarget)
|
|
72
|
-
return null;
|
|
73
|
-
e.ops.closeOnClickModal && e.close();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}, [e.isMediaType(s) ? t(e.isMediaType(s), {
|
|
77
|
-
ref: "item",
|
|
78
|
-
refInFor: !0,
|
|
79
|
-
tag: "Component",
|
|
80
|
-
style: [e.styleName, e.styleBoxName],
|
|
81
|
-
attrs: {
|
|
82
|
-
id: `avue-image-preview__${a}`,
|
|
83
|
-
src: s.url,
|
|
84
|
-
controls: "controls",
|
|
85
|
-
ondragstart: "return false"
|
|
86
|
-
},
|
|
87
|
-
on: {
|
|
88
|
-
click: function(n) {
|
|
89
|
-
return e.handleClick(s, a);
|
|
90
|
-
},
|
|
91
|
-
mousedown: e.move
|
|
92
|
-
}
|
|
93
|
-
}) : t("div", {
|
|
94
|
-
staticClass: "avue-image-preview__file",
|
|
95
|
-
attrs: {
|
|
96
|
-
id: `avue-image-preview__${a}`
|
|
97
|
-
},
|
|
98
|
-
on: {
|
|
99
|
-
click: function(n) {
|
|
100
|
-
return e.handleClick(s, a, !0);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, [t("span", [t("i", {
|
|
104
|
-
staticClass: "el-icon-document"
|
|
105
|
-
}), t("p", [e._v(e._s(s.name || e.getName(s.url)))])])])], 1);
|
|
106
|
-
}), 1)], 1), t("div", {
|
|
107
|
-
staticClass: "el-image-viewer__btn el-image-viewer__actions"
|
|
108
|
-
}, [t("div", {
|
|
109
|
-
staticClass: "el-image-viewer__actions__inner"
|
|
110
|
-
}, [t("i", {
|
|
111
|
-
staticClass: "el-icon-zoom-out",
|
|
112
|
-
on: {
|
|
113
|
-
click: e.subScale
|
|
114
|
-
}
|
|
115
|
-
}), t("i", {
|
|
116
|
-
staticClass: "el-icon-zoom-in",
|
|
117
|
-
on: {
|
|
118
|
-
click: e.addScale
|
|
119
|
-
}
|
|
120
|
-
}), t("i", {
|
|
121
|
-
staticClass: "el-image-viewer__actions__divider"
|
|
122
|
-
}), t("i", {
|
|
123
|
-
staticClass: "el-icon-printer",
|
|
124
|
-
on: {
|
|
125
|
-
click: e.handlePrint
|
|
126
|
-
}
|
|
127
|
-
}), t("i", {
|
|
128
|
-
staticClass: "el-image-viewer__actions__divider"
|
|
129
|
-
}), t("i", {
|
|
130
|
-
staticClass: "el-icon-refresh-left",
|
|
131
|
-
on: {
|
|
132
|
-
click: function(s) {
|
|
133
|
-
e.rotate = e.rotate - 90;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}), t("i", {
|
|
137
|
-
staticClass: "el-icon-refresh-right",
|
|
138
|
-
on: {
|
|
139
|
-
click: function(s) {
|
|
140
|
-
e.rotate = e.rotate + 90;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
})])])]) : e._e();
|
|
144
|
-
}, C = [];
|
|
14
|
+
import p from "vue";
|
|
15
|
+
import { n as f } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
145
16
|
const o = {
|
|
146
17
|
name: "ImagePreview",
|
|
147
18
|
data() {
|
|
@@ -175,8 +46,8 @@ const o = {
|
|
|
175
46
|
}
|
|
176
47
|
},
|
|
177
48
|
methods: {
|
|
178
|
-
getName(
|
|
179
|
-
return
|
|
49
|
+
getName(i) {
|
|
50
|
+
return i.substring(i.lastIndexOf("/") + 1);
|
|
180
51
|
},
|
|
181
52
|
handlePrint() {
|
|
182
53
|
this.$Print(`#avue-image-preview__${this.index}`);
|
|
@@ -188,12 +59,12 @@ const o = {
|
|
|
188
59
|
this.$refs.carousel.next(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
189
60
|
},
|
|
190
61
|
stopItem() {
|
|
191
|
-
this.left = 0, this.top = 0, this.$refs.item.forEach((
|
|
192
|
-
|
|
62
|
+
this.left = 0, this.top = 0, this.$refs.item.forEach((i) => {
|
|
63
|
+
i.pause && i.pause();
|
|
193
64
|
});
|
|
194
65
|
},
|
|
195
|
-
isMediaType(
|
|
196
|
-
return
|
|
66
|
+
isMediaType(i) {
|
|
67
|
+
return v(i.url, i.type);
|
|
197
68
|
},
|
|
198
69
|
subScale() {
|
|
199
70
|
this.scale !== 0.2 && (this.scale = parseFloat((this.scale - 0.2).toFixed(2)));
|
|
@@ -204,27 +75,27 @@ const o = {
|
|
|
204
75
|
handleChange() {
|
|
205
76
|
this.scale = 1, this.rotate = 0;
|
|
206
77
|
},
|
|
207
|
-
move(
|
|
208
|
-
let
|
|
78
|
+
move(i) {
|
|
79
|
+
let e = i.clientX, t = i.clientY;
|
|
209
80
|
const s = 2;
|
|
210
81
|
document.onmousemove = (a) => {
|
|
211
|
-
const n = a.clientX -
|
|
212
|
-
|
|
82
|
+
const n = a.clientX - e, d = a.clientY - t;
|
|
83
|
+
e = a.clientX, t = a.clientY, this.left = this.left + n * s, this.top = this.top + d * s;
|
|
213
84
|
}, document.onmouseup = () => {
|
|
214
85
|
document.onmousemove = null, document.onmouseup = null;
|
|
215
86
|
};
|
|
216
87
|
},
|
|
217
|
-
handleClick(
|
|
218
|
-
typeof this.ops.click == "function" ? this.ops.click(
|
|
88
|
+
handleClick(i, e, t = !1) {
|
|
89
|
+
typeof this.ops.click == "function" ? this.ops.click(i, e) : t && window.open(i.url);
|
|
219
90
|
},
|
|
220
91
|
close() {
|
|
221
92
|
this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
|
|
222
93
|
}
|
|
223
94
|
}
|
|
224
|
-
},
|
|
225
|
-
const s =
|
|
226
|
-
datas:
|
|
227
|
-
index:
|
|
95
|
+
}, g = (i = [], e = 0, t = {}) => {
|
|
96
|
+
const s = p.extend(o), a = {
|
|
97
|
+
datas: i,
|
|
98
|
+
index: e,
|
|
228
99
|
ops: c({
|
|
229
100
|
closeOnClickModal: !1,
|
|
230
101
|
beforeClose: null,
|
|
@@ -236,25 +107,40 @@ const o = {
|
|
|
236
107
|
}).$mount();
|
|
237
108
|
return document.body.appendChild(n.$el), n.isShow = !0, n;
|
|
238
109
|
};
|
|
239
|
-
o.imagePreview =
|
|
240
|
-
const
|
|
241
|
-
var
|
|
242
|
-
|
|
110
|
+
o.imagePreview = g;
|
|
111
|
+
const w = o;
|
|
112
|
+
var C = function() {
|
|
113
|
+
var e = this, t = e._self._c;
|
|
114
|
+
return e._self._setupProxy, e.isShow ? t("div", { staticClass: "avue-image-preview" }, [e.ops.modal ? t("div", { staticClass: "avue-image-preview__mask", on: { click: e.close } }) : e._e(), t("span", { staticClass: "el-image-viewer__btn el-image-viewer__close", on: { click: e.close } }, [t("i", { staticClass: "el-icon-circle-close" })]), e.isRrrow ? t("span", { staticClass: "el-image-viewer__btn el-image-viewer__prev", on: { click: function(s) {
|
|
115
|
+
return e.handlePrev();
|
|
116
|
+
} } }, [t("i", { staticClass: "el-icon-arrow-left" })]) : e._e(), e.isRrrow ? t("span", { staticClass: "el-image-viewer__btn el-image-viewer__next", on: { click: function(s) {
|
|
117
|
+
return e.handleNext();
|
|
118
|
+
} } }, [t("i", { staticClass: "el-icon-arrow-right" })]) : e._e(), t("div", { ref: "box", staticClass: "avue-image-preview__box" }, [t("ElCarousel", { ref: "carousel", attrs: { "show-indicators": !1, "initial-index": e.index, "initial-swipe": e.index, interval: 0, arrow: "never", "indicator-position": "none" }, on: { change: e.handleChange } }, e._l(e.datas, function(s, a) {
|
|
119
|
+
return t("ElCarouselItem", { key: a, nativeOn: { click: function(n) {
|
|
120
|
+
if (n.target !== n.currentTarget)
|
|
121
|
+
return null;
|
|
122
|
+
e.ops.closeOnClickModal && e.close();
|
|
123
|
+
} } }, [e.isMediaType(s) ? t(e.isMediaType(s), { ref: "item", refInFor: !0, tag: "Component", style: [e.styleName, e.styleBoxName], attrs: { id: `avue-image-preview__${a}`, src: s.url, controls: "controls", ondragstart: "return false" }, on: { click: function(n) {
|
|
124
|
+
return e.handleClick(s, a);
|
|
125
|
+
}, mousedown: e.move } }) : t("div", { staticClass: "avue-image-preview__file", attrs: { id: `avue-image-preview__${a}` }, on: { click: function(n) {
|
|
126
|
+
return e.handleClick(s, a, !0);
|
|
127
|
+
} } }, [t("span", [t("i", { staticClass: "el-icon-document" }), t("p", [e._v(e._s(s.name || e.getName(s.url)))])])])], 1);
|
|
128
|
+
}), 1)], 1), t("div", { staticClass: "el-image-viewer__btn el-image-viewer__actions" }, [t("div", { staticClass: "el-image-viewer__actions__inner" }, [t("i", { staticClass: "el-icon-zoom-out", on: { click: e.subScale } }), t("i", { staticClass: "el-icon-zoom-in", on: { click: e.addScale } }), t("i", { staticClass: "el-image-viewer__actions__divider" }), t("i", { staticClass: "el-icon-printer", on: { click: e.handlePrint } }), t("i", { staticClass: "el-image-viewer__actions__divider" }), t("i", { staticClass: "el-icon-refresh-left", on: { click: function(s) {
|
|
129
|
+
e.rotate = e.rotate - 90;
|
|
130
|
+
} } }), t("i", { staticClass: "el-icon-refresh-right", on: { click: function(s) {
|
|
131
|
+
e.rotate = e.rotate + 90;
|
|
132
|
+
} } })])])]) : e._e();
|
|
133
|
+
}, x = [], k = /* @__PURE__ */ f(
|
|
243
134
|
w,
|
|
244
135
|
C,
|
|
136
|
+
x,
|
|
245
137
|
!1,
|
|
246
|
-
|
|
138
|
+
null,
|
|
247
139
|
null,
|
|
248
140
|
null,
|
|
249
141
|
null
|
|
250
142
|
);
|
|
251
|
-
|
|
252
|
-
for (let i in d)
|
|
253
|
-
this[i] = d[i];
|
|
254
|
-
}
|
|
255
|
-
const M = /* @__PURE__ */ function() {
|
|
256
|
-
return $.exports;
|
|
257
|
-
}();
|
|
143
|
+
const N = k.exports;
|
|
258
144
|
export {
|
|
259
|
-
|
|
145
|
+
N as default
|
|
260
146
|
};
|
package/image-viewer/index.mjs
CHANGED
|
@@ -1,34 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "viewerjs";
|
|
2
2
|
import "viewerjs/dist/viewer.css";
|
|
3
|
-
import { n as
|
|
4
|
-
|
|
5
|
-
var e = this, t = e.$createElement, r = e._self._c || t;
|
|
6
|
-
return r("div", {
|
|
7
|
-
directives: [{
|
|
8
|
-
name: "show",
|
|
9
|
-
rawName: "v-show",
|
|
10
|
-
value: !e.lazy,
|
|
11
|
-
expression: "!lazy"
|
|
12
|
-
}],
|
|
13
|
-
ref: "wrapper",
|
|
14
|
-
staticClass: "image-viewer"
|
|
15
|
-
}, [e._t("default", function() {
|
|
16
|
-
return e._l(e.images, function(a) {
|
|
17
|
-
return r("img", {
|
|
18
|
-
key: a.src,
|
|
19
|
-
staticClass: "image-item",
|
|
20
|
-
style: {
|
|
21
|
-
backgroundImage: `url('${a.src}')`
|
|
22
|
-
},
|
|
23
|
-
attrs: {
|
|
24
|
-
"data-src": a.src,
|
|
25
|
-
alt: a.alt
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
})], 2);
|
|
30
|
-
}, o = [];
|
|
31
|
-
const u = {
|
|
3
|
+
import { n as i } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
4
|
+
const l = {
|
|
32
5
|
name: "ImageViewer",
|
|
33
6
|
props: {
|
|
34
7
|
images: Array,
|
|
@@ -49,47 +22,48 @@ const u = {
|
|
|
49
22
|
});
|
|
50
23
|
},
|
|
51
24
|
updated() {
|
|
52
|
-
var
|
|
53
|
-
this.lazy || (
|
|
25
|
+
var r;
|
|
26
|
+
this.lazy || (r = this.gallery) == null || r.update();
|
|
54
27
|
},
|
|
55
28
|
beforeDestroy() {
|
|
56
29
|
this.lazy || this.gallery.destroy();
|
|
57
30
|
},
|
|
58
31
|
methods: {
|
|
59
|
-
init({ container:
|
|
60
|
-
this.gallery = new
|
|
32
|
+
init({ container: r, options: e }) {
|
|
33
|
+
this.gallery = new s(r, e);
|
|
61
34
|
},
|
|
62
|
-
show({ container:
|
|
63
|
-
|
|
35
|
+
show({ container: r, options: e, index: a } = {}) {
|
|
36
|
+
r = r || this.$refs.wrapper, e = e || {
|
|
64
37
|
navbar: !1,
|
|
65
38
|
backdrop: "static",
|
|
66
39
|
url: this.url,
|
|
67
40
|
loop: !1,
|
|
68
|
-
initialViewIndex:
|
|
41
|
+
initialViewIndex: a || 0,
|
|
69
42
|
hidden: () => {
|
|
70
43
|
this.gallery.destroy(), this.gallery = null;
|
|
71
44
|
}
|
|
72
|
-
}, this.gallery || (this.init({ container:
|
|
45
|
+
}, this.gallery || (this.init({ container: r, options: e }), this.gallery.show());
|
|
73
46
|
}
|
|
74
47
|
}
|
|
75
|
-
}
|
|
76
|
-
var
|
|
77
|
-
|
|
48
|
+
};
|
|
49
|
+
var n = function() {
|
|
50
|
+
var e = this, a = e._self._c;
|
|
51
|
+
return a("div", { directives: [{ name: "show", rawName: "v-show", value: !e.lazy, expression: "!lazy" }], ref: "wrapper", staticClass: "image-viewer" }, [e._t("default", function() {
|
|
52
|
+
return e._l(e.images, function(t) {
|
|
53
|
+
return a("img", { key: t.src, staticClass: "image-item", style: { backgroundImage: `url('${t.src}')` }, attrs: { "data-src": t.src, alt: t.alt } });
|
|
54
|
+
});
|
|
55
|
+
})], 2);
|
|
56
|
+
}, o = [], u = /* @__PURE__ */ i(
|
|
57
|
+
l,
|
|
78
58
|
n,
|
|
79
59
|
o,
|
|
80
60
|
!1,
|
|
81
|
-
|
|
61
|
+
null,
|
|
82
62
|
null,
|
|
83
63
|
null,
|
|
84
64
|
null
|
|
85
65
|
);
|
|
86
|
-
|
|
87
|
-
for (let t in s)
|
|
88
|
-
this[t] = s[t];
|
|
89
|
-
}
|
|
90
|
-
const p = /* @__PURE__ */ function() {
|
|
91
|
-
return c.exports;
|
|
92
|
-
}();
|
|
66
|
+
const h = u.exports;
|
|
93
67
|
export {
|
|
94
|
-
|
|
68
|
+
h as default
|
|
95
69
|
};
|