@web-utils/component 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { p as c, e as u } from "../chunks/event.BT1F_1vF.mjs";
1
+ import { p as u, e as h } from "../chunks/event.BT1F_1vF.mjs";
2
2
  import { isBlank as n } from "@web-utils/core";
3
- import { n as h } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
- const p = {
3
+ import { n as p } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
+ const f = {
5
5
  name: "FyInputTree",
6
- mixins: [c, u],
6
+ mixins: [u, h],
7
7
  props: {
8
8
  nodeClick: Function,
9
9
  treeLoad: Function,
@@ -107,21 +107,22 @@ const p = {
107
107
  this.text = this.multiple ? [] : "", this.node = [], this.filterValue = "", this.$refs.tree.setCurrentKey(null), this.$refs.tree.setCheckedKeys([]);
108
108
  },
109
109
  handleTreeLoad(t, e) {
110
- const i = (l) => {
111
- const a = (r, d, o) => {
112
- r.forEach((s) => {
113
- s[this.valueKey] === d ? s[this.childrenKey] = o : s[this.childrenKey] && a(s[this.childrenKey]);
110
+ var l;
111
+ const i = (r) => {
112
+ const s = (d, o, c) => {
113
+ d.forEach((a) => {
114
+ a[this.valueKey] === o ? a[this.childrenKey] = c : a[this.childrenKey] && s(a[this.childrenKey]);
114
115
  });
115
116
  };
116
- a(this.dicList, t.key, l), e(l);
117
+ s(this.dicList, t.key, r), e(r);
117
118
  };
118
- this.treeLoad && this.treeLoad(t, i);
119
+ (l = this.treeLoad) == null || l.call(this, t, i);
119
120
  },
120
121
  filterNode(t, e) {
121
122
  return t ? e[this.labelKey].toLowerCase().indexOf(t.toLowerCase()) !== -1 : !0;
122
123
  },
123
124
  checkChange(t, e, i, l) {
124
- this.text.splice(0, this.text.length), this.$refs.tree.getCheckedNodes(this.leafOnly, !1).forEach((r) => this.text.push(r[this.valueKey])), typeof this.checked == "function" && this.checked(t, e, i, l);
125
+ this.text.splice(0, this.text.length), this.$refs.tree.getCheckedNodes(this.leafOnly, !1).forEach((s) => this.text.push(s[this.valueKey])), typeof this.checked == "function" && this.checked(t, e, i, l);
125
126
  },
126
127
  getHalfList() {
127
128
  let t = this.$refs.tree.getCheckedNodes(!1, !0);
@@ -153,7 +154,7 @@ const p = {
153
154
  }
154
155
  }
155
156
  };
156
- var f = function() {
157
+ var y = function() {
157
158
  var e = this, i = e._self._c;
158
159
  return i("ElSelect", { ref: "main", staticClass: "avue-input-tree", attrs: { size: e.size, multiple: e.multiple, "multiple-limit": e.limit, "collapse-tags": e.tags, value: e.labelShow, clearable: e.clearableVal, placeholder: e.placeholder, "popper-class": e.popperClass, "popper-append-to-body": e.popperAppendToBody, disabled: e.disabled }, on: { click: e.handleClick, focus: e.handleFocus, blur: e.handleBlur, clear: e.handleClear } }, [e.filter ? i("div", { staticClass: "avue-input-tree__filter" }, [i("ElInput", { attrs: { size: "mini", placeholder: e.filterText }, model: { value: e.filterValue, callback: function(l) {
159
160
  e.filterValue = l;
@@ -164,15 +165,15 @@ var f = function() {
164
165
  return [i("span", { class: { "avue--disabled": l[e.disabledKey] } }, [e._v(e._s(l[e.labelKey]))]), l[e.descKey] ? i("span", { staticClass: "avue-input-tree__desc" }, [e._v(e._s(l[e.descKey]))]) : e._e()];
165
166
  }, { label: e.labelKey, value: e.valueKey, item: l })], 2)];
166
167
  } }], null, !0) })], 1)], 1);
167
- }, y = [], m = /* @__PURE__ */ h(
168
- p,
168
+ }, m = [], k = /* @__PURE__ */ p(
169
169
  f,
170
170
  y,
171
+ m,
171
172
  !1,
172
173
  null,
173
174
  null
174
175
  );
175
- const C = m.exports;
176
+ const K = k.exports;
176
177
  export {
177
- C as default
178
+ K as default
178
179
  };
package/fy-tree/index.mjs CHANGED
@@ -195,7 +195,7 @@ const f = {
195
195
  },
196
196
  hide(t) {
197
197
  const e = () => {
198
- t && t(), this.node = {}, this.form = {}, this.box = !1;
198
+ t == null || t(), this.node = {}, this.form = {}, this.box = !1;
199
199
  };
200
200
  typeof this.beforeClose == "function" ? this.beforeClose(e, this.type) : e();
201
201
  },
@@ -1,5 +1,5 @@
1
1
  import { p as R, e as I } from "../chunks/event.BT1F_1vF.mjs";
2
- import { B, i as F, p as N } from "../chunks/util.CoahLDYn.mjs";
2
+ import { B, i as T, p as N } from "../chunks/util.CoahLDYn.mjs";
3
3
  import { p as A } from "../chunks/packages.CWPkeLu9.mjs";
4
4
  import { isBlank as b } from "@web-utils/core";
5
5
  import { n as K } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -25,15 +25,15 @@ const w = {
25
25
  ratio: 1
26
26
  // 压缩比
27
27
  };
28
- function T(e, t) {
29
- const i = new FileReader();
30
- i.readAsDataURL(e), i.onload = function(o) {
28
+ function k(i, t) {
29
+ const e = new FileReader();
30
+ e.readAsDataURL(i), e.onload = function(o) {
31
31
  t(o.target.result);
32
32
  };
33
33
  }
34
- function L(e, t = {}, i) {
34
+ function L(i, t = {}, e) {
35
35
  const { text: o, fontFamily: s, color: u, fontSize: l, opacity: p, bottom: S, right: f, ratio: x } = t;
36
- _(), T(e, C);
36
+ _(), k(i, C);
37
37
  function _() {
38
38
  n.text = o || n.text, n.fontFamily = s || n.fontFamily, n.color = u || n.color, n.fontSize = l || n.fontSize, n.opacity = p || n.opacity, n.bottom = S || n.bottom, n.right = f || n.right, n.ratio = x || n.ratio;
39
39
  }
@@ -42,8 +42,8 @@ function L(e, t = {}, i) {
42
42
  c.src = y, c.onload = function() {
43
43
  const m = c.width, a = c.height;
44
44
  r(m, a), g.drawImage(c, 0, 0, m, a), P(m, a);
45
- const v = document.getElementById("canvas").toDataURL(e.type, n.ratio), k = B(v, e.name);
46
- i && i(k);
45
+ const v = document.getElementById("canvas").toDataURL(i.type, n.ratio), F = B(v, i.name);
46
+ e == null || e(F);
47
47
  };
48
48
  }
49
49
  function r(y, c) {
@@ -67,46 +67,46 @@ function L(e, t = {}, i) {
67
67
  };
68
68
  }
69
69
  }
70
- const D = (e, t, i) => {
71
- const o = JSON.stringify(i);
72
- window.__ENV__ === "development" && console && console.log("put_policy = ", o);
70
+ const D = (i, t, e) => {
71
+ const o = JSON.stringify(e);
72
+ window.__ENV__ === "development" && (console == null || console.log("put_policy = ", o));
73
73
  const s = M(q(o));
74
- window.__ENV__ === "development" && console && console.log("encoded = ", s);
74
+ window.__ENV__ === "development" && (console == null || console.log("encoded = ", s));
75
75
  const l = window.CryptoJS.HmacSHA1(s, t).toString(window.CryptoJS.enc.Base64);
76
- window.__ENV__ === "development" && console && console.log("encoded_signed=", l);
77
- const p = `${e}:${V(l)}:${s}`;
78
- return window.__ENV__ === "development" && console && console.log("upload_token=", p), p;
76
+ window.__ENV__ === "development" && (console == null || console.log("encoded_signed=", l));
77
+ const p = `${i}:${V(l)}:${s}`;
78
+ return window.__ENV__ === "development" && (console == null || console.log("upload_token=", p)), p;
79
79
  };
80
- function q(e) {
81
- let t, i, o;
80
+ function q(i) {
81
+ let t, e, o;
82
82
  t = "";
83
- const s = e.length;
84
- for (i = 0; i < s; i++)
85
- o = e.charCodeAt(i), o >= 1 && o <= 127 ? t += e.charAt(i) : o > 2047 ? (t += String.fromCharCode(224 | o >> 12 & 15), t += String.fromCharCode(128 | o >> 6 & 63), t += String.fromCharCode(128 | o >> 0 & 63)) : (t += String.fromCharCode(192 | o >> 6 & 31), t += String.fromCharCode(128 | o >> 0 & 63));
83
+ const s = i.length;
84
+ for (e = 0; e < s; e++)
85
+ o = i.charCodeAt(e), o >= 1 && o <= 127 ? t += i.charAt(e) : o > 2047 ? (t += String.fromCharCode(224 | o >> 12 & 15), t += String.fromCharCode(128 | o >> 6 & 63), t += String.fromCharCode(128 | o >> 0 & 63)) : (t += String.fromCharCode(192 | o >> 6 & 31), t += String.fromCharCode(128 | o >> 0 & 63));
86
86
  return t;
87
87
  }
88
88
  const h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
89
- function M(e) {
90
- let t, i, o, s, u;
91
- const l = e.length;
92
- for (i = 0, t = ""; i < l; ) {
93
- if (o = e.charCodeAt(i++) & 255, i === l) {
89
+ function M(i) {
90
+ let t, e, o, s, u;
91
+ const l = i.length;
92
+ for (e = 0, t = ""; e < l; ) {
93
+ if (o = i.charCodeAt(e++) & 255, e === l) {
94
94
  t += h.charAt(o >> 2), t += h.charAt((o & 3) << 4), t += "==";
95
95
  break;
96
96
  }
97
- if (s = e.charCodeAt(i++), i === l) {
97
+ if (s = i.charCodeAt(e++), e === l) {
98
98
  t += h.charAt(o >> 2), t += h.charAt((o & 3) << 4 | (s & 240) >> 4), t += h.charAt((s & 15) << 2), t += "=";
99
99
  break;
100
100
  }
101
- u = e.charCodeAt(i++), t += h.charAt(o >> 2), t += h.charAt((o & 3) << 4 | (s & 240) >> 4), t += h.charAt((s & 15) << 2 | (u & 192) >> 6), t += h.charAt(u & 63);
101
+ u = i.charCodeAt(e++), t += h.charAt(o >> 2), t += h.charAt((o & 3) << 4 | (s & 240) >> 4), t += h.charAt((s & 15) << 2 | (u & 192) >> 6), t += h.charAt(u & 63);
102
102
  }
103
103
  return t;
104
104
  }
105
- const V = function(e) {
106
- return e = e.replace(/\+/g, "-"), e = e.replace(/\//g, "_"), e;
107
- }, J = (e) => new window.OSS(e);
108
- function O(e, t = "") {
109
- return t.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? t : e + t;
105
+ const V = function(i) {
106
+ return i = i.replace(/\+/g, "-"), i = i.replace(/\//g, "_"), i;
107
+ }, J = (i) => new window.OSS(i);
108
+ function O(i, t = "") {
109
+ return t.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? t : i + t;
110
110
  }
111
111
  const H = {
112
112
  name: "FyUpload",
@@ -210,84 +210,85 @@ const H = {
210
210
  return b(this.text) ? null : O(this.homeUrl, this.text[0]);
211
211
  },
212
212
  fileList() {
213
- const e = [];
214
- return (this.text || []).forEach((t, i) => {
213
+ const i = [];
214
+ return (this.text || []).forEach((t, e) => {
215
215
  if (t) {
216
216
  const o = this.isObject ? t[this.labelKey] : t.substring(t.lastIndexOf("/") + 1);
217
217
  let s = this.isObject ? t[this.valueKey] : t;
218
- s = O(this.homeUrl, s), e.push({
219
- uid: `${i}`,
218
+ s = O(this.homeUrl, s), i.push({
219
+ uid: `${e}`,
220
220
  status: "done",
221
221
  type: this.isMediaType(s),
222
222
  name: o,
223
223
  url: s
224
224
  });
225
225
  }
226
- }), e;
226
+ }), i;
227
227
  }
228
228
  },
229
229
  mounted() {
230
230
  this.drag && this.setSort();
231
231
  },
232
232
  methods: {
233
- isMediaType(e) {
234
- return F(e, this.fileType);
233
+ isMediaType(i) {
234
+ return T(i, this.fileType);
235
235
  },
236
236
  setSort() {
237
237
  if (!window.Sortable) {
238
238
  A.logs("Sortable");
239
239
  return;
240
240
  }
241
- const e = this.$el.querySelectorAll(".avue-upload > ul")[0];
242
- window.Sortable.create(e, {
241
+ const i = this.$el.querySelectorAll(".avue-upload > ul")[0];
242
+ window.Sortable.create(i, {
243
243
  animation: 100,
244
244
  onEnd: (t) => {
245
- const i = this.text.splice(t.oldIndex, 1)[0];
246
- this.text.splice(t.newIndex, 0, i), this.reload = Math.random(), this.$nextTick(() => this.setSort());
245
+ const e = this.text.splice(t.oldIndex, 1)[0];
246
+ this.text.splice(t.newIndex, 0, e), this.reload = Math.random(), this.$nextTick(() => this.setSort());
247
247
  }
248
248
  });
249
249
  },
250
- handleSuccess(e) {
250
+ handleSuccess(i) {
251
251
  if (this.isPictureImg)
252
- this.text.splice(0, 1, e[this.urlKey]);
252
+ this.text.splice(0, 1, i[this.urlKey]);
253
253
  else if (this.isObject) {
254
254
  const t = {};
255
- t[this.labelKey] = e[this.nameKey], t[this.valueKey] = e[this.urlKey], this.text.push(t);
255
+ t[this.labelKey] = i[this.nameKey], t[this.valueKey] = i[this.urlKey], this.text.push(t);
256
256
  } else
257
- this.text.push(e[this.urlKey]);
257
+ this.text.push(i[this.urlKey]);
258
258
  },
259
- handleRemove(e) {
260
- this.beforeRemove(e).then(() => {
261
- this.delete(e);
259
+ handleRemove(i) {
260
+ this.beforeRemove(i).then(() => {
261
+ this.delete(i);
262
262
  });
263
263
  },
264
- handleError(e) {
265
- this.uploadError && this.uploadError(e, this.column);
264
+ handleError(i) {
265
+ var t;
266
+ (t = this.uploadError) == null || t.call(this, i, this.column);
266
267
  },
267
- delete(e) {
268
- (this.text || []).forEach((t, i) => {
268
+ delete(i) {
269
+ (this.text || []).forEach((t, e) => {
269
270
  const o = this.isObject ? t[this.valueKey] : t;
270
- O(this.homeUrl, o) === e.url && this.text.splice(i, 1);
271
+ O(this.homeUrl, o) === i.url && this.text.splice(e, 1);
271
272
  });
272
273
  },
273
- show(e) {
274
- this.loading = !1, this.res = e || this.res, this.handleSuccess(this.res);
274
+ show(i) {
275
+ this.loading = !1, this.res = i || this.res, this.handleSuccess(this.res);
275
276
  },
276
- hide(e) {
277
- this.loading = !1, e && this.handleError(e);
277
+ hide(i) {
278
+ this.loading = !1, i && this.handleError(i);
278
279
  },
279
- handleFileChange(e, t) {
280
+ handleFileChange(i, t) {
280
281
  t.splice(t.length - 1, 1);
281
282
  },
282
- httpUpload(e) {
283
+ httpUpload(i) {
283
284
  if (typeof this.httpRequest == "function") {
284
- this.httpRequest(e);
285
+ this.httpRequest(i);
285
286
  return;
286
287
  }
287
288
  this.loading = !0;
288
- let t = e.file;
289
- const i = t.size / 1024;
290
- if (!b(i) && i > this.fileSize) {
289
+ let t = i.file;
290
+ const e = t.size / 1024;
291
+ if (!b(e) && e > this.fileSize) {
291
292
  this.hide("文件太大不符合");
292
293
  return;
293
294
  }
@@ -327,7 +328,7 @@ const H = {
327
328
  };
328
329
  typeof this.uploadBefore == "function" ? this.uploadBefore(t, f, this.hide, this.column) : f();
329
330
  };
330
- if (F(t.name) !== "img") {
331
+ if (T(t.name) !== "img") {
331
332
  p();
332
333
  return;
333
334
  }
@@ -336,7 +337,7 @@ const H = {
336
337
  t = f, p();
337
338
  });
338
339
  };
339
- b(this.cropperOption) ? S() : T(t, (f) => {
340
+ b(this.cropperOption) ? S() : k(t, (f) => {
340
341
  const x = Object.assign(this.cropperOption, {
341
342
  img: f,
342
343
  type: "file",
@@ -350,61 +351,62 @@ const H = {
350
351
  this.$ImageCropper(x);
351
352
  });
352
353
  },
353
- handleExceed(e, t) {
354
- this.uploadExceed && this.uploadExceed(this.limit, e, t, this.column);
354
+ handleExceed(i, t) {
355
+ var e;
356
+ (e = this.uploadExceed) == null || e.call(this, this.limit, i, t, this.column);
355
357
  },
356
- handlePreview(e) {
358
+ handlePreview(i) {
357
359
  const t = () => {
358
- const i = this.fileList.findIndex((o) => o.url === e.url);
359
- this.$ImagePreview(this.fileList, i);
360
+ const e = this.fileList.findIndex((o) => o.url === i.url);
361
+ this.$ImagePreview(this.fileList, e);
360
362
  };
361
- typeof this.uploadPreview == "function" ? this.uploadPreview(e, this.column, t) : t();
363
+ typeof this.uploadPreview == "function" ? this.uploadPreview(i, this.column, t) : t();
362
364
  },
363
- handleDelete(e) {
364
- this.beforeRemove(e).then(() => {
365
+ handleDelete(i) {
366
+ this.beforeRemove(i).then(() => {
365
367
  this.text = [], this.menu = !1;
366
368
  });
367
369
  },
368
- beforeRemove(e) {
369
- return typeof this.uploadDelete == "function" ? this.uploadDelete(e, this.column) : Promise.resolve();
370
+ beforeRemove(i) {
371
+ return typeof this.uploadDelete == "function" ? this.uploadDelete(i, this.column) : Promise.resolve();
370
372
  }
371
373
  }
372
374
  };
373
375
  var Q = function() {
374
- var t = this, i = t._self._c;
375
- return i("div", { directives: [{ name: "loading", rawName: "v-loading.lock", value: t.loading, expression: "loading", modifiers: { lock: !0 } }], staticClass: "avue-upload", attrs: { "element-loading-text": t.loadText } }, [i("ElUpload", { key: t.reload, class: { "avue-upload--list": t.listType === "picture-img", "avue-upload--upload": t.disabled }, attrs: { action: t.action, "on-remove": t.handleRemove, accept: t.acceptList, "before-remove": t.beforeRemove, multiple: t.multiple, "on-preview": t.handlePreview, limit: t.limit, "http-request": t.httpUpload, readonly: t.readonly, drag: t.dragFile, "show-file-list": t.isPictureImg ? !1 : t.showFileList, "list-type": t.listType, "on-change": t.handleFileChange, "on-exceed": t.handleExceed, disabled: t.disabled, "file-list": t.fileList }, nativeOn: { click: function(o) {
376
+ var t = this, e = t._self._c;
377
+ return e("div", { directives: [{ name: "loading", rawName: "v-loading.lock", value: t.loading, expression: "loading", modifiers: { lock: !0 } }], staticClass: "avue-upload", attrs: { "element-loading-text": t.loadText } }, [e("ElUpload", { key: t.reload, class: { "avue-upload--list": t.listType === "picture-img", "avue-upload--upload": t.disabled }, attrs: { action: t.action, "on-remove": t.handleRemove, accept: t.acceptList, "before-remove": t.beforeRemove, multiple: t.multiple, "on-preview": t.handlePreview, limit: t.limit, "http-request": t.httpUpload, readonly: t.readonly, drag: t.dragFile, "show-file-list": t.isPictureImg ? !1 : t.showFileList, "list-type": t.listType, "on-change": t.handleFileChange, "on-exceed": t.handleExceed, disabled: t.disabled, "file-list": t.fileList }, nativeOn: { click: function(o) {
376
378
  return t.handleClick.apply(null, arguments);
377
379
  } }, scopedSlots: t._u([{ key: "tip", fn: function() {
378
- return [i("div", { staticClass: "el-upload__tip", domProps: { innerHTML: t._s(t.tip) } })];
380
+ return [e("div", { staticClass: "el-upload__tip", domProps: { innerHTML: t._s(t.tip) } })];
379
381
  }, proxy: !0 }, { key: "file", fn: function({ file: o }) {
380
- return [t.$scopedSlots.default ? t._t("default", null, { file: o }) : t.listType === "picture-card" ? i("span", [t.isMediaType(o.url) ? i(o.type, { tag: "Component", staticClass: "el-upload-list__item-thumbnail", attrs: { src: o.url } }) : i("i", { staticClass: "avue-upload__avatar el-icon-document" }), i("span", { staticClass: "el-upload-list__item-actions" }, [i("span", { staticClass: "el-upload-list__item-preview" }, [i("i", { staticClass: "el-icon-zoom-in", on: { click: function(s) {
382
+ return [t.$scopedSlots.default ? t._t("default", null, { file: o }) : t.listType === "picture-card" ? e("span", [t.isMediaType(o.url) ? e(o.type, { tag: "Component", staticClass: "el-upload-list__item-thumbnail", attrs: { src: o.url } }) : e("i", { staticClass: "avue-upload__avatar el-icon-document" }), e("span", { staticClass: "el-upload-list__item-actions" }, [e("span", { staticClass: "el-upload-list__item-preview" }, [e("i", { staticClass: "el-icon-zoom-in", on: { click: function(s) {
381
383
  return s.stopPropagation(), t.handlePreview(o);
382
- } } })]), i("span", { staticClass: "el-upload-list__item-delete" }, [t.disabled ? t._e() : i("i", { staticClass: "el-icon-delete", on: { click: function(s) {
384
+ } } })]), e("span", { staticClass: "el-upload-list__item-delete" }, [t.disabled ? t._e() : e("i", { staticClass: "el-icon-delete", on: { click: function(s) {
383
385
  return s.stopPropagation(), t.handleRemove(o);
384
- } } })])])], 1) : t.listType === "picture" ? i("span", { on: { click: function(s) {
386
+ } } })])])], 1) : t.listType === "picture" ? e("span", { on: { click: function(s) {
385
387
  return s.stopPropagation(), t.handlePreview(o);
386
- } } }, [i(o.type, { tag: "Component", staticClass: "el-upload-list__item-thumbnail", attrs: { src: o.url } }), i("a", { staticClass: "el-upload-list__item-name" }, [i("i", { staticClass: "el-icon-document" }), t._v(" " + t._s(o.name) + " ")]), i("i", { staticClass: "el-icon-close", on: { click: function(s) {
388
+ } } }, [e(o.type, { tag: "Component", staticClass: "el-upload-list__item-thumbnail", attrs: { src: o.url } }), e("a", { staticClass: "el-upload-list__item-name" }, [e("i", { staticClass: "el-icon-document" }), t._v(" " + t._s(o.name) + " ")]), e("i", { staticClass: "el-icon-close", on: { click: function(s) {
387
389
  return s.stopPropagation(), t.handleRemove(o);
388
- } } })], 1) : i("span", { on: { click: function(s) {
390
+ } } })], 1) : e("span", { on: { click: function(s) {
389
391
  return s.stopPropagation(), t.handlePreview(o);
390
- } } }, [i("a", { staticClass: "el-upload-list__item-name" }, [i("i", { staticClass: "el-icon-document" }), t._v(" " + t._s(o.name) + " ")]), t.disabled ? t._e() : i("i", { staticClass: "el-icon-close", on: { click: function(s) {
392
+ } } }, [e("a", { staticClass: "el-upload-list__item-name" }, [e("i", { staticClass: "el-icon-document" }), t._v(" " + t._s(o.name) + " ")]), t.disabled ? t._e() : e("i", { staticClass: "el-icon-close", on: { click: function(s) {
391
393
  return s.stopPropagation(), t.handleRemove(o);
392
394
  } } })])];
393
- } }], null, !0) }, [t.listType === "picture-card" ? [i("i", { staticClass: "el-icon-plus" })] : t.listType === "picture-img" ? [t.$scopedSlots.default ? t._t("default", null, { file: { url: t.imgUrl } }) : [t.isMediaType(t.imgUrl) ? i(t.isMediaType(t.imgUrl), { tag: "Component", staticClass: "avue-upload__avatar", attrs: { src: t.imgUrl }, on: { mouseover: function(o) {
395
+ } }], null, !0) }, [t.listType === "picture-card" ? [e("i", { staticClass: "el-icon-plus" })] : t.listType === "picture-img" ? [t.$scopedSlots.default ? t._t("default", null, { file: { url: t.imgUrl } }) : [t.isMediaType(t.imgUrl) ? e(t.isMediaType(t.imgUrl), { tag: "Component", staticClass: "avue-upload__avatar", attrs: { src: t.imgUrl }, on: { mouseover: function(o) {
394
396
  t.menu = !0;
395
- } } }) : t.imgUrl ? i("i", { staticClass: "avue-upload__avatar el-icon-document", on: { mouseover: function(o) {
397
+ } } }) : t.imgUrl ? e("i", { staticClass: "avue-upload__avatar el-icon-document", on: { mouseover: function(o) {
396
398
  t.menu = !0;
397
- } } }) : i("i", { staticClass: "el-icon-plus avue-upload__avatar" }), t.menu ? i("div", { staticClass: "el-upload-list__item-actions avue-upload__menu", on: { mouseover: function(o) {
399
+ } } }) : e("i", { staticClass: "el-icon-plus avue-upload__avatar" }), t.menu ? e("div", { staticClass: "el-upload-list__item-actions avue-upload__menu", on: { mouseover: function(o) {
398
400
  t.menu = !0;
399
401
  }, mouseout: function(o) {
400
402
  t.menu = !1;
401
403
  }, click: function(o) {
402
404
  o.stopPropagation();
403
- } } }, [i("i", { staticClass: "el-icon-zoom-in", on: { click: function(o) {
405
+ } } }, [e("i", { staticClass: "el-icon-zoom-in", on: { click: function(o) {
404
406
  return o.stopPropagation(), t.handlePreview({ url: t.imgUrl });
405
- } } }), t.disabled ? t._e() : i("i", { staticClass: "el-icon-delete", on: { click: function(o) {
407
+ } } }), t.disabled ? t._e() : e("i", { staticClass: "el-icon-delete", on: { click: function(o) {
406
408
  return o.stopPropagation(), t.handleDelete(t.imgUrl);
407
- } } })]) : t._e()]] : t.dragFile ? [i("i", { staticClass: "el-icon-upload" }), i("div", { staticClass: "el-upload__text" }, [i("em", [t._v(t._s(t.fileText || "上传"))])])] : [i("ElButton", { attrs: { icon: "el-icon-upload", size: t.size, type: "primary" } }, [t._v(" " + t._s(t.fileText || "上传") + " ")])]], 2)], 1);
409
+ } } })]) : t._e()]] : t.dragFile ? [e("i", { staticClass: "el-icon-upload" }), e("div", { staticClass: "el-upload__text" }, [e("em", [t._v(t._s(t.fileText || "上传"))])])] : [e("ElButton", { attrs: { icon: "el-icon-upload", size: t.size, type: "primary" } }, [t._v(" " + t._s(t.fileText || "上传") + " ")])]], 2)], 1);
408
410
  }, W = [], X = /* @__PURE__ */ K(
409
411
  H,
410
412
  Q,
@@ -1,12 +1,12 @@
1
1
  var p = Object.defineProperty;
2
2
  var n = Object.getOwnPropertySymbols;
3
- var c = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
3
+ var l = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
4
4
  var s = (o, e, t) => e in o ? p(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, a = (o, e) => {
5
5
  for (var t in e || (e = {}))
6
- c.call(e, t) && s(o, t, e[t]);
6
+ l.call(e, t) && s(o, t, e[t]);
7
7
  if (n)
8
8
  for (var t of n(e))
9
- l.call(e, t) && s(o, t, e[t]);
9
+ c.call(e, t) && s(o, t, e[t]);
10
10
  return o;
11
11
  };
12
12
  import { B as u } from "../chunks/util.CoahLDYn.mjs";
@@ -47,12 +47,14 @@ const r = {
47
47
  },
48
48
  submit() {
49
49
  this.visible = !1, this.$refs.cropper.getCropData((o) => {
50
+ var t, i;
50
51
  let e = o;
51
- this.option.type === "file" && (e = u(o, `${(/* @__PURE__ */ new Date()).getTime()}.${this.option.outputType}`)), this.option.callback && this.option.callback(e);
52
+ this.option.type === "file" && (e = u(o, `${(/* @__PURE__ */ new Date()).getTime()}.${this.option.outputType}`)), (i = (t = this.option).callback) == null || i.call(t, e);
52
53
  });
53
54
  },
54
55
  cancel(o) {
55
- o && o(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
56
+ var e, t;
57
+ o == null || o(), this.visible = !1, (t = (e = this.option).cancel) == null || t.call(e), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
56
58
  }
57
59
  }
58
60
  }, d = (o = {}) => {
@@ -9,10 +9,10 @@ var r = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writab
9
9
  v.call(e, t) && r(i, t, e[t]);
10
10
  return i;
11
11
  };
12
- import { i as p } from "../chunks/util.CoahLDYn.mjs";
12
+ import { i as _ } from "../chunks/util.CoahLDYn.mjs";
13
13
  import { setPx as u } from "@web-utils/core";
14
- import _ from "vue";
15
- import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
14
+ import f from "vue";
15
+ import { n as p } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
16
16
  const o = {
17
17
  name: "ImagePreview",
18
18
  data() {
@@ -60,11 +60,12 @@ const o = {
60
60
  },
61
61
  stopItem() {
62
62
  this.left = 0, this.top = 0, this.$refs.item.forEach((i) => {
63
- i.pause && i.pause();
63
+ var e;
64
+ (e = i.pause) == null || e.call(i);
64
65
  });
65
66
  },
66
67
  isMediaType(i) {
67
- return p(i.url, i.type);
68
+ return _(i.url, i.type);
68
69
  },
69
70
  subScale() {
70
71
  this.scale !== 0.2 && (this.scale = parseFloat((this.scale - 0.2).toFixed(2)));
@@ -93,7 +94,7 @@ const o = {
93
94
  }
94
95
  }
95
96
  }, g = (i = [], e = 0, t = {}) => {
96
- const s = _.extend(o), a = {
97
+ const s = f.extend(o), a = {
97
98
  datas: i,
98
99
  index: e,
99
100
  ops: c({
@@ -129,7 +130,7 @@ var C = function() {
129
130
  } } }), t("i", { staticClass: "el-icon-refresh-right", on: { click: function(s) {
130
131
  e.rotate = e.rotate + 90;
131
132
  } } })])])]) : e._e();
132
- }, x = [], k = /* @__PURE__ */ f(
133
+ }, x = [], k = /* @__PURE__ */ p(
133
134
  w,
134
135
  C,
135
136
  x,
@@ -50,7 +50,8 @@ const m = {
50
50
  options: {
51
51
  deep: !0,
52
52
  handler(t) {
53
- this.editor && this.editor.updateOptions(t);
53
+ var e;
54
+ (e = this.editor) == null || e.updateOptions(t);
54
55
  }
55
56
  },
56
57
  keyIndex() {
@@ -69,8 +70,9 @@ const m = {
69
70
  this.editor && o.editor.setTheme(this.theme);
70
71
  },
71
72
  style() {
72
- this.editor && this.$nextTick(() => {
73
- this.editor.layout();
73
+ this.$nextTick(() => {
74
+ var t;
75
+ (t = this.editor) == null || t.layout();
74
76
  });
75
77
  },
76
78
  value(t) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "3.6.0",
4
+ "version": "3.7.0",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -17,9 +17,9 @@
17
17
  "@tinymce/tinymce-vue": "3.2.8",
18
18
  "@wangeditor/editor": "^5.1.23",
19
19
  "@wangeditor/editor-for-vue": "^1.0.2",
20
- "@web-utils/core": "^3.0.26",
21
- "@web-utils/integrations": "^3.0.26",
22
- "@web-utils/vue": "^3.0.26",
20
+ "@web-utils/core": "^4.0.1",
21
+ "@web-utils/integrations": "^4.0.1",
22
+ "@web-utils/vue": "^4.0.1",
23
23
  "bpmn-js": "^18.6.1",
24
24
  "bpmn-js-token-simulation": "^0.38.1",
25
25
  "codemirror": "^5.65.15",
@@ -32,7 +32,7 @@
32
32
  "min-dash": "^4.2.3",
33
33
  "min-dom": "^5.1.1",
34
34
  "monaco-editor": "^0.52.2",
35
- "overlayscrollbars": "^2.11.1",
35
+ "overlayscrollbars": "^2.11.2",
36
36
  "photoswipe": "^5.4.4",
37
37
  "qrcode": "^1.5.4",
38
38
  "quill": "^1.3.7",
@@ -2,19 +2,19 @@ var n = (a, t, e) => new Promise((s, r) => {
2
2
  var o = (i) => {
3
3
  try {
4
4
  u(e.next(i));
5
- } catch (h) {
6
- r(h);
5
+ } catch (d) {
6
+ r(d);
7
7
  }
8
8
  }, p = (i) => {
9
9
  try {
10
10
  u(e.throw(i));
11
- } catch (h) {
12
- r(h);
11
+ } catch (d) {
12
+ r(d);
13
13
  }
14
14
  }, u = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, p);
15
15
  u((e = e.apply(a, t)).next());
16
16
  });
17
- import { findFirstMatchNode as d, treeToArray as c } from "@web-utils/core";
17
+ import { findFirstMatchNode as h, treeToArray as c } from "@web-utils/core";
18
18
  import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
19
19
  const f = {
20
20
  name: "PageIndex",
@@ -69,7 +69,7 @@ const f = {
69
69
  if (c(this.menus).map((t) => t.path).filter((t) => t).includes(this.$route.path))
70
70
  yield this.setCurrentKey(this.$route.path);
71
71
  else {
72
- const t = d(this.menus, (e) => e.path);
72
+ const t = h(this.menus, (e) => e.path);
73
73
  t && (yield this.$router.push({ path: t.path, query: t.query }), yield this.setCurrentKey(t.path));
74
74
  }
75
75
  });
@@ -81,13 +81,14 @@ const f = {
81
81
  },
82
82
  setCurrentKey(a) {
83
83
  return n(this, null, function* () {
84
- yield this.$nextTick(), this.$refs.menuTree && this.$refs.menuTree.setCurrentKey(a);
84
+ var t;
85
+ yield this.$nextTick(), (t = this.$refs.menuTree) == null || t.setCurrentKey(a);
85
86
  });
86
87
  },
87
88
  beforeRouteUpdate(a, t, e) {
88
89
  return n(this, null, function* () {
89
90
  if (a.path === this.schema) {
90
- const s = d(this.menus, (r) => r.path);
91
+ const s = h(this.menus, (r) => r.path);
91
92
  s ? (yield e({ path: s.path, query: s.query }), yield this.setCurrentKey(s.path)) : yield e(!1);
92
93
  } else
93
94
  yield e(), yield this.setCurrentKey(this.$route.path);
@@ -92,7 +92,7 @@ const n = {
92
92
  },
93
93
  // 绘制移动轨迹
94
94
  moveLine(i, t, s) {
95
- s && s.preventDefault(), i -= this.start, t -= this.end, this.ctx.lineTo(i, t), this.ctx.stroke();
95
+ s == null || s.preventDefault(), i -= this.start, t -= this.end, this.ctx.lineTo(i, t), this.ctx.stroke();
96
96
  },
97
97
  clear() {
98
98
  this.ctx.clearRect(0, 0, this.width, this.height);