@web-utils/component 2.0.14 → 2.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.
Files changed (248) hide show
  1. package/dist/chunks/config.46422d7f.js +73 -0
  2. package/dist/chunks/{3a79781b.js → confirmable-mixin.3a79781b.js} +0 -0
  3. package/dist/chunks/dataformat.fb35ee10.js +61 -0
  4. package/dist/chunks/detail.a3249549.js +28 -0
  5. package/dist/chunks/dic.5f7e3523.js +132 -0
  6. package/dist/chunks/event.50c365eb.js +235 -0
  7. package/dist/chunks/{76680a03.js → form-input-mixin.ff5b58f7.js} +2 -2
  8. package/dist/chunks/{b4acd3a6.js → form-item-mixin.79f6eaff.js} +3 -1
  9. package/dist/chunks/{61ad06b2.js → form-pick-mixin.61ad06b2.js} +0 -0
  10. package/dist/chunks/init.352281f5.js +121 -0
  11. package/dist/chunks/{41a066be.js → input-number-mixin.41a066be.js} +0 -0
  12. package/dist/chunks/{5a78e0db.js → mixins.5a78e0db.js} +0 -0
  13. package/dist/chunks/packages.5d7a86c4.js +114 -0
  14. package/dist/chunks/permission.ce5d2121.js +16 -0
  15. package/dist/chunks/slot.1b8d2b1b.js +27 -0
  16. package/dist/chunks/{8c0142e0.js → tab-mixin.8c0142e0.js} +0 -0
  17. package/dist/chunks/util.5053d54e.js +264 -0
  18. package/dist/chunks/{97652d86.js → utils.97652d86.js} +0 -0
  19. package/dist/chunks/{f71045fc.js → utils.fa73de78.js} +1 -0
  20. package/dist/chunks/{5d4282fb.js → vueComponentNormalizer.71e2aa87.js} +3 -1
  21. package/dist/components/address-input/index.js +1 -1
  22. package/dist/components/affix/index.js +102 -0
  23. package/dist/components/affix/style.css +1 -0
  24. package/dist/components/array/index.js +156 -0
  25. package/dist/components/array/style.css +1 -0
  26. package/dist/components/article/index.js +93 -0
  27. package/dist/components/article/style.css +1 -0
  28. package/dist/components/aside-menu/index.js +1 -1
  29. package/dist/components/avatar/index.js +106 -0
  30. package/dist/components/avatar/style.css +1 -0
  31. package/dist/components/awesome-button/index.js +1 -1
  32. package/dist/components/base.css +1 -1
  33. package/dist/components/capsule-tab/index.js +1 -1
  34. package/dist/components/card/index.js +130 -0
  35. package/dist/components/card/style.css +1 -0
  36. package/dist/components/carousel/index.js +70 -0
  37. package/dist/components/carousel/style.css +1 -0
  38. package/dist/components/chat/index.js +567 -0
  39. package/dist/components/chat/style.css +1 -0
  40. package/dist/components/chunk-file-uploader/index.js +2 -2
  41. package/dist/components/chunk-file-uploader-button/index.js +2 -2
  42. package/dist/components/chunk-file-uploader-drop/index.js +2 -2
  43. package/dist/components/chunk-file-uploader-file/index.js +2 -2
  44. package/dist/components/chunk-file-uploader-files/index.js +2 -2
  45. package/dist/components/chunk-file-uploader-list/index.js +2 -2
  46. package/dist/components/chunk-file-uploader-un-support/index.js +2 -2
  47. package/dist/components/code/index.js +66 -0
  48. package/dist/components/code-mirror-editor/index.js +4 -1
  49. package/dist/components/color-picker/index.js +1 -1
  50. package/dist/components/column/index.js +114 -0
  51. package/dist/components/column-default/index.js +105 -0
  52. package/dist/components/column-dynamic/index.js +93 -0
  53. package/dist/components/column-menu/index.js +286 -0
  54. package/dist/components/column-slot/index.js +265 -0
  55. package/dist/components/comment/index.js +94 -0
  56. package/dist/components/comment/style.css +1 -0
  57. package/dist/components/confirm-button/index.js +2 -2
  58. package/dist/components/confirmable/index.js +2 -2
  59. package/dist/components/context-menu/index.js +11 -1
  60. package/dist/components/count-up/index.js +120 -0
  61. package/dist/components/custom-scrollbar/index.js +2 -2
  62. package/dist/components/data-box/index.js +97 -0
  63. package/dist/components/data-box/style.css +1 -0
  64. package/dist/components/data-card/index.js +98 -0
  65. package/dist/components/data-card/style.css +1 -0
  66. package/dist/components/data-cardtext/index.js +82 -0
  67. package/dist/components/data-cardtext/style.css +1 -0
  68. package/dist/components/data-display/index.js +93 -0
  69. package/dist/components/data-display/style.css +1 -0
  70. package/dist/components/data-icons/index.js +104 -0
  71. package/dist/components/data-icons/style.css +1 -0
  72. package/dist/components/data-imgtext/index.js +106 -0
  73. package/dist/components/data-imgtext/style.css +1 -0
  74. package/dist/components/data-operatext/index.js +99 -0
  75. package/dist/components/data-operatext/style.css +1 -0
  76. package/dist/components/data-panel/index.js +93 -0
  77. package/dist/components/data-panel/style.css +1 -0
  78. package/dist/components/data-pay/index.js +149 -0
  79. package/dist/components/data-pay/style.css +1 -0
  80. package/dist/components/data-price/index.js +84 -0
  81. package/dist/components/data-price/style.css +1 -0
  82. package/dist/components/data-progress/index.js +97 -0
  83. package/dist/components/data-progress/style.css +1 -0
  84. package/dist/components/data-rotate/index.js +96 -0
  85. package/dist/components/data-rotate/style.css +1 -0
  86. package/dist/components/data-table-picker/index.js +2 -2
  87. package/dist/components/data-tabs/index.js +94 -0
  88. package/dist/components/data-tabs/style.css +1 -0
  89. package/dist/components/dialog-column/index.js +138 -0
  90. package/dist/components/dialog-excel/index.js +214 -0
  91. package/dist/components/dialog-filter/index.js +245 -0
  92. package/dist/components/dialog-form/index.js +275 -0
  93. package/dist/components/draggable/index.js +384 -0
  94. package/dist/components/draggable/style.css +1 -0
  95. package/dist/components/dynamic-table/index.js +1 -1
  96. package/dist/components/e-charts/index.js +7 -1
  97. package/dist/components/editable-progress/index.js +1 -1
  98. package/dist/components/editable-tree/index.js +2 -2
  99. package/dist/components/egd-collapse/index.js +1 -1
  100. package/dist/components/egd-collapse-item/index.js +1 -1
  101. package/dist/components/element-dialog/index.js +1 -1
  102. package/dist/components/empty/index.js +59 -0
  103. package/dist/components/empty/style.css +1 -0
  104. package/dist/components/empty-view/index.js +1 -1
  105. package/dist/components/error-view/index.js +1 -1
  106. package/dist/components/flex-column/index.js +2 -2
  107. package/dist/components/flex-item/index.js +2 -2
  108. package/dist/components/flex-row/index.js +2 -2
  109. package/dist/components/flex-scroller/index.js +1 -1
  110. package/dist/components/flow/index.js +278 -0
  111. package/dist/components/flow/style.css +1 -0
  112. package/dist/components/flow-node/index.js +102 -0
  113. package/dist/components/form-button/index.js +2 -2
  114. package/dist/components/form-cascader/index.js +4 -4
  115. package/dist/components/form-checkbox-group/index.js +4 -4
  116. package/dist/components/form-date-picker/index.js +4 -4
  117. package/dist/components/form-group/index.js +122 -0
  118. package/dist/components/form-group/style.css +1 -0
  119. package/dist/components/form-holder/index.js +23 -2
  120. package/dist/components/form-input/index.js +3 -3
  121. package/dist/components/form-input-email/index.js +3 -3
  122. package/dist/components/form-input-id-card/index.js +3 -3
  123. package/dist/components/form-input-number/index.js +4 -4
  124. package/dist/components/form-input-phone-number/index.js +3 -3
  125. package/dist/components/form-input-time/index.js +3 -3
  126. package/dist/components/form-item/index.js +2 -2
  127. package/dist/components/form-item-config-provider/index.js +1 -1
  128. package/dist/components/form-item-group/index.js +1 -1
  129. package/dist/components/form-radio-group/index.js +4 -4
  130. package/dist/components/form-select/index.js +4 -4
  131. package/dist/components/form-switch/index.js +3 -3
  132. package/dist/components/form-temp/index.js +149 -0
  133. package/dist/components/form-textarea/index.js +3 -3
  134. package/dist/components/form-view/index.js +1 -1
  135. package/dist/components/fy-cascader/index.js +132 -0
  136. package/dist/components/fy-checkbox/index.js +116 -0
  137. package/dist/components/fy-checkbox/style.css +1 -0
  138. package/dist/components/fy-curd/index.js +846 -0
  139. package/dist/components/fy-curd/style.css +1 -0
  140. package/dist/components/fy-date/index.js +84 -0
  141. package/dist/components/fy-date/style.css +1 -0
  142. package/dist/components/fy-dialog-form/index.js +278 -0
  143. package/dist/components/fy-dialog-form/style.css +1 -0
  144. package/dist/components/fy-dynamic/index.js +335 -0
  145. package/dist/components/fy-dynamic/style.css +1 -0
  146. package/dist/components/fy-form/index.js +754 -0
  147. package/dist/components/fy-form/style.css +1 -0
  148. package/dist/components/fy-form-menu/index.js +95 -0
  149. package/dist/components/fy-input/index.js +162 -0
  150. package/dist/components/fy-input-color/index.js +96 -0
  151. package/dist/components/fy-input-icon/index.js +161 -0
  152. package/dist/components/fy-input-icon/style.css +1 -0
  153. package/dist/components/fy-input-map/index.js +275 -0
  154. package/dist/components/fy-input-map/style.css +1 -0
  155. package/dist/components/fy-input-number/index.js +87 -0
  156. package/dist/components/fy-input-table/index.js +172 -0
  157. package/dist/components/fy-input-table/style.css +1 -0
  158. package/dist/components/fy-input-tree/index.js +265 -0
  159. package/dist/components/fy-input-tree/style.css +1 -0
  160. package/dist/components/fy-radio/index.js +68 -0
  161. package/dist/components/fy-radio/style.css +1 -0
  162. package/dist/components/fy-rate/index.js +105 -0
  163. package/dist/components/fy-rate/style.css +1 -0
  164. package/dist/components/fy-select/index.js +223 -0
  165. package/dist/components/fy-select/style.css +1 -0
  166. package/dist/components/fy-slider/index.js +79 -0
  167. package/dist/components/fy-switch/index.js +73 -0
  168. package/dist/components/fy-time/index.js +95 -0
  169. package/dist/components/fy-title/index.js +40 -0
  170. package/dist/components/fy-title/style.css +1 -0
  171. package/dist/components/fy-upload/index.js +704 -0
  172. package/dist/components/fy-upload/style.css +1 -0
  173. package/dist/components/guide-steps/index.js +1 -1
  174. package/dist/components/header-menu/index.js +238 -0
  175. package/dist/components/header-search/index.js +246 -0
  176. package/dist/components/icon-card/index.js +1 -1
  177. package/dist/components/icon-temp/index.js +50 -0
  178. package/dist/components/icon-temp/style.css +1 -0
  179. package/dist/components/iframe-window/index.js +1 -1
  180. package/dist/components/image-viewer/index.js +1 -1
  181. package/dist/components/input-number/index.js +2 -2
  182. package/dist/components/input-number-range/index.js +1 -1
  183. package/dist/components/keep-view-alive/index.js +6 -2
  184. package/dist/components/keyboard/index.js +389 -0
  185. package/dist/components/keyboard/style.css +1 -0
  186. package/dist/components/license/index.js +134 -0
  187. package/dist/components/loading-view/index.js +1 -1
  188. package/dist/components/login/index.js +244 -0
  189. package/dist/components/login/style.css +1 -0
  190. package/dist/components/name-avatar/index.js +66 -0
  191. package/dist/components/name-avatar/style.css +1 -0
  192. package/dist/components/nav-bar/index.js +1 -1
  193. package/dist/components/not-implement/index.js +1 -1
  194. package/dist/components/notice/index.js +143 -0
  195. package/dist/components/notice/style.css +1 -0
  196. package/dist/components/page/index.js +1 -1
  197. package/dist/components/page-header/index.js +1 -1
  198. package/dist/components/page-index/index.js +1 -1
  199. package/dist/components/page-index-top/index.js +1 -1
  200. package/dist/components/page-skeleton/index.js +1 -1
  201. package/dist/components/page-skeleton-new/index.js +1 -1
  202. package/dist/components/pageable-table/index.js +6 -2
  203. package/dist/components/pageable-view/index.js +7 -2
  204. package/dist/components/photo-swipe/index.js +7 -1
  205. package/dist/components/progress/index.js +60 -0
  206. package/dist/components/queue/index.js +76 -0
  207. package/dist/components/record-video/index.js +173 -0
  208. package/dist/components/record-video/style.css +1 -0
  209. package/dist/components/resize-observer/index.js +2 -2
  210. package/dist/components/search/index.js +142 -0
  211. package/dist/components/search/style.css +1 -0
  212. package/dist/components/search-popover/index.js +1 -1
  213. package/dist/components/sign/index.js +128 -0
  214. package/dist/components/sign/style.css +1 -0
  215. package/dist/components/sign-panel/index.js +14 -1
  216. package/dist/components/skeleton/index.js +82 -0
  217. package/dist/components/skeleton/style.css +1 -0
  218. package/dist/components/split-pane/index.js +7 -1
  219. package/dist/components/stateful/index.js +1 -1
  220. package/dist/components/static-pageable-table/index.js +1 -1
  221. package/dist/components/swiper/index.js +1 -1
  222. package/dist/components/tab/index.js +4 -2
  223. package/dist/components/tab-item/index.js +2 -2
  224. package/dist/components/table-column/index.js +1 -1
  225. package/dist/components/table-page/index.js +129 -0
  226. package/dist/components/table-view/index.js +2 -2
  227. package/dist/components/tabs/index.js +90 -0
  228. package/dist/components/tabs/style.css +0 -0
  229. package/dist/components/tag-render/index.js +1 -1
  230. package/dist/components/text-ellipsis/index.js +107 -0
  231. package/dist/components/text-ellipsis/style.css +1 -0
  232. package/dist/components/tinymce-editor/index.js +1 -1
  233. package/dist/components/tinymce-wrapper/index.js +1 -1
  234. package/dist/components/toolbar/index.js +1 -1
  235. package/dist/components/toolbar-button/index.js +1 -1
  236. package/dist/components/tree/index.js +427 -0
  237. package/dist/components/tree/style.css +1 -0
  238. package/dist/components/trigger/index.js +1 -1
  239. package/dist/components/verify/index.js +80 -0
  240. package/dist/components/verify/style.css +1 -0
  241. package/dist/components/vue-tags-input/index.js +115 -1
  242. package/dist/components/watermark/index.js +20 -2
  243. package/dist/index.css +4128 -745
  244. package/dist/index.es.js +21634 -7064
  245. package/package.json +20 -4
  246. package/web-types.json +12777 -2788
  247. package/dist/components/x-dialog/index.js +0 -173
  248. package/dist/components/x-dialog/style.css +0 -1
