@web-utils/component 2.0.9 → 2.0.11

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