@vunk/form 1.1.65 → 1.1.67

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 (282) hide show
  1. package/component.d.ts +1 -1
  2. package/components/button/index.css +1 -0
  3. package/components/button/index.d.ts +1 -1
  4. package/components/button/index.js +43 -57
  5. package/components/button/src/ctx.d.ts +13 -13
  6. package/components/button/src/ctx.js +1 -39
  7. package/components/button/src/index.css +1 -0
  8. package/components/button/src/index.vue.d.ts +37 -73
  9. package/components/button/src/types.d.ts +1 -1
  10. package/components/cascader/index.css +1 -0
  11. package/components/cascader/index.d.ts +1 -1
  12. package/components/cascader/index.js +34 -49
  13. package/components/cascader/src/ctx.d.ts +15 -15
  14. package/components/cascader/src/ctx.js +1 -38
  15. package/components/cascader/src/index.css +1 -0
  16. package/components/cascader/src/index.vue.d.ts +45 -70
  17. package/components/cascader/src/use.d.ts +1 -1
  18. package/components/cascader/src/use.js +1 -28
  19. package/components/checkbox/index.css +1 -0
  20. package/components/checkbox/index.d.ts +1 -1
  21. package/components/checkbox/index.js +48 -53
  22. package/components/checkbox/src/ctx.d.ts +14 -14
  23. package/components/checkbox/src/ctx.js +1 -46
  24. package/components/checkbox/src/index.css +1 -0
  25. package/components/checkbox/src/index.vue.d.ts +43 -63
  26. package/components/color-picker/index.css +1 -0
  27. package/components/color-picker/index.d.ts +1 -1
  28. package/components/color-picker/index.js +38 -42
  29. package/components/color-picker/src/ctx.d.ts +15 -13
  30. package/components/color-picker/src/ctx.js +1 -23
  31. package/components/color-picker/src/index.css +1 -0
  32. package/components/color-picker/src/index.vue.d.ts +36 -65
  33. package/components/date-picker/index.css +1 -0
  34. package/components/date-picker/index.d.ts +1 -1
  35. package/components/date-picker/index.js +42 -55
  36. package/components/date-picker/src/ctx.d.ts +41 -34
  37. package/components/date-picker/src/ctx.js +1 -31
  38. package/components/date-picker/src/index.css +1 -0
  39. package/components/date-picker/src/index.vue.d.ts +122 -133
  40. package/components/date-picker/src/types.d.ts +9 -9
  41. package/components/date-picker/src/types.js +1 -11
  42. package/components/esri-input-geojson/index.css +8 -6
  43. package/components/esri-input-geojson/index.d.ts +1 -1
  44. package/components/esri-input-geojson/index.js +417 -535
  45. package/components/esri-input-geojson/src/append.vue.d.ts +7 -7
  46. package/components/esri-input-geojson/src/const.d.ts +1 -1
  47. package/components/esri-input-geojson/src/const.js +1 -33
  48. package/components/esri-input-geojson/src/ctx.d.ts +44 -35
  49. package/components/esri-input-geojson/src/ctx.js +1 -128
  50. package/components/esri-input-geojson/src/default-view.vue.d.ts +9 -9
  51. package/components/esri-input-geojson/src/index.css +1 -0
  52. package/components/esri-input-geojson/src/index.vue.d.ts +142 -119
  53. package/components/esri-input-geojson/src/types.d.ts +1 -0
  54. package/components/esri-input-geojson/src/viewer.vue.d.ts +23 -22
  55. package/components/form/index.css +1 -0
  56. package/components/form/index.d.ts +1 -1
  57. package/components/form/index.js +57 -87
  58. package/components/form/src/ctx.d.ts +176 -204
  59. package/components/form/src/ctx.js +1 -61
  60. package/components/form/src/index.css +1 -0
  61. package/components/form/src/index.vue.d.ts +515 -601
  62. package/components/form/src/types.d.ts +3 -3
  63. package/components/form/src/utils.d.ts +1 -1
  64. package/components/form/src/utils.js +1 -55
  65. package/components/form-item/index.css +1 -0
  66. package/components/form-item/index.d.ts +1 -1
  67. package/components/form-item/index.js +22 -50
  68. package/components/form-item/src/ctx.d.ts +9 -9
  69. package/components/form-item/src/ctx.js +1 -53
  70. package/components/form-item/src/index.css +1 -0
  71. package/components/form-item/src/index.vue.d.ts +26 -26
  72. package/components/form-item/src/types.d.ts +1 -1
  73. package/components/form-item-renderer/index.css +1 -0
  74. package/components/form-item-renderer/index.d.ts +1 -1
  75. package/components/form-item-renderer/index.js +10 -18
  76. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  77. package/components/form-item-renderer/src/ctx.js +1 -16
  78. package/components/form-item-renderer/src/index.css +1 -0
  79. package/components/form-item-renderer/src/index.vue.d.ts +9 -9
  80. package/components/form-item-renderer/src/symbols.js +1 -3
  81. package/components/form-item-renderer-template/index.css +1 -0
  82. package/components/form-item-renderer-template/index.d.ts +1 -1
  83. package/components/form-item-renderer-template/index.js +6 -13
  84. package/components/form-item-renderer-template/src/ctx.js +1 -9
  85. package/components/form-item-renderer-template/src/index.css +1 -0
  86. package/components/form-item-renderer-template/src/index.vue.d.ts +2 -2
  87. package/components/geoinput/index.css +1 -0
  88. package/components/geoinput/index.d.ts +1 -1
  89. package/components/geoinput/index.js +45 -43
  90. package/components/geoinput/src/ctx.d.ts +42 -28
  91. package/components/geoinput/src/ctx.js +1 -39
  92. package/components/geoinput/src/index.css +1 -0
  93. package/components/geoinput/src/index.vue.d.ts +111 -223
  94. package/components/geoinput/src/types.d.ts +3 -3
  95. package/components/geoinput-read/index.css +1 -0
  96. package/components/geoinput-read/index.d.ts +1 -1
  97. package/components/geoinput-read/index.js +120 -160
  98. package/components/geoinput-read/src/append.vue.d.ts +4 -4
  99. package/components/geoinput-read/src/core.vue.d.ts +130 -104
  100. package/components/geoinput-read/src/ctx.d.ts +42 -30
  101. package/components/geoinput-read/src/ctx.js +1 -66
  102. package/components/geoinput-read/src/index.css +1 -0
  103. package/components/geoinput-read/src/index.vue.d.ts +108 -151
  104. package/components/geoinput-read/src/types.d.ts +1 -1
  105. package/components/geoinput-update/index.css +9 -7
  106. package/components/geoinput-update/index.d.ts +1 -1
  107. package/components/geoinput-update/index.js +335 -366
  108. package/components/geoinput-update/src/append.vue.d.ts +5 -5
  109. package/components/geoinput-update/src/ctx.d.ts +38 -28
  110. package/components/geoinput-update/src/ctx.js +1 -85
  111. package/components/geoinput-update/src/index.css +1 -0
  112. package/components/geoinput-update/src/index.vue.d.ts +120 -98
  113. package/components/geoinput-update/src/types.d.ts +2 -2
  114. package/components/input/index.css +1 -0
  115. package/components/input/index.d.ts +1 -1
  116. package/components/input/index.js +43 -60
  117. package/components/input/src/ctx.d.ts +31 -25
  118. package/components/input/src/ctx.js +1 -46
  119. package/components/input/src/index.css +1 -0
  120. package/components/input/src/index.vue.d.ts +94 -110
  121. package/components/input/src/types.d.ts +2 -2
  122. package/components/input-link/index.css +1 -0
  123. package/components/input-link/index.d.ts +1 -1
  124. package/components/input-link/index.js +71 -92
  125. package/components/input-link/src/ctx.d.ts +26 -20
  126. package/components/input-link/src/ctx.js +1 -66
  127. package/components/input-link/src/index.css +1 -0
  128. package/components/input-link/src/index.vue.d.ts +72 -116
  129. package/components/input-number/index.css +1 -0
  130. package/components/input-number/index.d.ts +1 -1
  131. package/components/input-number/index.js +37 -45
  132. package/components/input-number/src/ctx.d.ts +15 -15
  133. package/components/input-number/src/ctx.js +1 -38
  134. package/components/input-number/src/index.css +1 -0
  135. package/components/input-number/src/index.vue.d.ts +42 -65
  136. package/components/input-number/src/types.d.ts +1 -1
  137. package/components/radio/index.css +1 -0
  138. package/components/radio/index.d.ts +1 -1
  139. package/components/radio/index.js +45 -50
  140. package/components/radio/src/ctx.d.ts +11 -11
  141. package/components/radio/src/ctx.js +1 -39
  142. package/components/radio/src/index.css +1 -0
  143. package/components/radio/src/index.vue.d.ts +41 -60
  144. package/components/radio/src/types.d.ts +1 -1
  145. package/components/select/index.css +1 -0
  146. package/components/select/index.d.ts +1 -1
  147. package/components/select/index.js +59 -64
  148. package/components/select/src/ctx.d.ts +39 -41
  149. package/components/select/src/ctx.js +1 -40
  150. package/components/select/src/index.css +1 -0
  151. package/components/select/src/index.vue.d.ts +130 -162
  152. package/components/select/src/types.d.ts +2 -2
  153. package/components/slider/index.css +1 -0
  154. package/components/slider/index.d.ts +1 -1
  155. package/components/slider/index.js +33 -50
  156. package/components/slider/src/ctx.d.ts +18 -18
  157. package/components/slider/src/ctx.js +1 -29
  158. package/components/slider/src/index.css +1 -0
  159. package/components/slider/src/index.vue.d.ts +62 -81
  160. package/components/switch/index.css +1 -0
  161. package/components/switch/index.d.ts +1 -1
  162. package/components/switch/index.js +33 -50
  163. package/components/switch/src/ctx.d.ts +22 -22
  164. package/components/switch/src/ctx.js +1 -31
  165. package/components/switch/src/index.css +1 -0
  166. package/components/switch/src/index.vue.d.ts +65 -83
  167. package/components/switch/src/types.d.ts +1 -1
  168. package/components/templates-default/index.css +1 -0
  169. package/components/templates-default/index.d.ts +1 -1
  170. package/components/templates-default/index.js +243 -172
  171. package/components/templates-default/src/ctx.d.ts +1 -1
  172. package/components/templates-default/src/ctx.js +1 -18
  173. package/components/templates-default/src/index.css +1 -0
  174. package/components/templates-default/src/index.vue.d.ts +9 -9
  175. package/components/templates-default/src/types.d.ts +16 -16
  176. package/components/templates-element-plus/index.css +1 -0
  177. package/components/templates-element-plus/index.d.ts +1 -1
  178. package/components/templates-element-plus/index.js +66 -36
  179. package/components/templates-element-plus/src/ctx.js +1 -9
  180. package/components/templates-element-plus/src/index.css +1 -0
  181. package/components/templates-element-plus/src/index.vue.d.ts +7 -7
  182. package/components/templates-element-plus/src/types.d.ts +1 -1
  183. package/components/templates-esri/index.css +1 -0
  184. package/components/templates-esri/index.d.ts +1 -1
  185. package/components/templates-esri/index.js +25 -24
  186. package/components/templates-esri/src/ctx.d.ts +1 -1
  187. package/components/templates-esri/src/ctx.js +1 -11
  188. package/components/templates-esri/src/index.css +1 -0
  189. package/components/templates-esri/src/index.vue.d.ts +6 -6
  190. package/components/templates-esri/src/types.d.ts +1 -1
  191. package/components/templates-layout/index.css +1 -0
  192. package/components/templates-layout/index.d.ts +1 -1
  193. package/components/templates-layout/index.js +96 -63
  194. package/components/templates-layout/src/ctx.js +1 -9
  195. package/components/templates-layout/src/index.css +1 -0
  196. package/components/templates-layout/src/index.vue.d.ts +7 -7
  197. package/components/templates-layout/src/types.d.ts +3 -3
  198. package/components/templates-mapbox/index.css +1 -0
  199. package/components/templates-mapbox/index.d.ts +1 -1
  200. package/components/templates-mapbox/index.js +25 -24
  201. package/components/templates-mapbox/src/ctx.d.ts +1 -1
  202. package/components/templates-mapbox/src/ctx.js +1 -11
  203. package/components/templates-mapbox/src/index.css +1 -0
  204. package/components/templates-mapbox/src/index.vue.d.ts +6 -6
  205. package/components/templates-mapbox/src/types.d.ts +1 -1
  206. package/components/upload/index.css +11 -9
  207. package/components/upload/index.d.ts +1 -1
  208. package/components/upload/index.js +283 -296
  209. package/components/upload/src/ctx.d.ts +32 -22
  210. package/components/upload/src/ctx.js +1 -45
  211. package/components/upload/src/file.vue.d.ts +28 -19
  212. package/components/upload/src/index.css +1 -0
  213. package/components/upload/src/index.vue.d.ts +63 -62
  214. package/components/upload-plus/index.css +1 -0
  215. package/components/upload-plus/index.d.ts +1 -1
  216. package/components/upload-plus/index.js +911 -9539
  217. package/components/upload-plus/src/api.d.ts +3 -3
  218. package/components/upload-plus/src/api.js +21 -18114
  219. package/components/upload-plus/src/const.js +1 -12
  220. package/components/upload-plus/src/ctx.d.ts +13 -13
  221. package/components/upload-plus/src/ctx.js +1 -58
  222. package/components/upload-plus/src/index.css +1 -0
  223. package/components/upload-plus/src/index.vue.d.ts +31 -48
  224. package/components/upload-plus/src/types.d.ts +1 -1
  225. package/components/van-cascader/index.css +1 -0
  226. package/components/van-cascader/index.d.ts +1 -1
  227. package/components/van-cascader/index.js +47 -55
  228. package/components/van-cascader/src/ctx.d.ts +13 -13
  229. package/components/van-cascader/src/ctx.js +1 -22
  230. package/components/van-cascader/src/index.css +1 -0
  231. package/components/van-cascader/src/index.vue.d.ts +40 -57
  232. package/components/var-datetime-picker/index.css +1 -0
  233. package/components/var-datetime-picker/index.d.ts +1 -1
  234. package/components/var-datetime-picker/index.js +137 -168
  235. package/components/var-datetime-picker/src/const.js +1 -91
  236. package/components/var-datetime-picker/src/ctx.d.ts +10 -10
  237. package/components/var-datetime-picker/src/ctx.js +1 -43
  238. package/components/var-datetime-picker/src/index.css +1 -0
  239. package/components/var-datetime-picker/src/index.vue.d.ts +26 -42
  240. package/components/var-datetime-picker/src/types.d.ts +1 -1
  241. package/components/vditor/index.css +1 -0
  242. package/components/vditor/index.d.ts +1 -1
  243. package/components/vditor/index.js +22 -17
  244. package/components/vditor/src/ctx.js +1 -15
  245. package/components/vditor/src/index.css +1 -0
  246. package/components/vditor/src/index.vue.d.ts +4 -3
  247. package/components/vditor/src/types.d.ts +1 -1
  248. package/composables/index.css +1 -0
  249. package/composables/index.js +1 -104
  250. package/composables/useForm.d.ts +2 -2
  251. package/composables/useSourceManager.d.ts +1 -1
  252. package/index.css +127 -20
  253. package/index.esm.js +1 -44
  254. package/package.json +1 -1
  255. package/shared/const/index.css +1 -0
  256. package/shared/const/index.d.ts +1 -1
  257. package/shared/const/index.js +1 -56
  258. package/shared/element-plus/ctx.d.ts +28 -26
  259. package/shared/element-plus/index.css +1 -0
  260. package/shared/element-plus/index.js +1 -220
  261. package/shared/element-plus/instances.d.ts +45 -38
  262. package/shared/form/index.css +1 -0
  263. package/shared/form/index.js +1 -30
  264. package/shared/helper/index.css +1 -0
  265. package/shared/helper/index.js +1 -9
  266. package/shared/index.css +1 -0
  267. package/shared/index.js +1 -56
  268. package/shared/infer-prop/index.css +1 -0
  269. package/shared/infer-prop/index.d.ts +1 -1
  270. package/shared/infer-prop/index.js +1 -34
  271. package/shared/progress-it/index.css +1 -0
  272. package/shared/progress-it/index.d.ts +4 -4
  273. package/shared/progress-it/index.js +1 -57
  274. package/shared/rules/index.css +1 -0
  275. package/shared/rules/index.js +1 -32
  276. package/shared/types/form/index.css +1 -0
  277. package/shared/types/index.css +1 -0
  278. package/shared/types/source/index.css +1 -0
  279. package/shared/types/source/index.d.ts +2 -2
  280. package/shared/types/source-manager/index.css +1 -0
  281. package/shared/upload/index.css +1 -0
  282. package/shared/upload/index.js +1 -767