@@ -0,0 +1,704 @@
1
+ import { p as j, e as z } from "../../chunks/event.50c365eb.js";
2
+ import { C as R, c as x, i as w, m as D } from "../../chunks/util.5053d54e.js";
3
+ import { p as S } from "../../chunks/packages.5d7a86c4.js";
4
+ import { n as I } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
5
+ function A(t, e) {
6
+ var i = new FileReader();
7
+ i.readAsDataURL(t), i.onload = function(o) {
8
+ e(o.target.result);
9
+ };
10
+ }
11
+ function $(t, e = {}, i) {
12
+ const { text: o, fontFamily: a, color: n, fontSize: l, opacity: d, bottom: y, right: p, ratio: v } = e;
13
+ g(), A(t, _);
14
+ function g() {
15
+ 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;
16
+ }
17
+ function _(f) {
18
+ var c = new Image();
19
+ c.src = f, c.onload = function() {
20
+ var h = c.width, s = c.height;
21
+ r(h, s), ctx.drawImage(c, 0, 0, h, s), O(h, s);
22
+ const m = document.getElementById("canvas").toDataURL(t.type, config.ratio), C = R(m, t.name);
23
+ i && i(C);
24
+ };
25
+ }
26
+ function r(f, c) {
27
+ 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;
28
+ }
29
+ function O(f, c) {
30
+ var h = config.text, s = k(h, f, c);
31
+ ctx.font = s.fontSize + "px " + config.fontFamily, ctx.fillStyle = config.color, ctx.globalAlpha = config.opacity / 100, ctx.fillText(h, s.x, s.y);
32
+ }
33
+ function k(f, c, h) {
34
+ var s, m, C = config.fontSize / configDefault.width, T = C * c;
35
+ 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;
36
+ var P = Number(ctx.measureText(f).width);
37
+ s = s - P;
38
+ var E = s / configDefault.width, U = m / configDefault.height;
39
+ return s = E * c, m = U * h, {
40
+ x: s,
41
+ y: m,
42
+ fontSize: T
43
+ };
44
+ }
45
+ }
46
+ const L = (t, e, i) => {
47
+ var o = JSON.stringify(i);
48
+ __ENV__ === "development" && console && console.log("put_policy = ", o);
49
+ var a = B(N(o));
50
+ __ENV__ === "development" && console && console.log("encoded = ", a);
51
+ var n = CryptoJS.HmacSHA1(a, e), l = n.toString(CryptoJS.enc.Base64);
52
+ __ENV__ === "development" && console && console.log("encoded_signed=", l);
53
+ var d = t + ":" + K(l) + ":" + a;
54
+ return __ENV__ === "development" && console && console.log("upload_token=", d), d;
55
+ };
56
+ function N(t) {
57
+ var e, i, o, a;
58
+ for (e = "", o = t.length, i = 0; i < o; i++)
59
+ 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));
60
+ return e;
61
+ }
62
+ var u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
63
+ new Array(
64
+ -1,
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
+ 62,
108
+ -1,
109
+ -1,
110
+ -1,
111
+ 63,
112
+ 52,
113
+ 53,
114
+ 54,
115
+ 55,
116
+ 56,
117
+ 57,
118
+ 58,
119
+ 59,
120
+ 60,
121
+ 61,
122
+ -1,
123
+ -1,
124
+ -1,
125
+ -1,
126
+ -1,
127
+ -1,
128
+ -1,
129
+ 0,
130
+ 1,
131
+ 2,
132
+ 3,
133
+ 4,
134
+ 5,
135
+ 6,
136
+ 7,
137
+ 8,
138
+ 9,
139
+ 10,
140
+ 11,
141
+ 12,
142
+ 13,
143
+ 14,
144
+ 15,
145
+ 16,
146
+ 17,
147
+ 18,
148
+ 19,
149
+ 20,
150
+ 21,
151
+ 22,
152
+ 23,
153
+ 24,
154
+ 25,
155
+ -1,
156
+ -1,
157
+ -1,
158
+ -1,
159
+ -1,
160
+ -1,
161
+ 26,
162
+ 27,
163
+ 28,
164
+ 29,
165
+ 30,
166
+ 31,
167
+ 32,
168
+ 33,
169
+ 34,
170
+ 35,
171
+ 36,
172
+ 37,
173
+ 38,
174
+ 39,
175
+ 40,
176
+ 41,
177
+ 42,
178
+ 43,
179
+ 44,
180
+ 45,
181
+ 46,
182
+ 47,
183
+ 48,
184
+ 49,
185
+ 50,
186
+ 51,
187
+ -1,
188
+ -1,
189
+ -1,
190
+ -1,
191
+ -1
192
+ );
193
+ function B(t) {
194
+ var e, i, o, a, n, l;
195
+ for (o = t.length, i = 0, e = ""; i < o; ) {
196
+ if (a = t.charCodeAt(i++) & 255, i == o) {
197
+ e += u.charAt(a >> 2), e += u.charAt((a & 3) << 4), e += "==";
198
+ break;
199
+ }
200
+ if (n = t.charCodeAt(i++), i == o) {
201
+ e += u.charAt(a >> 2), e += u.charAt((a & 3) << 4 | (n & 240) >> 4), e += u.charAt((n & 15) << 2), e += "=";
202
+ break;
203
+ }
204
+ 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);
205
+ }
206
+ return e;
207
+ }
208
+ var K = function(t) {
209
+ return t = t.replace(/\+/g, "-"), t = t.replace(/\//g, "_"), t;
210
+ };
211
+ const M = (t) => {
212
+ var e = new OSS(t);
213
+ return e;
214
+ };
215
+ var q = function() {
216
+ var t = this, e = t.$createElement, i = t._self._c || e;
217
+ return i("div", {
218
+ directives: [{
219
+ name: "loading",
220
+ rawName: "v-loading.lock",
221
+ value: t.loading,
222
+ expression: "loading",
223
+ modifiers: {
224
+ lock: !0
225
+ }
226
+ }],
227
+ staticClass: "avue-upload",
228
+ attrs: {
229
+ "element-loading-text": t.loadText
230
+ }
231
+ }, [i("ElUpload", {
232
+ key: t.reload,
233
+ class: {
234
+ "avue-upload__list": t.listType === "picture-img",
235
+ "avue-upload__upload": t.disabled
236
+ },
237
+ attrs: {
238
+ action: t.action,
239
+ "on-remove": t.handleRemove,
240
+ accept: t.acceptList,
241
+ "before-remove": t.beforeRemove,
242
+ multiple: t.multiple,
243
+ "on-preview": t.handlePreview,
244
+ limit: t.limit,
245
+ "http-request": t.httpUpload,
246
+ readonly: t.readonly,
247
+ drag: t.dragFile,
248
+ "show-file-list": t.isPictureImg ? !1 : t.showFileList,
249
+ "list-type": t.listType,
250
+ "on-change": t.handleFileChange,
251
+ "on-exceed": t.handleExceed,
252
+ disabled: t.disabled,
253
+ "file-list": t.fileList
254
+ },
255
+ nativeOn: {
256
+ click: function(o) {
257
+ return t.handleClick.apply(null, arguments);
258
+ }
259
+ },
260
+ scopedSlots: t._u([{
261
+ key: "file",
262
+ fn: function(o) {
263
+ var a = o.file;
264
+ return [t.$scopedSlots.default ? t._t("default", null, {
265
+ file: a
266
+ }) : t.listType === "picture-card" ? i("span", [t.isMediaType(a.url) ? i(a.type, {
267
+ tag: "Component",
268
+ staticClass: "el-upload-list__item-thumbnail",
269
+ attrs: {
270
+ src: a.url
271
+ }
272
+ }) : i("i", {
273
+ staticClass: "avue-upload__avatar el-icon-document",
274
+ attrs: {
275
+ src: a.url
276
+ }
277
+ }), i("span", {
278
+ staticClass: "el-upload-list__item-actions"
279
+ }, [i("span", {
280
+ staticClass: "el-upload-list__item-preview"
281
+ }, [i("i", {
282
+ staticClass: "el-icon-zoom-in",
283
+ on: {
284
+ click: function(n) {
285
+ return n.stopPropagation(), t.handlePreview(a);
286
+ }
287
+ }
288
+ })]), i("span", {
289
+ staticClass: "el-upload-list__item-delete"
290
+ }, [t.disabled ? t._e() : i("i", {
291
+ staticClass: "el-icon-delete",
292
+ on: {
293
+ click: function(n) {
294
+ return n.stopPropagation(), t.handleRemove(a);
295
+ }
296
+ }
297
+ })])])], 1) : t.listType === "picture" ? i("span", {
298
+ on: {
299
+ click: function(n) {
300
+ return n.stopPropagation(), t.handlePreview(a);
301
+ }
302
+ }
303
+ }, [i(a.type, {
304
+ tag: "Component",
305
+ staticClass: "el-upload-list__item-thumbnail",
306
+ attrs: {
307
+ src: a.url
308
+ }
309
+ }), i("a", {
310
+ staticClass: "el-upload-list__item-name"
311
+ }, [i("i", {
312
+ staticClass: "el-icon-document"
313
+ }), t._v(" " + t._s(a.name) + " ")]), i("i", {
314
+ staticClass: "el-icon-close",
315
+ on: {
316
+ click: function(n) {
317
+ return n.stopPropagation(), t.handleRemove(a);
318
+ }
319
+ }
320
+ })], 1) : i("span", {
321
+ on: {
322
+ click: function(n) {
323
+ return n.stopPropagation(), t.handlePreview(a);
324
+ }
325
+ }
326
+ }, [i("a", {
327
+ staticClass: "el-upload-list__item-name"
328
+ }, [i("i", {
329
+ staticClass: "el-icon-document"
330
+ }), t._v(" " + t._s(a.name) + " ")]), t.disabled ? t._e() : i("i", {
331
+ staticClass: "el-icon-close",
332
+ on: {
333
+ click: function(n) {
334
+ return n.stopPropagation(), t.handleRemove(a);
335
+ }
336
+ }
337
+ })])];
338
+ }
339
+ }], null, !0)
340
+ }, [t.listType === "picture-card" ? [i("i", {
341
+ staticClass: "el-icon-plus"
342
+ })] : t.listType === "picture-img" ? [t.$scopedSlots.default ? t._t("default", null, {
343
+ file: {
344
+ url: t.imgUrl
345
+ }
346
+ }) : [t.isMediaType(t.imgUrl) ? i(t.isMediaType(t.imgUrl), {
347
+ tag: "Component",
348
+ staticClass: "avue-upload__avatar",
349
+ attrs: {
350
+ src: t.imgUrl
351
+ },
352
+ on: {
353
+ mouseover: function(o) {
354
+ t.menu = !0;
355
+ }
356
+ }
357
+ }) : t.imgUrl ? i("i", {
358
+ staticClass: "avue-upload__avatar el-icon-document",
359
+ attrs: {
360
+ src: t.imgUrl
361
+ },
362
+ on: {
363
+ mouseover: function(o) {
364
+ t.menu = !0;
365
+ }
366
+ }
367
+ }) : i("i", {
368
+ staticClass: "el-icon-plus avue-upload__avatar"
369
+ }), t.menu ? i("div", {
370
+ staticClass: "el-upload-list__item-actions avue-upload__menu",
371
+ on: {
372
+ mouseover: function(o) {
373
+ t.menu = !0;
374
+ },
375
+ mouseout: function(o) {
376
+ t.menu = !1;
377
+ },
378
+ click: function(o) {
379
+ return o.stopPropagation(), function() {
380
+ return !1;
381
+ }.apply(null, arguments);
382
+ }
383
+ }
384
+ }, [i("i", {
385
+ staticClass: "el-icon-zoom-in",
386
+ on: {
387
+ click: function(o) {
388
+ return o.stopPropagation(), t.handlePreview({
389
+ url: t.imgUrl
390
+ });
391
+ }
392
+ }
393
+ }), t.disabled ? t._e() : i("i", {
394
+ staticClass: "el-icon-delete",
395
+ on: {
396
+ click: function(o) {
397
+ return o.stopPropagation(), t.handleDelete(t.imgUrl);
398
+ }
399
+ }
400
+ })]) : t._e()]] : t.dragFile ? [i("i", {
401
+ staticClass: "el-icon-upload"
402
+ }), i("div", {
403
+ staticClass: "el-upload__text"
404
+ }, [i("em", [t._v(t._s(t.fileText || "上传"))])])] : [i("ElButton", {
405
+ attrs: {
406
+ icon: "el-icon-upload",
407
+ size: t.size,
408
+ type: "primary"
409
+ }
410
+ }, [t._v(" " + t._s(t.fileText || "上传") + " ")])], i("div", {
411
+ staticClass: "el-upload__tip",
412
+ attrs: {
413
+ slot: "tip"
414
+ },
415
+ domProps: {
416
+ innerHTML: t._s(t.tip)
417
+ },
418
+ slot: "tip"
419
+ })], 2)], 1);
420
+ }, V = [];
421
+ function b(t, e = "") {
422
+ return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e;
423
+ }
424
+ const H = {
425
+ name: "FyUpload",
426
+ mixins: [j, z],
427
+ props: {
428
+ qiniu: Object,
429
+ ali: Object,
430
+ data: {
431
+ type: Object,
432
+ default: () => ({})
433
+ },
434
+ showFileList: {
435
+ type: Boolean,
436
+ default: !0
437
+ },
438
+ fileText: String,
439
+ fileType: {
440
+ type: String
441
+ },
442
+ oss: {
443
+ type: String
444
+ },
445
+ limit: {
446
+ type: Number
447
+ },
448
+ headers: {
449
+ type: Object,
450
+ default: () => ({})
451
+ },
452
+ accept: {
453
+ type: [String, Array],
454
+ default: ""
455
+ },
456
+ canvasOption: {
457
+ type: Object,
458
+ default: () => ({})
459
+ },
460
+ cropperOption: {
461
+ type: Object,
462
+ default: () => ({})
463
+ },
464
+ fileSize: {
465
+ type: Number
466
+ },
467
+ dragFile: {
468
+ type: Boolean,
469
+ default: !1
470
+ },
471
+ drag: {
472
+ type: Boolean,
473
+ default: !1
474
+ },
475
+ loadText: {
476
+ type: String,
477
+ default: "Loading..."
478
+ },
479
+ action: {
480
+ type: String,
481
+ default: ""
482
+ },
483
+ uploadBefore: Function,
484
+ uploadAfter: Function,
485
+ uploadDelete: Function,
486
+ uploadPreview: Function,
487
+ uploadError: Function,
488
+ uploadExceed: Function,
489
+ httpRequest: Function
490
+ },
491
+ data() {
492
+ return {
493
+ res: "",
494
+ loading: !1,
495
+ menu: !1,
496
+ reload: Math.random()
497
+ };
498
+ },
499
+ computed: {
500
+ isObject() {
501
+ return typeof this.text[0] == "object";
502
+ },
503
+ acceptList() {
504
+ return Array.isArray(this.accept) ? this.accept.join(",") : this.accept;
505
+ },
506
+ homeUrl() {
507
+ return this.propsHttp.home || "";
508
+ },
509
+ fileName() {
510
+ return this.propsHttp.fileName || "file";
511
+ },
512
+ isAliOss() {
513
+ return this.oss === "ali";
514
+ },
515
+ isQiniuOss() {
516
+ return this.oss === "qiniu";
517
+ },
518
+ isPictureImg() {
519
+ return this.listType === "picture-img";
520
+ },
521
+ //单个头像图片
522
+ imgUrl() {
523
+ return x(this.text) ? null : b(this.homeUrl, this.text[0]);
524
+ },
525
+ fileList() {
526
+ let t = [];
527
+ return (this.text || []).forEach((e, i) => {
528
+ if (e) {
529
+ let o = this.isObject ? e[this.labelKey] : e.substring(e.lastIndexOf("/") + 1), a = this.isObject ? e[this.valueKey] : e;
530
+ a = b(this.homeUrl, a), t.push({
531
+ uid: i + "",
532
+ status: "done",
533
+ type: this.isMediaType(a),
534
+ name: o,
535
+ url: a
536
+ });
537
+ }
538
+ }), t;
539
+ }
540
+ },
541
+ mounted() {
542
+ this.drag && this.setSort();
543
+ },
544
+ methods: {
545
+ isMediaType(t) {
546
+ return w(t, this.fileType);
547
+ },
548
+ setSort() {
549
+ if (!window.Sortable) {
550
+ S.logs("Sortable");
551
+ return;
552
+ }
553
+ const t = this.$el.querySelectorAll(".avue-upload > ul")[0];
554
+ window.Sortable.create(t, {
555
+ animation: 100,
556
+ onEnd: (e) => {
557
+ const i = this.text.splice(e.oldIndex, 1)[0];
558
+ this.text.splice(e.newIndex, 0, i), this.reload = Math.random(), this.$nextTick(() => this.setSort());
559
+ }
560
+ });
561
+ },
562
+ handleSuccess(t) {
563
+ if (this.isPictureImg)
564
+ this.text.splice(0, 1, t[this.urlKey]);
565
+ else if (this.isObject) {
566
+ let e = {};
567
+ e[this.labelKey] = t[this.nameKey], e[this.valueKey] = t[this.urlKey], this.text.push(e);
568
+ } else
569
+ this.text.push(t[this.urlKey]);
570
+ },
571
+ handleRemove(t, e) {
572
+ this.beforeRemove(t).then(() => {
573
+ this.delete(t);
574
+ });
575
+ },
576
+ handleError(t) {
577
+ this.uploadError && this.uploadError(t, this.column);
578
+ },
579
+ delete(t) {
580
+ (this.text || []).forEach((e, i) => {
581
+ let o = this.isObject ? e[this.valueKey] : e;
582
+ b(this.homeUrl, o) === t.url && this.text.splice(i, 1);
583
+ });
584
+ },
585
+ show(t) {
586
+ this.loading = !1, this.res = t || this.res, this.handleSuccess(this.res);
587
+ },
588
+ hide(t) {
589
+ this.loading = !1, t && this.handleError(t);
590
+ },
591
+ handleFileChange(t, e) {
592
+ e.splice(e.length - 1, 1);
593
+ },
594
+ httpUpload(t) {
595
+ if (typeof this.httpRequest == "function") {
596
+ this.httpRequest(t);
597
+ return;
598
+ }
599
+ this.loading = !0;
600
+ let e = t.file;
601
+ const i = e.size / 1024;
602
+ if (!x(i) && i > this.fileSize) {
603
+ this.hide("文件太大不符合");
604
+ return;
605
+ }
606
+ const o = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
607
+ let a = {}, n = {}, l = new FormData();
608
+ const d = () => {
609
+ const p = (v) => {
610
+ let g = this.action;
611
+ for (let r in this.data)
612
+ l.append(r, this.data[r]);
613
+ const _ = v || e;
614
+ if (l.append(this.fileName, _), this.isQiniuOss) {
615
+ if (!window.CryptoJS) {
616
+ S.logs("CryptoJS"), this.hide();
617
+ return;
618
+ }
619
+ a = this.qiniu || this.$AVUE.qiniu;
620
+ const r = L(a.AK, a.SK, {
621
+ scope: a.scope,
622
+ deadline: new Date().getTime() + a.deadline * 3600
623
+ });
624
+ l.append("token", r), g = a.bucket;
625
+ } else if (this.isAliOss) {
626
+ if (!window.OSS) {
627
+ S.logs("AliOSS"), this.hide();
628
+ return;
629
+ }
630
+ a = this.ali || this.$AVUE.ali, n = M(a);
631
+ }
632
+ (() => this.isAliOss ? n.put(_.name, _, {
633
+ headers: this.headers
634
+ }) : this.$axios.post(g, l, { headers: o }))().then((r) => {
635
+ 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();
636
+ }).catch((r) => {
637
+ this.hide(r);
638
+ });
639
+ };
640
+ typeof this.uploadBefore == "function" ? this.uploadBefore(e, p, this.hide, this.column) : p();
641
+ };
642
+ if (w(e.name) != "img") {
643
+ d();
644
+ return;
645
+ }
646
+ const y = () => {
647
+ x(this.canvasOption) ? d() : $(e, this.canvasOption, (p) => {
648
+ e = p, d();
649
+ });
650
+ };
651
+ x(this.cropperOption) ? y() : A(e, (p) => {
652
+ let v = Object.assign(this.cropperOption, {
653
+ img: p,
654
+ type: "file",
655
+ callback: (g) => {
656
+ e = g, y();
657
+ },
658
+ cancel: () => {
659
+ this.loading = !1;
660
+ }
661
+ });
662
+ this.$ImageCropper(v);
663
+ });
664
+ },
665
+ handleExceed(t, e) {
666
+ this.uploadExceed && this.uploadExceed(this.limit, t, e, this.column);
667
+ },
668
+ handlePreview(t) {
669
+ const e = () => {
670
+ let i = this.fileList.findIndex((o) => o.url === t.url);
671
+ this.$ImagePreview(this.fileList, i);
672
+ };
673
+ typeof this.uploadPreview == "function" ? this.uploadPreview(t, this.column, e) : e();
674
+ },
675
+ handleDelete(t) {
676
+ this.beforeRemove(t).then(() => {
677
+ this.text = [], this.menu = !1;
678
+ });
679
+ },
680
+ beforeRemove(t) {
681
+ return typeof this.uploadDelete == "function" ? this.uploadDelete(t, this.column) : Promise.resolve();
682
+ }
683
+ }
684
+ }, F = {};
685
+ var J = /* @__PURE__ */ I(
686
+ H,
687
+ q,
688
+ V,
689
+ !1,
690
+ Q,
691
+ null,
692
+ null,
693
+ null
694
+ );
695
+ function Q(t) {
696
+ for (let e in F)
697
+ this[e] = F[e];
698
+ }
699
+ const Z = /* @__PURE__ */ function() {
700
+ return J.exports;
701
+ }();
702
+ export {
703
+ Z as default
704
+ };
@@ -0,0 +1 @@
1
+ .avue-upload--upload .el-upload,.avue-upload--upload .el-upload__tip{display:none}.avue-upload--upload .el-upload--picture-img{display:inline-block}.avue-upload--upload .el-upload-list{margin-top:-6px}.avue-upload--list .el-upload{background-color:#fbfdff;border:1px dashed #c0ccda;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avue-upload--list .el-upload:hover{border-color:#409eff}.avue-upload__dialog .el-dialog__header{display:none}.avue-upload__dialog .el-dialog__body{padding:10px;display:flex;justify-content:center}.avue-upload__menu{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1024}.avue-upload__menu i{color:#fff;margin:0 8px;font-size:20px}.avue-upload__avatar{font-size:28px;color:#8c939d;width:148px;height:148px;line-height:148px;text-align:center;display:block}
@@ -1,4 +1,4 @@
1
- import { n as i } from "../../chunks/5d4282fb.js";
1
+ import { n as i } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
2
2
  var n = function() {
3
3
  var t = this, e = t.$createElement, a = t._self._c || e;
4
4
  return a("ElSteps", {