@web-utils/component 2.0.13 → 2.0.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 (172) hide show
  1. package/dist/chunks/3a79781b.js +75 -0
  2. package/dist/chunks/{44b78389.js → 41a066be.js} +8 -8
  3. package/dist/chunks/{e1939731.js → 5a78e0db.js} +5 -6
  4. package/dist/chunks/5d4282fb.js +30 -0
  5. package/dist/chunks/{822300f3.js → 61ad06b2.js} +3 -3
  6. package/dist/chunks/76680a03.js +24 -0
  7. package/dist/chunks/8c0142e0.js +81 -0
  8. package/dist/chunks/97652d86.js +26 -0
  9. package/dist/chunks/b4acd3a6.js +126 -0
  10. package/dist/chunks/f71045fc.js +184 -0
  11. package/dist/components/address-input/index.js +43 -56
  12. package/dist/components/address-input/style.css +1 -15
  13. package/dist/components/aside-menu/index.js +30 -36
  14. package/dist/components/aside-menu/style.css +1 -9
  15. package/dist/components/awesome-button/index.js +32 -35
  16. package/dist/components/base.css +1 -66
  17. package/dist/components/capsule-tab/index.js +27 -33
  18. package/dist/components/capsule-tab/style.css +1 -32
  19. package/dist/components/chunk-file-uploader/index.js +54 -88
  20. package/dist/components/chunk-file-uploader/style.css +1 -4
  21. package/dist/components/chunk-file-uploader-button/index.js +25 -31
  22. package/dist/components/chunk-file-uploader-button/style.css +1 -17
  23. package/dist/components/chunk-file-uploader-drop/index.js +28 -42
  24. package/dist/components/chunk-file-uploader-drop/style.css +1 -12
  25. package/dist/components/chunk-file-uploader-file/index.js +134 -211
  26. package/dist/components/chunk-file-uploader-file/style.css +1 -125
  27. package/dist/components/chunk-file-uploader-files/index.js +28 -34
  28. package/dist/components/chunk-file-uploader-files/style.css +1 -9
  29. package/dist/components/chunk-file-uploader-list/index.js +29 -35
  30. package/dist/components/chunk-file-uploader-list/style.css +1 -9
  31. package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
  32. package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
  33. package/dist/components/code-mirror-editor/index.js +153 -181
  34. package/dist/components/code-mirror-editor/style.css +1 -17
  35. package/dist/components/color-picker/index.js +49 -68
  36. package/dist/components/confirm-button/index.js +19 -21
  37. package/dist/components/confirmable/index.js +18 -19
  38. package/dist/components/context-menu/index.js +108 -130
  39. package/dist/components/context-menu/style.css +1 -88
  40. package/dist/components/custom-scrollbar/index.js +49 -67
  41. package/dist/components/data-table-picker/index.js +62 -81
  42. package/dist/components/dynamic-table/index.js +89 -113
  43. package/dist/components/dynamic-table/style.css +1 -30
  44. package/dist/components/e-charts/index.js +120 -201
  45. package/dist/components/e-charts/style.css +1 -10
  46. package/dist/components/editable-progress/index.js +60 -93
  47. package/dist/components/editable-progress/style.css +1 -37
  48. package/dist/components/editable-tree/index.js +423 -638
  49. package/dist/components/editable-tree/style.css +1 -82
  50. package/dist/components/egd-collapse/index.js +33 -46
  51. package/dist/components/egd-collapse-item/index.js +60 -76
  52. package/dist/components/element-dialog/index.js +95 -147
  53. package/dist/components/element-dialog/style.css +1 -102
  54. package/dist/components/empty-view/index.js +28 -34
  55. package/dist/components/empty-view/style.css +1 -17
  56. package/dist/components/error-view/index.js +26 -32
  57. package/dist/components/error-view/style.css +1 -17
  58. package/dist/components/flex-column/index.js +25 -40
  59. package/dist/components/flex-item/index.js +29 -57
  60. package/dist/components/flex-row/index.js +25 -40
  61. package/dist/components/flex-scroller/index.js +26 -32
  62. package/dist/components/flex-scroller/style.css +1 -20
  63. package/dist/components/form-button/index.js +34 -38
  64. package/dist/components/form-cascader/index.js +71 -81
  65. package/dist/components/form-checkbox-group/index.js +88 -113
  66. package/dist/components/form-checkbox-group/style.css +1 -51
  67. package/dist/components/form-date-picker/index.js +70 -132
  68. package/dist/components/form-holder/index.js +32 -39
  69. package/dist/components/form-input/index.js +56 -62
  70. package/dist/components/form-input-email/index.js +48 -60
  71. package/dist/components/form-input-id-card/index.js +53 -59
  72. package/dist/components/form-input-number/index.js +61 -68
  73. package/dist/components/form-input-number/style.css +1 -12
  74. package/dist/components/form-input-phone-number/index.js +49 -55
  75. package/dist/components/form-input-time/index.js +53 -59
  76. package/dist/components/form-item/index.js +80 -123
  77. package/dist/components/form-item/style.css +1 -11
  78. package/dist/components/form-item-config-provider/index.js +25 -26
  79. package/dist/components/form-item-group/index.js +85 -111
  80. package/dist/components/form-item-group/style.css +1 -30
  81. package/dist/components/form-radio-group/index.js +85 -104
  82. package/dist/components/form-radio-group/style.css +1 -53
  83. package/dist/components/form-select/index.js +76 -91
  84. package/dist/components/form-switch/index.js +51 -57
  85. package/dist/components/form-textarea/index.js +51 -57
  86. package/dist/components/form-view/index.js +165 -232
  87. package/dist/components/form-view/style.css +1 -158
  88. package/dist/components/guide-steps/index.js +44 -58
  89. package/dist/components/guide-steps/style.css +1 -34
  90. package/dist/components/icon-card/index.js +29 -35
  91. package/dist/components/icon-card/style.css +1 -56
  92. package/dist/components/iframe-window/index.js +29 -35
  93. package/dist/components/iframe-window/style.css +1 -20
  94. package/dist/components/image-viewer/index.js +48 -66
  95. package/dist/components/image-viewer/style.css +1 -21
  96. package/dist/components/input-number/index.js +127 -193
  97. package/dist/components/input-number/style.css +1 -15
  98. package/dist/components/input-number-range/index.js +45 -57
  99. package/dist/components/input-number-range/style.css +1 -12
  100. package/dist/components/j-s-x-component/index.js +4 -4
  101. package/dist/components/keep-view-alive/index.js +73 -120
  102. package/dist/components/loading-view/index.js +26 -32
  103. package/dist/components/loading-view/style.css +1 -17
  104. package/dist/components/nav-bar/index.js +27 -37
  105. package/dist/components/nav-bar/style.css +1 -17
  106. package/dist/components/not-implement/index.js +23 -31
  107. package/dist/components/not-implement/style.css +1 -15
  108. package/dist/components/page/index.js +22 -28
  109. package/dist/components/page/style.css +1 -12
  110. package/dist/components/page-header/index.js +30 -36
  111. package/dist/components/page-header/style.css +1 -14
  112. package/dist/components/page-index/index.js +62 -83
  113. package/dist/components/page-index/style.css +1 -23
  114. package/dist/components/page-index-top/index.js +53 -68
  115. package/dist/components/page-skeleton/index.js +31 -37
  116. package/dist/components/page-skeleton/style.css +1 -23
  117. package/dist/components/page-skeleton-new/index.js +42 -48
  118. package/dist/components/page-skeleton-new/style.css +1 -42
  119. package/dist/components/pageable-table/index.js +186 -253
  120. package/dist/components/pageable-table/style.css +1 -72
  121. package/dist/components/pageable-view/index.js +129 -199
  122. package/dist/components/pageable-view/style.css +1 -69
  123. package/dist/components/photo-swipe/index.js +110 -151
  124. package/dist/components/photo-swipe/style.css +1 -20
  125. package/dist/components/resize-observer/index.js +34 -68
  126. package/dist/components/resize-observer/style.css +1 -31
  127. package/dist/components/search-popover/index.js +153 -211
  128. package/dist/components/search-popover/style.css +1 -93
  129. package/dist/components/sign-panel/index.js +92 -142
  130. package/dist/components/sign-panel/style.css +1 -97
  131. package/dist/components/split-pane/index.js +101 -162
  132. package/dist/components/split-pane/style.css +1 -100
  133. package/dist/components/stateful/index.js +31 -34
  134. package/dist/components/stateful/style.css +1 -33
  135. package/dist/components/static-pageable-table/index.js +37 -44
  136. package/dist/components/static-pageable-table/style.css +1 -9
  137. package/dist/components/swiper/index.js +85 -150
  138. package/dist/components/swiper/style.css +1 -43
  139. package/dist/components/tab/index.js +54 -72
  140. package/dist/components/tab/style.css +1 -122
  141. package/dist/components/tab-item/index.js +30 -35
  142. package/dist/components/table-column/index.js +30 -32
  143. package/dist/components/table-view/index.js +156 -227
  144. package/dist/components/table-view/style.css +1 -95
  145. package/dist/components/tag-render/index.js +44 -58
  146. package/dist/components/tag-render/style.css +1 -33
  147. package/dist/components/tinymce-editor/index.js +79 -95
  148. package/dist/components/tinymce-editor/style.css +1 -43
  149. package/dist/components/tinymce-wrapper/index.js +92 -121
  150. package/dist/components/tinymce-wrapper/style.css +1 -36
  151. package/dist/components/toolbar/index.js +63 -84
  152. package/dist/components/toolbar/style.css +1 -39
  153. package/dist/components/toolbar-button/index.js +41 -48
  154. package/dist/components/toolbar-button/style.css +1 -21
  155. package/dist/components/trigger/index.js +29 -36
  156. package/dist/components/vue-tags-input/index.js +188 -308
  157. package/dist/components/vue-tags-input/style.css +1 -682
  158. package/dist/components/watermark/index.js +25 -37
  159. package/dist/components/watermark/style.css +1 -11
  160. package/dist/components/x-dialog/index.js +67 -93
  161. package/dist/components/x-dialog/style.css +1 -15
  162. package/dist/index.css +193 -1105
  163. package/dist/index.es.js +4790 -7243
  164. package/package.json +1 -1
  165. package/web-types.json +1 -1
  166. package/dist/chunks/3d28cc08.js +0 -57
  167. package/dist/chunks/5d33812d.js +0 -147
  168. package/dist/chunks/9d848bf6.js +0 -99
  169. package/dist/chunks/a0bb327b.js +0 -96
  170. package/dist/chunks/a8891d2c.js +0 -30
  171. package/dist/chunks/c69d5628.js +0 -248
  172. package/dist/chunks/de9fe802.js +0 -24