@@ -9,26 +9,9 @@ import { RestFetch } from '@vunk/core/shared/utils-fetch';
9
9
  import { useComputedReadonly } from '@vunk/form/composables';
10
10
  import progress from '@vunk/form/shared/progress-it';
11
11
 
12
- var __defProp = Object.defineProperty;
13
- var __defProps = Object.defineProperties;
14
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
15
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
16
- var __hasOwnProp = Object.prototype.hasOwnProperty;
17
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
18
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19
- var __spreadValues = (a, b) => {
20
- for (var prop in b || (b = {}))
21
- if (__hasOwnProp.call(b, prop))
22
- __defNormalProp(a, prop, b[prop]);
23
- if (__getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(b)) {
25
- if (__propIsEnum.call(b, prop))
26
- __defNormalProp(a, prop, b[prop]);
27
- }
28
- return a;
29
- };
30
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
31
- const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), uploadProps), {
12
+ const props = {
13
+ ..._VkfFormItemCtx.props,
14
+ ...uploadProps,
32
15
  tip: {
33
16
  type: String,
34
17
  default: ""
@@ -40,8 +23,12 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
40
23
  beforeUpload: {
41
24
  type: Function,
42
25
  default: void 0
26
+ },
27
+ onDownload: {
28
+ type: Function,
29
+ default: void 0
43
30
  }
44
- });
31
+ };
45
32
  const createBindProps = bindPropsFactory(props);
