@web-utils/component 2.7.12 → 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.
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.d3cd0479.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
  5. package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.fbb7d6b7.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
  6. package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.47789aae.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
  7. package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.30625146.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +4 -3
  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 +198 -312
  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 +71 -166
  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 +4069 -3731
  104. package/package.json +6 -56
  105. package/web-types.json +28 -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,219 +1,110 @@
1
- import { p as j, e as z } from "../../chunks/event.43b42228.js";
2
- import { B as R, x as w, i as D } from "../../chunks/util.80e28481.js";
3
- import { p as S } from "../../chunks/packages.6f252850.js";
4
- import { isBlank as x } from "@web-utils/core";
5
- import { n as I } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
6
- function A(t, e) {
7
- var i = new FileReader();
8
- i.readAsDataURL(t), i.onload = function(o) {
9
- e(o.target.result);
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
+ import { n as L } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
6
+ let d, g;
7
+ const S = {
8
+ width: 200,
9
+ height: 200
10
+ }, n = {
11
+ text: "avueJS",
12
+ // 文字
13
+ fontFamily: "microsoft yahei",
14
+ // 字体
15
+ color: "#999",
16
+ // 颜色
17
+ fontSize: 16,
18
+ // 大小
19
+ opacity: 100,
20
+ // 透明度
21
+ bottom: 10,
22
+ // 下边位置
23
+ right: 10,
24
+ // 右边位置
25
+ ratio: 1
26
+ // 压缩比
27
+ };
28
+ function P(t, e) {
29
+ const i = new FileReader();
30
+ i.readAsDataURL(t), i.onload = function(s) {
31
+ e(s.target.result);
10
32
  };
11
33
  }
12
- function $(t, e = {}, i) {
13
- const { text: o, fontFamily: a, color: n, fontSize: l, opacity: d, bottom: y, right: p, ratio: v } = e;
14
- g(), A(t, _);
15
- function g() {
16
- config.text = o || config.text, config.fontFamily = a || config.fontFamily, config.color = n || config.color, config.fontSize = l || config.fontSize, config.opacity = d || config.opacity, config.bottom = y || config.bottom, config.right = p || config.right, config.ratio = v || config.ratio;
34
+ function D(t, e = {}, i) {
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;
17
39
  }
18
- function _(f) {
19
- var c = new Image();
20
- c.src = f, c.onload = function() {
21
- var h = c.width, s = c.height;
22
- r(h, s), ctx.drawImage(c, 0, 0, h, s), O(h, s);
23
- const m = document.getElementById("canvas").toDataURL(t.type, config.ratio), C = R(m, t.name);
24
- i && i(C);
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
+ c(m, l), g.drawImage(u, 0, 0, m, l), E(m, l);
45
+ const _ = document.getElementById("canvas").toDataURL(t.type, n.ratio), O = B(_, t.name);
46
+ i && i(O);
25
47
  };
26
48
  }
27
- function r(f, c) {
28
- canvas = document.getElementById("canvas"), canvas === null && (canvas = document.createElement("canvas"), canvas.id = "canvas", canvas.className = "avue-canvas", document.body.appendChild(canvas)), ctx = canvas.getContext("2d"), canvas.width = f, canvas.height = c;
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;
29
51
  }
30
- function O(f, c) {
31
- var h = config.text, s = k(h, f, c);
32
- ctx.font = s.fontSize + "px " + config.fontFamily, ctx.fillStyle = config.color, ctx.globalAlpha = config.opacity / 100, ctx.fillText(h, s.x, s.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);
33
55
  }
34
- function k(f, c, h) {
35
- var s, m, C = config.fontSize / configDefault.width, T = C * c;
36
- config.bottom ? m = configDefault.height - config.bottom : m = config.top, config.right ? s = configDefault.width - config.right : s = config.left, ctx.font = config.fontSize + "px " + config.fontFamily;
37
- var P = Number(ctx.measureText(f).width);
38
- s = s - P;
39
- var E = s / configDefault.width, U = m / configDefault.height;
40
- return s = E * c, m = U * h, {
41
- x: s,
42
- y: m,
43
- fontSize: T
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);
61
+ l = l - z;
62
+ const j = l / S.width, R = _ / S.height;
63
+ return l = j * u, _ = R * m, {
64
+ x: l,
65
+ y: _,
66
+ fontSize: $
44
67
  };
45
68
  }
46
69
  }
47
- const B = (t, e, i) => {
48
- var o = JSON.stringify(i);
49
- __ENV__ === "development" && console && console.log("put_policy = ", o);
50
- var a = K(N(o));
51
- __ENV__ === "development" && console && console.log("encoded = ", a);
52
- var n = CryptoJS.HmacSHA1(a, e), l = n.toString(CryptoJS.enc.Base64);
53
- __ENV__ === "development" && console && console.log("encoded_signed=", l);
54
- var d = t + ":" + L(l) + ":" + a;
55
- return __ENV__ === "development" && console && console.log("upload_token=", d), d;
70
+ const M = (t, e, i) => {
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;
56
79
  };
57
- function N(t) {
58
- var e, i, o, a;
59
- for (e = "", o = t.length, i = 0; i < o; i++)
60
- 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));
80
+ function q(t) {
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));
61
86
  return e;
62
87
  }
63
- var u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
64
- new Array(
65
- -1,
66
- -1,
67
- -1,
68
- -1,
69
- -1,
70
- -1,
71
- -1,
72
- -1,
73
- -1,
74
- -1,
75
- -1,
76
- -1,
77
- -1,
78
- -1,
79
- -1,
80
- -1,
81
- -1,
82
- -1,
83
- -1,
84
- -1,
85
- -1,
86
- -1,
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
- 62,
109
- -1,
110
- -1,
111
- -1,
112
- 63,
113
- 52,
114
- 53,
115
- 54,
116
- 55,
117
- 56,
118
- 57,
119
- 58,
120
- 59,
121
- 60,
122
- 61,
123
- -1,
124
- -1,
125
- -1,
126
- -1,
127
- -1,
128
- -1,
129
- -1,
130
- 0,
131
- 1,
132
- 2,
133
- 3,
134
- 4,
135
- 5,
136
- 6,
137
- 7,
138
- 8,
139
- 9,
140
- 10,
141
- 11,
142
- 12,
143
- 13,
144
- 14,
145
- 15,
146
- 16,
147
- 17,
148
- 18,
149
- 19,
150
- 20,
151
- 21,
152
- 22,
153
- 23,
154
- 24,
155
- 25,
156
- -1,
157
- -1,
158
- -1,
159
- -1,
160
- -1,
161
- -1,
162
- 26,
163
- 27,
164
- 28,
165
- 29,
166
- 30,
167
- 31,
168
- 32,
169
- 33,
170
- 34,
171
- 35,
172
- 36,
173
- 37,
174
- 38,
175
- 39,
176
- 40,
177
- 41,
178
- 42,
179
- 43,
180
- 44,
181
- 45,
182
- 46,
183
- 47,
184
- 48,
185
- 49,
186
- 50,
187
- 51,
188
- -1,
189
- -1,
190
- -1,
191
- -1,
192
- -1
193
- );
194
- function K(t) {
195
- var e, i, o, a, n, l;
196
- for (o = t.length, i = 0, e = ""; i < o; ) {
197
- if (a = t.charCodeAt(i++) & 255, i == o) {
198
- e += u.charAt(a >> 2), e += u.charAt((a & 3) << 4), e += "==";
88
+ const h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
89
+ function V(t) {
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 += "==";
199
94
  break;
200
95
  }
201
- if (n = t.charCodeAt(i++), i == o) {
202
- e += u.charAt(a >> 2), e += u.charAt((a & 3) << 4 | (n & 240) >> 4), e += u.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 += "=";
203
98
  break;
204
99
  }
205
- l = t.charCodeAt(i++), e += u.charAt(a >> 2), e += u.charAt((a & 3) << 4 | (n & 240) >> 4), e += u.charAt((n & 15) << 2 | (l & 192) >> 6), e += u.charAt(l & 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);
206
101
  }
207
102
  return e;
208
103
  }
209
- var L = function(t) {
104
+ const J = function(t) {
210
105
  return t = t.replace(/\+/g, "-"), t = t.replace(/\//g, "_"), t;
211
- };
212
- const M = (t) => {
213
- var e = new OSS(t);
214
- return e;
215
- };
216
- var q = function() {
106
+ }, H = (t) => new OSS(t);
107
+ var Q = function() {
217
108
  var t = this, e = t.$createElement, i = t._self._c || e;
218
109
  return i("div", {
219
110
  directives: [{
@@ -254,27 +145,35 @@ var q = function() {
254
145
  "file-list": t.fileList
255
146
  },
256
147
  nativeOn: {
257
- click: function(o) {
148
+ click: function(s) {
258
149
  return t.handleClick.apply(null, arguments);
259
150
  }
260
151
  },
261
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
+ }, {
262
164
  key: "file",
263
- fn: function(o) {
264
- var a = o.file;
165
+ fn: function(s) {
166
+ var o = s.file;
265
167
  return [t.$scopedSlots.default ? t._t("default", null, {
266
- file: a
267
- }) : 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, {
268
170
  tag: "Component",
269
171
  staticClass: "el-upload-list__item-thumbnail",
270
172
  attrs: {
271
- src: a.url
173
+ src: o.url
272
174
  }
273
175
  }) : i("i", {
274
- staticClass: "avue-upload__avatar el-icon-document",
275
- attrs: {
276
- src: a.url
277
- }
176
+ staticClass: "avue-upload__avatar el-icon-document"
278
177
  }), i("span", {
279
178
  staticClass: "el-upload-list__item-actions"
280
179
  }, [i("span", {
@@ -282,8 +181,8 @@ var q = function() {
282
181
  }, [i("i", {
283
182
  staticClass: "el-icon-zoom-in",
284
183
  on: {
285
- click: function(n) {
286
- return n.stopPropagation(), t.handlePreview(a);
184
+ click: function(a) {
185
+ return a.stopPropagation(), t.handlePreview(o);
287
186
  }
288
187
  }
289
188
  })]), i("span", {
@@ -291,48 +190,48 @@ var q = function() {
291
190
  }, [t.disabled ? t._e() : i("i", {
292
191
  staticClass: "el-icon-delete",
293
192
  on: {
294
- click: function(n) {
295
- return n.stopPropagation(), t.handleRemove(a);
193
+ click: function(a) {
194
+ return a.stopPropagation(), t.handleRemove(o);
296
195
  }
297
196
  }
298
197
  })])])], 1) : t.listType === "picture" ? i("span", {
299
198
  on: {
300
- click: function(n) {
301
- return n.stopPropagation(), t.handlePreview(a);
199
+ click: function(a) {
200
+ return a.stopPropagation(), t.handlePreview(o);
302
201
  }
303
202
  }
304
- }, [i(a.type, {
203
+ }, [i(o.type, {
305
204
  tag: "Component",
306
205
  staticClass: "el-upload-list__item-thumbnail",
307
206
  attrs: {
308
- src: a.url
207
+ src: o.url
309
208
  }
310
209
  }), i("a", {
311
210
  staticClass: "el-upload-list__item-name"
312
211
  }, [i("i", {
313
212
  staticClass: "el-icon-document"
314
- }), t._v(" " + t._s(a.name) + " ")]), i("i", {
213
+ }), t._v(" " + t._s(o.name) + " ")]), i("i", {
315
214
  staticClass: "el-icon-close",
316
215
  on: {
317
- click: function(n) {
318
- return n.stopPropagation(), t.handleRemove(a);
216
+ click: function(a) {
217
+ return a.stopPropagation(), t.handleRemove(o);
319
218
  }
320
219
  }
321
220
  })], 1) : i("span", {
322
221
  on: {
323
- click: function(n) {
324
- return n.stopPropagation(), t.handlePreview(a);
222
+ click: function(a) {
223
+ return a.stopPropagation(), t.handlePreview(o);
325
224
  }
326
225
  }
327
226
  }, [i("a", {
328
227
  staticClass: "el-upload-list__item-name"
329
228
  }, [i("i", {
330
229
  staticClass: "el-icon-document"
331
- }), 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", {
332
231
  staticClass: "el-icon-close",
333
232
  on: {
334
- click: function(n) {
335
- return n.stopPropagation(), t.handleRemove(a);
233
+ click: function(a) {
234
+ return a.stopPropagation(), t.handleRemove(o);
336
235
  }
337
236
  }
338
237
  })])];
@@ -351,17 +250,14 @@ var q = function() {
351
250
  src: t.imgUrl
352
251
  },
353
252
  on: {
354
- mouseover: function(o) {
253
+ mouseover: function(s) {
355
254
  t.menu = !0;
356
255
  }
357
256
  }
358
257
  }) : t.imgUrl ? i("i", {
359
258
  staticClass: "avue-upload__avatar el-icon-document",
360
- attrs: {
361
- src: t.imgUrl
362
- },
363
259
  on: {
364
- mouseover: function(o) {
260
+ mouseover: function(s) {
365
261
  t.menu = !0;
366
262
  }
367
263
  }
@@ -370,23 +266,21 @@ var q = function() {
370
266
  }), t.menu ? i("div", {
371
267
  staticClass: "el-upload-list__item-actions avue-upload__menu",
372
268
  on: {
373
- mouseover: function(o) {
269
+ mouseover: function(s) {
374
270
  t.menu = !0;
375
271
  },
376
- mouseout: function(o) {
272
+ mouseout: function(s) {
377
273
  t.menu = !1;
378
274
  },
379
- click: function(o) {
380
- return o.stopPropagation(), function() {
381
- return !1;
382
- }.apply(null, arguments);
275
+ click: function(s) {
276
+ s.stopPropagation();
383
277
  }
384
278
  }
385
279
  }, [i("i", {
386
280
  staticClass: "el-icon-zoom-in",
387
281
  on: {
388
- click: function(o) {
389
- return o.stopPropagation(), t.handlePreview({
282
+ click: function(s) {
283
+ return s.stopPropagation(), t.handlePreview({
390
284
  url: t.imgUrl
391
285
  });
392
286
  }
@@ -394,8 +288,8 @@ var q = function() {
394
288
  }), t.disabled ? t._e() : i("i", {
395
289
  staticClass: "el-icon-delete",
396
290
  on: {
397
- click: function(o) {
398
- return o.stopPropagation(), t.handleDelete(t.imgUrl);
291
+ click: function(s) {
292
+ return s.stopPropagation(), t.handleDelete(t.imgUrl);
399
293
  }
400
294
  }
401
295
  })]) : t._e()]] : t.dragFile ? [i("i", {
@@ -408,23 +302,14 @@ var q = function() {
408
302
  size: t.size,
409
303
  type: "primary"
410
304
  }
411
- }, [t._v(" " + t._s(t.fileText || "上传") + " ")])], i("div", {
412
- staticClass: "el-upload__tip",
413
- attrs: {
414
- slot: "tip"
415
- },
416
- domProps: {
417
- innerHTML: t._s(t.tip)
418
- },
419
- slot: "tip"
420
- })], 2)], 1);
421
- }, V = [];
422
- function b(t, e = "") {
305
+ }, [t._v(" " + t._s(t.fileText || "上传") + " ")])]], 2)], 1);
306
+ }, W = [];
307
+ function A(t, e = "") {
423
308
  return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e;
424
309
  }
425
- const H = {
310
+ const X = {
426
311
  name: "FyUpload",
427
- mixins: [j, z],
312
+ mixins: [I, N],
428
313
  props: {
429
314
  qiniu: Object,
430
315
  ali: Object,
@@ -519,21 +404,22 @@ const H = {
519
404
  isPictureImg() {
520
405
  return this.listType === "picture-img";
521
406
  },
522
- //单个头像图片
407
+ // 单个头像图片
523
408
  imgUrl() {
524
- return x(this.text) ? null : b(this.homeUrl, this.text[0]);
409
+ return b(this.text) ? null : A(this.homeUrl, this.text[0]);
525
410
  },
526
411
  fileList() {
527
- let t = [];
412
+ const t = [];
528
413
  return (this.text || []).forEach((e, i) => {
529
414
  if (e) {
530
- let o = this.isObject ? e[this.labelKey] : e.substring(e.lastIndexOf("/") + 1), a = this.isObject ? e[this.valueKey] : e;
531
- a = b(this.homeUrl, a), t.push({
532
- 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}`,
533
419
  status: "done",
534
- type: this.isMediaType(a),
535
- name: o,
536
- url: a
420
+ type: this.isMediaType(o),
421
+ name: s,
422
+ url: o
537
423
  });
538
424
  }
539
425
  }), t;
@@ -544,11 +430,11 @@ const H = {
544
430
  },
545
431
  methods: {
546
432
  isMediaType(t) {
547
- return w(t, this.fileType);
433
+ return k(t, this.fileType);
548
434
  },
549
435
  setSort() {
550
436
  if (!window.Sortable) {
551
- S.logs("Sortable");
437
+ F.logs("Sortable");
552
438
  return;
553
439
  }
554
440
  const t = this.$el.querySelectorAll(".avue-upload > ul")[0];
@@ -564,7 +450,7 @@ const H = {
564
450
  if (this.isPictureImg)
565
451
  this.text.splice(0, 1, t[this.urlKey]);
566
452
  else if (this.isObject) {
567
- let e = {};
453
+ const e = {};
568
454
  e[this.labelKey] = t[this.nameKey], e[this.valueKey] = t[this.urlKey], this.text.push(e);
569
455
  } else
570
456
  this.text.push(t[this.urlKey]);
@@ -579,8 +465,8 @@ const H = {
579
465
  },
580
466
  delete(t) {
581
467
  (this.text || []).forEach((e, i) => {
582
- let o = this.isObject ? e[this.valueKey] : e;
583
- b(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);
584
470
  });
585
471
  },
586
472
  show(t) {
@@ -600,67 +486,67 @@ const H = {
600
486
  this.loading = !0;
601
487
  let e = t.file;
602
488
  const i = e.size / 1024;
603
- if (!x(i) && i > this.fileSize) {
489
+ if (!b(i) && i > this.fileSize) {
604
490
  this.hide("文件太大不符合");
605
491
  return;
606
492
  }
607
- const o = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
608
- let a = {}, n = {}, l = new FormData();
609
- const d = () => {
610
- const p = (v) => {
611
- let g = this.action;
612
- for (let r in this.data)
613
- l.append(r, this.data[r]);
614
- const _ = v || e;
615
- if (l.append(this.fileName, _), this.isQiniuOss) {
493
+ const s = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
494
+ let o = {}, a = {};
495
+ const r = new FormData(), p = () => {
496
+ const f = (x) => {
497
+ let v = this.action;
498
+ for (const c in this.data)
499
+ r.append(c, this.data[c]);
500
+ const C = x || e;
501
+ if (r.append(this.fileName, C), this.isQiniuOss) {
616
502
  if (!window.CryptoJS) {
617
- S.logs("CryptoJS"), this.hide();
503
+ F.logs("CryptoJS"), this.hide();
618
504
  return;
619
505
  }
620
- a = this.qiniu || this.$AVUE.qiniu;
621
- const r = B(a.AK, a.SK, {
622
- scope: a.scope,
623
- 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
624
510
  });
625
- l.append("token", r), g = a.bucket;
511
+ r.append("token", c), v = o.bucket;
626
512
  } else if (this.isAliOss) {
627
513
  if (!window.OSS) {
628
- S.logs("AliOSS"), this.hide();
514
+ F.logs("AliOSS"), this.hide();
629
515
  return;
630
516
  }
631
- a = this.ali || this.$AVUE.ali, n = M(a);
517
+ o = this.ali || this.$AVUE.ali, a = H(o);
632
518
  }
633
- (() => this.isAliOss ? n.put(_.name, _, {
519
+ (() => this.isAliOss ? a.put(C.name, C, {
634
520
  headers: this.headers
635
- }) : this.$axios.post(g, l, { headers: o }))().then((r) => {
636
- this.res = {}, this.isQiniuOss && (r.data.key = a.url + r.data.key), this.res = D(this.isAliOss ? r : r.data, this.resKey), typeof this.uploadAfter == "function" ? this.uploadAfter(this.res, this.show, this.hide, this.column) : this.show();
637
- }).catch((r) => {
638
- this.hide(r);
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();
523
+ }).catch((c) => {
524
+ this.hide(c);
639
525
  });
640
526
  };
641
- typeof this.uploadBefore == "function" ? this.uploadBefore(e, p, this.hide, this.column) : p();
527
+ typeof this.uploadBefore == "function" ? this.uploadBefore(e, f, this.hide, this.column) : f();
642
528
  };
643
- if (w(e.name) != "img") {
644
- d();
529
+ if (k(e.name) !== "img") {
530
+ p();
645
531
  return;
646
532
  }
647
- const y = () => {
648
- x(this.canvasOption) ? d() : $(e, this.canvasOption, (p) => {
649
- e = p, d();
533
+ const w = () => {
534
+ b(this.canvasOption) ? p() : D(e, this.canvasOption, (f) => {
535
+ e = f, p();
650
536
  });
651
537
  };
652
- x(this.cropperOption) ? y() : A(e, (p) => {
653
- let v = Object.assign(this.cropperOption, {
654
- img: p,
538
+ b(this.cropperOption) ? w() : P(e, (f) => {
539
+ const x = Object.assign(this.cropperOption, {
540
+ img: f,
655
541
  type: "file",
656
- callback: (g) => {
657
- e = g, y();
542
+ callback: (v) => {
543
+ e = v, w();
658
544
  },
659
545
  cancel: () => {
660
546
  this.loading = !1;
661
547
  }
662
548
  });
663
- this.$ImageCropper(v);
549
+ this.$ImageCropper(x);
664
550
  });
665
551
  },
666
552
  handleExceed(t, e) {
@@ -668,7 +554,7 @@ const H = {
668
554
  },
669
555
  handlePreview(t) {
670
556
  const e = () => {
671
- let i = this.fileList.findIndex((o) => o.url === t.url);
557
+ const i = this.fileList.findIndex((s) => s.url === t.url);
672
558
  this.$ImagePreview(this.fileList, i);
673
559
  };
674
560
  typeof this.uploadPreview == "function" ? this.uploadPreview(t, this.column, e) : e();
@@ -682,24 +568,24 @@ const H = {
682
568
  return typeof this.uploadDelete == "function" ? this.uploadDelete(t, this.column) : Promise.resolve();
683
569
  }
684
570
  }
685
- }, F = {};
686
- var J = /* @__PURE__ */ I(
687
- H,
688
- q,
689
- V,
690
- !1,
571
+ }, T = {};
572
+ var Y = /* @__PURE__ */ L(
573
+ X,
691
574
  Q,
575
+ W,
576
+ !1,
577
+ G,
692
578
  null,
693
579
  null,
694
580
  null
695
581
  );
696
- function Q(t) {
697
- for (let e in F)
698
- this[e] = F[e];
582
+ function G(t) {
583
+ for (let e in T)
584
+ this[e] = T[e];
699
585
  }
700
- const tt = /* @__PURE__ */ function() {
701
- return J.exports;
586
+ const st = /* @__PURE__ */ function() {
587
+ return Y.exports;
702
588
  }();
703
589
  export {
704
- tt as default
590
+ st as default
705
591
  };