@web-utils/component 2.7.13 → 2.7.15

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.
Files changed (110) hide show
  1. package/dist/chunks/{ConfigSelect.vue_vue_type_template_lang.e7a9d5b7.js → ConfigSelect.vue_vue_type_template_lang.dfc91f07.js} +20 -15
  2. package/dist/chunks/{ConfigTable.vue_vue_type_template_lang.e9060616.js → ConfigTable.vue_vue_type_template_lang.b27540fd.js} +1 -1
  3. package/dist/chunks/{ConfigUpload.vue_vue_type_template_lang.48dd814b.js → ConfigUpload.vue_vue_type_template_lang.129c0ced.js} +18 -13
  4. package/dist/chunks/{WidgetConfig.vue_vue_type_template_lang.7928c468.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
  5. package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.e3e800a6.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
  6. package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.6a693e5e.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
  7. package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.291bf39a.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +3 -2
  8. package/dist/chunks/{dataformat.d3fd2d1b.js → dataformat.65b92bfe.js} +36 -35
  9. package/dist/chunks/detail.d67573b1.js +28 -0
  10. package/dist/chunks/dic.70feb9b4.js +135 -0
  11. package/dist/chunks/{event.43b42228.js → event.dd6f522d.js} +3 -3
  12. package/dist/chunks/{init.3b47bb80.js → init.7c58eb34.js} +10 -10
  13. package/dist/chunks/{monaco.1dbdc960.js → monaco.cefcb9f5.js} +92 -85
  14. package/dist/chunks/{packages.6f252850.js → packages.1fc9ccba.js} +1 -1
  15. package/dist/chunks/slot.4b391395.js +27 -0
  16. package/dist/chunks/util.23fe58fb.js +261 -0
  17. package/dist/components/afd-column/index.js +1 -1
  18. package/dist/components/affix/index.js +2 -2
  19. package/dist/components/base.css +1 -1
  20. package/dist/components/carousel/index.js +2 -2
  21. package/dist/components/chat/index.js +9 -9
  22. package/dist/components/column/index.js +25 -25
  23. package/dist/components/column-default/index.js +3 -2
  24. package/dist/components/column-dynamic/index.js +1 -1
  25. package/dist/components/column-menu/index.js +11 -11
  26. package/dist/components/column-slot/index.js +54 -53
  27. package/dist/components/config-custom/index.js +3 -3
  28. package/dist/components/config-event/index.js +5 -5
  29. package/dist/components/config-rate/index.js +1 -1
  30. package/dist/components/config-rate/style.css +1 -1
  31. package/dist/components/config-select/index.js +3 -3
  32. package/dist/components/config-switch/index.js +5 -5
  33. package/dist/components/config-switch/style.css +1 -1
  34. package/dist/components/config-table/index.js +3 -3
  35. package/dist/components/config-tree/index.js +3 -3
  36. package/dist/components/config-tree/style.css +1 -1
  37. package/dist/components/config-upload/index.js +1 -1
  38. package/dist/components/dialog-excel/index.js +37 -40
  39. package/dist/components/dialog-filter/index.js +19 -19
  40. package/dist/components/dialog-form/index.js +1 -1
  41. package/dist/components/element-dialog/index.js +2 -2
  42. package/dist/components/element-dialog/style.css +1 -1
  43. package/dist/components/flow/index.js +17 -18
  44. package/dist/components/flow-node/index.js +1 -1
  45. package/dist/components/form-temp/index.js +3 -3
  46. package/dist/components/fy-array/index.js +2 -2
  47. package/dist/components/fy-cascader/index.js +13 -13
  48. package/dist/components/fy-checkbox/index.js +4 -4
  49. package/dist/components/fy-code/index.js +1 -1
  50. package/dist/components/fy-curd/index.js +68 -69
  51. package/dist/components/fy-date/index.js +1 -1
  52. package/dist/components/fy-dialog-form/index.js +11 -11
  53. package/dist/components/fy-draggable/index.js +5 -7
  54. package/dist/components/fy-dynamic/index.js +32 -28
  55. package/dist/components/fy-empty/index.js +1 -1
  56. package/dist/components/fy-form/index.js +153 -141
  57. package/dist/components/fy-form-design/index.js +31 -31
  58. package/dist/components/fy-input/index.js +60 -46
  59. package/dist/components/fy-input-color/index.js +34 -29
  60. package/dist/components/fy-input-icon/index.js +1 -1
  61. package/dist/components/fy-input-map/index.js +14 -14
  62. package/dist/components/fy-input-number/index.js +1 -1
  63. package/dist/components/fy-input-table/index.js +2 -2
  64. package/dist/components/fy-input-tree/index.js +12 -12
  65. package/dist/components/fy-radio/index.js +1 -1
  66. package/dist/components/fy-rate/index.js +1 -1
  67. package/dist/components/fy-select/index.js +3 -3
  68. package/dist/components/fy-slider/index.js +2 -2
  69. package/dist/components/fy-switch/index.js +1 -1
  70. package/dist/components/fy-tabs/index.js +2 -2
  71. package/dist/components/fy-time/index.js +2 -2
  72. package/dist/components/fy-title/index.js +1 -1
  73. package/dist/components/fy-tree/index.js +3 -3
  74. package/dist/components/fy-u-editor/index.js +26 -24
  75. package/dist/components/fy-upload/index.js +146 -282
  76. package/dist/components/header-menu/index.js +2 -2
  77. package/dist/components/header-search/index.js +16 -15
  78. package/dist/components/image-cropper/index.js +299 -0
  79. package/dist/components/image-cropper/style.css +1 -0
  80. package/dist/components/image-preview/index.js +346 -0
  81. package/dist/components/image-preview/style.css +1 -0
  82. package/dist/components/keyboard/index.js +58 -63
  83. package/dist/components/license/index.js +7 -7
  84. package/dist/components/login/index.js +37 -32
  85. package/dist/components/name-avatar/index.js +1 -1
  86. package/dist/components/pageable-table/index.js +1 -1
  87. package/dist/components/pageable-view/index.js +26 -26
  88. package/dist/components/photo-swipe/index.js +72 -165
  89. package/dist/components/queue/index.js +6 -6
  90. package/dist/components/record-video/index.js +18 -18
  91. package/dist/components/search/index.js +3 -3
  92. package/dist/components/sign/index.js +64 -59
  93. package/dist/components/skeleton/index.js +1 -1
  94. package/dist/components/table-page/index.js +5 -5
  95. package/dist/components/text-ellipsis/index.js +11 -10
  96. package/dist/components/verify/index.js +25 -25
  97. package/dist/components/widget-config/index.js +8 -8
  98. package/dist/components/widget-form/index.js +7 -7
  99. package/dist/components/widget-form-group/index.js +8 -8
  100. package/dist/components/widget-form-item/index.js +14 -13
  101. package/dist/components/widget-form-table/index.js +14 -14
  102. package/dist/index.css +109 -40
  103. package/dist/index.es.js +4049 -3731
  104. package/package.json +5 -56
  105. package/web-types.json +33 -10
  106. package/dist/chunks/detail.ac4d421a.js +0 -28
  107. package/dist/chunks/dic.79d9f595.js +0 -133
  108. package/dist/chunks/slot.1b8d2b1b.js +0 -27
  109. package/dist/chunks/util.80e28481.js +0 -250
  110. package/dist/components/photo-swipe/style.css +0 -1
@@ -1,13 +1,13 @@
1
- import { p as $, e as B } from "../../chunks/event.43b42228.js";
2
- import { B as N, x as k, i as K } from "../../chunks/util.80e28481.js";
3
- import { p as A } from "../../chunks/packages.6f252850.js";
4
- import { isBlank as w } from "@web-utils/core";
1
+ import { p as I, e as N } from "../../chunks/event.dd6f522d.js";
2
+ import { w as B, x as k, i as K } from "../../chunks/util.23fe58fb.js";
3
+ import { p as F } from "../../chunks/packages.1fc9ccba.js";
4
+ import { isBlank as b } from "@web-utils/core";
5
5
  import { n as L } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
6
- let d, g, S = {
6
+ let d, g;
7
+ const S = {
7
8
  width: 200,
8
9
  height: 200
9
- };
10
- const s = {
10
+ }, n = {
11
11
  text: "avueJS",
12
12
  // 文字
13
13
  fontFamily: "microsoft yahei",
@@ -27,214 +27,83 @@ const s = {
27
27
  };
28
28
  function P(t, e) {
29
29
  const i = new FileReader();
30
- i.readAsDataURL(t), i.onload = function(o) {
31
- e(o.target.result);
30
+ i.readAsDataURL(t), i.onload = function(s) {
31
+ e(s.target.result);
32
32
  };
33
33
  }
34
34
  function D(t, e = {}, i) {
35
- const { text: o, fontFamily: a, color: n, fontSize: r, opacity: h, bottom: b, right: f, ratio: x } = e;
36
- _(), P(t, C);
37
- function _() {
38
- s.text = o || s.text, s.fontFamily = a || s.fontFamily, s.color = n || s.color, s.fontSize = r || s.fontSize, s.opacity = h || s.opacity, s.bottom = b || s.bottom, s.right = f || s.right, s.ratio = x || s.ratio;
35
+ const { text: s, fontFamily: o, color: a, fontSize: r, opacity: p, bottom: w, right: f, ratio: x } = e;
36
+ v(), P(t, C);
37
+ function v() {
38
+ n.text = s || n.text, n.fontFamily = o || n.fontFamily, n.color = a || n.color, n.fontSize = r || n.fontSize, n.opacity = p || n.opacity, n.bottom = w || n.bottom, n.right = f || n.right, n.ratio = x || n.ratio;
39
39
  }
40
- function C(v) {
41
- var u = new Image();
42
- u.src = v, u.onload = function() {
43
- var m = u.width, l = u.height;
40
+ function C(y) {
41
+ const u = new Image();
42
+ u.src = y, u.onload = function() {
43
+ const m = u.width, l = u.height;
44
44
  c(m, l), g.drawImage(u, 0, 0, m, l), E(m, l);
45
- const y = document.getElementById("canvas").toDataURL(t.type, s.ratio), F = N(y, t.name);
46
- i && i(F);
45
+ const _ = document.getElementById("canvas").toDataURL(t.type, n.ratio), O = B(_, t.name);
46
+ i && i(O);
47
47
  };
48
48
  }
49
- function c(v, u) {
50
- d = document.getElementById("canvas"), d === null && (d = document.createElement("canvas"), d.id = "canvas", d.className = "avue-canvas", document.body.appendChild(d)), g = d.getContext("2d"), d.width = v, d.height = u;
49
+ function c(y, u) {
50
+ d = document.getElementById("canvas"), d === null && (d = document.createElement("canvas"), d.id = "canvas", d.className = "avue-canvas", document.body.appendChild(d)), g = d.getContext("2d"), d.width = y, d.height = u;
51
51
  }
52
- function E(v, u) {
53
- var m = s.text, l = U(m, v, u);
54
- g.font = l.fontSize + "px " + s.fontFamily, g.fillStyle = s.color, g.globalAlpha = s.opacity / 100, g.fillText(m, l.x, l.y);
52
+ function E(y, u) {
53
+ const m = n.text, l = U(m, y, u);
54
+ g.font = `${l.fontSize}px ${n.fontFamily}`, g.fillStyle = n.color, g.globalAlpha = n.opacity / 100, g.fillText(m, l.x, l.y);
55
55
  }
56
- function U(v, u, m) {
57
- var l, y, F = s.fontSize / S.width, j = F * u;
58
- s.bottom ? y = S.height - s.bottom : y = s.top, s.right ? l = S.width - s.right : l = s.left, g.font = s.fontSize + "px " + s.fontFamily;
59
- var z = Number(g.measureText(v).width);
56
+ function U(y, u, m) {
57
+ let l, _;
58
+ const $ = n.fontSize / S.width * u;
59
+ n.bottom ? _ = S.height - n.bottom : _ = n.top, n.right ? l = S.width - n.right : l = n.left, g.font = `${n.fontSize}px ${n.fontFamily}`;
60
+ const z = Number(g.measureText(y).width);
60
61
  l = l - z;
61
- var R = l / S.width, I = y / S.height;
62
- return l = R * u, y = I * m, {
62
+ const j = l / S.width, R = _ / S.height;
63
+ return l = j * u, _ = R * m, {
63
64
  x: l,
64
- y,
65
- fontSize: j
65
+ y: _,
66
+ fontSize: $
66
67
  };
67
68
  }
68
69
  }
69
70
  const M = (t, e, i) => {
70
- var o = JSON.stringify(i);
71
- __ENV__ === "development" && console && console.log("put_policy = ", o);
72
- var a = V(q(o));
73
- __ENV__ === "development" && console && console.log("encoded = ", a);
74
- var n = CryptoJS.HmacSHA1(a, e), r = n.toString(CryptoJS.enc.Base64);
75
- __ENV__ === "development" && console && console.log("encoded_signed=", r);
76
- var h = t + ":" + J(r) + ":" + a;
77
- return __ENV__ === "development" && console && console.log("upload_token=", h), h;
71
+ const s = JSON.stringify(i);
72
+ window.__ENV__ === "development" && console && console.log("put_policy = ", s);
73
+ const o = V(q(s));
74
+ window.__ENV__ === "development" && console && console.log("encoded = ", o);
75
+ const r = CryptoJS.HmacSHA1(o, e).toString(CryptoJS.enc.Base64);
76
+ window.__ENV__ === "development" && console && console.log("encoded_signed=", r);
77
+ const p = `${t}:${J(r)}:${o}`;
78
+ return window.__ENV__ === "development" && console && console.log("upload_token=", p), p;
78
79
  };
79
80
  function q(t) {
80
- var e, i, o, a;
81
- for (e = "", o = t.length, i = 0; i < o; i++)
82
- a = t.charCodeAt(i), a >= 1 && a <= 127 ? e += t.charAt(i) : a > 2047 ? (e += String.fromCharCode(224 | a >> 12 & 15), e += String.fromCharCode(128 | a >> 6 & 63), e += String.fromCharCode(128 | a >> 0 & 63)) : (e += String.fromCharCode(192 | a >> 6 & 31), e += String.fromCharCode(128 | a >> 0 & 63));
81
+ let e, i, s;
82
+ e = "";
83
+ const o = t.length;
84
+ for (i = 0; i < o; i++)
85
+ s = t.charCodeAt(i), s >= 1 && s <= 127 ? e += t.charAt(i) : s > 2047 ? (e += String.fromCharCode(224 | s >> 12 & 15), e += String.fromCharCode(128 | s >> 6 & 63), e += String.fromCharCode(128 | s >> 0 & 63)) : (e += String.fromCharCode(192 | s >> 6 & 31), e += String.fromCharCode(128 | s >> 0 & 63));
83
86
  return e;
84
87
  }
85
- var p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
86
- new Array(
87
- -1,
88
- -1,
89
- -1,
90
- -1,
91
- -1,
92
- -1,
93
- -1,
94
- -1,
95
- -1,
96
- -1,
97
- -1,
98
- -1,
99
- -1,
100
- -1,
101
- -1,
102
- -1,
103
- -1,
104
- -1,
105
- -1,
106
- -1,
107
- -1,
108
- -1,
109
- -1,
110
- -1,
111
- -1,
112
- -1,
113
- -1,
114
- -1,
115
- -1,
116
- -1,
117
- -1,
118
- -1,
119
- -1,
120
- -1,
121
- -1,
122
- -1,
123
- -1,
124
- -1,
125
- -1,
126
- -1,
127
- -1,
128
- -1,
129
- -1,
130
- 62,
131
- -1,
132
- -1,
133
- -1,
134
- 63,
135
- 52,
136
- 53,
137
- 54,
138
- 55,
139
- 56,
140
- 57,
141
- 58,
142
- 59,
143
- 60,
144
- 61,
145
- -1,
146
- -1,
147
- -1,
148
- -1,
149
- -1,
150
- -1,
151
- -1,
152
- 0,
153
- 1,
154
- 2,
155
- 3,
156
- 4,
157
- 5,
158
- 6,
159
- 7,
160
- 8,
161
- 9,
162
- 10,
163
- 11,
164
- 12,
165
- 13,
166
- 14,
167
- 15,
168
- 16,
169
- 17,
170
- 18,
171
- 19,
172
- 20,
173
- 21,
174
- 22,
175
- 23,
176
- 24,
177
- 25,
178
- -1,
179
- -1,
180
- -1,
181
- -1,
182
- -1,
183
- -1,
184
- 26,
185
- 27,
186
- 28,
187
- 29,
188
- 30,
189
- 31,
190
- 32,
191
- 33,
192
- 34,
193
- 35,
194
- 36,
195
- 37,
196
- 38,
197
- 39,
198
- 40,
199
- 41,
200
- 42,
201
- 43,
202
- 44,
203
- 45,
204
- 46,
205
- 47,
206
- 48,
207
- 49,
208
- 50,
209
- 51,
210
- -1,
211
- -1,
212
- -1,
213
- -1,
214
- -1
215
- );
88
+ const h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
216
89
  function V(t) {
217
- var e, i, o, a, n, r;
218
- for (o = t.length, i = 0, e = ""; i < o; ) {
219
- if (a = t.charCodeAt(i++) & 255, i == o) {
220
- e += p.charAt(a >> 2), e += p.charAt((a & 3) << 4), e += "==";
90
+ let e, i, s, o, a, r;
91
+ for (s = t.length, i = 0, e = ""; i < s; ) {
92
+ if (o = t.charCodeAt(i++) & 255, i == s) {
93
+ e += h.charAt(o >> 2), e += h.charAt((o & 3) << 4), e += "==";
221
94
  break;
222
95
  }
223
- if (n = t.charCodeAt(i++), i == o) {
224
- e += p.charAt(a >> 2), e += p.charAt((a & 3) << 4 | (n & 240) >> 4), e += p.charAt((n & 15) << 2), e += "=";
96
+ if (a = t.charCodeAt(i++), i == s) {
97
+ e += h.charAt(o >> 2), e += h.charAt((o & 3) << 4 | (a & 240) >> 4), e += h.charAt((a & 15) << 2), e += "=";
225
98
  break;
226
99
  }
227
- r = t.charCodeAt(i++), e += p.charAt(a >> 2), e += p.charAt((a & 3) << 4 | (n & 240) >> 4), e += p.charAt((n & 15) << 2 | (r & 192) >> 6), e += p.charAt(r & 63);
100
+ r = t.charCodeAt(i++), e += h.charAt(o >> 2), e += h.charAt((o & 3) << 4 | (a & 240) >> 4), e += h.charAt((a & 15) << 2 | (r & 192) >> 6), e += h.charAt(r & 63);
228
101
  }
229
102
  return e;
230
103
  }
231
- var J = function(t) {
104
+ const J = function(t) {
232
105
  return t = t.replace(/\+/g, "-"), t = t.replace(/\//g, "_"), t;
233
- };
234
- const H = (t) => {
235
- var e = new OSS(t);
236
- return e;
237
- };
106
+ }, H = (t) => new OSS(t);
238
107
  var Q = function() {
239
108
  var t = this, e = t.$createElement, i = t._self._c || e;
240
109
  return i("div", {
@@ -276,27 +145,35 @@ var Q = function() {
276
145
  "file-list": t.fileList
277
146
  },
278
147
  nativeOn: {
279
- click: function(o) {
148
+ click: function(s) {
280
149
  return t.handleClick.apply(null, arguments);
281
150
  }
282
151
  },
283
152
  scopedSlots: t._u([{
153
+ key: "tip",
154
+ fn: function() {
155
+ return [i("div", {
156
+ staticClass: "el-upload__tip",
157
+ domProps: {
158
+ innerHTML: t._s(t.tip)
159
+ }
160
+ })];
161
+ },
162
+ proxy: !0
163
+ }, {
284
164
  key: "file",
285
- fn: function(o) {
286
- var a = o.file;
165
+ fn: function(s) {
166
+ var o = s.file;
287
167
  return [t.$scopedSlots.default ? t._t("default", null, {
288
- file: a
289
- }) : t.listType === "picture-card" ? i("span", [t.isMediaType(a.url) ? i(a.type, {
168
+ file: o
169
+ }) : t.listType === "picture-card" ? i("span", [t.isMediaType(o.url) ? i(o.type, {
290
170
  tag: "Component",
291
171
  staticClass: "el-upload-list__item-thumbnail",
292
172
  attrs: {
293
- src: a.url
173
+ src: o.url
294
174
  }
295
175
  }) : i("i", {
296
- staticClass: "avue-upload__avatar el-icon-document",
297
- attrs: {
298
- src: a.url
299
- }
176
+ staticClass: "avue-upload__avatar el-icon-document"
300
177
  }), i("span", {
301
178
  staticClass: "el-upload-list__item-actions"
302
179
  }, [i("span", {
@@ -304,8 +181,8 @@ var Q = function() {
304
181
  }, [i("i", {
305
182
  staticClass: "el-icon-zoom-in",
306
183
  on: {
307
- click: function(n) {
308
- return n.stopPropagation(), t.handlePreview(a);
184
+ click: function(a) {
185
+ return a.stopPropagation(), t.handlePreview(o);
309
186
  }
310
187
  }
311
188
  })]), i("span", {
@@ -313,48 +190,48 @@ var Q = function() {
313
190
  }, [t.disabled ? t._e() : i("i", {
314
191
  staticClass: "el-icon-delete",
315
192
  on: {
316
- click: function(n) {
317
- return n.stopPropagation(), t.handleRemove(a);
193
+ click: function(a) {
194
+ return a.stopPropagation(), t.handleRemove(o);
318
195
  }
319
196
  }
320
197
  })])])], 1) : t.listType === "picture" ? i("span", {
321
198
  on: {
322
- click: function(n) {
323
- return n.stopPropagation(), t.handlePreview(a);
199
+ click: function(a) {
200
+ return a.stopPropagation(), t.handlePreview(o);
324
201
  }
325
202
  }
326
- }, [i(a.type, {
203
+ }, [i(o.type, {
327
204
  tag: "Component",
328
205
  staticClass: "el-upload-list__item-thumbnail",
329
206
  attrs: {
330
- src: a.url
207
+ src: o.url
331
208
  }
332
209
  }), i("a", {
333
210
  staticClass: "el-upload-list__item-name"
334
211
  }, [i("i", {
335
212
  staticClass: "el-icon-document"
336
- }), t._v(" " + t._s(a.name) + " ")]), i("i", {
213
+ }), t._v(" " + t._s(o.name) + " ")]), i("i", {
337
214
  staticClass: "el-icon-close",
338
215
  on: {
339
- click: function(n) {
340
- return n.stopPropagation(), t.handleRemove(a);
216
+ click: function(a) {
217
+ return a.stopPropagation(), t.handleRemove(o);
341
218
  }
342
219
  }
343
220
  })], 1) : i("span", {
344
221
  on: {
345
- click: function(n) {
346
- return n.stopPropagation(), t.handlePreview(a);
222
+ click: function(a) {
223
+ return a.stopPropagation(), t.handlePreview(o);
347
224
  }
348
225
  }
349
226
  }, [i("a", {
350
227
  staticClass: "el-upload-list__item-name"
351
228
  }, [i("i", {
352
229
  staticClass: "el-icon-document"
353
- }), t._v(" " + t._s(a.name) + " ")]), t.disabled ? t._e() : i("i", {
230
+ }), t._v(" " + t._s(o.name) + " ")]), t.disabled ? t._e() : i("i", {
354
231
  staticClass: "el-icon-close",
355
232
  on: {
356
- click: function(n) {
357
- return n.stopPropagation(), t.handleRemove(a);
233
+ click: function(a) {
234
+ return a.stopPropagation(), t.handleRemove(o);
358
235
  }
359
236
  }
360
237
  })])];
@@ -373,17 +250,14 @@ var Q = function() {
373
250
  src: t.imgUrl
374
251
  },
375
252
  on: {
376
- mouseover: function(o) {
253
+ mouseover: function(s) {
377
254
  t.menu = !0;
378
255
  }
379
256
  }
380
257
  }) : t.imgUrl ? i("i", {
381
258
  staticClass: "avue-upload__avatar el-icon-document",
382
- attrs: {
383
- src: t.imgUrl
384
- },
385
259
  on: {
386
- mouseover: function(o) {
260
+ mouseover: function(s) {
387
261
  t.menu = !0;
388
262
  }
389
263
  }
@@ -392,23 +266,21 @@ var Q = function() {
392
266
  }), t.menu ? i("div", {
393
267
  staticClass: "el-upload-list__item-actions avue-upload__menu",
394
268
  on: {
395
- mouseover: function(o) {
269
+ mouseover: function(s) {
396
270
  t.menu = !0;
397
271
  },
398
- mouseout: function(o) {
272
+ mouseout: function(s) {
399
273
  t.menu = !1;
400
274
  },
401
- click: function(o) {
402
- return o.stopPropagation(), function() {
403
- return !1;
404
- }.apply(null, arguments);
275
+ click: function(s) {
276
+ s.stopPropagation();
405
277
  }
406
278
  }
407
279
  }, [i("i", {
408
280
  staticClass: "el-icon-zoom-in",
409
281
  on: {
410
- click: function(o) {
411
- return o.stopPropagation(), t.handlePreview({
282
+ click: function(s) {
283
+ return s.stopPropagation(), t.handlePreview({
412
284
  url: t.imgUrl
413
285
  });
414
286
  }
@@ -416,8 +288,8 @@ var Q = function() {
416
288
  }), t.disabled ? t._e() : i("i", {
417
289
  staticClass: "el-icon-delete",
418
290
  on: {
419
- click: function(o) {
420
- return o.stopPropagation(), t.handleDelete(t.imgUrl);
291
+ click: function(s) {
292
+ return s.stopPropagation(), t.handleDelete(t.imgUrl);
421
293
  }
422
294
  }
423
295
  })]) : t._e()]] : t.dragFile ? [i("i", {
@@ -430,23 +302,14 @@ var Q = function() {
430
302
  size: t.size,
431
303
  type: "primary"
432
304
  }
433
- }, [t._v(" " + t._s(t.fileText || "上传") + " ")])], i("div", {
434
- staticClass: "el-upload__tip",
435
- attrs: {
436
- slot: "tip"
437
- },
438
- domProps: {
439
- innerHTML: t._s(t.tip)
440
- },
441
- slot: "tip"
442
- })], 2)], 1);
305
+ }, [t._v(" " + t._s(t.fileText || "上传") + " ")])]], 2)], 1);
443
306
  }, W = [];
444
- function O(t, e = "") {
307
+ function A(t, e = "") {
445
308
  return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e;
446
309
  }
447
310
  const X = {
448
311
  name: "FyUpload",
449
- mixins: [$, B],
312
+ mixins: [I, N],
450
313
  props: {
451
314
  qiniu: Object,
452
315
  ali: Object,
@@ -541,21 +404,22 @@ const X = {
541
404
  isPictureImg() {
542
405
  return this.listType === "picture-img";
543
406
  },
544
- //单个头像图片
407
+ // 单个头像图片
545
408
  imgUrl() {
546
- return w(this.text) ? null : O(this.homeUrl, this.text[0]);
409
+ return b(this.text) ? null : A(this.homeUrl, this.text[0]);
547
410
  },
548
411
  fileList() {
549
- let t = [];
412
+ const t = [];
550
413
  return (this.text || []).forEach((e, i) => {
551
414
  if (e) {
552
- let o = this.isObject ? e[this.labelKey] : e.substring(e.lastIndexOf("/") + 1), a = this.isObject ? e[this.valueKey] : e;
553
- a = O(this.homeUrl, a), t.push({
554
- uid: i + "",
415
+ const s = this.isObject ? e[this.labelKey] : e.substring(e.lastIndexOf("/") + 1);
416
+ let o = this.isObject ? e[this.valueKey] : e;
417
+ o = A(this.homeUrl, o), t.push({
418
+ uid: `${i}`,
555
419
  status: "done",
556
- type: this.isMediaType(a),
557
- name: o,
558
- url: a
420
+ type: this.isMediaType(o),
421
+ name: s,
422
+ url: o
559
423
  });
560
424
  }
561
425
  }), t;
@@ -570,7 +434,7 @@ const X = {
570
434
  },
571
435
  setSort() {
572
436
  if (!window.Sortable) {
573
- A.logs("Sortable");
437
+ F.logs("Sortable");
574
438
  return;
575
439
  }
576
440
  const t = this.$el.querySelectorAll(".avue-upload > ul")[0];
@@ -586,7 +450,7 @@ const X = {
586
450
  if (this.isPictureImg)
587
451
  this.text.splice(0, 1, t[this.urlKey]);
588
452
  else if (this.isObject) {
589
- let e = {};
453
+ const e = {};
590
454
  e[this.labelKey] = t[this.nameKey], e[this.valueKey] = t[this.urlKey], this.text.push(e);
591
455
  } else
592
456
  this.text.push(t[this.urlKey]);
@@ -601,8 +465,8 @@ const X = {
601
465
  },
602
466
  delete(t) {
603
467
  (this.text || []).forEach((e, i) => {
604
- let o = this.isObject ? e[this.valueKey] : e;
605
- O(this.homeUrl, o) === t.url && this.text.splice(i, 1);
468
+ const s = this.isObject ? e[this.valueKey] : e;
469
+ A(this.homeUrl, s) === t.url && this.text.splice(i, 1);
606
470
  });
607
471
  },
608
472
  show(t) {
@@ -622,61 +486,61 @@ const X = {
622
486
  this.loading = !0;
623
487
  let e = t.file;
624
488
  const i = e.size / 1024;
625
- if (!w(i) && i > this.fileSize) {
489
+ if (!b(i) && i > this.fileSize) {
626
490
  this.hide("文件太大不符合");
627
491
  return;
628
492
  }
629
- const o = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
630
- let a = {}, n = {}, r = new FormData();
631
- const h = () => {
493
+ const s = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
494
+ let o = {}, a = {};
495
+ const r = new FormData(), p = () => {
632
496
  const f = (x) => {
633
- let _ = this.action;
634
- for (let c in this.data)
497
+ let v = this.action;
498
+ for (const c in this.data)
635
499
  r.append(c, this.data[c]);
636
500
  const C = x || e;
637
501
  if (r.append(this.fileName, C), this.isQiniuOss) {
638
502
  if (!window.CryptoJS) {
639
- A.logs("CryptoJS"), this.hide();
503
+ F.logs("CryptoJS"), this.hide();
640
504
  return;
641
505
  }
642
- a = this.qiniu || this.$AVUE.qiniu;
643
- const c = M(a.AK, a.SK, {
644
- scope: a.scope,
645
- deadline: new Date().getTime() + a.deadline * 3600
506
+ o = this.qiniu || this.$AVUE.qiniu;
507
+ const c = M(o.AK, o.SK, {
508
+ scope: o.scope,
509
+ deadline: new Date().getTime() + o.deadline * 3600
646
510
  });
647
- r.append("token", c), _ = a.bucket;
511
+ r.append("token", c), v = o.bucket;
648
512
  } else if (this.isAliOss) {
649
513
  if (!window.OSS) {
650
- A.logs("AliOSS"), this.hide();
514
+ F.logs("AliOSS"), this.hide();
651
515
  return;
652
516
  }
653
- a = this.ali || this.$AVUE.ali, n = H(a);
517
+ o = this.ali || this.$AVUE.ali, a = H(o);
654
518
  }
655
- (() => this.isAliOss ? n.put(C.name, C, {
519
+ (() => this.isAliOss ? a.put(C.name, C, {
656
520
  headers: this.headers
657
- }) : this.$axios.post(_, r, { headers: o }))().then((c) => {
658
- this.res = {}, this.isQiniuOss && (c.data.key = a.url + c.data.key), this.res = K(this.isAliOss ? c : c.data, this.resKey), typeof this.uploadAfter == "function" ? this.uploadAfter(this.res, this.show, this.hide, this.column) : this.show();
521
+ }) : this.$axios.post(v, r, { headers: s }))().then((c) => {
522
+ this.res = {}, this.isQiniuOss && (c.data.key = o.url + c.data.key), this.res = K(this.isAliOss ? c : c.data, this.resKey), typeof this.uploadAfter == "function" ? this.uploadAfter(this.res, this.show, this.hide, this.column) : this.show();
659
523
  }).catch((c) => {
660
524
  this.hide(c);
661
525
  });
662
526
  };
663
527
  typeof this.uploadBefore == "function" ? this.uploadBefore(e, f, this.hide, this.column) : f();
664
528
  };
665
- if (k(e.name) != "img") {
666
- h();
529
+ if (k(e.name) !== "img") {
530
+ p();
667
531
  return;
668
532
  }
669
- const b = () => {
670
- w(this.canvasOption) ? h() : D(e, this.canvasOption, (f) => {
671
- e = f, h();
533
+ const w = () => {
534
+ b(this.canvasOption) ? p() : D(e, this.canvasOption, (f) => {
535
+ e = f, p();
672
536
  });
673
537
  };
674
- w(this.cropperOption) ? b() : P(e, (f) => {
675
- let x = Object.assign(this.cropperOption, {
538
+ b(this.cropperOption) ? w() : P(e, (f) => {
539
+ const x = Object.assign(this.cropperOption, {
676
540
  img: f,
677
541
  type: "file",
678
- callback: (_) => {
679
- e = _, b();
542
+ callback: (v) => {
543
+ e = v, w();
680
544
  },
681
545
  cancel: () => {
682
546
  this.loading = !1;
@@ -690,7 +554,7 @@ const X = {
690
554
  },
691
555
  handlePreview(t) {
692
556
  const e = () => {
693
- let i = this.fileList.findIndex((o) => o.url === t.url);
557
+ const i = this.fileList.findIndex((s) => s.url === t.url);
694
558
  this.$ImagePreview(this.fileList, i);
695
559
  };
696
560
  typeof this.uploadPreview == "function" ? this.uploadPreview(t, this.column, e) : e();
@@ -719,9 +583,9 @@ function G(t) {
719
583
  for (let e in T)
720
584
  this[e] = T[e];
721
585
  }
722
- const ot = /* @__PURE__ */ function() {
586
+ const st = /* @__PURE__ */ function() {
723
587
  return Y.exports;
724
588
  }();
725
589
  export {
726
- ot as default
590
+ st as default
727
591
  };
@@ -1,6 +1,6 @@
1
1
  import { p as s } from "../../chunks/permission.ce5d2121.js";
2
2
  import { c } from "../../chunks/config.46422d7f.js";
3
- import { o } from "../../chunks/util.80e28481.js";
3
+ import { o } from "../../chunks/util.23fe58fb.js";
4
4
  import { n as a } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
5
5
  var d = function() {
6
6
  var e = this, i = e.$createElement, t = e._self._c || i;
@@ -201,7 +201,7 @@ const l = {
201
201
  },
202
202
  methods: {
203
203
  optVal: o,
204
- //日期组件回调
204
+ // 日期组件回调
205
205
  dateChange(e) {
206
206
  this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
207
207
  },