46
33
  const emits = {
47
34
  "update:fileList": null,
@@ -51,19 +38,19 @@ const createOnEmits = onEmitsFactory(emits);
51
38
 
52
39
  var ctx = /*#__PURE__*/Object.freeze({
53
40
  __proto__: null,
54
- props: props,
55
41
  createBindProps: createBindProps,
42
+ createOnEmits: createOnEmits,
56
43
  emits: emits,
57
- createOnEmits: createOnEmits
44
+ props: props
58
45
  });
59
46
 
60
47
  /*! Element Plus Icons Vue v2.1.0 */
61
48
 
49
+
62
50
  // unplugin-vue:/plugin-vue/export-helper
63
51
  var export_helper_default = (sfc, props) => {
64
52
  let target = sfc.__vccOpts || sfc;
65
- for (let [key, val] of props)
66
- target[key] = val;
53
+ for (let [key, val] of props) target[key] = val;
67
54
  return target;
68
55
  };
69
56
 
@@ -72,191 +59,143 @@ var check_vue_vue_type_script_lang_default = {
72
59
  name: "Check"
73
60
  };
74
61
  var _hoisted_143 = {
75
- xmlns: "http://www.w3.org/2000/svg",
76
- viewBox: "0 0 1024 1024"
77
- }, _hoisted_243 = /* @__PURE__ */ createElementVNode(
78
- "path",
79
- {
62
+ xmlns: "http://www.w3.org/2000/svg",
63
+ viewBox: "0 0 1024 1024"
64
+ },
65
+ _hoisted_243 = /* @__PURE__ */createElementVNode("path", {
80
66
  fill: "currentColor",
81
67
  d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
82
- },
83
- null,
84
- -1
85
- /* HOISTED */
86
- ), _hoisted_342 = [
87
- _hoisted_243
88
- ];
68
+ }, null, -1
69
+ /* HOISTED */),
70
+ _hoisted_342 = [_hoisted_243];
89
71
  function _sfc_render43(_ctx, _cache, $props, $setup, $data, $options) {
90
72
  return openBlock(), createElementBlock("svg", _hoisted_143, _hoisted_342);
91
73
  }
