@web-utils/component 2.7.13 → 2.7.14
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/chunks/{ConfigSelect.vue_vue_type_template_lang.e7a9d5b7.js → ConfigSelect.vue_vue_type_template_lang.dfc91f07.js} +20 -15
- package/dist/chunks/{ConfigTable.vue_vue_type_template_lang.e9060616.js → ConfigTable.vue_vue_type_template_lang.b27540fd.js} +1 -1
- package/dist/chunks/{ConfigUpload.vue_vue_type_template_lang.48dd814b.js → ConfigUpload.vue_vue_type_template_lang.129c0ced.js} +18 -13
- package/dist/chunks/{WidgetConfig.vue_vue_type_template_lang.7928c468.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
- package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.e3e800a6.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
- package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.6a693e5e.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
- package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.291bf39a.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +3 -2
- package/dist/chunks/{dataformat.d3fd2d1b.js → dataformat.65b92bfe.js} +36 -35
- package/dist/chunks/detail.d67573b1.js +28 -0
- package/dist/chunks/dic.70feb9b4.js +135 -0
- package/dist/chunks/{event.43b42228.js → event.dd6f522d.js} +3 -3
- package/dist/chunks/{init.3b47bb80.js → init.7c58eb34.js} +10 -10
- package/dist/chunks/{monaco.1dbdc960.js → monaco.cefcb9f5.js} +92 -85
- package/dist/chunks/{packages.6f252850.js → packages.1fc9ccba.js} +1 -1
- package/dist/chunks/slot.4b391395.js +27 -0
- package/dist/chunks/util.23fe58fb.js +261 -0
- package/dist/components/afd-column/index.js +1 -1
- package/dist/components/affix/index.js +2 -2
- package/dist/components/base.css +1 -1
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/chat/index.js +9 -9
- package/dist/components/column/index.js +25 -25
- package/dist/components/column-default/index.js +3 -2
- package/dist/components/column-dynamic/index.js +1 -1
- package/dist/components/column-menu/index.js +11 -11
- package/dist/components/column-slot/index.js +54 -53
- package/dist/components/config-custom/index.js +3 -3
- package/dist/components/config-event/index.js +5 -5
- package/dist/components/config-rate/index.js +1 -1
- package/dist/components/config-rate/style.css +1 -1
- package/dist/components/config-select/index.js +3 -3
- package/dist/components/config-switch/index.js +5 -5
- package/dist/components/config-switch/style.css +1 -1
- package/dist/components/config-table/index.js +3 -3
- package/dist/components/config-tree/index.js +3 -3
- package/dist/components/config-tree/style.css +1 -1
- package/dist/components/config-upload/index.js +1 -1
- package/dist/components/dialog-excel/index.js +37 -40
- package/dist/components/dialog-filter/index.js +19 -19
- package/dist/components/dialog-form/index.js +1 -1
- package/dist/components/element-dialog/index.js +2 -2
- package/dist/components/element-dialog/style.css +1 -1
- package/dist/components/flow/index.js +17 -18
- package/dist/components/flow-node/index.js +1 -1
- package/dist/components/form-temp/index.js +3 -3
- package/dist/components/fy-array/index.js +2 -2
- package/dist/components/fy-cascader/index.js +13 -13
- package/dist/components/fy-checkbox/index.js +4 -4
- package/dist/components/fy-code/index.js +1 -1
- package/dist/components/fy-curd/index.js +68 -69
- package/dist/components/fy-date/index.js +1 -1
- package/dist/components/fy-dialog-form/index.js +11 -11
- package/dist/components/fy-draggable/index.js +5 -7
- package/dist/components/fy-dynamic/index.js +32 -28
- package/dist/components/fy-empty/index.js +1 -1
- package/dist/components/fy-form/index.js +153 -141
- package/dist/components/fy-form-design/index.js +31 -31
- package/dist/components/fy-input/index.js +60 -46
- package/dist/components/fy-input-color/index.js +34 -29
- package/dist/components/fy-input-icon/index.js +1 -1
- package/dist/components/fy-input-map/index.js +14 -14
- package/dist/components/fy-input-number/index.js +1 -1
- package/dist/components/fy-input-table/index.js +2 -2
- package/dist/components/fy-input-tree/index.js +12 -12
- package/dist/components/fy-radio/index.js +1 -1
- package/dist/components/fy-rate/index.js +1 -1
- package/dist/components/fy-select/index.js +3 -3
- package/dist/components/fy-slider/index.js +2 -2
- package/dist/components/fy-switch/index.js +1 -1
- package/dist/components/fy-tabs/index.js +2 -2
- package/dist/components/fy-time/index.js +2 -2
- package/dist/components/fy-title/index.js +1 -1
- package/dist/components/fy-tree/index.js +3 -3
- package/dist/components/fy-u-editor/index.js +26 -24
- package/dist/components/fy-upload/index.js +146 -282
- package/dist/components/header-menu/index.js +2 -2
- package/dist/components/header-search/index.js +16 -15
- package/dist/components/image-cropper/index.js +299 -0
- package/dist/components/image-cropper/style.css +1 -0
- package/dist/components/image-preview/index.js +346 -0
- package/dist/components/image-preview/style.css +1 -0
- package/dist/components/keyboard/index.js +58 -63
- package/dist/components/license/index.js +7 -7
- package/dist/components/login/index.js +37 -32
- package/dist/components/name-avatar/index.js +1 -1
- package/dist/components/pageable-table/index.js +1 -1
- package/dist/components/pageable-view/index.js +26 -26
- package/dist/components/photo-swipe/index.js +71 -166
- package/dist/components/queue/index.js +6 -6
- package/dist/components/record-video/index.js +18 -18
- package/dist/components/search/index.js +3 -3
- package/dist/components/sign/index.js +64 -59
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/table-page/index.js +5 -5
- package/dist/components/text-ellipsis/index.js +11 -10
- package/dist/components/verify/index.js +25 -25
- package/dist/components/widget-config/index.js +8 -8
- package/dist/components/widget-form/index.js +7 -7
- package/dist/components/widget-form-group/index.js +8 -8
- package/dist/components/widget-form-item/index.js +14 -13
- package/dist/components/widget-form-table/index.js +14 -14
- package/dist/index.css +109 -40
- package/dist/index.es.js +4048 -3732
- package/package.json +5 -56
- package/web-types.json +28 -10
- package/dist/chunks/detail.ac4d421a.js +0 -28
- package/dist/chunks/dic.79d9f595.js +0 -133
- package/dist/chunks/slot.1b8d2b1b.js +0 -27
- package/dist/chunks/util.80e28481.js +0 -250
- package/dist/components/photo-swipe/style.css +0 -1
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { x as u } from "../../chunks/util.23fe58fb.js";
|
|
2
|
+
import { setPx as n } from "@web-utils/core";
|
|
3
|
+
import { n as h } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
|
|
4
|
+
import f from "vue";
|
|
5
|
+
var d = function() {
|
|
6
|
+
var e = this, s = e.$createElement, t = e._self._c || s;
|
|
7
|
+
return e.isShow ? t("div", {
|
|
8
|
+
staticClass: "avue-image-preview"
|
|
9
|
+
}, [e.ops.modal ? t("div", {
|
|
10
|
+
staticClass: "avue-image-preview__mask",
|
|
11
|
+
on: {
|
|
12
|
+
click: e.close
|
|
13
|
+
}
|
|
14
|
+
}) : e._e(), t("span", {
|
|
15
|
+
staticClass: "el-image-viewer__btn el-image-viewer__close",
|
|
16
|
+
on: {
|
|
17
|
+
click: e.close
|
|
18
|
+
}
|
|
19
|
+
}, [t("i", {
|
|
20
|
+
staticClass: "el-icon-circle-close"
|
|
21
|
+
})]), e.isRrrow ? t("span", {
|
|
22
|
+
staticClass: "el-image-viewer__btn el-image-viewer__prev",
|
|
23
|
+
on: {
|
|
24
|
+
click: function(i) {
|
|
25
|
+
return e.handlePrev();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, [t("i", {
|
|
29
|
+
staticClass: "el-icon-arrow-left"
|
|
30
|
+
})]) : e._e(), e.isRrrow ? t("span", {
|
|
31
|
+
staticClass: "el-image-viewer__btn el-image-viewer__next",
|
|
32
|
+
on: {
|
|
33
|
+
click: function(i) {
|
|
34
|
+
return e.handleNext();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, [t("i", {
|
|
38
|
+
staticClass: "el-icon-arrow-right"
|
|
39
|
+
})]) : e._e(), t("div", {
|
|
40
|
+
ref: "box",
|
|
41
|
+
staticClass: "avue-image-preview__box"
|
|
42
|
+
}, [t("ElCarousel", {
|
|
43
|
+
ref: "carousel",
|
|
44
|
+
attrs: {
|
|
45
|
+
"show-indicators": !1,
|
|
46
|
+
"initial-index": e.index,
|
|
47
|
+
"initial-swipe": e.index,
|
|
48
|
+
interval: 0,
|
|
49
|
+
arrow: "never",
|
|
50
|
+
"indicator-position": "none"
|
|
51
|
+
},
|
|
52
|
+
on: {
|
|
53
|
+
change: e.handleChange
|
|
54
|
+
}
|
|
55
|
+
}, e._l(e.datas, function(i, a) {
|
|
56
|
+
return t("ElCarouselItem", {
|
|
57
|
+
key: a,
|
|
58
|
+
nativeOn: {
|
|
59
|
+
click: function(o) {
|
|
60
|
+
if (o.target !== o.currentTarget)
|
|
61
|
+
return null;
|
|
62
|
+
e.ops.closeOnClickModal && e.close();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, [e.isMediaType(i) ? t(e.isMediaType(i), {
|
|
66
|
+
ref: "item",
|
|
67
|
+
refInFor: !0,
|
|
68
|
+
tag: "Component",
|
|
69
|
+
style: [e.styleName, e.styleBoxName],
|
|
70
|
+
attrs: {
|
|
71
|
+
id: `avue-image-preview__${a}`,
|
|
72
|
+
src: i.url,
|
|
73
|
+
controls: "controls",
|
|
74
|
+
ondragstart: "return false"
|
|
75
|
+
},
|
|
76
|
+
on: {
|
|
77
|
+
click: function(o) {
|
|
78
|
+
return e.handleClick(i, a);
|
|
79
|
+
},
|
|
80
|
+
mousedown: e.move
|
|
81
|
+
}
|
|
82
|
+
}) : t("div", {
|
|
83
|
+
staticClass: "avue-image-preview__file",
|
|
84
|
+
attrs: {
|
|
85
|
+
id: `avue-image-preview__${a}`
|
|
86
|
+
},
|
|
87
|
+
on: {
|
|
88
|
+
click: function(o) {
|
|
89
|
+
return e.handleClick(i, a, !0);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, [t("span", [t("i", {
|
|
93
|
+
staticClass: "el-icon-document"
|
|
94
|
+
}), t("p", [e._v(e._s(i.name || e.getName(i.url)))])])])], 1);
|
|
95
|
+
}), 1)], 1), t("div", {
|
|
96
|
+
staticClass: "el-image-viewer__btn el-image-viewer__actions"
|
|
97
|
+
}, [t("div", {
|
|
98
|
+
staticClass: "el-image-viewer__actions__inner"
|
|
99
|
+
}, [t("i", {
|
|
100
|
+
staticClass: "el-icon-zoom-out",
|
|
101
|
+
on: {
|
|
102
|
+
click: e.subScale
|
|
103
|
+
}
|
|
104
|
+
}), t("i", {
|
|
105
|
+
staticClass: "el-icon-zoom-in",
|
|
106
|
+
on: {
|
|
107
|
+
click: e.addScale
|
|
108
|
+
}
|
|
109
|
+
}), t("i", {
|
|
110
|
+
staticClass: "el-image-viewer__actions__divider"
|
|
111
|
+
}), t("i", {
|
|
112
|
+
staticClass: "el-icon-printer",
|
|
113
|
+
on: {
|
|
114
|
+
click: e.handlePrint
|
|
115
|
+
}
|
|
116
|
+
}), t("i", {
|
|
117
|
+
staticClass: "el-image-viewer__actions__divider"
|
|
118
|
+
}), t("i", {
|
|
119
|
+
staticClass: "el-icon-refresh-left",
|
|
120
|
+
on: {
|
|
121
|
+
click: function(i) {
|
|
122
|
+
e.rotate = e.rotate - 90;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}), t("i", {
|
|
126
|
+
staticClass: "el-icon-refresh-right",
|
|
127
|
+
on: {
|
|
128
|
+
click: function(i) {
|
|
129
|
+
e.rotate = e.rotate + 90;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
})])])]) : e._e();
|
|
133
|
+
}, m = [];
|
|
134
|
+
const v = {
|
|
135
|
+
name: "ImagePreview",
|
|
136
|
+
data() {
|
|
137
|
+
return {
|
|
138
|
+
left: 0,
|
|
139
|
+
top: 0,
|
|
140
|
+
scale: 1,
|
|
141
|
+
datas: [],
|
|
142
|
+
rotate: 0,
|
|
143
|
+
isShow: !1,
|
|
144
|
+
index: 0,
|
|
145
|
+
ops: {}
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
computed: {
|
|
149
|
+
styleBoxName() {
|
|
150
|
+
return {
|
|
151
|
+
marginLeft: n(this.left),
|
|
152
|
+
marginTop: n(this.top)
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
styleName() {
|
|
156
|
+
return {
|
|
157
|
+
transform: `scale(${this.scale}) rotate(${this.rotate}deg)`,
|
|
158
|
+
maxWidth: "100%",
|
|
159
|
+
maxHeight: "100%"
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
isRrrow() {
|
|
163
|
+
return this.datas.length > 1;
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
methods: {
|
|
167
|
+
getName(e) {
|
|
168
|
+
return e.substring(e.lastIndexOf("/") + 1);
|
|
169
|
+
},
|
|
170
|
+
handlePrint() {
|
|
171
|
+
this.$Print(`#avue-image-preview__${this.index}`);
|
|
172
|
+
},
|
|
173
|
+
handlePrev() {
|
|
174
|
+
this.$refs.carousel.prev(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
175
|
+
},
|
|
176
|
+
handleNext() {
|
|
177
|
+
this.$refs.carousel.next(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
178
|
+
},
|
|
179
|
+
stopItem() {
|
|
180
|
+
this.left = 0, this.top = 0, this.$refs.item.forEach((e) => {
|
|
181
|
+
e.pause && e.pause();
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
isMediaType(e) {
|
|
185
|
+
return u(e.url, e.type);
|
|
186
|
+
},
|
|
187
|
+
subScale() {
|
|
188
|
+
this.scale !== 0.2 && (this.scale = parseFloat((this.scale - 0.2).toFixed(2)));
|
|
189
|
+
},
|
|
190
|
+
addScale() {
|
|
191
|
+
this.scale = parseFloat((this.scale + 0.2).toFixed(2));
|
|
192
|
+
},
|
|
193
|
+
handleChange() {
|
|
194
|
+
this.scale = 1, this.rotate = 0;
|
|
195
|
+
},
|
|
196
|
+
move(e) {
|
|
197
|
+
let s = e.clientX, t = e.clientY;
|
|
198
|
+
const i = 2;
|
|
199
|
+
document.onmousemove = (a) => {
|
|
200
|
+
const o = a.clientX - s, l = a.clientY - t;
|
|
201
|
+
s = a.clientX, t = a.clientY, this.left = this.left + o * i, this.top = this.top + l * i;
|
|
202
|
+
}, document.onmouseup = () => {
|
|
203
|
+
document.onmousemove = null, document.onmouseup = null;
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
handleClick(e, s, t = !1) {
|
|
207
|
+
typeof this.ops.click == "function" ? this.ops.click(e, s) : t && window.open(e.url);
|
|
208
|
+
},
|
|
209
|
+
close() {
|
|
210
|
+
this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
imagePreview: p
|
|
214
|
+
}, r = {};
|
|
215
|
+
var _ = /* @__PURE__ */ h(
|
|
216
|
+
v,
|
|
217
|
+
d,
|
|
218
|
+
m,
|
|
219
|
+
!1,
|
|
220
|
+
g,
|
|
221
|
+
null,
|
|
222
|
+
null,
|
|
223
|
+
null
|
|
224
|
+
);
|
|
225
|
+
function g(e) {
|
|
226
|
+
for (let s in r)
|
|
227
|
+
this[s] = r[s];
|
|
228
|
+
}
|
|
229
|
+
const w = /* @__PURE__ */ function() {
|
|
230
|
+
return _.exports;
|
|
231
|
+
}(), p = (e = [], s = 0, t = {}) => {
|
|
232
|
+
const i = f.extend(w), a = {
|
|
233
|
+
datas: e,
|
|
234
|
+
index: s,
|
|
235
|
+
ops: {
|
|
236
|
+
closeOnClickModal: !1,
|
|
237
|
+
beforeClose: null,
|
|
238
|
+
click: null,
|
|
239
|
+
modal: !0,
|
|
240
|
+
...t
|
|
241
|
+
}
|
|
242
|
+
}, o = new i({
|
|
243
|
+
data: a
|
|
244
|
+
});
|
|
245
|
+
return o.$mount(), document.body.appendChild(o.$el), o.isShow = !0, o;
|
|
246
|
+
}, x = {
|
|
247
|
+
name: "ImagePreview",
|
|
248
|
+
data() {
|
|
249
|
+
return {
|
|
250
|
+
left: 0,
|
|
251
|
+
top: 0,
|
|
252
|
+
scale: 1,
|
|
253
|
+
datas: [],
|
|
254
|
+
rotate: 0,
|
|
255
|
+
isShow: !1,
|
|
256
|
+
index: 0,
|
|
257
|
+
ops: {}
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
computed: {
|
|
261
|
+
styleBoxName() {
|
|
262
|
+
return {
|
|
263
|
+
marginLeft: n(this.left),
|
|
264
|
+
marginTop: n(this.top)
|
|
265
|
+
};
|
|
266
|
+
},
|
|
267
|
+
styleName() {
|
|
268
|
+
return {
|
|
269
|
+
transform: `scale(${this.scale}) rotate(${this.rotate}deg)`,
|
|
270
|
+
maxWidth: "100%",
|
|
271
|
+
maxHeight: "100%"
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
isRrrow() {
|
|
275
|
+
return this.datas.length > 1;
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
methods: {
|
|
279
|
+
getName(e) {
|
|
280
|
+
return e.substring(e.lastIndexOf("/") + 1);
|
|
281
|
+
},
|
|
282
|
+
handlePrint() {
|
|
283
|
+
this.$Print(`#avue-image-preview__${this.index}`);
|
|
284
|
+
},
|
|
285
|
+
handlePrev() {
|
|
286
|
+
this.$refs.carousel.prev(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
287
|
+
},
|
|
288
|
+
handleNext() {
|
|
289
|
+
this.$refs.carousel.next(), this.index = this.$refs.carousel.activeIndex, this.stopItem();
|
|
290
|
+
},
|
|
291
|
+
stopItem() {
|
|
292
|
+
this.left = 0, this.top = 0, this.$refs.item.forEach((e) => {
|
|
293
|
+
e.pause && e.pause();
|
|
294
|
+
});
|
|
295
|
+
},
|
|
296
|
+
isMediaType(e) {
|
|
297
|
+
return u(e.url, e.type);
|
|
298
|
+
},
|
|
299
|
+
subScale() {
|
|
300
|
+
this.scale !== 0.2 && (this.scale = parseFloat((this.scale - 0.2).toFixed(2)));
|
|
301
|
+
},
|
|
302
|
+
addScale() {
|
|
303
|
+
this.scale = parseFloat((this.scale + 0.2).toFixed(2));
|
|
304
|
+
},
|
|
305
|
+
handleChange() {
|
|
306
|
+
this.scale = 1, this.rotate = 0;
|
|
307
|
+
},
|
|
308
|
+
move(e) {
|
|
309
|
+
let s = e.clientX, t = e.clientY;
|
|
310
|
+
const i = 2;
|
|
311
|
+
document.onmousemove = (a) => {
|
|
312
|
+
const o = a.clientX - s, l = a.clientY - t;
|
|
313
|
+
s = a.clientX, t = a.clientY, this.left = this.left + o * i, this.top = this.top + l * i;
|
|
314
|
+
}, document.onmouseup = () => {
|
|
315
|
+
document.onmousemove = null, document.onmouseup = null;
|
|
316
|
+
};
|
|
317
|
+
},
|
|
318
|
+
handleClick(e, s, t = !1) {
|
|
319
|
+
typeof this.ops.click == "function" ? this.ops.click(e, s) : t && window.open(e.url);
|
|
320
|
+
},
|
|
321
|
+
close() {
|
|
322
|
+
this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
imagePreview: p
|
|
326
|
+
}, c = {};
|
|
327
|
+
var C = /* @__PURE__ */ h(
|
|
328
|
+
x,
|
|
329
|
+
d,
|
|
330
|
+
m,
|
|
331
|
+
!1,
|
|
332
|
+
$,
|
|
333
|
+
null,
|
|
334
|
+
null,
|
|
335
|
+
null
|
|
336
|
+
);
|
|
337
|
+
function $(e) {
|
|
338
|
+
for (let s in c)
|
|
339
|
+
this[s] = c[s];
|
|
340
|
+
}
|
|
341
|
+
const b = /* @__PURE__ */ function() {
|
|
342
|
+
return C.exports;
|
|
343
|
+
}();
|
|
344
|
+
export {
|
|
345
|
+
b as default
|
|
346
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.avue-img--center{display:flex;align-items:center;justify-content:center}.avue-img--fullscreen .el-dialog__body{height:100%}.avue-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;transition:all .5s;z-index:9998}.avue-image-preview .el-image-viewer__close i{color:#fff}.avue-image-preview .el-image-viewer__btn{z-index:1024}.avue-image-preview img{transition:all .5s;cursor:pointer}.avue-image-preview__file{text-align:center}.avue-image-preview__file a{color:#fff}.avue-image-preview__file i{cursor:pointer;font-size:80px}.avue-image-preview__mask{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.avue-image-preview__box{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.avue-image-preview__box .el-carousel{width:90%;height:100%}.avue-image-preview__box .el-carousel__container{height:100%}.avue-image-preview__box .el-carousel__item{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
|
|
@@ -7,11 +7,12 @@ let T = class {
|
|
|
7
7
|
}
|
|
8
8
|
this.obj = e;
|
|
9
9
|
const r = document.querySelector(e.el);
|
|
10
|
-
let
|
|
10
|
+
let c = "";
|
|
11
11
|
if (typeof e.style == "object")
|
|
12
|
-
for (
|
|
13
|
-
|
|
14
|
-
let i =
|
|
12
|
+
for (const t in e.style)
|
|
13
|
+
c += `${t}: ${e.style[t]};`;
|
|
14
|
+
let i = `<div class="akeyboard-keyboard${e.fixedBottomCenter ? " akeyboard-keyboard-fixedBottomCenter" : ""}" style="${c}">`;
|
|
15
|
+
const o = [];
|
|
15
16
|
for (let t = 1; t < 10; t++)
|
|
16
17
|
o.push(t.toString());
|
|
17
18
|
o.push("0");
|
|
@@ -30,9 +31,9 @@ let T = class {
|
|
|
30
31
|
const a = [], m = [];
|
|
31
32
|
for (let t = 0; t < s.length; t++) {
|
|
32
33
|
a.push([]), m.push([]), n = s[t];
|
|
33
|
-
for (let
|
|
34
|
-
if (n[
|
|
35
|
-
switch (m[t].push(n[
|
|
34
|
+
for (let l = 0; l < n.length; l++) {
|
|
35
|
+
if (n[l].length === 1) {
|
|
36
|
+
switch (m[t].push(n[l].toUpperCase()), n[l]) {
|
|
36
37
|
case "`":
|
|
37
38
|
a[t].push("~");
|
|
38
39
|
continue;
|
|
@@ -97,33 +98,30 @@ let T = class {
|
|
|
97
98
|
a[t].push("?");
|
|
98
99
|
continue;
|
|
99
100
|
}
|
|
100
|
-
a[t].push(n[
|
|
101
|
+
a[t].push(n[l].toUpperCase());
|
|
101
102
|
continue;
|
|
102
103
|
}
|
|
103
|
-
a[t].push(n[
|
|
104
|
+
a[t].push(n[l]), m[t].push(n[l]);
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
for (let t = 0; t < s.length; t++) {
|
|
107
108
|
n = s[t], i += '<div class="akeyboard-keyboard-innerKeys">';
|
|
108
|
-
for (let
|
|
109
|
-
i +=
|
|
109
|
+
for (let l = 0; l < n.length; l++)
|
|
110
|
+
i += `<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-${n[l]}">${n[l]}</div>`;
|
|
110
111
|
i += "</div>";
|
|
111
112
|
}
|
|
112
113
|
i += "</div>", r.innerHTML = i;
|
|
113
114
|
let K = !1;
|
|
114
115
|
s.forEach((t) => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
}), K && document.querySelectorAll(e.el + " .akeyboard-keyboard-keys-Shift").forEach((c) => {
|
|
120
|
-
c.onclick = function() {
|
|
116
|
+
t.includes("Shift") && (K = !0);
|
|
117
|
+
}), K && document.querySelectorAll(`${e.el} .akeyboard-keyboard-keys-Shift`).forEach((l) => {
|
|
118
|
+
l.onclick = function() {
|
|
121
119
|
if (!this.isShift) {
|
|
122
|
-
const y = document.querySelector(e.el
|
|
120
|
+
const y = document.querySelector(`${e.el} .akeyboard-keyboard-keys-Caps`);
|
|
123
121
|
if (y && y.isCaps)
|
|
124
122
|
return;
|
|
125
|
-
|
|
126
|
-
const u = document.querySelectorAll(e.el
|
|
123
|
+
l.isShift = !0, l.innerHTML = "SHIFT", this.classList.add("keyboard-keyboard-keys-focus");
|
|
124
|
+
const u = document.querySelectorAll(`${e.el} .akeyboard-keyboard-innerKeys`);
|
|
127
125
|
let b;
|
|
128
126
|
for (let h = 0; h < u.length; h++) {
|
|
129
127
|
b = u[h];
|
|
@@ -132,8 +130,8 @@ let T = class {
|
|
|
132
130
|
}
|
|
133
131
|
return;
|
|
134
132
|
}
|
|
135
|
-
|
|
136
|
-
const p = document.querySelectorAll(e.el
|
|
133
|
+
l.isShift = !1, l.innerHTML = "Shift", this.classList.remove("keyboard-keyboard-keys-focus");
|
|
134
|
+
const p = document.querySelectorAll(`${e.el} .akeyboard-keyboard-innerKeys`);
|
|
137
135
|
let k;
|
|
138
136
|
for (let y = 0; y < p.length; y++) {
|
|
139
137
|
k = p[y];
|
|
@@ -144,18 +142,15 @@ let T = class {
|
|
|
144
142
|
});
|
|
145
143
|
let v = !1;
|
|
146
144
|
s.forEach((t) => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
}), v && document.querySelectorAll(e.el + " .akeyboard-keyboard-keys-Caps").forEach((c) => {
|
|
152
|
-
c.onclick = function() {
|
|
145
|
+
t.includes("Caps") && (v = !0);
|
|
146
|
+
}), v && document.querySelectorAll(`${e.el} .akeyboard-keyboard-keys-Caps`).forEach((l) => {
|
|
147
|
+
l.onclick = function() {
|
|
153
148
|
if (!this.isCaps) {
|
|
154
|
-
const y = document.querySelector(e.el
|
|
149
|
+
const y = document.querySelector(`${e.el} .akeyboard-keyboard-keys-Shift`);
|
|
155
150
|
if (y && y.isShift)
|
|
156
151
|
return;
|
|
157
152
|
this.isCaps = !0, this.classList.add("keyboard-keyboard-keys-focus");
|
|
158
|
-
const u = document.querySelectorAll(e.el
|
|
153
|
+
const u = document.querySelectorAll(`${e.el} .akeyboard-keyboard-innerKeys`);
|
|
159
154
|
let b;
|
|
160
155
|
for (let h = 0; h < u.length; h++) {
|
|
161
156
|
b = u[h];
|
|
@@ -165,7 +160,7 @@ let T = class {
|
|
|
165
160
|
return;
|
|
166
161
|
}
|
|
167
162
|
this.isCaps = !1, this.classList.remove("keyboard-keyboard-keys-focus");
|
|
168
|
-
const p = document.querySelectorAll(e.el
|
|
163
|
+
const p = document.querySelectorAll(`${e.el} .akeyboard-keyboard-innerKeys`);
|
|
169
164
|
let k;
|
|
170
165
|
for (let y = 0; y < p.length; y++) {
|
|
171
166
|
k = p[y];
|
|
@@ -175,7 +170,7 @@ let T = class {
|
|
|
175
170
|
};
|
|
176
171
|
});
|
|
177
172
|
}
|
|
178
|
-
inputOn(e, r,
|
|
173
|
+
inputOn(e, r, c, i) {
|
|
179
174
|
if (typeof e != "string") {
|
|
180
175
|
console.error('aKeyboard: The inputEle parameter needs to be a string <In "aKeyboard.inputOn()">');
|
|
181
176
|
return;
|
|
@@ -184,36 +179,36 @@ let T = class {
|
|
|
184
179
|
console.error('aKeyboard: The type parameter needs to be a string <In "aKeyboard.inputOn()">');
|
|
185
180
|
return;
|
|
186
181
|
}
|
|
187
|
-
const o = document.querySelector(e), s = document.querySelectorAll(this.obj.el
|
|
182
|
+
const o = document.querySelector(e), s = document.querySelectorAll(`${this.obj.el} .akeyboard-keyboard-keys`);
|
|
188
183
|
for (let n = 0; n < s.length; n++)
|
|
189
184
|
if (!["Shift", "Caps"].includes(s[n].innerHTML)) {
|
|
190
185
|
if (s[n].innerHTML === "Delete") {
|
|
191
186
|
s[n].onclick = function() {
|
|
192
|
-
o[r] = o[r].substr(0, o[r].length - 1),
|
|
187
|
+
o[r] = o[r].substr(0, o[r].length - 1), c("Delete", o[r]);
|
|
193
188
|
};
|
|
194
189
|
continue;
|
|
195
190
|
}
|
|
196
191
|
if (s[n].innerHTML === "Tab") {
|
|
197
192
|
s[n].onclick = function() {
|
|
198
|
-
o[r] += " ",
|
|
193
|
+
o[r] += " ", c("Tab", o[r]);
|
|
199
194
|
};
|
|
200
195
|
continue;
|
|
201
196
|
}
|
|
202
197
|
if (s[n].innerHTML === "Enter") {
|
|
203
198
|
s[n].onclick = function() {
|
|
204
199
|
o[r] += `
|
|
205
|
-
`,
|
|
200
|
+
`, c("Enter", o[r]);
|
|
206
201
|
};
|
|
207
202
|
continue;
|
|
208
203
|
}
|
|
209
204
|
if (s[n].innerHTML === "Space") {
|
|
210
205
|
s[n].onclick = function() {
|
|
211
|
-
o[r] += " ",
|
|
206
|
+
o[r] += " ", c("Space", o[r]);
|
|
212
207
|
};
|
|
213
208
|
continue;
|
|
214
209
|
}
|
|
215
210
|
i && typeof i == "object" && Object.keys(i).length > 0 && i[s[n].innerHTML] ? s[n].onclick = i[s[n].innerHTML] : s[n].onclick = function() {
|
|
216
|
-
o[r] += this.innerText,
|
|
211
|
+
o[r] += this.innerText, c(this.innerText, o[r]);
|
|
217
212
|
};
|
|
218
213
|
}
|
|
219
214
|
}
|
|
@@ -226,11 +221,11 @@ let T = class {
|
|
|
226
221
|
console.error('aKeyboard: The fn parameter needs to be a function <In "aKeyboard.onclick()">');
|
|
227
222
|
return;
|
|
228
223
|
}
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
const c = document.querySelector(`${this.obj.el} .akeyboard-keyboard-keys-${e}`);
|
|
225
|
+
c ? c.onclick = r : console.error(`Can not find key: ${e}`);
|
|
231
226
|
}
|
|
232
227
|
};
|
|
233
|
-
class
|
|
228
|
+
class $ {
|
|
234
229
|
constructor(e) {
|
|
235
230
|
if (typeof e != "object") {
|
|
236
231
|
console.error('aKeyboard: The obj parameter needs to be an object <In "new aKeyboard()">');
|
|
@@ -238,17 +233,17 @@ class E {
|
|
|
238
233
|
}
|
|
239
234
|
this.obj = e;
|
|
240
235
|
const r = document.querySelector(e.el);
|
|
241
|
-
let
|
|
236
|
+
let c = "";
|
|
242
237
|
if (typeof e.style == "object")
|
|
243
|
-
for (
|
|
244
|
-
|
|
245
|
-
let i =
|
|
238
|
+
for (const o in e.style)
|
|
239
|
+
c += `${o}: ${e.style[o]};`;
|
|
240
|
+
let i = `<div class="akeyboard-numberKeyboard${e.fixedBottomCenter ? " akeyboard-keyboard-fixedBottomCenter" : ""}" style="${c}">`;
|
|
246
241
|
i += '<div class="akeyboard-keyboard-innerKeys">';
|
|
247
242
|
for (let o = 1; o < 10; o++)
|
|
248
|
-
i +=
|
|
243
|
+
i += `<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-${o}">${o}</div>`, o % 3 === 0 && (i += '</div><div class="akeyboard-keyboard-innerKeys">');
|
|
249
244
|
i += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-0">0</div><div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-Delete">Delete</div></div><div class="akeyboard-keyboard-innerKeys"><div class="akeyboard-keyboard-keys akeyboard-numberKeyboard-keys-Enter">Enter</div></div>', i += "</div>", r.innerHTML = i;
|
|
250
245
|
}
|
|
251
|
-
inputOn(e, r,
|
|
246
|
+
inputOn(e, r, c, i) {
|
|
252
247
|
if (typeof e != "string") {
|
|
253
248
|
console.error('aKeyboard: The inputEle parameter needs to be a string <In "aKeyboard.inputOn()">');
|
|
254
249
|
return;
|
|
@@ -257,23 +252,23 @@ class E {
|
|
|
257
252
|
console.error('aKeyboard: The type parameter needs to be a string <In "aKeyboard.inputOn()">');
|
|
258
253
|
return;
|
|
259
254
|
}
|
|
260
|
-
const o = document.querySelector(e), s = document.querySelectorAll(this.obj.el
|
|
255
|
+
const o = document.querySelector(e), s = document.querySelectorAll(`${this.obj.el} .akeyboard-keyboard-keys`);
|
|
261
256
|
for (let n = 0; n < s.length; n++) {
|
|
262
257
|
if (s[n].innerHTML === "Delete") {
|
|
263
258
|
s[n].onclick = function() {
|
|
264
|
-
o[r] = o[r].substr(0, o[r].length - 1),
|
|
259
|
+
o[r] = o[r].substr(0, o[r].length - 1), c("Delete", o[r]);
|
|
265
260
|
};
|
|
266
261
|
continue;
|
|
267
262
|
}
|
|
268
263
|
if (s[n].innerHTML === "Enter") {
|
|
269
264
|
s[n].onclick = function() {
|
|
270
265
|
o[r] += `
|
|
271
|
-
`,
|
|
266
|
+
`, c("Enter", o[r]);
|
|
272
267
|
};
|
|
273
268
|
continue;
|
|
274
269
|
}
|
|
275
270
|
i && typeof i == "object" && Object.keys(i).length > 0 && i[s[n].innerHTML] ? s[n].onclick = i[s[n].innerHTML] : s[n].onclick = function() {
|
|
276
|
-
o[r] += this.innerText,
|
|
271
|
+
o[r] += this.innerText, c(this.innerText, o[r]);
|
|
277
272
|
};
|
|
278
273
|
}
|
|
279
274
|
}
|
|
@@ -286,11 +281,11 @@ class E {
|
|
|
286
281
|
console.error('aKeyboard: The fn parameter needs to be a function <In "aKeyboard.onclick()">');
|
|
287
282
|
return;
|
|
288
283
|
}
|
|
289
|
-
|
|
290
|
-
|
|
284
|
+
const c = document.querySelector(`${this.obj.el} .akeyboard-keyboard-keys-${e}`);
|
|
285
|
+
c ? c.onclick = r : console.error(`Can not find key: ${e}`);
|
|
291
286
|
}
|
|
292
287
|
}
|
|
293
|
-
var
|
|
288
|
+
var E = function() {
|
|
294
289
|
var d = this, e = d.$createElement, r = d._self._c || e;
|
|
295
290
|
return r("div", {
|
|
296
291
|
class: ["avue-keyboard", d.className]
|
|
@@ -299,8 +294,8 @@ var _ = function() {
|
|
|
299
294
|
id: "keyboard"
|
|
300
295
|
}
|
|
301
296
|
})]);
|
|
302
|
-
},
|
|
303
|
-
const
|
|
297
|
+
}, _ = [];
|
|
298
|
+
const L = {
|
|
304
299
|
name: "Keyboard",
|
|
305
300
|
props: {
|
|
306
301
|
ele: {
|
|
@@ -356,10 +351,10 @@ const M = {
|
|
|
356
351
|
keys: this.keys,
|
|
357
352
|
fixedBottomCenter: this.fixedBottomCenter
|
|
358
353
|
};
|
|
359
|
-
this.type === "default" ? d = new T(e) : this.type === "number"
|
|
354
|
+
this.type === "default" ? d = new T(e) : this.type === "number" && (d = new $(e));
|
|
360
355
|
const r = this.ele.indexOf("#") === 0 ? this.ele.substring(1) : this.ele;
|
|
361
|
-
d.inputOn(`#${r}`, "value", (
|
|
362
|
-
this.$emit("click",
|
|
356
|
+
d.inputOn(`#${r}`, "value", (c, i) => {
|
|
357
|
+
this.$emit("click", c, i);
|
|
363
358
|
}, this.rebind ? this.customClick : null), this.keyboard = d;
|
|
364
359
|
},
|
|
365
360
|
bindClick(d, e) {
|
|
@@ -368,9 +363,9 @@ const M = {
|
|
|
368
363
|
}
|
|
369
364
|
}, g = {};
|
|
370
365
|
var C = /* @__PURE__ */ S(
|
|
371
|
-
M,
|
|
372
|
-
_,
|
|
373
366
|
L,
|
|
367
|
+
E,
|
|
368
|
+
_,
|
|
374
369
|
!1,
|
|
375
370
|
H,
|
|
376
371
|
null,
|
|
@@ -381,9 +376,9 @@ function H(d) {
|
|
|
381
376
|
for (let e in g)
|
|
382
377
|
this[e] = g[e];
|
|
383
378
|
}
|
|
384
|
-
const
|
|
379
|
+
const x = /* @__PURE__ */ function() {
|
|
385
380
|
return C.exports;
|
|
386
381
|
}();
|
|
387
382
|
export {
|
|
388
|
-
|
|
383
|
+
x as default
|
|
389
384
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as l } from "../../chunks/util.23fe58fb.js";
|
|
2
2
|
import { n as g } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
|
|
3
3
|
var m = function() {
|
|
4
4
|
var t = this, e = t.$createElement, s = t._self._c || e;
|
|
@@ -10,11 +10,11 @@ var m = function() {
|
|
|
10
10
|
}, [s("canvas", {
|
|
11
11
|
ref: "canvas",
|
|
12
12
|
attrs: {
|
|
13
|
-
id:
|
|
13
|
+
id: `canvas${t.id}`
|
|
14
14
|
}
|
|
15
15
|
}), t._t("default")], 2);
|
|
16
|
-
},
|
|
17
|
-
const
|
|
16
|
+
}, f = [];
|
|
17
|
+
const w = {
|
|
18
18
|
name: "License",
|
|
19
19
|
props: {
|
|
20
20
|
id: {
|
|
@@ -51,7 +51,7 @@ const f = {
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
mounted() {
|
|
54
|
-
this.canvas = document.getElementById(
|
|
54
|
+
this.canvas = document.getElementById(`canvas${this.id}`), this.context = this.canvas.getContext("2d"), this.init();
|
|
55
55
|
},
|
|
56
56
|
methods: {
|
|
57
57
|
init() {
|
|
@@ -113,9 +113,9 @@ const f = {
|
|
|
113
113
|
}
|
|
114
114
|
}, d = {};
|
|
115
115
|
var p = /* @__PURE__ */ g(
|
|
116
|
-
f,
|
|
117
|
-
m,
|
|
118
116
|
w,
|
|
117
|
+
m,
|
|
118
|
+
f,
|
|
119
119
|
!1,
|
|
120
120
|
v,
|
|
121
121
|
null,
|