@@ -1,108 +1,104 @@
1
- import Uploader from "simple-uploader.js";
2
- import { s as secondsToStr } from "../../chunks/a8891d2c.js";
3
- import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
4
- const events = ["fileProgress", "fileSuccess", "fileComplete", "fileError"];
5
- var render = function() {
6
- var _vm = this;
7
- var _h = _vm.$createElement;
8
- var _c = _vm._self._c || _h;
9
- return _c("div", {
1
+ import n from "simple-uploader.js";
2
+ import { s as p } from "../../chunks/97652d86.js";
3
+ import { n as f } from "../../chunks/5d4282fb.js";
4
+ const o = ["fileProgress", "fileSuccess", "fileComplete", "fileError"];
5
+ var u = function() {
6
+ var e = this, i = e.$createElement, s = e._self._c || i;
7
+ return s("div", {
10
8
  staticClass: "chunk-file-uploader-file",
11
9
  attrs: {
12
- "status": _vm.status
10
+ status: e.status
13
11
  }
14
- }, [_vm._t("default", function() {
15
- return [_c("div", {
12
+ }, [e._t("default", function() {
13
+ return [s("div", {
16
14
  staticClass: "chunk-file-uploader-file-info"
17
- }, [_c("div", {
15
+ }, [s("div", {
18
16
  staticClass: "chunk-file-uploader-file-name",
19
17
  attrs: {
20
- "title": _vm.file.name
18
+ title: e.file.name
21
19
  }
22
- }, [_c("i", {
20
+ }, [s("i", {
23
21
  staticClass: "chunk-file-uploader-file-icon",
24
22
  attrs: {
25
- "icon": _vm.fileCategory
23
+ icon: e.fileCategory
26
24
  }
27
- }), _vm._v(_vm._s(_vm.file.name) + " ")]), _c("div", {
25
+ }), e._v(e._s(e.file.name) + " ")]), s("div", {
28
26
  staticClass: "chunk-file-uploader-file-size"
29
- }, [_vm._v(" " + _vm._s(_vm.formatedSize) + " ")]), _c("div", {
27
+ }, [e._v(" " + e._s(e.formatedSize) + " ")]), s("div", {
30
28
  staticClass: "chunk-file-uploader-file-status"
31
- }, [_c("span", {
29
+ }, [s("span", {
32
30
  directives: [{
33
31
  name: "show",
34
32
  rawName: "v-show",
35
- value: !["uploading", "md5"].includes(_vm.status),
33
+ value: !["uploading", "md5"].includes(e.status),
36
34
  expression: "!['uploading', 'md5'].includes(status)"
37
35
  }]
38
- }, [_vm._v(_vm._s(_vm.statusText))]), _c("span", {
36
+ }, [e._v(e._s(e.statusText))]), s("span", {
39
37
  directives: [{
40
38
  name: "show",
41
39
  rawName: "v-show",
42
- value: _vm.status === "md5",
40
+ value: e.status === "md5",
43
41
  expression: "status === 'md5'"
44
42
  }]
45
- }, [_vm._v(_vm._s(_vm.file.md5Progress))]), _c("span", {
43
+ }, [e._v(e._s(e.file.md5Progress))]), s("span", {
46
44
  directives: [{
47
45
  name: "show",
48
46
  rawName: "v-show",
49
- value: _vm.status === "uploading",
47
+ value: e.status === "uploading",
50
48
  expression: "status === 'uploading'"
51
49
  }],
52
50
  staticStyle: {
53
51
  "padding-left": "4px"
54
52
  }
55
- }, [_c("span", [_vm._v(_vm._s(_vm.progressStyle.progress))]), _vm._v(" | "), _c("em", [_vm._v(_vm._s(_vm.formatedAverageSpeed))]), _vm._v(" | "), _c("i", [_vm._v(_vm._s(_vm.formatedTimeRemaining))])])]), _c("div", {
53
+ }, [s("span", [e._v(e._s(e.progressStyle.progress))]), e._v(" | "), s("em", [e._v(e._s(e.formatedAverageSpeed))]), e._v(" | "), s("i", [e._v(e._s(e.formatedTimeRemaining))])])]), s("div", {
56
54
  staticClass: "chunk-file-uploader-file-actions"
57
- }, [_c("span", {
55
+ }, [s("span", {
58
56
  staticClass: "chunk-file-uploader-file-pause",
59
57
  on: {
60
- "click": _vm.pause
58
+ click: e.pause
61
59
  }
62
- }), _c("span", {
60
+ }), s("span", {
63
61
  staticClass: "chunk-file-uploader-file-resume",
64
62
  on: {
65
- "click": _vm.resume
63
+ click: e.resume
66
64
  }
67
- }, [_vm._v("️")]), _c("span", {
65
+ }, [e._v("️")]), s("span", {
68
66
  staticClass: "chunk-file-uploader-file-retry",
69
67
  on: {
70
- "click": _vm.retry
68
+ click: e.retry
71
69
  }
72
- }), _c("span", {
70
+ }), s("span", {
73
71
  staticClass: "chunk-file-uploader-file-remove",
74
72
  on: {
75
- "click": _vm.remove
73
+ click: e.remove
76
74
  }
77
75
  })])])];
78
76
  }, {
79
- "file": _vm.file,
80
- "list": _vm.list,
81
- "status": _vm.status,
82
- "paused": _vm.paused,
83
- "error": _vm.error,
84
- "response": _vm.response,
85
- "averageSpeed": _vm.averageSpeed,
86
- "formatedAverageSpeed": _vm.formatedAverageSpeed,
87
- "currentSpeed": _vm.currentSpeed,
88
- "isComplete": _vm.isComplete,
89
- "isUploading": _vm.isUploading,
90
- "size": _vm.size,
91
- "formatedSize": _vm.formatedSize,
92
- "uploadedSize": _vm.uploadedSize,
93
- "progress": _vm.progress,
94
- "progressStyle": _vm.progressStyle,
95
- "progressingClass": _vm.progressingClass,
96
- "timeRemaining": _vm.timeRemaining,
97
- "formatedTimeRemaining": _vm.formatedTimeRemaining,
98
- "type": _vm.type,
99
- "extension": _vm.extension,
100
- "fileCategory": _vm.fileCategory
77
+ file: e.file,
78
+ list: e.list,
79
+ status: e.status,
80
+ paused: e.paused,
81
+ error: e.error,
82
+ response: e.response,
83
+ averageSpeed: e.averageSpeed,
84
+ formatedAverageSpeed: e.formatedAverageSpeed,
85
+ currentSpeed: e.currentSpeed,
86
+ isComplete: e.isComplete,
87
+ isUploading: e.isUploading,
88
+ size: e.size,
89
+ formatedSize: e.formatedSize,
90
+ uploadedSize: e.uploadedSize,
91
+ progress: e.progress,
92
+ progressStyle: e.progressStyle,
93
+ progressingClass: e.progressingClass,
94
+ timeRemaining: e.timeRemaining,
95
+ formatedTimeRemaining: e.formatedTimeRemaining,
96
+ type: e.type,
97
+ extension: e.extension,
98
+ fileCategory: e.fileCategory
101
99
  })], 2);
102
- };
103
- var staticRenderFns = [];
104
- const ChunkFileUploaderFile_vue_vue_type_style_index_0_lang = "";
105
- const __vue2_script = {
100
+ }, d = [];
101
+ const c = {
106
102
  name: "ChunkFileUploaderFile",
107
103
  props: {
108
104
  file: {
@@ -113,18 +109,18 @@ const __vue2_script = {
113
109
  },
114
110
  list: {
115
111
  type: Boolean,
116
- default: false
112
+ default: !1
117
113
  }
118
114
  },
119
115
  data() {
120
116
  return {
121
117
  response: null,
122
- paused: false,
123
- error: false,
118
+ paused: !1,
119
+ error: !1,
124
120
  averageSpeed: 0,
125
121
  currentSpeed: 0,
126
- isComplete: false,
127
- isUploading: false,
122
+ isComplete: !1,
123
+ isUploading: !1,
128
124
  size: 0,
129
125
  formatedSize: "",
130
126
  uploadedSize: 0,
@@ -137,11 +133,9 @@ const __vue2_script = {
137
133
  },
138
134
  computed: {
139
135
  fileCategory() {
140
- const extension = this.extension;
141
- const isFolder = this.file.isFolder;
142
- let type = isFolder ? "folder" : "unknown";
143
- const categoryMap = this.file.uploader.opts.categoryMap;
144
- const typeMap = categoryMap || {
136
+ const e = this.extension;
137
+ let s = this.file.isFolder ? "folder" : "unknown";
138
+ const t = this.file.uploader.opts.categoryMap || {
145
139
  image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"],
146
140
  video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"],
147
141
  audio: ["mp3", "wav", "wma", "ogg", "aac", "flac"],
@@ -161,85 +155,50 @@ const __vue2_script = {
161
155
  "pptx"
162
156
  ]
163
157
  };
164
- Object.keys(typeMap).forEach((_type) => {
165
- const extensions = typeMap[_type];
166
- if (extensions.indexOf(extension) > -1) {
167
- type = _type;
168
- }
169
- });
170
- return type;
158
+ return Object.keys(t).forEach((a) => {
159
+ t[a].indexOf(e) > -1 && (s = a);
160
+ }), s;
171
161
  },
172
162
  progressStyle() {
173
- const progress = Math.floor(this.progress * 100);
174
- const style = `translateX(${Math.floor(progress - 100)}%)`;
163
+ const e = Math.floor(this.progress * 100), i = `translateX(${Math.floor(e - 100)}%)`;
175
164
  return {
176
- progress: `${progress}%`,
177
- webkitTransform: style,
178
- mozTransform: style,
179
- msTransform: style,
180
- transform: style
165
+ progress: `${e}%`,
166
+ webkitTransform: i,
167
+ mozTransform: i,
168
+ msTransform: i,
169
+ transform: i
181
170
  };
182
171
  },
183
172
  formatedAverageSpeed() {
184
- return `${Uploader.utils.formatSize(this.averageSpeed)} / s`;
173
+ return `${n.utils.formatSize(this.averageSpeed)} / s`;
185
174
  },
186
175
  status() {
187
- const { isUploading, isComplete, isError, paused } = this;
188
- const { md5Computing } = this.file;
189
- if (md5Computing) {
190
- return "md5";
191
- } else if (isComplete) {
192
- return "success";
193
- } else if (isError) {
194
- return "error";
195
- } else if (isUploading) {
196
- return "uploading";
197
- } else if (paused) {
198
- return "paused";
199
- } else {
200
- return "waiting";
201
- }
176
+ const { isUploading: e, isComplete: i, isError: s, paused: r } = this, { md5Computing: t } = this.file;
177
+ return t ? "md5" : i ? "success" : s ? "error" : e ? "uploading" : r ? "paused" : "waiting";
202
178
  },
203
179
  statusText() {
204
- const status = this.status;
205
- const fileStatusText = this.file.uploader.fileStatusText;
206
- let txt = status;
207
- if (typeof fileStatusText === "function") {
208
- txt = fileStatusText(status, this.response);
209
- } else {
210
- txt = fileStatusText[status];
211
- }
212
- return txt || "";
180
+ const e = this.status, i = this.file.uploader.fileStatusText;
181
+ let s = e;
182
+ return typeof i == "function" ? s = i(e, this.response) : s = i[e], s || "";
213
183
  },
214
184
  formatedTimeRemaining() {
215
- const timeRemaining = this.timeRemaining;
216
- const file = this.file;
217
- if (timeRemaining === Number.POSITIVE_INFINITY || timeRemaining === 0) {
185
+ const e = this.timeRemaining, i = this.file;
186
+ if (e === Number.POSITIVE_INFINITY || e === 0)
218
187
  return "";
219
- }
220
- let parsedTimeRemaining = secondsToStr(timeRemaining);
221
- const parseTimeRemaining = file.uploader.opts.parseTimeRemaining;
222
- if (parseTimeRemaining) {
223
- parsedTimeRemaining = parseTimeRemaining(timeRemaining, parsedTimeRemaining);
224
- }
225
- return parsedTimeRemaining;
188
+ let s = p(e);
189
+ const r = i.uploader.opts.parseTimeRemaining;
190
+ return r && (s = r(e, s)), s;
226
191
  }
227
192
  },
228
193
  watch: {
229
- status(newStatus, oldStatus) {
230
- if (oldStatus && newStatus === "uploading" && oldStatus !== "uploading") {
231
- this.tid = setTimeout(() => {
232
- this.progressingClass = "uploader-file-progressing";
233
- }, 200);
234
- } else {
235
- clearTimeout(this.tid);
236
- this.progressingClass = "";
237
- }
194
+ status(e, i) {
195
+ i && e === "uploading" && i !== "uploading" ? this.tid = setTimeout(() => {
196
+ this.progressingClass = "uploader-file-progressing";
197
+ }, 200) : (clearTimeout(this.tid), this.progressingClass = "");
238
198
  }
239
199
  },
240
200
  mounted() {
241
- const staticProps = ["paused", "error", "averageSpeed", "currentSpeed"];
242
- const fnProps = [
201
+ const e = ["paused", "error", "averageSpeed", "currentSpeed"], i = [
243
202
  "isComplete",
244
203
  "isUploading",
245
204
  {
@@ -265,124 +224,88 @@ const __vue2_script = {
265
224
  fn: "getExtension"
266
225
  }
267
226
  ];
268
- staticProps.forEach((prop) => {
269
- this[prop] = this.file[prop];
227
+ e.forEach((t) => {
228
+ this[t] = this.file[t];
229
+ }), i.forEach((t) => {
230
+ typeof t == "string" ? this[t] = this.file[t]() : this[t.key] = this.file[t.fn]();
270
231
  });
271
- fnProps.forEach((fnProp) => {
272
- if (typeof fnProp === "string") {
273
- this[fnProp] = this.file[fnProp]();
274
- } else {
275
- this[fnProp.key] = this.file[fnProp.fn]();
276
- }
277
- });
278
- const handlers = this._handlers = {};
279
- const eventHandler = (event) => {
280
- handlers[event] = (...args) => {
281
- this.fileEventsHandler(event, args);
282
- };
283
- return handlers[event];
284
- };
285
- events.forEach((event) => {
286
- this.file.uploader.on(event, eventHandler(event));
232
+ const s = this._handlers = {}, r = (t) => (s[t] = (...a) => {
233
+ this.fileEventsHandler(t, a);
234
+ }, s[t]);
235
+ o.forEach((t) => {
236
+ this.file.uploader.on(t, r(t));
287
237
  });
288
238
  },
289
239
  destroyed() {
290
- events.forEach((event) => {
291
- this.file.uploader.off(event, this._handlers[event]);
292
- });
293
- this._handlers = null;
240
+ o.forEach((e) => {
241
+ this.file.uploader.off(e, this._handlers[e]);
242
+ }), this._handlers = null;
294
243
  },
295
244
  methods: {
296
245
  _actionCheck() {
297
- this.paused = this.file.paused;
298
- this.error = this.file.error;
299
- this.isUploading = this.file.isUploading();
246
+ this.paused = this.file.paused, this.error = this.file.error, this.isUploading = this.file.isUploading();
300
247
  },
301
248
  pause() {
302
- this.file.pause();
303
- this._actionCheck();
304
- this._fileProgress();
249
+ this.file.pause(), this._actionCheck(), this._fileProgress();
305
250
  },
306
251
  resume() {
307
- this.file.resume();
308
- this._actionCheck();
252
+ this.file.resume(), this._actionCheck();
309
253
  },
310
254
  remove() {
311
- this.$set(this.file, "canceled", true);
312
- this.file.cancel();
255
+ this.$set(this.file, "canceled", !0), this.file.cancel();
313
256
  },
314
257
  retry() {
315
- this.file.retry();
316
- this._actionCheck();
258
+ this.file.retry(), this._actionCheck();
317
259
  },
318
- processResponse(message) {
319
- let res = message;
260
+ processResponse(e) {
261
+ let i = e;
320
262
  try {
321
- res = JSON.parse(message);
322
- } catch (e) {
263
+ i = JSON.parse(e);
264
+ } catch {
323
265
  }
324
- this.response = res;
266
+ this.response = i;
325
267
  },
326
- fileEventsHandler(event, args) {
327
- const rootFile = args[0];
328
- const file = args[1];
329
- const target = this.list ? rootFile : file;
330
- if (this.file === target) {
331
- if (this.list && event === "fileSuccess") {
332
- this.processResponse(args[2]);
268
+ fileEventsHandler(e, i) {
269
+ const s = i[0], r = i[1], t = this.list ? s : r;
270
+ if (this.file === t) {
271
+ if (this.list && e === "fileSuccess") {
272
+ this.processResponse(i[2]);
333
273
  return;
334
274
  }
335
- this[`_${event}`].apply(this, args);
275
+ this[`_${e}`].apply(this, i);
336
276
  }
337
277
  },
338
278
  _fileProgress() {
339
- this.progress = this.file.progress();
340
- this.averageSpeed = this.file.averageSpeed;
341
- this.currentSpeed = this.file.currentSpeed;
342
- this.timeRemaining = this.file.timeRemaining();
343
- this.uploadedSize = this.file.sizeUploaded();
344
- this._actionCheck();
279
+ this.progress = this.file.progress(), this.averageSpeed = this.file.averageSpeed, this.currentSpeed = this.file.currentSpeed, this.timeRemaining = this.file.timeRemaining(), this.uploadedSize = this.file.sizeUploaded(), this._actionCheck();
345
280
  },
346
- _fileSuccess(rootFile, file, message) {
347
- if (rootFile) {
348
- this.processResponse(message);
349
- }
350
- this._fileProgress();
351
- this.error = false;
352
- this.isComplete = true;
353
- this.isUploading = false;
281
+ _fileSuccess(e, i, s) {
282
+ e && this.processResponse(s), this._fileProgress(), this.error = !1, this.isComplete = !0, this.isUploading = !1;
354
283
  },
355
284
  _fileComplete() {
356
285
  this._fileSuccess();
357
286
  },
358
- _fileError(rootFile, file, message) {
359
- this._fileProgress();
360
- this.processResponse(message);
361
- this.error = true;
362
- this.isComplete = false;
363
- this.isUploading = false;
287
+ _fileError(e, i, s) {
288
+ this._fileProgress(), this.processResponse(s), this.error = !0, this.isComplete = !1, this.isUploading = !1;
364
289
  }
365
290
  }
366
- };
367
- const __cssModules = {};
368
- var __component__ = /* @__PURE__ */ normalizeComponent(
369
- __vue2_script,
370
- render,
371
- staticRenderFns,
372
- false,
373
- __vue2_injectStyles,
291
+ }, l = {};
292
+ var h = /* @__PURE__ */ f(
293
+ c,
294
+ u,
295
+ d,
296
+ !1,
297
+ m,
374
298
  null,
375
299
  null,
376
300
  null
377
301
  );
378
- function __vue2_injectStyles(context) {
379
- for (let o in __cssModules) {
380
- this[o] = __cssModules[o];
381
- }
302
+ function m(e) {
303
+ for (let i in l)
304
+ this[i] = l[i];
382
305
  }
383
- const ChunkFileUploaderFile = /* @__PURE__ */ function() {
384
- return __component__.exports;
306
+ const y = /* @__PURE__ */ function() {
307
+ return h.exports;
385
308
  }();
386
309
  export {
387
- ChunkFileUploaderFile as default
310
+ y as default
388
311
  };
@@ -1,125 +1 @@
1
- /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
- /* 应用头部高度 */
3
- /* 页面宽度 */
4
- /* 侧栏宽度 */
5
- /* 标签高度 */
6
- /* 页面头部工具条高度 */
7
- .chunk-file-uploader-file {
8
- position: relative;
9
- height: 49px;
10
- overflow: hidden;
11
- line-height: 49px;
12
- border-bottom: 1px solid #cdcdcd;
13
- }
14
- .chunk-file-uploader-file[status=waiting] .chunk-file-uploader-file-pause, .chunk-file-uploader-file[status=uploading] .chunk-file-uploader-file-pause {
15
- display: block;
16
- }
17
- .chunk-file-uploader-file[status=paused] .chunk-file-uploader-file-resume {
18
- display: block;
19
- }
20
- .chunk-file-uploader-file[status=error] .chunk-file-uploader-file-retry {
21
- display: block;
22
- }
23
- .chunk-file-uploader-file[status=success] .chunk-file-uploader-file-remove {
24
- display: none;
25
- }
26
- .chunk-file-uploader-file[status=error] .chunk-file-uploader-file-progress {
27
- background: #ffe0e0;
28
- }
29
- .chunk-file-uploader-file-progress {
30
- position: absolute;
31
- width: 100%;
32
- height: 100%;
33
- background: #e2eeff;
34
- transform: translateX(-100%);
35
- }
36
- .chunk-file-uploader-file-progressing {
37
- transition: all 0.4s linear;
38
- }
39
- .chunk-file-uploader-file-info {
40
- position: relative;
41
- z-index: 1;
42
- height: 100%;
43
- overflow: hidden;
44
- display: flex;
45
- flex-direction: row;
46
- }
47
- .chunk-file-uploader-file-info:hover {
48
- background-color: rgba(240, 240, 240, 0.2);
49
- }
50
- .chunk-file-uploader-file-info i, .chunk-file-uploader-file-info em {
51
- font-style: normal;
52
- }
53
- .chunk-file-uploader-file-name, .chunk-file-uploader-file-size, .chunk-file-uploader-file-meta, .chunk-file-uploader-file-status, .chunk-file-uploader-file-actions {
54
- position: relative;
55
- height: 100%;
56
- padding: 0 10px;
57
- }
58
- .chunk-file-uploader-file-size, .chunk-file-uploader-file-meta, .chunk-file-uploader-file-status, .chunk-file-uploader-file-actions {
59
- flex-shrink: 0;
60
- }
61
- .chunk-file-uploader-file-name {
62
- overflow: hidden;
63
- white-space: nowrap;
64
- text-indent: 14px;
65
- text-overflow: ellipsis;
66
- flex: 1 1 auto;
67
- }
68
- .chunk-file-uploader-file-icon {
69
- display: inline-block;
70
- width: 24px;
71
- height: 24px;
72
- margin-top: 13px;
73
- margin-right: 8px;
74
- vertical-align: top;
75
- }
76
- .chunk-file-uploader-file-icon::before {
77
- display: block;
78
- height: 100%;
79
- color: #808080;
80
- font-size: 24px;
81
- line-height: 1;
82
- text-indent: 0;
83
- content: "📃";
84
- }
85
- .chunk-file-uploader-file-icon[icon=folder]::before {
86
- content: "📂";
87
- }
88
- .chunk-file-uploader-file-icon[icon=image]::before {
89
- content: "📊";
90
- }
91
- .chunk-file-uploader-file-icon[icon=video]::before {
92
- content: "📹";
93
- }
94
- .chunk-file-uploader-file-icon[icon=audio]::before {
95
- content: "🎵";
96
- }
97
- .chunk-file-uploader-file-icon[icon=document]::before {
98
- content: "📋";
99
- }
100
- .chunk-file-uploader-file-actions > span {
101
- display: none;
102
- float: left;
103
- width: 16px;
104
- height: 16px;
105
- margin-top: 16px;
106
- margin-right: 10px;
107
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAARkSURBVGje7ZnfS1NRHMAH4ptPkvQSuAdBkCxD8FUQJMEULUgzy1KyyPVQ4JMiiP4Bvg6EwUQQfMm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C/bJ5D5F38YPeLfx0rjWJxHsS0SqsSYuxySjj5qO5Oj7xQWy2VBtFOwzCy6ryH3YfE3uh64Y1xckgstJPydEjkkeHv07Iy4Xaao15+KCWTBx6M/db+T9xivSErqaJDdzXI6yLRE8Vgg0coex/SPJvT0SbWu0KpZtbgSpCH3NRt7I5OxHkObc6heU+/M/J5vrpBFM5GBLqCQux14COXs5CNXK5OjPGm1tSMrJSOMNYQ4mVTGV/L6zTL7+DovkbFUxbSW0Wo05l8hJWsU+cRWfSh+Mt5Lb1ck/J1TvVsdDaR/MiEni+llsdZuZp62EViu+96bpNjNPWwmtVnzvFd5m9IVVC54x/wA7gNvqFG9vXQAAAABJRU5ErkJggg==") no-repeat 0 0;
108
- cursor: pointer;
109
- }
110
- .chunk-file-uploader-file-actions > span:hover {
111
- background-position-x: -21px;
112
- }
113
- .chunk-file-uploader-file-actions .chunk-file-uploader-file-pause {
114
- background-position-y: 0;
115
- }
116
- .chunk-file-uploader-file-actions .chunk-file-uploader-file-resume {
117
- background-position-y: -17px;
118
- }
119
- .chunk-file-uploader-file-actions .chunk-file-uploader-file-retry {
120
- background-position-y: -53px;
121
- }
122
- .chunk-file-uploader-file-actions .chunk-file-uploader-file-remove {
123
- display: block;
124
- background-position-y: -34px;
125
- }
1
+ .chunk-file-uploader-file{position:relative;height:49px;overflow:hidden;line-height:49px;border-bottom:1px solid #cdcdcd}.chunk-file-uploader-file[status=waiting] .chunk-file-uploader-file-pause,.chunk-file-uploader-file[status=uploading] .chunk-file-uploader-file-pause,.chunk-file-uploader-file[status=paused] .chunk-file-uploader-file-resume,.chunk-file-uploader-file[status=error] .chunk-file-uploader-file-retry{display:block}.chunk-file-uploader-file[status=success] .chunk-file-uploader-file-remove{display:none}.chunk-file-uploader-file[status=error] .chunk-file-uploader-file-progress{background:#ffe0e0}.chunk-file-uploader-file-progress{position:absolute;width:100%;height:100%;background:#e2eeff;transform:translate(-100%)}.chunk-file-uploader-file-progressing{transition:all .4s linear}.chunk-file-uploader-file-info{position:relative;z-index:1;height:100%;overflow:hidden;display:flex;flex-direction:row}.chunk-file-uploader-file-info:hover{background-color:#f0f0f033}.chunk-file-uploader-file-info i,.chunk-file-uploader-file-info em{font-style:normal}.chunk-file-uploader-file-name,.chunk-file-uploader-file-size,.chunk-file-uploader-file-meta,.chunk-file-uploader-file-status,.chunk-file-uploader-file-actions{position:relative;height:100%;padding:0 10px}.chunk-file-uploader-file-size,.chunk-file-uploader-file-meta,.chunk-file-uploader-file-status,.chunk-file-uploader-file-actions{flex-shrink:0}.chunk-file-uploader-file-name{overflow:hidden;white-space:nowrap;text-indent:14px;text-overflow:ellipsis;flex:1 1 auto}.chunk-file-uploader-file-icon{display:inline-block;width:24px;height:24px;margin-top:13px;margin-right:8px;vertical-align:top}.chunk-file-uploader-file-icon:before{display:block;height:100%;color:gray;font-size:24px;line-height:1;text-indent:0;content:"\1f4c3"}.chunk-file-uploader-file-icon[icon=folder]:before{content:"\1f4c2"}.chunk-file-uploader-file-icon[icon=image]:before{content:"\1f4ca"}.chunk-file-uploader-file-icon[icon=video]:before{content:"\1f4f9"}.chunk-file-uploader-file-icon[icon=audio]:before{content:"\1f3b5"}.chunk-file-uploader-file-icon[icon=document]:before{content:"\1f4cb"}.chunk-file-uploader-file-actions>span{display:none;float:left;width:16px;height:16px;margin-top:16px;margin-right:10px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAARkSURBVGje7ZnfS1NRHMAH4ptPkvQSuAdBkCxD8FUQJMEULUgzy1KyyPVQ4JMiiP4Bvg6EwUQQfMmwhwRDshwaKUjDVCgoSdDNHkzTJZ6+Z37Purve8+PeTb2TM/ggu+ew89l33x8H9BBCPG7GowXTJej3+wnDvEm0JuLC04+EYWftVAUv+fiCvDUdQR1BHUEdQR3BTIygvix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DdzXI6yLRE8Vgg0coex/SPJvT0SbWu0KpZtbgSpCH3NRt7I5OxHkObc6heU+/M/J5vrpBFM5GBLqCQux14COXs5CNXK5OjPGm1tSMrJSOMNYQ4mVTGV/L6zTL7+DovkbFUxbSW0Wo05l8hJWsU+cRWfSh+Mt5Lb1ck/J1TvVsdDaR/MiEni+llsdZuZp62EViu+96bpNjNPWwmtVnzvFd5m9IVVC54x/wA7gNvqFG9vXQAAAABJRU5ErkJggg==) no-repeat 0 0;cursor:pointer}.chunk-file-uploader-file-actions>span:hover{background-position-x:-21px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-pause{background-position-y:0}.chunk-file-uploader-file-actions .chunk-file-uploader-file-resume{background-position-y:-17px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-retry{background-position-y:-53px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-remove{display:block;background-position-y:-34px}