92
- var check_default = /* @__PURE__ */ export_helper_default(check_vue_vue_type_script_lang_default, [["render", _sfc_render43], ["__file", "check.vue"]]);
74
+ var check_default = /* @__PURE__ */export_helper_default(check_vue_vue_type_script_lang_default, [["render", _sfc_render43], ["__file", "check.vue"]]);
93
75
 
94
76
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/circle-check.vue?vue&type=script&lang.ts
95
77
  var circle_check_vue_vue_type_script_lang_default = {
96
78
  name: "CircleCheck"
97
79
  };
98
80
  var _hoisted_149 = {
99
- xmlns: "http://www.w3.org/2000/svg",
100
- viewBox: "0 0 1024 1024"
101
- }, _hoisted_249 = /* @__PURE__ */ createElementVNode(
102
- "path",
103
- {
81
+ xmlns: "http://www.w3.org/2000/svg",
82
+ viewBox: "0 0 1024 1024"
83
+ },
84
+ _hoisted_249 = /* @__PURE__ */createElementVNode("path", {
104
85
  fill: "currentColor",
105
86
  d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
106
- },
107
- null,
108
- -1
109
- /* HOISTED */
110
- ), _hoisted_348 = /* @__PURE__ */ createElementVNode(
111
- "path",
112
- {
87
+ }, null, -1
88
+ /* HOISTED */),
89
+ _hoisted_348 = /* @__PURE__ */createElementVNode("path", {
113
90
  fill: "currentColor",
114
91
  d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
115
- },
116
- null,
117
- -1
118
- /* HOISTED */
119
- ), _hoisted_415 = [
120
- _hoisted_249,
121
- _hoisted_348
122
- ];
92
+ }, null, -1
93
+ /* HOISTED */),
94
+ _hoisted_415 = [_hoisted_249, _hoisted_348];
123
95
  function _sfc_render49(_ctx, _cache, $props, $setup, $data, $options) {
124
96
  return openBlock(), createElementBlock("svg", _hoisted_149, _hoisted_415);
125
97
  }
126
- var circle_check_default = /* @__PURE__ */ export_helper_default(circle_check_vue_vue_type_script_lang_default, [["render", _sfc_render49], ["__file", "circle-check.vue"]]);
98
+ var circle_check_default = /* @__PURE__ */export_helper_default(circle_check_vue_vue_type_script_lang_default, [["render", _sfc_render49], ["__file", "circle-check.vue"]]);
127
99
 
128
100
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/close.vue?vue&type=script&lang.ts
129
101
  var close_vue_vue_type_script_lang_default = {
130
102
  name: "Close"
131
103
  };
132
104
  var _hoisted_156 = {
133
- xmlns: "http://www.w3.org/2000/svg",
134
- viewBox: "0 0 1024 1024"
135
- }, _hoisted_256 = /* @__PURE__ */ createElementVNode(
136
- "path",
137
- {
105
+ xmlns: "http://www.w3.org/2000/svg",
106
+ viewBox: "0 0 1024 1024"
107
+ },
108
+ _hoisted_256 = /* @__PURE__ */createElementVNode("path", {
138
109
  fill: "currentColor",
139
110
  d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
140
- },
141
- null,
142
- -1
143
- /* HOISTED */
144
- ), _hoisted_355 = [
145
- _hoisted_256
146
- ];
111
+ }, null, -1
112
+ /* HOISTED */),
113
+ _hoisted_355 = [_hoisted_256];
147
114
  function _sfc_render56(_ctx, _cache, $props, $setup, $data, $options) {
148
115
  return openBlock(), createElementBlock("svg", _hoisted_156, _hoisted_355);
149
116
  }
150
- var close_default = /* @__PURE__ */ export_helper_default(close_vue_vue_type_script_lang_default, [["render", _sfc_render56], ["__file", "close.vue"]]);
117
+ var close_default = /* @__PURE__ */export_helper_default(close_vue_vue_type_script_lang_default, [["render", _sfc_render56], ["__file", "close.vue"]]);
151
118
 
152
119
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/delete.vue?vue&type=script&lang.ts
153
120
  var delete_vue_vue_type_script_lang_default = {
154
121
  name: "Delete"
155
122
  };
156
123
  var _hoisted_180 = {
157
- xmlns: "http://www.w3.org/2000/svg",
158
- viewBox: "0 0 1024 1024"
159
- }, _hoisted_280 = /* @__PURE__ */ createElementVNode(
160
- "path",
161
- {
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ viewBox: "0 0 1024 1024"
126
+ },
127
+ _hoisted_280 = /* @__PURE__ */createElementVNode("path", {
162
128
  fill: "currentColor",
163
129
  d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"
164
- },
165
- null,
166
- -1
167
- /* HOISTED */
168
- ), _hoisted_379 = [
169
- _hoisted_280
170
- ];
130
+ }, null, -1
131
+ /* HOISTED */),
132
+ _hoisted_379 = [_hoisted_280];
171
133
  function _sfc_render80(_ctx, _cache, $props, $setup, $data, $options) {
172
134
  return openBlock(), createElementBlock("svg", _hoisted_180, _hoisted_379);
173
135
  }
174
- var delete_default = /* @__PURE__ */ export_helper_default(delete_vue_vue_type_script_lang_default, [["render", _sfc_render80], ["__file", "delete.vue"]]);
136
+ var delete_default = /* @__PURE__ */export_helper_default(delete_vue_vue_type_script_lang_default, [["render", _sfc_render80], ["__file", "delete.vue"]]);
175
137
 
176
138
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/document.vue?vue&type=script&lang.ts
177
139
  var document_vue_vue_type_script_lang_default = {
178
140
  name: "Document"
179
141
  };
180
142
  var _hoisted_190 = {
181
- xmlns: "http://www.w3.org/2000/svg",
182
- viewBox: "0 0 1024 1024"
183
- }, _hoisted_290 = /* @__PURE__ */ createElementVNode(
184
- "path",
185
- {
143
+ xmlns: "http://www.w3.org/2000/svg",
144
+ viewBox: "0 0 1024 1024"
145
+ },
146
+ _hoisted_290 = /* @__PURE__ */createElementVNode("path", {
186
147
  fill: "currentColor",
187
148
  d: "M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"
188
- },
189
- null,
190
- -1
191
- /* HOISTED */
192
- ), _hoisted_389 = [
193
- _hoisted_290
194
- ];
149
+ }, null, -1
150
+ /* HOISTED */),
151
+ _hoisted_389 = [_hoisted_290];
195
152
  function _sfc_render90(_ctx, _cache, $props, $setup, $data, $options) {
196
153
  return openBlock(), createElementBlock("svg", _hoisted_190, _hoisted_389);
197
154
  }
198
- var document_default = /* @__PURE__ */ export_helper_default(document_vue_vue_type_script_lang_default, [["render", _sfc_render90], ["__file", "document.vue"]]);
155
+ var document_default = /* @__PURE__ */export_helper_default(document_vue_vue_type_script_lang_default, [["render", _sfc_render90], ["__file", "document.vue"]]);
199
156
 
200
157
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/download.vue?vue&type=script&lang.ts
201
158
  var download_vue_vue_type_script_lang_default = {
202
159
  name: "Download"
203
160
  };
204
161
  var _hoisted_191 = {
205
- xmlns: "http://www.w3.org/2000/svg",
206
- viewBox: "0 0 1024 1024"
207
- }, _hoisted_291 = /* @__PURE__ */ createElementVNode(
208
- "path",
209
- {
162
+ xmlns: "http://www.w3.org/2000/svg",
163
+ viewBox: "0 0 1024 1024"
164
+ },
165
+ _hoisted_291 = /* @__PURE__ */createElementVNode("path", {
210
166
  fill: "currentColor",
211
167
  d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64v450.304z"
212
- },
213
- null,
214
- -1
215
- /* HOISTED */
216
- ), _hoisted_390 = [
217
- _hoisted_291
218
- ];
168
+ }, null, -1
169
+ /* HOISTED */),
170
+ _hoisted_390 = [_hoisted_291];
219
171
  function _sfc_render91(_ctx, _cache, $props, $setup, $data, $options) {
220
172
  return openBlock(), createElementBlock("svg", _hoisted_191, _hoisted_390);
221
173
  }
222
- var download_default = /* @__PURE__ */ export_helper_default(download_vue_vue_type_script_lang_default, [["render", _sfc_render91], ["__file", "download.vue"]]);
174
+ var download_default = /* @__PURE__ */export_helper_default(download_vue_vue_type_script_lang_default, [["render", _sfc_render91], ["__file", "download.vue"]]);
223
175
 
224
176
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/zoom-in.vue?vue&type=script&lang.ts
225
177
  var zoom_in_vue_vue_type_script_lang_default = {
226
178
  name: "ZoomIn"
227
179
  };
228
180
  var _hoisted_1292 = {
229
- xmlns: "http://www.w3.org/2000/svg",
230
- viewBox: "0 0 1024 1024"
231
- }, _hoisted_2292 = /* @__PURE__ */ createElementVNode(
232
- "path",
233
- {
181
+ xmlns: "http://www.w3.org/2000/svg",
182
+ viewBox: "0 0 1024 1024"
183
+ },
184
+ _hoisted_2292 = /* @__PURE__ */createElementVNode("path", {
234
185
  fill: "currentColor",
235
186
  d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z"
236
- },
237
- null,
238
- -1
239
- /* HOISTED */
240
- ), _hoisted_3291 = [
241
- _hoisted_2292
242
- ];
187
+ }, null, -1
188
+ /* HOISTED */),
189
+ _hoisted_3291 = [_hoisted_2292];
243
190
  function _sfc_render292(_ctx, _cache, $props, $setup, $data, $options) {
244
191
  return openBlock(), createElementBlock("svg", _hoisted_1292, _hoisted_3291);
245
192
  }
246
- var zoom_in_default = /* @__PURE__ */ export_helper_default(zoom_in_vue_vue_type_script_lang_default, [["render", _sfc_render292], ["__file", "zoom-in.vue"]]);
247
-
248
- var _export_sfc = (sfc, props) => {
249
- const target = sfc.__vccOpts || sfc;
250
- for (const [key, val] of props) {
251
- target[key] = val;
252
- }
253
- return target;
254
- };
193
+ var zoom_in_default = /* @__PURE__ */export_helper_default(zoom_in_vue_vue_type_script_lang_default, [["render", _sfc_render292], ["__file", "zoom-in.vue"]]);
255
194
 
256
195
  const restFetch = new RestFetch({
257
196
  baseURL: ""
258
197
  });
259
- const _sfc_main$1 = defineComponent({
198
+ var script$1 = defineComponent({
260
199
  components: {
261
200
  ElProgress,
262
201
  ElIcon,
@@ -285,6 +224,10 @@ const _sfc_main$1 = defineComponent({
285
224
  type: Function,
286
225
  default: () => NOOP
287
226
  },
227
+ onDownload: {
228
+ type: Function,
229
+ default: void 0
230
+ },
288
231
  preview: {
289
232
  type: Boolean,
290
233
  default: false
@@ -293,14 +236,22 @@ const _sfc_main$1 = defineComponent({
293
236
  emits: {
294
237
  "remove": (e) => e
295
238
  },
296
- setup(props, { emit }) {
239
+ setup(props, {
240
+ emit
241
+ }) {
297
242
  const nsUpload = useNamespace("upload");
298
243
  const nsIcon = useNamespace("icon");
299
- const { t } = useLocale();
244
+ const {
245
+ t
246
+ } = useLocale();
300
247
  const handleRemove = (file = props.file) => {
301
248
  emit("remove", file);
302
249
  };
303
250
  const handleDownload = (file = props.file) => {
251
+ if (props.onDownload) {
252
+ props.onDownload(file);
253
+ return;
254
+ }
304
255
  let url = "";
305
256
  if (file.url) {
306
257
  url = file.url;
@@ -323,8 +274,9 @@ const _sfc_main$1 = defineComponent({
323
274
  };
324
275
  }
325
276
  });
277
+
326
278
  const _hoisted_1$1 = ["src"];
327
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
279
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
328
280
  const _component_Document = resolveComponent("Document");
329
281
  const _component_el_icon = resolveComponent("el-icon");
330
282
  const _component_Download = resolveComponent("Download");
@@ -334,160 +286,179 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
334
286
  const _component_Close = resolveComponent("Close");
335
287
  const _component_zoom_in = resolveComponent("zoom-in");
336
288
  const _component_Delete = resolveComponent("Delete");
337
- return openBlock(), createElementBlock(Fragment, null, [
338
- createCommentVNode(" picture "),
339
- _ctx.listType === "picture" || _ctx.file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
340
- /\.(svg|png|jpg|jpeg)$/.test(_ctx.file.name) ? (openBlock(), createElementBlock("img", {
289
+ return openBlock(), createElementBlock(
290
+ Fragment,
291
+ null,
292
+ [createCommentVNode(" picture "), _ctx.listType === "picture" || _ctx.file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock(
293
+ Fragment,
294
+ {
295
+ key: 0
296
+ },
297
+ [/\.(svg|png|jpg|jpeg)$/.test(_ctx.file.name) ? (openBlock(), createElementBlock("img", {
341
298
  key: 0,
342
299
  class: normalizeClass(_ctx.nsUpload.be("list", "item-thumbnail")),
343
300
  src: _ctx.file.url,
344
301
  alt: ""
345
- }, null, 10, _hoisted_1$1)) : (openBlock(), createBlock(_component_Document, { key: 1 }))
346
- ], 64)) : createCommentVNode("v-if", true),
347
- createCommentVNode(" text "),
348
- _ctx.listType !== "picture" && (_ctx.file.status === "uploading" || _ctx.listType !== "picture-card") ? (openBlock(), createElementBlock("div", {
349
- key: 1,
350
- class: normalizeClass(_ctx.nsUpload.be("list", "item-info"))
351
- }, [
352
- createElementVNode("a", {
353
- class: normalizeClass(_ctx.nsUpload.be("list", "item-name")),
354
- onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.onPreview(_ctx.file), ["prevent"]))
355
- }, [
356
- createVNode(_component_el_icon, {
302
+ }, null, 10, _hoisted_1$1)) : (openBlock(), createBlock(_component_Document, {
303
+ key: 1
304
+ }))],
305
+ 64
306
+ /* STABLE_FRAGMENT */
307
+ )) : createCommentVNode("v-if", true), createCommentVNode(" text "), _ctx.listType !== "picture" && (_ctx.file.status === "uploading" || _ctx.listType !== "picture-card") ? (openBlock(), createElementBlock(
308
+ "div",
309
+ {
310
+ key: 1,
311
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-info"))
312
+ },
313
+ [createElementVNode(
314
+ "a",
315
+ {
316
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-name")),
317
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.onPreview(_ctx.file), ["prevent"]))
318
+ },
319
+ [createVNode(_component_el_icon, {
357
320
  class: normalizeClass(_ctx.nsIcon.m("document"))
358
321
  }, {
359
- default: withCtx(() => [
360
- createVNode(_component_Document)
361
- ]),
322
+ default: withCtx(() => [createVNode(_component_Document)]),
362
323
  _: 1
363
- }, 8, ["class"]),
364
- createVNode(_component_el_icon, {
365
- class: normalizeClass([
366
- _ctx.nsIcon.m("download"),
367
- _ctx.nsIcon.m("download-primary")
368
- ]),
324
+ /* STABLE */
325
+ }, 8, ["class"]), createVNode(_component_el_icon, {
326
+ class: normalizeClass([_ctx.nsIcon.m("download"), _ctx.nsIcon.m("download-primary")]),
369
327
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleDownload(_ctx.file))
370
328
  }, {
371
- default: withCtx(() => [
372
- createVNode(_component_Download)
373
- ]),
329
+ default: withCtx(() => [createVNode(_component_Download)]),
374
330
  _: 1
375
- }, 8, ["class"]),
376
- createElementVNode("span", {
377
- class: normalizeClass(_ctx.nsUpload.be("list", "item-file-name"))
378
- }, toDisplayString(_ctx.file.name), 3)
379
- ], 2),
380
- _ctx.file.status === "uploading" ? (openBlock(), createBlock(_component_el_progress, {
331
+ /* STABLE */
332
+ }, 8, ["class"]), createElementVNode(
333
+ "span",
334
+ {
335
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-file-name"))
336
+ },
337
+ toDisplayString(_ctx.file.name),
338
+ 3
339
+ /* TEXT, CLASS */
340
+ )],
341
+ 2
342
+ /* CLASS */
343
+ ), _ctx.file.status === "uploading" ? (openBlock(), createBlock(_component_el_progress, {
381
344
  key: 0,
382
345
  type: _ctx.listType === "picture-card" ? "circle" : "line",
383
346
  "stroke-width": _ctx.listType === "picture-card" ? 6 : 2,
384
347
  percentage: Number(_ctx.file.percentage),
385
348
  style: normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem")
386
- }, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true)
387
- ], 2)) : createCommentVNode("v-if", true),
388
- createElementVNode("label", {
389
- class: normalizeClass(_ctx.nsUpload.be("list", "item-status-label"))
390
- }, [
391
- _ctx.listType === "text" ? (openBlock(), createBlock(_component_el_icon, {
349
+ }, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true)],
350
+ 2
351
+ /* CLASS */
352
+ )) : createCommentVNode("v-if", true), createElementVNode(
353
+ "label",
354
+ {
355
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-status-label"))
356
+ },
357
+ [_ctx.listType === "text" ? (openBlock(), createBlock(_component_el_icon, {
392
358
  key: 0,
393
- class: normalizeClass([
394
- _ctx.nsIcon.m("upload-success"),
395
- _ctx.nsIcon.m("circle-check")
396
- ])
359
+ class: normalizeClass([_ctx.nsIcon.m("upload-success"), _ctx.nsIcon.m("circle-check")])
397
360
  }, {
398
- default: withCtx(() => [
399
- createVNode(_component_circle_check)
400
- ]),
361
+ default: withCtx(() => [createVNode(_component_circle_check)]),
401
362
  _: 1
363
+ /* STABLE */
402
364
  }, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(_component_el_icon, {
403
365
  key: 1,
404
366
  class: normalizeClass([_ctx.nsIcon.m("upload-success"), _ctx.nsIcon.m("check")])
405
367
  }, {
406
- default: withCtx(() => [
407
- createVNode(_component_Check)
408
- ]),
368
+ default: withCtx(() => [createVNode(_component_Check)]),
409
369
  _: 1
410
- }, 8, ["class"])) : createCommentVNode("v-if", true)
411
- ], 2),
412
- !_ctx.disabled ? (openBlock(), createBlock(_component_el_icon, {
370
+ /* STABLE */
371
+ }, 8, ["class"])) : createCommentVNode("v-if", true)],
372
+ 2
373
+ /* CLASS */
374
+ ), !_ctx.disabled ? (openBlock(), createBlock(_component_el_icon, {
413
375
  key: 2,
414
376
  class: normalizeClass(_ctx.nsIcon.m("close")),
415
377
  onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleRemove(_ctx.file))
416
378
  }, {
417
- default: withCtx(() => [
418
- createVNode(_component_Close)
419
- ]),
379
+ default: withCtx(() => [createVNode(_component_Close)]),
420
380
  _: 1
421
- }, 8, ["class"])) : createCommentVNode("v-if", true),
422
- createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
423
- createCommentVNode(" This is a bug which needs to be fixed "),
424
- createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
425
- createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{
381
+ /* STABLE */
382
+ }, 8, ["class"])) : createCommentVNode("v-if", true), createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"), createCommentVNode(" This is a bug which needs to be fixed "), createCommentVNode(" TODO: Fix the incorrect navigation interaction "), createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{
426
383
  t('el.upload.deleteTip')
427
- }}</i> `),
428
- createCommentVNode(" picture-card "),
429
- _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
430
- key: 3,
431
- class: normalizeClass(_ctx.nsUpload.be("list", "item-actions"))
432
- }, [
433
- _ctx.preview ? (openBlock(), createElementBlock("span", {
434
- key: 0,
435
- class: normalizeClass(_ctx.nsUpload.be("list", "item-preview")),
436
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.onPreview(_ctx.file))
437
- }, [
438
- createVNode(_component_el_icon, {
384
+ }}</i> `), createCommentVNode(" picture-card "), _ctx.listType === "picture-card" ? (openBlock(), createElementBlock(
385
+ "span",
386
+ {
387
+ key: 3,
388
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-actions"))
389
+ },
390
+ [_ctx.preview ? (openBlock(), createElementBlock(
391
+ "span",
392
+ {
393
+ key: 0,
394
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-preview")),
395
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.onPreview(_ctx.file))
396
+ },
397
+ [createVNode(_component_el_icon, {
439
398
  class: normalizeClass(_ctx.nsIcon.m("zoom-in"))
440
399
  }, {
441
- default: withCtx(() => [
442
- createVNode(_component_zoom_in)
443
- ]),
400
+ default: withCtx(() => [createVNode(_component_zoom_in)]),
444
401
  _: 1
445
- }, 8, ["class"])
446
- ], 2)) : createCommentVNode("v-if", true),
447
- createCommentVNode(" \u4E0B\u8F7D "),
448
- createElementVNode("span", {
449
- class: normalizeClass(_ctx.nsUpload.be("list", "item-download")),
450
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleDownload(_ctx.file))
451
- }, [
452
- createVNode(_component_el_icon, {
402
+ /* STABLE */
403
+ }, 8, ["class"])],
404
+ 2
405
+ /* CLASS */
406
+ )) : createCommentVNode("v-if", true), createCommentVNode(" \u4E0B\u8F7D "), createElementVNode(
407
+ "span",
408
+ {
409
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-download")),
410
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleDownload(_ctx.file))
411
+ },
412
+ [createVNode(_component_el_icon, {
453
413
  class: normalizeClass(_ctx.nsIcon.m("download"))
454
414
  }, {
455
- default: withCtx(() => [
456
- createVNode(_component_Download)
457
- ]),
415
+ default: withCtx(() => [createVNode(_component_Download)]),
458
416
  _: 1
459
- }, 8, ["class"])
460
- ], 2),
461
- !_ctx.disabled ? (openBlock(), createElementBlock("span", {
462
- key: 1,
463
- class: normalizeClass(_ctx.nsUpload.be("list", "item-delete")),
464
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleRemove(_ctx.file))
465
- }, [
466
- createVNode(_component_el_icon, {
417
+ /* STABLE */
418
+ }, 8, ["class"])],
419
+ 2
420
+ /* CLASS */
421
+ ), !_ctx.disabled ? (openBlock(), createElementBlock(
422
+ "span",
423
+ {
424
+ key: 1,
425
+ class: normalizeClass(_ctx.nsUpload.be("list", "item-delete")),
426
+ onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleRemove(_ctx.file))
427
+ },
428
+ [createVNode(_component_el_icon, {
467
429
  class: normalizeClass(_ctx.nsIcon.m("delete"))
468
430
  }, {
469
- default: withCtx(() => [
470
- createVNode(_component_Delete)
471
- ]),
431
+ default: withCtx(() => [createVNode(_component_Delete)]),
472
432
  _: 1
473
- }, 8, ["class"])
474
- ], 2)) : createCommentVNode("v-if", true)
475
- ], 2)) : createCommentVNode("v-if", true)
476
- ], 64);
433
+ /* STABLE */
434
+ }, 8, ["class"])],
435
+ 2
436
+ /* CLASS */
437
+ )) : createCommentVNode("v-if", true)],
438
+ 2
439
+ /* CLASS */
440
+ )) : createCommentVNode("v-if", true)],
441
+ 64
442
+ /* STABLE_FRAGMENT */
443
+ );
477
444
  }
478
- var FileVue = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "file.vue"]]);
479
445
 
480
- const _sfc_main = defineComponent({
446
+ script$1.render = render$1;
447
+ script$1.__file = "upload/src/file.vue";
448
+
449
+ var script = defineComponent({
481
450
  name: "VkfUpload",
482
451
  components: {
483
452
  VkfFormItem,
484
453
  ElUpload,
485
- FileVue,
454
+ FileVue: script$1,
486
455
  ElLink
487
456
  },
488
- emits,
489
457
  props,
490
- setup(props2, { emit }) {
458
+ emits,
459
+ setup(props2, {
460
+ emit
461
+ }) {
491
462
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
492
463
  const coreBindProps = createUploadBindProps(props2, ["disabled", "fileList", "beforeUpload", "onSuccess"]);
493
464
  const uploadRef = shallowRef();
@@ -529,80 +500,96 @@ const _sfc_main = defineComponent({
529
500
  handleRemove,
530
501
  readonly,
531
502
  onSuccess,
503
+ // onProgress,
532
504
  beforeUpload
533
505
  };
534
506
  }
535
507
  });
536
- const _hoisted_1 = { class: "el-upload__tip" };
537
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
508
+
509
+ const _hoisted_1 = {
510
+ class: "el-upload__tip"
511
+ };
512
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
538
513
  const _component_ElLink = resolveComponent("ElLink");
539
514
  const _component_FileVue = resolveComponent("FileVue");
540
515
  const _component_ElUpload = resolveComponent("ElUpload");
541
516
  const _component_VkfFormItem = resolveComponent("VkfFormItem");
542
- return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
543
- default: withCtx(() => [
544
- createVNode(_component_ElUpload, mergeProps({
517
+ return openBlock(), createBlock(
518
+ _component_VkfFormItem,
519
+ normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
520
+ {
521
+ default: withCtx(() => [createVNode(_component_ElUpload, mergeProps(_ctx.coreBindProps, {
522
+ ref: "uploadRef",
545
523
  class: ["vkf-upload", {
546
524
  "is-readonly": _ctx.readonly,
547
525
  "is-empty": _ctx.fileList?.length === 0,
548
526
  "is-limit": _ctx.limit && _ctx.fileList?.length >= _ctx.limit
549
- }]
550
- }, _ctx.coreBindProps, {
551
- fileList: _ctx.fileList ?? [],
552
- "onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fileList", $event)),
553
- ref: "uploadRef",
527
+ }],
528
+ "file-list": _ctx.fileList ?? [],
554
529
  "on-success": _ctx.onSuccess,
555
530
  "before-upload": _ctx.beforeUpload,
556
- disabled: _ctx.readonly || _ctx.disabled
531
+ disabled: _ctx.readonly || _ctx.disabled,
532
+ "onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fileList", $event))
557
533
  }), createSlots({
558
- file: withCtx(({ file }) => [
559
- createVNode(_component_FileVue, {
560
- file,
561
- listType: _ctx.listType,
562
- disabled: _ctx.readonly || _ctx.disabled,
563
- onPreview: _ctx.onPreview,
564
- preview: _ctx.preview,
565
- onRemove: _ctx.handleRemove
566
- }, null, 8, ["file", "listType", "disabled", "onPreview", "preview", "onRemove"])
567
- ]),
568
- default: withCtx(() => [
569
- renderSlot(_ctx.$slots, "default", {}, () => [
570
- createVNode(_component_ElLink, { type: "primary" }, {
571
- default: withCtx(() => [
572
- createTextVNode("+ \u9009\u62E9\u6587\u4EF6")
573
- ]),
574
- _: 1
575
- })
576
- ])
577
- ]),
534
+ file: withCtx(({
535
+ file
536
+ }) => [createVNode(_component_FileVue, {
537
+ file,
538
+ "list-type": _ctx.listType,
539
+ disabled: _ctx.readonly || _ctx.disabled,
540
+ "on-preview": _ctx.onPreview,
541
+ preview: _ctx.preview,
542
+ "on-download": _ctx.onDownload,
543
+ onRemove: _ctx.handleRemove
544
+ }, null, 8, ["file", "list-type", "disabled", "on-preview", "preview", "on-download", "onRemove"])]),
545
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(_component_ElLink, {
546
+ type: "primary"
547
+ }, {
548
+ default: withCtx(() => [createTextVNode(" + \u9009\u62E9\u6587\u4EF6 ")]),
549
+ _: 1
550
+ /* STABLE */
551
+ })])]),
578
552
  _: 2
579
- }, [
580
- _ctx.tip ? {
581
- name: "tip",
582
- fn: withCtx(() => [
583
- createElementVNode("div", _hoisted_1, toDisplayString(_ctx.tip), 1)
584
- ]),
585
- key: "0"
586
- } : void 0
587
- ]), 1040, ["class", "fileList", "on-success", "before-upload", "disabled"]),
588
- createElementVNode("span", {
589
- class: normalizeClass(["vkf-upload-empty-tip", {
590
- "is-readonly": _ctx.readonly,
591
- "is-empty": _ctx.fileList?.length === 0
592
- }])
593
- }, "\u6682\u65E0", 2)
594
- ]),
595
- _: 3
596
- }, 16);
553
+ /* DYNAMIC */
554
+ }, [_ctx.tip ? {
555
+ name: "tip",
556
+ fn: withCtx(() => [createElementVNode(
557
+ "div",
558
+ _hoisted_1,
559
+ toDisplayString(_ctx.tip),
560
+ 1
561
+ /* TEXT */
562
+ )]),
563
+ key: "0"
564
+ } : void 0]), 1040, ["class", "file-list", "on-success", "before-upload", "disabled"]), createElementVNode(
565
+ "span",
566
+ {
567
+ class: normalizeClass(["vkf-upload-empty-tip", {
568
+ "is-readonly": _ctx.readonly,
569
+ "is-empty": _ctx.fileList?.length === 0
570
+ }])
571
+ },
572
+ "\u6682\u65E0",
573
+ 2
574
+ /* CLASS */
575
+ )]),
576
+ _: 3
577
+ /* FORWARDED */
578
+ },
579
+ 16
580
+ /* FULL_PROPS */
581
+ );
597
582
  }
598
- var VkfUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
583
+
584
+ script.render = render;
585
+ script.__file = "upload/src/index.vue";
599
586
 
600
587
  var types = /*#__PURE__*/Object.freeze({
601
588
  __proto__: null
602
589
  });
603
590
 
604
- VkfUpload.install = (app) => {
605
- app.component(VkfUpload.name, VkfUpload);
591
+ script.install = (app) => {
592
+ app.component(script.name, script);
606
593
  };
607
594
 
608
- export { VkfUpload, ctx as _VkfUploadCtx, types as __VkfUpload, VkfUpload as default };
595
+ export { script as VkfUpload, ctx as _VkfUploadCtx, types as __VkfUpload, script as default };