bkui-vue 2.0.1-beta.11 → 2.0.1-beta.110

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 (523) hide show
  1. package/README.md +15 -0
  2. package/dist/index.cjs.js +142 -168
  3. package/dist/index.esm.js +29125 -32074
  4. package/dist/index.umd.js +142 -168
  5. package/dist/style.css +1 -1
  6. package/dist/style.variable.css +1 -1
  7. package/lib/affix/affix.variable.css +1 -0
  8. package/lib/affix/index.d.ts +111 -57
  9. package/lib/affix/index.js +24 -24
  10. package/lib/alert/alert.d.ts +5 -12
  11. package/lib/alert/alert.variable.css +1 -0
  12. package/lib/alert/index.d.ts +131 -93
  13. package/lib/alert/index.js +25 -25
  14. package/lib/animate-number/index.d.ts +96 -33
  15. package/lib/animate-number/index.js +7 -8
  16. package/lib/backtop/backtop.d.ts +1 -1
  17. package/lib/backtop/backtop.variable.css +1 -0
  18. package/lib/backtop/index.d.ts +118 -70
  19. package/lib/backtop/index.js +16 -17
  20. package/lib/badge/badge.variable.css +1 -0
  21. package/lib/badge/index.d.ts +152 -119
  22. package/lib/badge/index.js +20 -20
  23. package/lib/breadcrumb/breadcrumb.variable.css +1 -0
  24. package/lib/breadcrumb/index.d.ts +119 -67
  25. package/lib/breadcrumb/index.js +17 -17
  26. package/lib/button/button.css +188 -144
  27. package/lib/button/button.d.ts +10 -10
  28. package/lib/button/button.less +74 -71
  29. package/lib/button/button.variable.css +189 -144
  30. package/lib/button/index.d.ts +160 -124
  31. package/lib/button/index.js +26 -26
  32. package/lib/card/card.variable.css +1 -0
  33. package/lib/card/index.d.ts +157 -128
  34. package/lib/card/index.js +22 -20
  35. package/lib/cascader/cascader-panel.d.ts +6 -1
  36. package/lib/cascader/cascader.css +4 -0
  37. package/lib/cascader/cascader.d.ts +8 -4
  38. package/lib/cascader/cascader.less +5 -0
  39. package/lib/cascader/cascader.variable.css +5 -0
  40. package/lib/cascader/index.d.ts +355 -393
  41. package/lib/cascader/index.js +377 -308
  42. package/lib/cascader/interface.d.ts +1 -1
  43. package/lib/checkbox/checkbox-group.d.ts +0 -16
  44. package/lib/checkbox/checkbox.css +8 -0
  45. package/lib/checkbox/checkbox.d.ts +40 -8
  46. package/lib/checkbox/checkbox.less +12 -0
  47. package/lib/checkbox/checkbox.variable.css +9 -0
  48. package/lib/checkbox/index.d.ts +194 -127
  49. package/lib/checkbox/index.js +65 -52
  50. package/lib/checkbox/type.d.ts +1 -1
  51. package/lib/code-diff/code-diff.variable.css +1 -0
  52. package/lib/code-diff/index.d.ts +82 -65
  53. package/lib/code-diff/index.js +446 -389
  54. package/lib/collapse/collapse-panel.d.ts +5 -5
  55. package/lib/collapse/collapse.variable.css +1 -0
  56. package/lib/collapse/index.d.ts +180 -161
  57. package/lib/collapse/index.js +31 -30
  58. package/lib/collapse/props.d.ts +2 -2
  59. package/lib/collapse/utils.d.ts +2 -2
  60. package/lib/collapse-transition/collapse-transition.variable.css +1 -0
  61. package/lib/collapse-transition/index.d.ts +94 -19
  62. package/lib/collapse-transition/index.js +3 -4
  63. package/lib/color-picker/color-picker.d.ts +17 -1
  64. package/lib/color-picker/color-picker.variable.css +1 -0
  65. package/lib/color-picker/index.d.ts +168 -124
  66. package/lib/color-picker/index.js +93 -88
  67. package/lib/components.d.ts +30 -32
  68. package/lib/components.js +29 -31
  69. package/lib/config-provider/config-provider.variable.css +1 -0
  70. package/lib/config-provider/index.d.ts +228 -161
  71. package/lib/config-provider/index.js +17 -17
  72. package/lib/container/container.d.ts +1 -1
  73. package/lib/container/container.variable.css +1 -0
  74. package/lib/container/index.d.ts +85 -74
  75. package/lib/container/index.js +32 -35
  76. package/lib/date-picker/base/date-table.d.ts +1 -1
  77. package/lib/date-picker/base/month-table.d.ts +1 -1
  78. package/lib/date-picker/base/picker-dropdown.d.ts +2 -2
  79. package/lib/date-picker/base/time-spinner.d.ts +3 -3
  80. package/lib/date-picker/base/year-table.d.ts +1 -1
  81. package/lib/date-picker/date-picker.d.ts +7 -15
  82. package/lib/date-picker/date-picker.variable.css +1 -0
  83. package/lib/date-picker/index.d.ts +356 -399
  84. package/lib/date-picker/index.js +343 -297
  85. package/lib/date-picker/interface.d.ts +9 -9
  86. package/lib/date-picker/panel/date-range.d.ts +6 -6
  87. package/lib/date-picker/panel/date.d.ts +2 -2
  88. package/lib/date-picker/panel/time-range.d.ts +3 -12
  89. package/lib/date-picker/panel/time.d.ts +3 -12
  90. package/lib/date-picker/props.d.ts +1 -5
  91. package/lib/date-picker/time-picker.d.ts +7 -14
  92. package/lib/date-picker/utils.d.ts +1 -1
  93. package/lib/dialog/dialog.d.ts +47 -31
  94. package/lib/dialog/dialog.variable.css +1 -0
  95. package/lib/dialog/index.d.ts +309 -305
  96. package/lib/dialog/index.js +252 -249
  97. package/lib/dialog/props.d.ts +20 -13
  98. package/lib/directives/index.d.ts +4 -3
  99. package/lib/directives/index.js +219 -197
  100. package/lib/directives/tooltips.d.ts +1 -1
  101. package/lib/dist.index.js +2 -4
  102. package/lib/divider/divider.d.ts +5 -5
  103. package/lib/divider/divider.variable.css +1 -0
  104. package/lib/divider/index.d.ts +116 -62
  105. package/lib/divider/index.js +4 -5
  106. package/lib/divider/props.d.ts +2 -2
  107. package/lib/dropdown/dropdown-item.d.ts +1 -1
  108. package/lib/dropdown/dropdown-menu.d.ts +1 -1
  109. package/lib/dropdown/dropdown.d.ts +7 -7
  110. package/lib/dropdown/dropdown.variable.css +1 -0
  111. package/lib/dropdown/index.d.ts +144 -102
  112. package/lib/dropdown/index.js +32 -32
  113. package/lib/exception/exception.d.ts +9 -9
  114. package/lib/exception/exception.variable.css +1 -0
  115. package/lib/exception/index.d.ts +107 -46
  116. package/lib/exception/index.js +31 -31
  117. package/lib/exception/typings/index.d.ts +1 -1
  118. package/lib/fixed-navbar/fixed-navbar.variable.css +1 -0
  119. package/lib/fixed-navbar/index.d.ts +113 -59
  120. package/lib/fixed-navbar/index.js +4 -5
  121. package/lib/form/form-item.d.ts +7 -19
  122. package/lib/form/form.d.ts +3 -3
  123. package/lib/form/form.variable.css +1 -0
  124. package/lib/form/index.d.ts +139 -94
  125. package/lib/form/index.js +44 -42
  126. package/lib/form/type.d.ts +2 -2
  127. package/lib/icon/angle-double-down-line.js +17 -17
  128. package/lib/icon/angle-double-left-line.js +17 -17
  129. package/lib/icon/angle-double-left.js +17 -17
  130. package/lib/icon/angle-double-right-line.js +17 -17
  131. package/lib/icon/angle-double-right.js +17 -17
  132. package/lib/icon/angle-double-up-line.js +17 -17
  133. package/lib/icon/angle-down-fill.js +17 -17
  134. package/lib/icon/angle-down-line.js +17 -17
  135. package/lib/icon/angle-down.js +17 -17
  136. package/lib/icon/angle-left.js +17 -17
  137. package/lib/icon/angle-right.js +17 -17
  138. package/lib/icon/angle-up-fill.js +17 -17
  139. package/lib/icon/angle-up.js +17 -17
  140. package/lib/icon/archive-fill.js +17 -17
  141. package/lib/icon/arrows-left.js +17 -17
  142. package/lib/icon/arrows-right.js +17 -17
  143. package/lib/icon/assistant.js +17 -17
  144. package/lib/icon/audio-fill.js +17 -17
  145. package/lib/icon/bk.js +17 -17
  146. package/lib/icon/circle.js +17 -17
  147. package/lib/icon/close-line.js +17 -17
  148. package/lib/icon/close.js +17 -17
  149. package/lib/icon/code.js +17 -17
  150. package/lib/icon/cog-shape.js +17 -17
  151. package/lib/icon/collapse-left.js +17 -17
  152. package/lib/icon/copy-shape.js +17 -17
  153. package/lib/icon/copy.js +17 -17
  154. package/lib/icon/data-shape.js +17 -17
  155. package/lib/icon/del.js +17 -17
  156. package/lib/icon/doc-fill.js +17 -17
  157. package/lib/icon/done.js +17 -17
  158. package/lib/icon/down-shape.js +17 -17
  159. package/lib/icon/down-small.js +17 -17
  160. package/lib/icon/edit-line.js +17 -17
  161. package/lib/icon/ellipsis.js +17 -17
  162. package/lib/icon/enlarge-line.js +17 -17
  163. package/lib/icon/error.js +17 -17
  164. package/lib/icon/excel-fill.js +17 -17
  165. package/lib/icon/exclamation-circle-shape.js +17 -17
  166. package/lib/icon/eye.js +17 -17
  167. package/lib/icon/filliscreen-line.js +17 -17
  168. package/lib/icon/fix-line.js +17 -17
  169. package/lib/icon/fix-shape.js +17 -17
  170. package/lib/icon/folder-open.js +17 -17
  171. package/lib/icon/folder-shape-open.js +17 -17
  172. package/lib/icon/folder-shape.js +17 -17
  173. package/lib/icon/folder.js +17 -17
  174. package/lib/icon/funnel.js +17 -17
  175. package/lib/icon/grag-fill.js +17 -17
  176. package/lib/icon/help-document-fill.js +17 -17
  177. package/lib/icon/help-fill.js +17 -17
  178. package/lib/icon/help.js +17 -17
  179. package/lib/icon/image-fill.js +17 -17
  180. package/lib/icon/img-error.js +17 -17
  181. package/lib/icon/img-placehoulder.js +17 -17
  182. package/lib/icon/index.d.ts +11 -11
  183. package/lib/icon/index.js +11 -11
  184. package/lib/icon/info-line.js +17 -17
  185. package/lib/icon/info.js +17 -17
  186. package/lib/icon/left-shape.js +17 -17
  187. package/lib/icon/left-turn-line.js +17 -17
  188. package/lib/icon/loading.js +17 -17
  189. package/lib/icon/narrow-line.js +17 -17
  190. package/lib/icon/original.js +17 -17
  191. package/lib/icon/pdf-fill.js +17 -17
  192. package/lib/icon/play-shape.js +17 -17
  193. package/lib/icon/plus.js +17 -17
  194. package/lib/icon/ppt-fill.js +17 -17
  195. package/lib/icon/qq.js +17 -17
  196. package/lib/icon/right-shape.js +17 -17
  197. package/lib/icon/right-turn-line.js +17 -17
  198. package/lib/icon/search.js +17 -17
  199. package/lib/icon/share.js +17 -17
  200. package/lib/icon/spinner.js +17 -17
  201. package/lib/icon/success.js +17 -17
  202. package/lib/icon/switcher-loading.js +17 -17
  203. package/lib/icon/text-all.js +17 -17
  204. package/lib/icon/text-file.js +17 -17
  205. package/lib/icon/text-fill.js +17 -17
  206. package/lib/icon/transfer.js +17 -17
  207. package/lib/icon/tree-application-shape.js +17 -17
  208. package/lib/icon/unfull-screen.js +17 -17
  209. package/lib/icon/unvisible.js +17 -17
  210. package/lib/icon/up-shape.js +17 -17
  211. package/lib/icon/upload.js +17 -17
  212. package/lib/icon/video-fill.js +17 -17
  213. package/lib/icon/warn.js +17 -17
  214. package/lib/icon/weixin-pro.js +17 -17
  215. package/lib/icon/weixin.js +17 -17
  216. package/lib/image/image-viewer.d.ts +1 -1
  217. package/lib/image/image-viewer.variable.css +1 -0
  218. package/lib/image/image.variable.css +1 -0
  219. package/lib/image/index.d.ts +149 -113
  220. package/lib/image/index.js +46 -48
  221. package/lib/index.d.ts +9 -3
  222. package/lib/index.js +5 -29
  223. package/lib/info-box/index.js +250 -250
  224. package/lib/info-box/info-box.d.ts +15 -15
  225. package/lib/info-box/info-box.variable.css +1 -0
  226. package/lib/input/index.d.ts +299 -332
  227. package/lib/input/index.js +110 -561
  228. package/lib/input/input.css +23 -1
  229. package/lib/input/input.d.ts +15 -15
  230. package/lib/input/input.less +30 -1
  231. package/lib/input/input.variable.css +24 -1
  232. package/lib/link/index.d.ts +127 -78
  233. package/lib/link/index.js +5 -5
  234. package/lib/link/link.d.ts +5 -5
  235. package/lib/link/link.variable.css +1 -0
  236. package/lib/loading/index.d.ts +162 -135
  237. package/lib/loading/index.js +43 -40
  238. package/lib/loading/loading.d.ts +9 -9
  239. package/lib/loading/loading.variable.css +1 -0
  240. package/lib/locale/index.d.ts +1 -1
  241. package/lib/menu/index.d.ts +131 -51
  242. package/lib/menu/index.js +46 -27
  243. package/lib/menu/menu-group.d.ts +9 -0
  244. package/lib/menu/menu-item.d.ts +9 -0
  245. package/lib/menu/menu.css +29 -17
  246. package/lib/menu/menu.less +33 -18
  247. package/lib/menu/menu.variable.css +30 -17
  248. package/lib/menu/submenu.d.ts +1 -0
  249. package/lib/menu/submenu.variable.css +1 -0
  250. package/lib/menu/utils.d.ts +3 -3
  251. package/lib/message/index.js +43 -42
  252. package/lib/message/message.css +2 -1
  253. package/lib/message/message.less +3 -2
  254. package/lib/message/message.variable.css +3 -1
  255. package/lib/message/messageConstructor.d.ts +21 -21
  256. package/lib/modal/index.d.ts +214 -159
  257. package/lib/modal/index.js +68 -47
  258. package/lib/modal/modal.d.ts +24 -8
  259. package/lib/modal/modal.variable.css +1 -0
  260. package/lib/modal/props.mixin.d.ts +10 -3
  261. package/lib/navigation/index.d.ts +188 -152
  262. package/lib/navigation/index.js +27 -29
  263. package/lib/navigation/navigation.d.ts +1 -1
  264. package/lib/navigation/navigation.variable.css +1 -0
  265. package/lib/notify/index.js +25 -24
  266. package/lib/notify/notify.variable.css +1 -0
  267. package/lib/notify/notifyConstructor.d.ts +5 -5
  268. package/lib/overflow-title/components/overflow-title.d.ts +45 -16
  269. package/lib/overflow-title/index.d.ts +298 -328
  270. package/lib/overflow-title/index.js +85 -28
  271. package/lib/overflow-title/overflow-title.css +3 -0
  272. package/lib/overflow-title/overflow-title.less +4 -0
  273. package/lib/overflow-title/overflow-title.variable.css +3 -0
  274. package/lib/overflow-title/props.d.ts +36 -21
  275. package/lib/pagination/index.d.ts +198 -203
  276. package/lib/pagination/index.js +128 -68
  277. package/lib/pagination/pagination.css +8 -8
  278. package/lib/pagination/pagination.d.ts +0 -13
  279. package/lib/pagination/pagination.less +14 -13
  280. package/lib/pagination/pagination.variable.css +9 -8
  281. package/lib/pagination/type.d.ts +1 -1
  282. package/lib/pagination/use-limit.d.ts +1 -1
  283. package/lib/pagination/use-total.d.ts +1 -1
  284. package/lib/plugin-popover/index.js +311 -304
  285. package/lib/pop-confirm/index.d.ts +162 -148
  286. package/lib/pop-confirm/index.js +40 -35
  287. package/lib/pop-confirm/pop-confirm.css +3 -1
  288. package/lib/pop-confirm/pop-confirm.d.ts +10 -20
  289. package/lib/pop-confirm/pop-confirm.less +3 -1
  290. package/lib/pop-confirm/pop-confirm.variable.css +4 -1
  291. package/lib/pop-confirm/props.d.ts +8 -11
  292. package/lib/popover/const.d.ts +3 -3
  293. package/lib/popover/content.d.ts +6 -3
  294. package/lib/popover/index.d.ts +411 -380
  295. package/lib/popover/index.js +311 -304
  296. package/lib/popover/plugin-popover.d.ts +1 -1
  297. package/lib/popover/popover.d.ts +51 -8
  298. package/lib/popover/popover.variable.css +1 -0
  299. package/lib/popover/props.d.ts +28 -4
  300. package/lib/popover/use-floating.d.ts +2 -2
  301. package/lib/popover/use-popover-init.d.ts +2 -1
  302. package/lib/popover/utils.d.ts +2 -0
  303. package/lib/popover2/index.d.ts +83 -8
  304. package/lib/popover2/index.js +2 -2
  305. package/lib/preset.d.ts +0 -1
  306. package/lib/preset.js +0 -1
  307. package/lib/process/index.d.ts +137 -93
  308. package/lib/process/index.js +229 -229
  309. package/lib/process/process.variable.css +1 -0
  310. package/lib/progress/index.d.ts +192 -183
  311. package/lib/progress/index.js +31 -33
  312. package/lib/progress/progress.d.ts +9 -9
  313. package/lib/progress/progress.variable.css +1 -0
  314. package/lib/radio/index.d.ts +155 -106
  315. package/lib/radio/index.js +76 -63
  316. package/lib/radio/radio-button.d.ts +7 -7
  317. package/lib/radio/radio-group.d.ts +7 -7
  318. package/lib/radio/radio.d.ts +7 -7
  319. package/lib/radio/radio.variable.css +1 -0
  320. package/lib/radio/type.d.ts +1 -1
  321. package/lib/rate/index.d.ts +112 -55
  322. package/lib/rate/index.js +28 -27
  323. package/lib/rate/rate.variable.css +1 -0
  324. package/lib/resize-layout/index.d.ts +204 -157
  325. package/lib/resize-layout/index.js +54 -34
  326. package/lib/resize-layout/resize-layout.d.ts +18 -7
  327. package/lib/resize-layout/resize-layout.variable.css +1 -0
  328. package/lib/scrollbar/css/scrollbar.css +109 -0
  329. package/lib/scrollbar/css/scrollbar.less +139 -0
  330. package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +96 -61
  331. package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
  332. package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
  333. package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
  334. package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
  335. package/lib/scrollbar/handlers/touch.d.ts +4 -0
  336. package/lib/scrollbar/helper/class-names.d.ts +21 -0
  337. package/lib/scrollbar/helper/css.d.ts +3 -0
  338. package/lib/scrollbar/helper/dom.d.ts +4 -0
  339. package/lib/scrollbar/helper/event-manager.d.ts +20 -0
  340. package/lib/scrollbar/helper/util.d.ts +11 -0
  341. package/lib/scrollbar/index.d.ts +133 -13
  342. package/lib/scrollbar/index.js +1380 -18482
  343. package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
  344. package/lib/scrollbar/update-geometry.d.ts +8 -0
  345. package/lib/search-select/index.d.ts +946 -701
  346. package/lib/search-select/index.js +644 -486
  347. package/lib/search-select/input.d.ts +20 -8
  348. package/lib/search-select/menu.d.ts +13 -1
  349. package/lib/search-select/search-select.css +45 -47
  350. package/lib/search-select/search-select.d.ts +207 -160
  351. package/lib/search-select/search-select.less +41 -41
  352. package/lib/search-select/search-select.variable.css +46 -47
  353. package/lib/search-select/selected.d.ts +209 -127
  354. package/lib/search-select/utils.d.ts +6 -6
  355. package/lib/select/common.d.ts +4 -4
  356. package/lib/select/index.d.ts +1457 -1384
  357. package/lib/select/index.js +603 -477
  358. package/lib/select/option.d.ts +6 -6
  359. package/lib/select/select.css +9 -4
  360. package/lib/select/select.d.ts +285 -148
  361. package/lib/select/select.less +11 -4
  362. package/lib/select/select.variable.css +10 -4
  363. package/lib/select/selectTagInput.d.ts +9 -8
  364. package/lib/select/type.d.ts +10 -11
  365. package/lib/shared/frame-throttle.d.ts +15 -0
  366. package/lib/shared/index.d.ts +2 -1
  367. package/lib/shared/index.js +166 -101
  368. package/lib/shared/popover.d.ts +3 -3
  369. package/lib/shared/token.d.ts +1 -1
  370. package/lib/shared/vue-types.d.ts +50 -50
  371. package/lib/shared/z-index-manager.d.ts +6 -6
  372. package/lib/sideslider/index.d.ts +220 -182
  373. package/lib/sideslider/index.js +239 -237
  374. package/lib/sideslider/sideslider.css +7 -8
  375. package/lib/sideslider/sideslider.d.ts +24 -8
  376. package/lib/sideslider/sideslider.less +7 -8
  377. package/lib/sideslider/sideslider.variable.css +8 -8
  378. package/lib/slider/index.d.ts +210 -214
  379. package/lib/slider/index.js +246 -249
  380. package/lib/slider/slider.variable.css +1 -0
  381. package/lib/steps/index.d.ts +155 -131
  382. package/lib/steps/index.js +234 -234
  383. package/lib/steps/steps.d.ts +8 -18
  384. package/lib/steps/steps.variable.css +1 -0
  385. package/lib/styles/index.d.ts +1 -0
  386. package/lib/styles/mixins/animate.variable.css +1 -0
  387. package/lib/styles/mixins/popper.variable.css +1 -0
  388. package/lib/styles/mixins/scroll.variable.css +1 -0
  389. package/lib/styles/reset.variable.css +1 -0
  390. package/lib/styles/themes/themes.less +1 -0
  391. package/lib/swiper/index.d.ts +127 -81
  392. package/lib/swiper/index.js +23 -23
  393. package/lib/swiper/swiper.variable.css +1 -0
  394. package/lib/switcher/index.d.ts +179 -157
  395. package/lib/switcher/index.js +24 -22
  396. package/lib/switcher/switcher.d.ts +9 -9
  397. package/lib/switcher/switcher.variable.css +1 -0
  398. package/lib/tab/index.d.ts +220 -258
  399. package/lib/tab/index.js +79 -69
  400. package/lib/tab/props.d.ts +27 -52
  401. package/lib/tab/tab-nav.d.ts +26 -66
  402. package/lib/tab/tab-panel.d.ts +27 -5
  403. package/lib/tab/tab.css +64 -0
  404. package/lib/tab/tab.d.ts +10 -54
  405. package/lib/tab/tab.less +91 -4
  406. package/lib/tab/tab.variable.css +65 -0
  407. package/lib/table/components/ghost-body.d.ts +2 -0
  408. package/lib/table/components/table-cell.d.ts +22 -0
  409. package/lib/table/components/table-column.d.ts +24 -127
  410. package/lib/table/const.d.ts +23 -10
  411. package/lib/table/events.d.ts +16 -112
  412. package/lib/table/hooks/use-cell.d.ts +20 -0
  413. package/lib/table/hooks/use-checkbox-tooltip.d.ts +11 -0
  414. package/lib/table/hooks/use-column-resize.d.ts +7 -0
  415. package/lib/table/hooks/use-column-template.d.ts +5 -0
  416. package/lib/table/hooks/use-columns.d.ts +69 -0
  417. package/lib/table/{plugins → hooks}/use-draggable.d.ts +2 -2
  418. package/lib/table/hooks/use-fixed-column.d.ts +10 -0
  419. package/lib/table/hooks/use-head.d.ts +16 -0
  420. package/lib/table/hooks/use-layout.d.ts +25 -0
  421. package/lib/table/hooks/use-pagination.d.ts +16 -0
  422. package/lib/table/hooks/use-render.d.ts +21 -0
  423. package/lib/table/hooks/use-rows.d.ts +30 -0
  424. package/lib/table/hooks/use-settings.d.ts +138 -0
  425. package/lib/table/{plugins → hooks}/use-shift-key.d.ts +4 -2
  426. package/lib/table/index.d.ts +412 -1029
  427. package/lib/table/index.js +4698 -20825
  428. package/lib/table/plugins/head-filter.css +5 -0
  429. package/lib/table/plugins/head-filter.d.ts +2 -1
  430. package/lib/table/plugins/head-filter.less +4 -0
  431. package/lib/table/plugins/head-filter.variable.css +6 -0
  432. package/lib/table/plugins/head-sort.variable.css +1 -0
  433. package/lib/table/plugins/settings.css +11 -1
  434. package/lib/table/plugins/settings.less +12 -1
  435. package/lib/table/plugins/settings.variable.css +12 -1
  436. package/lib/table/props.d.ts +127 -62
  437. package/lib/table/table.css +503 -302
  438. package/lib/table/table.d.ts +51 -185
  439. package/lib/table/table.less +244 -112
  440. package/lib/table/table.variable.css +504 -302
  441. package/lib/table/utils.d.ts +44 -21
  442. package/lib/table-column/index.d.ts +156 -369
  443. package/lib/table-column/index.js +143 -62
  444. package/lib/tag/index.d.ts +147 -100
  445. package/lib/tag/index.js +21 -22
  446. package/lib/tag/tag.css +1 -1
  447. package/lib/tag/tag.d.ts +5 -5
  448. package/lib/tag/tag.less +1 -1
  449. package/lib/tag/tag.variable.css +2 -1
  450. package/lib/tag-input/common.d.ts +2 -2
  451. package/lib/tag-input/index.d.ts +595 -712
  452. package/lib/tag-input/index.js +150 -17391
  453. package/lib/tag-input/tag-input.css +12 -9
  454. package/lib/tag-input/tag-input.d.ts +60 -24
  455. package/lib/tag-input/tag-input.less +13 -9
  456. package/lib/tag-input/tag-input.variable.css +13 -9
  457. package/lib/tag-input/tag-props.d.ts +25 -2
  458. package/lib/time-picker/index.d.ts +391 -455
  459. package/lib/time-picker/time-picker.variable.css +1 -0
  460. package/lib/timeline/index.d.ts +131 -64
  461. package/lib/timeline/index.js +8 -8
  462. package/lib/timeline/timeline.variable.css +1 -0
  463. package/lib/transfer/const.d.ts +2 -2
  464. package/lib/transfer/index.d.ts +206 -191
  465. package/lib/transfer/index.js +3 -5
  466. package/lib/transfer/transfer.variable.css +1 -0
  467. package/lib/tree/constant.d.ts +22 -20
  468. package/lib/tree/index.d.ts +329 -357
  469. package/lib/tree/index.js +176 -17389
  470. package/lib/tree/props.d.ts +18 -11
  471. package/lib/tree/tree.css +103 -69
  472. package/lib/tree/tree.d.ts +16 -10
  473. package/lib/tree/tree.variable.css +104 -69
  474. package/lib/tree/use-empty.d.ts +1 -1
  475. package/lib/tree/use-node-action.d.ts +10 -9
  476. package/lib/tree/use-node-async.d.ts +2 -1
  477. package/lib/tree/use-node-attribute.d.ts +42 -34
  478. package/lib/tree/use-search.d.ts +1 -1
  479. package/lib/tree/use-tree-init.d.ts +8 -5
  480. package/lib/tree/util.d.ts +21 -21
  481. package/lib/upload/index.d.ts +294 -286
  482. package/lib/upload/index.js +398 -316
  483. package/lib/upload/props.d.ts +11 -2
  484. package/lib/upload/upload-list.d.ts +11 -1
  485. package/lib/upload/upload-trigger.d.ts +11 -1
  486. package/lib/upload/upload.d.ts +25 -4
  487. package/lib/upload/upload.type.d.ts +12 -6
  488. package/lib/upload/upload.variable.css +1 -0
  489. package/lib/upload/use-file-handler.d.ts +1 -1
  490. package/lib/virtual-render/index.d.ts +247 -373
  491. package/lib/virtual-render/index.js +223 -162
  492. package/lib/virtual-render/props.d.ts +2 -9
  493. package/lib/virtual-render/use-fix-top.d.ts +1 -1
  494. package/lib/virtual-render/use-scrollbar.d.ts +4 -17
  495. package/lib/virtual-render/v-virtual-render.d.ts +7 -1
  496. package/lib/virtual-render/virtual-render.css +96 -70
  497. package/lib/virtual-render/virtual-render.d.ts +7 -23
  498. package/lib/virtual-render/virtual-render.less +2 -11
  499. package/lib/virtual-render/virtual-render.variable.css +96 -69
  500. package/lib/volar.components.d.ts +2 -0
  501. package/package.json +17 -55
  502. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  503. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  504. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -241
  505. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  506. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  507. package/lib/scrollbar/scrollbar.css +0 -75
  508. package/lib/scrollbar/scrollbar.less +0 -94
  509. package/lib/table/plugins/col-group.d.ts +0 -38
  510. package/lib/table/plugins/settings.d.ts +0 -16
  511. package/lib/table/plugins/use-active-columns.d.ts +0 -16
  512. package/lib/table/plugins/use-column-resize.d.ts +0 -35
  513. package/lib/table/plugins/use-column-template.d.ts +0 -7
  514. package/lib/table/plugins/use-fixed-column.d.ts +0 -27
  515. package/lib/table/plugins/use-head-cell.d.ts +0 -7
  516. package/lib/table/plugins/use-pagination.d.ts +0 -23
  517. package/lib/table/use-attributes.d.ts +0 -62
  518. package/lib/table/use-column.d.ts +0 -275
  519. package/lib/table/use-common.d.ts +0 -1679
  520. package/lib/table/use-render.d.ts +0 -11
  521. /package/lib/table/{plugins → components}/body-empty.d.ts +0 -0
  522. /package/lib/table/{plugins → hooks}/use-observer-resize.d.ts +0 -0
  523. /package/lib/table/{plugins → hooks}/use-scroll-loading.d.ts +0 -0
@@ -761,304 +761,304 @@ var _typeof = (__webpack_require__(7425)["default"]);
761
761
  function _regeneratorRuntime() {
762
762
  "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
763
763
  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
764
- return e;
764
+ return exports;
765
765
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
766
- var t,
767
- e = {},
768
- r = Object.prototype,
769
- n = r.hasOwnProperty,
770
- o = Object.defineProperty || function (t, e, r) {
771
- t[e] = r.value;
766
+ var exports = {},
767
+ Op = Object.prototype,
768
+ hasOwn = Op.hasOwnProperty,
769
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
770
+ obj[key] = desc.value;
772
771
  },
773
- i = "function" == typeof Symbol ? Symbol : {},
774
- a = i.iterator || "@@iterator",
775
- c = i.asyncIterator || "@@asyncIterator",
776
- u = i.toStringTag || "@@toStringTag";
777
- function define(t, e, r) {
778
- return Object.defineProperty(t, e, {
779
- value: r,
772
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
773
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
774
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
775
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
776
+ function define(obj, key, value) {
777
+ return Object.defineProperty(obj, key, {
778
+ value: value,
780
779
  enumerable: !0,
781
780
  configurable: !0,
782
781
  writable: !0
783
- }), t[e];
782
+ }), obj[key];
784
783
  }
785
784
  try {
786
785
  define({}, "");
787
- } catch (t) {
788
- define = function define(t, e, r) {
789
- return t[e] = r;
786
+ } catch (err) {
787
+ define = function define(obj, key, value) {
788
+ return obj[key] = value;
790
789
  };
791
790
  }
792
- function wrap(t, e, r, n) {
793
- var i = e && e.prototype instanceof Generator ? e : Generator,
794
- a = Object.create(i.prototype),
795
- c = new Context(n || []);
796
- return o(a, "_invoke", {
797
- value: makeInvokeMethod(t, r, c)
798
- }), a;
791
+ function wrap(innerFn, outerFn, self, tryLocsList) {
792
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
793
+ generator = Object.create(protoGenerator.prototype),
794
+ context = new Context(tryLocsList || []);
795
+ return defineProperty(generator, "_invoke", {
796
+ value: makeInvokeMethod(innerFn, self, context)
797
+ }), generator;
799
798
  }
800
- function tryCatch(t, e, r) {
799
+ function tryCatch(fn, obj, arg) {
801
800
  try {
802
801
  return {
803
802
  type: "normal",
804
- arg: t.call(e, r)
803
+ arg: fn.call(obj, arg)
805
804
  };
806
- } catch (t) {
805
+ } catch (err) {
807
806
  return {
808
807
  type: "throw",
809
- arg: t
808
+ arg: err
810
809
  };
811
810
  }
812
811
  }
813
- e.wrap = wrap;
814
- var h = "suspendedStart",
815
- l = "suspendedYield",
816
- f = "executing",
817
- s = "completed",
818
- y = {};
812
+ exports.wrap = wrap;
813
+ var ContinueSentinel = {};
819
814
  function Generator() {}
820
815
  function GeneratorFunction() {}
821
816
  function GeneratorFunctionPrototype() {}
822
- var p = {};
823
- define(p, a, function () {
817
+ var IteratorPrototype = {};
818
+ define(IteratorPrototype, iteratorSymbol, function () {
824
819
  return this;
825
820
  });
826
- var d = Object.getPrototypeOf,
827
- v = d && d(d(values([])));
828
- v && v !== r && n.call(v, a) && (p = v);
829
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
830
- function defineIteratorMethods(t) {
831
- ["next", "throw", "return"].forEach(function (e) {
832
- define(t, e, function (t) {
833
- return this._invoke(e, t);
821
+ var getProto = Object.getPrototypeOf,
822
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
823
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
824
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
825
+ function defineIteratorMethods(prototype) {
826
+ ["next", "throw", "return"].forEach(function (method) {
827
+ define(prototype, method, function (arg) {
828
+ return this._invoke(method, arg);
834
829
  });
835
830
  });
836
831
  }
837
- function AsyncIterator(t, e) {
838
- function invoke(r, o, i, a) {
839
- var c = tryCatch(t[r], t, o);
840
- if ("throw" !== c.type) {
841
- var u = c.arg,
842
- h = u.value;
843
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
844
- invoke("next", t, i, a);
845
- }, function (t) {
846
- invoke("throw", t, i, a);
847
- }) : e.resolve(h).then(function (t) {
848
- u.value = t, i(u);
849
- }, function (t) {
850
- return invoke("throw", t, i, a);
832
+ function AsyncIterator(generator, PromiseImpl) {
833
+ function invoke(method, arg, resolve, reject) {
834
+ var record = tryCatch(generator[method], generator, arg);
835
+ if ("throw" !== record.type) {
836
+ var result = record.arg,
837
+ value = result.value;
838
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
839
+ invoke("next", value, resolve, reject);
840
+ }, function (err) {
841
+ invoke("throw", err, resolve, reject);
842
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
843
+ result.value = unwrapped, resolve(result);
844
+ }, function (error) {
845
+ return invoke("throw", error, resolve, reject);
851
846
  });
852
847
  }
853
- a(c.arg);
848
+ reject(record.arg);
854
849
  }
855
- var r;
856
- o(this, "_invoke", {
857
- value: function value(t, n) {
850
+ var previousPromise;
851
+ defineProperty(this, "_invoke", {
852
+ value: function value(method, arg) {
858
853
  function callInvokeWithMethodAndArg() {
859
- return new e(function (e, r) {
860
- invoke(t, n, e, r);
854
+ return new PromiseImpl(function (resolve, reject) {
855
+ invoke(method, arg, resolve, reject);
861
856
  });
862
857
  }
863
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
858
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
864
859
  }
865
860
  });
866
861
  }
867
- function makeInvokeMethod(e, r, n) {
868
- var o = h;
869
- return function (i, a) {
870
- if (o === f) throw new Error("Generator is already running");
871
- if (o === s) {
872
- if ("throw" === i) throw a;
873
- return {
874
- value: t,
875
- done: !0
876
- };
862
+ function makeInvokeMethod(innerFn, self, context) {
863
+ var state = "suspendedStart";
864
+ return function (method, arg) {
865
+ if ("executing" === state) throw new Error("Generator is already running");
866
+ if ("completed" === state) {
867
+ if ("throw" === method) throw arg;
868
+ return doneResult();
877
869
  }
878
- for (n.method = i, n.arg = a;;) {
879
- var c = n.delegate;
880
- if (c) {
881
- var u = maybeInvokeDelegate(c, n);
882
- if (u) {
883
- if (u === y) continue;
884
- return u;
870
+ for (context.method = method, context.arg = arg;;) {
871
+ var delegate = context.delegate;
872
+ if (delegate) {
873
+ var delegateResult = maybeInvokeDelegate(delegate, context);
874
+ if (delegateResult) {
875
+ if (delegateResult === ContinueSentinel) continue;
876
+ return delegateResult;
885
877
  }
886
878
  }
887
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
888
- if (o === h) throw o = s, n.arg;
889
- n.dispatchException(n.arg);
890
- } else "return" === n.method && n.abrupt("return", n.arg);
891
- o = f;
892
- var p = tryCatch(e, r, n);
893
- if ("normal" === p.type) {
894
- if (o = n.done ? s : l, p.arg === y) continue;
879
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
880
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
881
+ context.dispatchException(context.arg);
882
+ } else "return" === context.method && context.abrupt("return", context.arg);
883
+ state = "executing";
884
+ var record = tryCatch(innerFn, self, context);
885
+ if ("normal" === record.type) {
886
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
895
887
  return {
896
- value: p.arg,
897
- done: n.done
888
+ value: record.arg,
889
+ done: context.done
898
890
  };
899
891
  }
900
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
892
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
901
893
  }
902
894
  };
903
895
  }
904
- function maybeInvokeDelegate(e, r) {
905
- var n = r.method,
906
- o = e.iterator[n];
907
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
908
- var i = tryCatch(o, e.iterator, r.arg);
909
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
910
- var a = i.arg;
911
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
896
+ function maybeInvokeDelegate(delegate, context) {
897
+ var methodName = context.method,
898
+ method = delegate.iterator[methodName];
899
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
900
+ var record = tryCatch(method, delegate.iterator, context.arg);
901
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
902
+ var info = record.arg;
903
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
912
904
  }
913
- function pushTryEntry(t) {
914
- var e = {
915
- tryLoc: t[0]
905
+ function pushTryEntry(locs) {
906
+ var entry = {
907
+ tryLoc: locs[0]
916
908
  };
917
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
909
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
918
910
  }
919
- function resetTryEntry(t) {
920
- var e = t.completion || {};
921
- e.type = "normal", delete e.arg, t.completion = e;
911
+ function resetTryEntry(entry) {
912
+ var record = entry.completion || {};
913
+ record.type = "normal", delete record.arg, entry.completion = record;
922
914
  }
923
- function Context(t) {
915
+ function Context(tryLocsList) {
924
916
  this.tryEntries = [{
925
917
  tryLoc: "root"
926
- }], t.forEach(pushTryEntry, this), this.reset(!0);
918
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
927
919
  }
928
- function values(e) {
929
- if (e || "" === e) {
930
- var r = e[a];
931
- if (r) return r.call(e);
932
- if ("function" == typeof e.next) return e;
933
- if (!isNaN(e.length)) {
934
- var o = -1,
935
- i = function next() {
936
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
937
- return next.value = t, next.done = !0, next;
920
+ function values(iterable) {
921
+ if (iterable) {
922
+ var iteratorMethod = iterable[iteratorSymbol];
923
+ if (iteratorMethod) return iteratorMethod.call(iterable);
924
+ if ("function" == typeof iterable.next) return iterable;
925
+ if (!isNaN(iterable.length)) {
926
+ var i = -1,
927
+ next = function next() {
928
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
929
+ return next.value = undefined, next.done = !0, next;
938
930
  };
939
- return i.next = i;
931
+ return next.next = next;
940
932
  }
941
933
  }
942
- throw new TypeError(_typeof(e) + " is not iterable");
934
+ return {
935
+ next: doneResult
936
+ };
937
+ }
938
+ function doneResult() {
939
+ return {
940
+ value: undefined,
941
+ done: !0
942
+ };
943
943
  }
944
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
944
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
945
945
  value: GeneratorFunctionPrototype,
946
946
  configurable: !0
947
- }), o(GeneratorFunctionPrototype, "constructor", {
947
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
948
948
  value: GeneratorFunction,
949
949
  configurable: !0
950
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
951
- var e = "function" == typeof t && t.constructor;
952
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
953
- }, e.mark = function (t) {
954
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
955
- }, e.awrap = function (t) {
950
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
951
+ var ctor = "function" == typeof genFun && genFun.constructor;
952
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
953
+ }, exports.mark = function (genFun) {
954
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
955
+ }, exports.awrap = function (arg) {
956
956
  return {
957
- __await: t
957
+ __await: arg
958
958
  };
959
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
959
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
960
960
  return this;
961
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
962
- void 0 === i && (i = Promise);
963
- var a = new AsyncIterator(wrap(t, r, n, o), i);
964
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
965
- return t.done ? t.value : a.next();
961
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
962
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
963
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
964
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
965
+ return result.done ? result.value : iter.next();
966
966
  });
967
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
967
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
968
968
  return this;
969
- }), define(g, "toString", function () {
969
+ }), define(Gp, "toString", function () {
970
970
  return "[object Generator]";
971
- }), e.keys = function (t) {
972
- var e = Object(t),
973
- r = [];
974
- for (var n in e) r.push(n);
975
- return r.reverse(), function next() {
976
- for (; r.length;) {
977
- var t = r.pop();
978
- if (t in e) return next.value = t, next.done = !1, next;
971
+ }), exports.keys = function (val) {
972
+ var object = Object(val),
973
+ keys = [];
974
+ for (var key in object) keys.push(key);
975
+ return keys.reverse(), function next() {
976
+ for (; keys.length;) {
977
+ var key = keys.pop();
978
+ if (key in object) return next.value = key, next.done = !1, next;
979
979
  }
980
980
  return next.done = !0, next;
981
981
  };
982
- }, e.values = values, Context.prototype = {
982
+ }, exports.values = values, Context.prototype = {
983
983
  constructor: Context,
984
- reset: function reset(e) {
985
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
984
+ reset: function reset(skipTempReset) {
985
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
986
986
  },
987
987
  stop: function stop() {
988
988
  this.done = !0;
989
- var t = this.tryEntries[0].completion;
990
- if ("throw" === t.type) throw t.arg;
989
+ var rootRecord = this.tryEntries[0].completion;
990
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
991
991
  return this.rval;
992
992
  },
993
- dispatchException: function dispatchException(e) {
994
- if (this.done) throw e;
995
- var r = this;
996
- function handle(n, o) {
997
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
993
+ dispatchException: function dispatchException(exception) {
994
+ if (this.done) throw exception;
995
+ var context = this;
996
+ function handle(loc, caught) {
997
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
998
998
  }
999
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
1000
- var i = this.tryEntries[o],
1001
- a = i.completion;
1002
- if ("root" === i.tryLoc) return handle("end");
1003
- if (i.tryLoc <= this.prev) {
1004
- var c = n.call(i, "catchLoc"),
1005
- u = n.call(i, "finallyLoc");
1006
- if (c && u) {
1007
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
1008
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
1009
- } else if (c) {
1010
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
999
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1000
+ var entry = this.tryEntries[i],
1001
+ record = entry.completion;
1002
+ if ("root" === entry.tryLoc) return handle("end");
1003
+ if (entry.tryLoc <= this.prev) {
1004
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
1005
+ hasFinally = hasOwn.call(entry, "finallyLoc");
1006
+ if (hasCatch && hasFinally) {
1007
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
1008
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
1009
+ } else if (hasCatch) {
1010
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
1011
1011
  } else {
1012
- if (!u) throw new Error("try statement without catch or finally");
1013
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
1012
+ if (!hasFinally) throw new Error("try statement without catch or finally");
1013
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
1014
1014
  }
1015
1015
  }
1016
1016
  }
1017
1017
  },
1018
- abrupt: function abrupt(t, e) {
1019
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
1020
- var o = this.tryEntries[r];
1021
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
1022
- var i = o;
1018
+ abrupt: function abrupt(type, arg) {
1019
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1020
+ var entry = this.tryEntries[i];
1021
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
1022
+ var finallyEntry = entry;
1023
1023
  break;
1024
1024
  }
1025
1025
  }
1026
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
1027
- var a = i ? i.completion : {};
1028
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
1026
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
1027
+ var record = finallyEntry ? finallyEntry.completion : {};
1028
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
1029
1029
  },
1030
- complete: function complete(t, e) {
1031
- if ("throw" === t.type) throw t.arg;
1032
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
1030
+ complete: function complete(record, afterLoc) {
1031
+ if ("throw" === record.type) throw record.arg;
1032
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
1033
1033
  },
1034
- finish: function finish(t) {
1035
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
1036
- var r = this.tryEntries[e];
1037
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
1034
+ finish: function finish(finallyLoc) {
1035
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1036
+ var entry = this.tryEntries[i];
1037
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
1038
1038
  }
1039
1039
  },
1040
- "catch": function _catch(t) {
1041
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
1042
- var r = this.tryEntries[e];
1043
- if (r.tryLoc === t) {
1044
- var n = r.completion;
1045
- if ("throw" === n.type) {
1046
- var o = n.arg;
1047
- resetTryEntry(r);
1040
+ "catch": function _catch(tryLoc) {
1041
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1042
+ var entry = this.tryEntries[i];
1043
+ if (entry.tryLoc === tryLoc) {
1044
+ var record = entry.completion;
1045
+ if ("throw" === record.type) {
1046
+ var thrown = record.arg;
1047
+ resetTryEntry(entry);
1048
1048
  }
1049
- return o;
1049
+ return thrown;
1050
1050
  }
1051
1051
  }
1052
1052
  throw new Error("illegal catch attempt");
1053
1053
  },
1054
- delegateYield: function delegateYield(e, r, n) {
1054
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
1055
1055
  return this.delegate = {
1056
- iterator: values(e),
1057
- resultName: r,
1058
- nextLoc: n
1059
- }, "next" === this.method && (this.arg = t), y;
1056
+ iterator: values(iterable),
1057
+ resultName: resultName,
1058
+ nextLoc: nextLoc
1059
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
1060
1060
  }
1061
- }, e;
1061
+ }, exports;
1062
1062
  }
1063
1063
  module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
1064
1064
 
@@ -1067,14 +1067,14 @@ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.e
1067
1067
  /***/ 7425:
1068
1068
  /***/ ((module) => {
1069
1069
 
1070
- function _typeof(o) {
1070
+ function _typeof(obj) {
1071
1071
  "@babel/helpers - typeof";
1072
1072
 
1073
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1074
- return typeof o;
1075
- } : function (o) {
1076
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1077
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
1073
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1074
+ return typeof obj;
1075
+ } : function (obj) {
1076
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1077
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
1078
1078
  }
1079
1079
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1080
1080
 
@@ -1204,38 +1204,38 @@ function _asyncToGenerator(fn) {
1204
1204
  };
1205
1205
  }
1206
1206
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
1207
- function _typeof(o) {
1207
+ function _typeof(obj) {
1208
1208
  "@babel/helpers - typeof";
1209
1209
 
1210
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1211
- return typeof o;
1212
- } : function (o) {
1213
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1214
- }, _typeof(o);
1210
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1211
+ return typeof obj;
1212
+ } : function (obj) {
1213
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1214
+ }, _typeof(obj);
1215
1215
  }
1216
1216
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
1217
1217
 
1218
- function toPrimitive(t, r) {
1219
- if ("object" != _typeof(t) || !t) return t;
1220
- var e = t[Symbol.toPrimitive];
1221
- if (void 0 !== e) {
1222
- var i = e.call(t, r || "default");
1223
- if ("object" != _typeof(i)) return i;
1218
+ function _toPrimitive(input, hint) {
1219
+ if (_typeof(input) !== "object" || input === null) return input;
1220
+ var prim = input[Symbol.toPrimitive];
1221
+ if (prim !== undefined) {
1222
+ var res = prim.call(input, hint || "default");
1223
+ if (_typeof(res) !== "object") return res;
1224
1224
  throw new TypeError("@@toPrimitive must return a primitive value.");
1225
1225
  }
1226
- return ("string" === r ? String : Number)(t);
1226
+ return (hint === "string" ? String : Number)(input);
1227
1227
  }
1228
1228
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
1229
1229
 
1230
1230
 
1231
- function toPropertyKey(t) {
1232
- var i = toPrimitive(t, "string");
1233
- return "symbol" == _typeof(i) ? i : String(i);
1231
+ function _toPropertyKey(arg) {
1232
+ var key = _toPrimitive(arg, "string");
1233
+ return _typeof(key) === "symbol" ? key : String(key);
1234
1234
  }
1235
1235
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
1236
1236
 
1237
1237
  function _defineProperty(obj, key, value) {
1238
- key = toPropertyKey(key);
1238
+ key = _toPropertyKey(key);
1239
1239
  if (key in obj) {
1240
1240
  Object.defineProperty(obj, key, {
1241
1241
  value: value,
@@ -1292,12 +1292,17 @@ var EThemes;
1292
1292
  EThemes["DRAGGABLE"] = "draggable";
1293
1293
  EThemes["PICTURE"] = "picture";
1294
1294
  })(EThemes || (EThemes = {}));
1295
+ var ETypes;
1296
+ (function (ETypes) {
1297
+ ETypes["BINARY"] = "binary";
1298
+ ETypes["FORMDATA"] = "formdata";
1299
+ })(ETypes || (ETypes = {}));
1295
1300
  var EUploadStatus;
1296
1301
  (function (EUploadStatus) {
1302
+ EUploadStatus["FAIL"] = "fail";
1297
1303
  EUploadStatus["NEW"] = "new";
1298
- EUploadStatus["UPLOADING"] = "uploading";
1299
1304
  EUploadStatus["SUCCESS"] = "success";
1300
- EUploadStatus["FAIL"] = "fail";
1305
+ EUploadStatus["UPLOADING"] = "uploading";
1301
1306
  })(EUploadStatus || (EUploadStatus = {}));
1302
1307
  ;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
1303
1308
  /*
@@ -1327,7 +1332,19 @@ var EUploadStatus;
1327
1332
  */
1328
1333
 
1329
1334
  var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
1335
+ var types = [ETypes.FORMDATA, ETypes.BINARY];
1330
1336
  /* harmony default export */ const props = ({
1337
+ type: {
1338
+ type: String,
1339
+ "default": 'formdata',
1340
+ validator: function validator(val) {
1341
+ if (!val || types.includes(val)) {
1342
+ return true;
1343
+ }
1344
+ console.error("invalid type, ".concat(val, ", the type must be one of \u3010").concat(types.join(' | '), "\u3011"));
1345
+ return false;
1346
+ }
1347
+ },
1331
1348
  theme: {
1332
1349
  type: String,
1333
1350
  "default": 'draggable',
@@ -1459,6 +1476,11 @@ var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
1459
1476
  chunkSize: {
1460
1477
  type: Number,
1461
1478
  "default": 10
1479
+ },
1480
+ // 是否显示预览按钮
1481
+ isShowPreview: {
1482
+ type: Boolean,
1483
+ "default": true
1462
1484
  }
1463
1485
  });
1464
1486
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
@@ -1466,31 +1488,31 @@ function _arrayWithHoles(arr) {
1466
1488
  if (Array.isArray(arr)) return arr;
1467
1489
  }
1468
1490
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
1469
- function _iterableToArrayLimit(r, l) {
1470
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1471
- if (null != t) {
1472
- var e,
1473
- n,
1474
- i,
1475
- u,
1476
- a = [],
1477
- f = !0,
1478
- o = !1;
1491
+ function _iterableToArrayLimit(arr, i) {
1492
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1493
+ if (null != _i) {
1494
+ var _s,
1495
+ _e,
1496
+ _x,
1497
+ _r,
1498
+ _arr = [],
1499
+ _n = !0,
1500
+ _d = !1;
1479
1501
  try {
1480
- if (i = (t = t.call(r)).next, 0 === l) {
1481
- if (Object(t) !== t) return;
1482
- f = !1;
1483
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1484
- } catch (r) {
1485
- o = !0, n = r;
1502
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
1503
+ if (Object(_i) !== _i) return;
1504
+ _n = !1;
1505
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1506
+ } catch (err) {
1507
+ _d = !0, _e = err;
1486
1508
  } finally {
1487
1509
  try {
1488
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1510
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1489
1511
  } finally {
1490
- if (o) throw n;
1512
+ if (_d) throw _e;
1491
1513
  }
1492
1514
  }
1493
- return a;
1515
+ return _arr;
1494
1516
  }
1495
1517
  }
1496
1518
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
@@ -1524,7 +1546,7 @@ function _slicedToArray(arr, i) {
1524
1546
  ;// CONCATENATED MODULE: external "../icon"
1525
1547
  var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1526
1548
  var icon_y = x => () => x
1527
- const icon_namespaceObject = icon_x({ ["ArchiveFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ArchiveFill, ["AudioFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AudioFill, ["Del"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Del, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Done, ["ImageFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ImageFill, ["Plus"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Plus, ["RightTurnLine"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightTurnLine, ["TextFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.TextFill, ["Upload"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Upload, ["VideoFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.VideoFill });
1549
+ const icon_namespaceObject = icon_x({ ["ArchiveFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ArchiveFill, ["AudioFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AudioFill, ["Del"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Del, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Done, ["Eye"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Eye, ["ImageFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ImageFill, ["Plus"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Plus, ["RightTurnLine"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightTurnLine, ["TextFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.TextFill, ["Upload"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Upload, ["VideoFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.VideoFill });
1528
1550
  ;// CONCATENATED MODULE: external "../progress"
1529
1551
  var progress_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1530
1552
  var progress_y = x => () => x
@@ -1579,9 +1601,10 @@ function _isSlot(s) {
1579
1601
  theme: props.theme,
1580
1602
  disabled: props.disabled,
1581
1603
  files: props.files,
1582
- multiple: props.multiple
1604
+ multiple: props.multiple,
1605
+ isShowPreview: props.isShowPreview
1583
1606
  },
1584
- emits: ['remove', 'retry'],
1607
+ emits: ['remove', 'preview', 'retry'],
1585
1608
  setup: function setup(props, _ref) {
1586
1609
  var slots = _ref.slots,
1587
1610
  emit = _ref.emit;
@@ -1591,7 +1614,8 @@ function _isSlot(s) {
1591
1614
  var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
1592
1615
  theme = _toRefs.theme,
1593
1616
  disabled = _toRefs.disabled,
1594
- multiple = _toRefs.multiple;
1617
+ multiple = _toRefs.multiple,
1618
+ isShowPreview = _toRefs.isShowPreview;
1595
1619
  var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-list");
1596
1620
  var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
1597
1621
  return theme.value === EThemes.PICTURE;
@@ -1600,7 +1624,8 @@ function _isSlot(s) {
1600
1624
  return isPhotowall.value && !multiple.value;
1601
1625
  });
1602
1626
  var classNames = (0,external_vue_namespaceObject.computed)(function () {
1603
- return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty({}, classBlock, true), "".concat(classBlock, "--").concat(theme.value), true), "".concat(classBlock, "--disabled"), disabled.value));
1627
+ var _classes;
1628
+ return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
1604
1629
  });
1605
1630
  function formatSize(value) {
1606
1631
  var uints = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
@@ -1608,6 +1633,9 @@ function _isSlot(s) {
1608
1633
  var size = value / Math.pow(1024, index);
1609
1634
  return "".concat(size.toFixed(2)).concat(uints[index]);
1610
1635
  }
1636
+ function handlePreview(file, files, e) {
1637
+ emit('preview', file, files, e);
1638
+ }
1611
1639
  function handleRemove(file, e) {
1612
1640
  emit('remove', file, e);
1613
1641
  }
@@ -1619,7 +1647,8 @@ function _isSlot(s) {
1619
1647
  return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
1620
1648
  "name": "".concat(classBlock, "__item")
1621
1649
  }, _isSlot(_slot = props.files.map(function (file) {
1622
- var classNames = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty({}, "".concat(classBlock, "__item"), true), "".concat(classBlock, "__item-picture"), true), "".concat(classBlock, "__item--").concat(file.status), true));
1650
+ var _classes2;
1651
+ var classNames = (0,shared_namespaceObject.classes)((_classes2 = {}, _defineProperty(_classes2, "".concat(classBlock, "__item"), true), _defineProperty(_classes2, "".concat(classBlock, "__item-picture"), true), _defineProperty(_classes2, "".concat(classBlock, "__item--").concat(file.status), true), _classes2));
1623
1652
  return (0,external_vue_namespaceObject.createVNode)("li", {
1624
1653
  "key": file.uid,
1625
1654
  "class": classNames
@@ -1634,22 +1663,27 @@ function _isSlot(s) {
1634
1663
  };
1635
1664
  var PhotoItem = function PhotoItem(file) {
1636
1665
  return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
1637
- "src": file.url,
1638
1666
  "class": "".concat(classBlock, "__picture-item-thumbnail"),
1639
- "alt": ""
1667
+ "alt": "",
1668
+ "src": file.url
1640
1669
  }, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
1670
+ "width": 50,
1641
1671
  "class": "".concat(classBlock, "__picture-item-progress"),
1642
- "type": "circle",
1643
- "color": "#3a84ff",
1644
1672
  "bgColor": "#333",
1645
- "width": 50,
1673
+ "color": "#3a84ff",
1674
+ "percent": file.percentage,
1646
1675
  "titleStyle": {
1647
1676
  color: '#fff'
1648
1677
  },
1649
- "percent": file.percentage
1678
+ "type": "circle"
1650
1679
  }, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!disabled.value && (0,external_vue_namespaceObject.createVNode)("div", {
1651
1680
  "class": "".concat(classBlock, "__picture-item-actions")
1652
- }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
1681
+ }, [isShowPreview.value && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Eye, {
1682
+ "class": "action-icon",
1683
+ "onClick": function onClick(e) {
1684
+ return handlePreview(file, props.files, e);
1685
+ }
1686
+ }, null), (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
1653
1687
  "class": "action-icon",
1654
1688
  "onClick": function onClick(e) {
1655
1689
  return handleRemove(file, e);
@@ -1661,7 +1695,8 @@ function _isSlot(s) {
1661
1695
  return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
1662
1696
  "name": "".concat(classBlock, "__item")
1663
1697
  }, _isSlot(_slot2 = props.files.map(function (file) {
1664
- var classNames = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty({}, "".concat(classBlock, "__item"), true), "".concat(classBlock, "__item--").concat(file.status), true));
1698
+ var _classes3;
1699
+ var classNames = (0,shared_namespaceObject.classes)((_classes3 = {}, _defineProperty(_classes3, "".concat(classBlock, "__item"), true), _defineProperty(_classes3, "".concat(classBlock, "__item--").concat(file.status), true), _classes3));
1665
1700
  return (0,external_vue_namespaceObject.createVNode)("li", {
1666
1701
  "key": file.uid,
1667
1702
  "class": classNames
@@ -1700,9 +1735,9 @@ function _isSlot(s) {
1700
1735
  return [(0,external_vue_namespaceObject.createVNode)("div", {
1701
1736
  "class": "".concat(classBlock, "__item-icon")
1702
1737
  }, [file.isPic ? (0,external_vue_namespaceObject.createVNode)("img", {
1703
- "src": file.url,
1704
1738
  "class": "".concat(classBlock, "__item-thumbnail"),
1705
- "alt": ""
1739
+ "alt": "",
1740
+ "src": file.url
1706
1741
  }, null) : FileIcon(file)]), (0,external_vue_namespaceObject.createVNode)("div", {
1707
1742
  "class": "".concat(classBlock, "__item-summary")
1708
1743
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
@@ -1715,8 +1750,8 @@ function _isSlot(s) {
1715
1750
  "class": "".concat(classBlock, "__item-message-success-icon")
1716
1751
  }, null), file.statusText || t.value.uploadSuccess]), file.status === 'fail' && (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.statusText || t.value.uploadFailed])]), file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
1717
1752
  "class": "".concat(classBlock, "__item-progress"),
1718
- "showText": false,
1719
1753
  "percent": file.percentage,
1754
+ "showText": false,
1720
1755
  "size": "small"
1721
1756
  }, null), file.status !== 'fail' && (0,external_vue_namespaceObject.createVNode)("div", {
1722
1757
  "class": "".concat(classBlock, "__item-speed")
@@ -1739,10 +1774,10 @@ function _isSlot(s) {
1739
1774
  }, null)])])];
1740
1775
  };
1741
1776
  return function () {
1742
- var _props$files;
1743
- return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePhoto.value ? (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger((_props$files = props.files) === null || _props$files === void 0 ? void 0 : _props$files[0])) : (0,external_vue_namespaceObject.createVNode)("ul", {
1777
+ var _slots$innerTrigger, _props$files, _slots$innerTrigger2;
1778
+ return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePhoto.value ? slots === null || slots === void 0 || (_slots$innerTrigger = slots.innerTrigger) === null || _slots$innerTrigger === void 0 ? void 0 : _slots$innerTrigger.call(slots, (_props$files = props.files) === null || _props$files === void 0 ? void 0 : _props$files[0]) : (0,external_vue_namespaceObject.createVNode)("ul", {
1744
1779
  "class": classNames.value
1745
- }, [isPhotowall.value ? Photowall() : Normal(), (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger())])]);
1780
+ }, [isPhotowall.value ? Photowall() : Normal(), slots === null || slots === void 0 || (_slots$innerTrigger2 = slots.innerTrigger) === null || _slots$innerTrigger2 === void 0 ? void 0 : _slots$innerTrigger2.call(slots)])]);
1746
1781
  };
1747
1782
  }
1748
1783
  }));
@@ -1802,9 +1837,10 @@ const button_less_namespaceObject = button_less_x({ });
1802
1837
  file: {
1803
1838
  type: Object
1804
1839
  },
1805
- selectChange: props.selectChange
1840
+ selectChange: props.selectChange,
1841
+ isShowPreview: props.isShowPreview
1806
1842
  },
1807
- emits: ['change', 'remove'],
1843
+ emits: ['change', 'remove', 'preview'],
1808
1844
  setup: function setup(props, _ref) {
1809
1845
  var slots = _ref.slots,
1810
1846
  emit = _ref.emit;
@@ -1816,7 +1852,8 @@ const button_less_namespaceObject = button_less_x({ });
1816
1852
  disabled = _toRefs.disabled,
1817
1853
  file = _toRefs.file,
1818
1854
  multiple = _toRefs.multiple,
1819
- accept = _toRefs.accept;
1855
+ accept = _toRefs.accept,
1856
+ isShowPreview = _toRefs.isShowPreview;
1820
1857
  var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-trigger");
1821
1858
  var isButton = (0,external_vue_namespaceObject.computed)(function () {
1822
1859
  return theme.value === EThemes.BUTTON;
@@ -1835,8 +1872,8 @@ const button_less_namespaceObject = button_less_x({ });
1835
1872
  });
1836
1873
  var inputEl = (0,external_vue_namespaceObject.ref)(null);
1837
1874
  var classNames = (0,external_vue_namespaceObject.computed)(function () {
1838
- var _file$value, _file$value2, _file$value3;
1839
- return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classBlock, true), "".concat(classBlock, "--").concat(theme.value), true), "".concat(classBlock, "--single-picture"), isSinglePicture.value), "".concat(classBlock, "--has-file"), (_file$value = file.value) !== null && _file$value !== void 0 ? _file$value : false), "".concat(classBlock, "--").concat((_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.status), (_file$value3 = file.value) !== null && _file$value3 !== void 0 ? _file$value3 : false), "".concat(classBlock, "--dragover"), dragover.value), "".concat(classBlock, "--disabled"), disabled.value));
1875
+ var _file$value, _file$value2, _file$value3, _classes;
1876
+ return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--single-picture"), isSinglePicture.value), _defineProperty(_classes, "".concat(classBlock, "--has-file"), (_file$value = file.value) !== null && _file$value !== void 0 ? _file$value : false), _defineProperty(_classes, "".concat(classBlock, "--").concat((_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.status), (_file$value3 = file.value) !== null && _file$value3 !== void 0 ? _file$value3 : false), _defineProperty(_classes, "".concat(classBlock, "--dragover"), dragover.value), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
1840
1877
  });
1841
1878
  var invoke = function invoke() {
1842
1879
  inputEl.value.value = null;
@@ -1870,6 +1907,11 @@ const button_less_namespaceObject = button_less_x({ });
1870
1907
  e.stopPropagation();
1871
1908
  e.preventDefault();
1872
1909
  }
1910
+ function handlePreview(file, e) {
1911
+ emit('preview', file, [file], e);
1912
+ e.stopPropagation();
1913
+ e.preventDefault();
1914
+ }
1873
1915
  var dragover = (0,external_vue_namespaceObject.ref)(false);
1874
1916
  var Dragger = function Dragger() {
1875
1917
  var handleDrop = function handleDrop(e) {
@@ -1895,9 +1937,9 @@ const button_less_namespaceObject = button_less_x({ });
1895
1937
  var classNames = (0,shared_namespaceObject.classes)(_defineProperty({}, "".concat(classBlock, "__draggable"), true));
1896
1938
  return (0,external_vue_namespaceObject.createVNode)("div", {
1897
1939
  "class": classNames,
1898
- "onDrop": handleDrop,
1940
+ "onDragleave": handleDragleave,
1899
1941
  "onDragover": handleDragover,
1900
- "onDragleave": handleDragleave
1942
+ "onDrop": handleDrop
1901
1943
  }, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Upload, {
1902
1944
  "class": "".concat(classBlock, "__draggable-icon")
1903
1945
  }, null), (0,external_vue_namespaceObject.createVNode)("div", {
@@ -1920,22 +1962,27 @@ const button_less_namespaceObject = button_less_x({ });
1920
1962
  };
1921
1963
  var SinglePicture = function SinglePicture(file) {
1922
1964
  return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
1923
- "src": file.url,
1924
1965
  "class": "".concat(classBlock, "__picture-thumbnail"),
1925
- "alt": ""
1966
+ "alt": "",
1967
+ "src": file.url
1926
1968
  }, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
1969
+ "width": 50,
1927
1970
  "class": "".concat(classBlock, "__picture-progress"),
1928
- "type": "circle",
1929
- "color": "#3a84ff",
1930
1971
  "bgColor": "#333",
1931
- "width": 50,
1972
+ "color": "#3a84ff",
1973
+ "percent": file.percentage,
1932
1974
  "titleStyle": {
1933
1975
  color: '#fff'
1934
1976
  },
1935
- "percent": file.percentage
1977
+ "type": "circle"
1936
1978
  }, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.disabled && (0,external_vue_namespaceObject.createVNode)("div", {
1937
1979
  "class": "".concat(classBlock, "__picture-actions")
1938
- }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
1980
+ }, [isShowPreview.value && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Eye, {
1981
+ "class": "action-icon",
1982
+ "onClick": function onClick(e) {
1983
+ return handlePreview(file, e);
1984
+ }
1985
+ }, null), (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
1939
1986
  "class": "action-icon",
1940
1987
  "onClick": function onClick(e) {
1941
1988
  return handleRemove(file, e);
@@ -1970,12 +2017,12 @@ const button_less_namespaceObject = button_less_x({ });
1970
2017
  }, [slots.trigger ? [slots.trigger(), slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)] : Trigger(), (0,external_vue_namespaceObject.createVNode)("input", {
1971
2018
  "ref": inputEl,
1972
2019
  "class": "".concat(classBlock, "__input-file"),
1973
- "tabindex": "-1",
1974
- "onChange": handleFileChange,
1975
2020
  "accept": acceptTypes.value,
1976
- "multiple": multiple.value,
1977
2021
  "disabled": disabled.value,
1978
- "type": "file"
2022
+ "multiple": multiple.value,
2023
+ "tabindex": "-1",
2024
+ "type": "file",
2025
+ "onChange": handleFileChange
1979
2026
  }, null)]);
1980
2027
  };
1981
2028
  }
@@ -2036,10 +2083,11 @@ var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
2036
2083
  */
2037
2084
 
2038
2085
 
2086
+ var errMsg = 'An error occurred during upload';
2039
2087
  function getRes(xhr) {
2040
2088
  var res = xhr.responseText || xhr.response;
2041
2089
  if (!res) {
2042
- return res;
2090
+ return res || {};
2043
2091
  }
2044
2092
  try {
2045
2093
  return JSON.parse(res);
@@ -2052,7 +2100,9 @@ var ajaxUpload = function ajaxUpload(option) {
2052
2100
  throw new Error('XMLHttpRequest is undefined');
2053
2101
  }
2054
2102
  var xhr = new XMLHttpRequest();
2055
- var action = option.action;
2103
+ var action = option.action,
2104
+ type = option.type;
2105
+ var isFormdata = type === 'formdata';
2056
2106
  if (xhr.upload) {
2057
2107
  xhr.upload.addEventListener('progress', function (event) {
2058
2108
  var progressEvent = event;
@@ -2061,7 +2111,7 @@ var ajaxUpload = function ajaxUpload(option) {
2061
2111
  });
2062
2112
  }
2063
2113
  var formData = new FormData();
2064
- if (option.data) {
2114
+ if (isFormdata && option.data) {
2065
2115
  var appendData = option.data;
2066
2116
  if (!Array.isArray(appendData)) {
2067
2117
  appendData = [appendData];
@@ -2075,7 +2125,7 @@ var ajaxUpload = function ajaxUpload(option) {
2075
2125
  }
2076
2126
  });
2077
2127
  }
2078
- if (option.formDataAttributes) {
2128
+ if (isFormdata && option.formDataAttributes) {
2079
2129
  var _appendData = option.formDataAttributes;
2080
2130
  if (!Array.isArray(_appendData)) {
2081
2131
  _appendData = [_appendData];
@@ -2084,13 +2134,27 @@ var ajaxUpload = function ajaxUpload(option) {
2084
2134
  if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
2085
2135
  });
2086
2136
  }
2087
- formData.append(option.filename, option.file, option.file.name);
2137
+ if (isFormdata) {
2138
+ formData.append(option.filename, option.file, option.file.name);
2139
+ }
2088
2140
  xhr.addEventListener('error', function () {
2089
- option.onError(new Error('An error occurred during upload'));
2141
+ var msg = new Error(errMsg);
2142
+ var responseText = getRes(xhr);
2143
+ if (responseText) {
2144
+ msg = new Error(responseText.message || errMsg);
2145
+ }
2146
+ console.log(responseText, msg);
2147
+ option.onError(msg);
2148
+ // option.onError(new Error('An error occurred during upload'));
2090
2149
  });
2091
2150
  xhr.addEventListener('load', function () {
2092
2151
  if (xhr.status < 200 || xhr.status >= 300) {
2093
- return option.onError(new Error('An error occurred during upload'));
2152
+ var responseText = getRes(xhr);
2153
+ var msg = new Error(errMsg);
2154
+ if (responseText) {
2155
+ msg = new Error(responseText.message || errMsg);
2156
+ }
2157
+ return option.onError(msg);
2094
2158
  }
2095
2159
  option.onSuccess(getRes(xhr));
2096
2160
  });
@@ -2128,13 +2192,13 @@ var ajaxUpload = function ajaxUpload(option) {
2128
2192
  xhr.setRequestHeader(key, String(value));
2129
2193
  }
2130
2194
  }
2131
- xhr.send(formData);
2195
+ xhr.send(isFormdata ? formData : option.file);
2132
2196
  return xhr;
2133
2197
  };
2134
2198
  // 该方法用于在不同的浏览器使用不同的方式
2135
2199
  var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
2136
2200
  var ajaxSliceUpload = /*#__PURE__*/function () {
2137
- var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(option) {
2201
+ var _ref = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(option) {
2138
2202
  var chunkSize, file, blockCount, hash, progressList;
2139
2203
  return regenerator_default().wrap(function _callee$(_context) {
2140
2204
  while (1) switch (_context.prev = _context.next) {
@@ -2168,10 +2232,15 @@ var ajaxSliceUpload = /*#__PURE__*/function () {
2168
2232
  req.open(option.method, option.mergeUrl, true);
2169
2233
  req.onreadystatechange = function () {
2170
2234
  if (req.readyState === 4) {
2235
+ var responseText = getRes(req);
2171
2236
  if (req.status < 200 || req.status >= 300) {
2172
- return option.onError(new Error('An error occurred during upload'));
2237
+ var msg = new Error(errMsg);
2238
+ if (responseText) {
2239
+ msg = new Error(responseText.message || errMsg);
2240
+ }
2241
+ return option.onError(msg);
2173
2242
  }
2174
- option.onSuccess(getRes(req));
2243
+ option.onSuccess(responseText);
2175
2244
  }
2176
2245
  };
2177
2246
  req.onloadend = function () {
@@ -2193,7 +2262,6 @@ var ajaxSliceUpload = /*#__PURE__*/function () {
2193
2262
  // 请求分片上传,保存在progressList中
2194
2263
  var sliceSend = function sliceSend(option, file, blockCount, hash, progressList, chunkSize) {
2195
2264
  var _loop = function _loop(i) {
2196
- // eslint-disable-next-line no-loop-func
2197
2265
  var pooltask = new Promise(function (resolve, reject) {
2198
2266
  var start = i * chunkSize;
2199
2267
  var end = Math.min(file.size, start + chunkSize);
@@ -2231,10 +2299,14 @@ var sliceSend = function sliceSend(option, file, blockCount, hash, progressList,
2231
2299
  var xhr = new XMLHttpRequest();
2232
2300
  xhr.onreadystatechange = function () {
2233
2301
  if (xhr.readyState === 4) {
2234
- var res = getRes(xhr);
2302
+ var responseText = getRes(xhr);
2235
2303
  if (xhr.status < 200 || xhr.status >= 300) {
2236
- reject(res);
2237
- option.onError(new Error('An error occurred during upload'));
2304
+ reject(responseText);
2305
+ var msg = new Error(errMsg);
2306
+ if (responseText) {
2307
+ msg = new Error(responseText.message || errMsg);
2308
+ }
2309
+ option.onError(msg);
2238
2310
  } else {
2239
2311
  resolve('reponseText');
2240
2312
  }
@@ -2312,7 +2384,7 @@ var hashFile = function hashFile(file, chunkSize) {
2312
2384
  }
2313
2385
  };
2314
2386
  fileReader.onerror = function () {
2315
- reject(new Error('File slcie failed'));
2387
+ reject(new Error('File slice failed'));
2316
2388
  };
2317
2389
  loadNext();
2318
2390
  })["catch"](function (err) {
@@ -2423,7 +2495,7 @@ function buildFileId(index) {
2423
2495
  return _handleRemove.apply(this, arguments);
2424
2496
  }
2425
2497
  function _handleRemove() {
2426
- _handleRemove = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(file) {
2498
+ _handleRemove = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(file) {
2427
2499
  var uploadFile, remove, _props$beforeRemove, before;
2428
2500
  return regenerator_default().wrap(function _callee$(_context) {
2429
2501
  while (1) switch (_context.prev = _context.next) {
@@ -2464,7 +2536,7 @@ function buildFileId(index) {
2464
2536
  return _handleError.apply(this, arguments);
2465
2537
  }
2466
2538
  function _handleError() {
2467
- _handleError = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee2(err, rawFile, res) {
2539
+ _handleError = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee2(err, rawFile, res) {
2468
2540
  var file;
2469
2541
  return regenerator_default().wrap(function _callee2$(_context2) {
2470
2542
  while (1) switch (_context2.prev = _context2.next) {
@@ -2491,7 +2563,7 @@ function buildFileId(index) {
2491
2563
  return _handleSuccess.apply(this, arguments);
2492
2564
  }
2493
2565
  function _handleSuccess() {
2494
- _handleSuccess = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee3(res, rawFile) {
2566
+ _handleSuccess = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee3(res, rawFile) {
2495
2567
  var file;
2496
2568
  return regenerator_default().wrap(function _callee3$(_context3) {
2497
2569
  while (1) switch (_context3.prev = _context3.next) {
@@ -2517,7 +2589,7 @@ function buildFileId(index) {
2517
2589
  return _handleProgress.apply(this, arguments);
2518
2590
  }
2519
2591
  function _handleProgress() {
2520
- _handleProgress = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee4(event, rawFile) {
2592
+ _handleProgress = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee4(event, rawFile) {
2521
2593
  var file;
2522
2594
  return regenerator_default().wrap(function _callee4$(_context4) {
2523
2595
  while (1) switch (_context4.prev = _context4.next) {
@@ -2569,9 +2641,9 @@ function buildFileId(index) {
2569
2641
 
2570
2642
 
2571
2643
 
2572
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = upload_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
2573
- function upload_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return upload_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return upload_arrayLikeToArray(o, minLen); }
2574
- function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2644
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = upload_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2645
+ function upload_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return upload_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? upload_arrayLikeToArray(r, a) : void 0; } }
2646
+ function upload_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2575
2647
  /*
2576
2648
  * Tencent is pleased to support the open source community by making
2577
2649
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
@@ -2609,7 +2681,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2609
2681
  /* harmony default export */ const upload = ((0,external_vue_namespaceObject.defineComponent)({
2610
2682
  name: 'Upload',
2611
2683
  props: props,
2612
- emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done'],
2684
+ emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done', 'preview'],
2613
2685
  setup: function setup(props, _ref) {
2614
2686
  var slots = _ref.slots,
2615
2687
  emit = _ref.emit,
@@ -2624,8 +2696,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2624
2696
  return isPhotowall.value && !props.multiple;
2625
2697
  });
2626
2698
  var classNames = (0,external_vue_namespaceObject.computed)(function () {
2627
- var _props$extCls;
2628
- return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(resolveClassName(CLASS_PREFIX)), true), "".concat(resolveClassName(CLASS_PREFIX), "--").concat(props.theme), true), "".concat(resolveClassName(CLASS_PREFIX), "--disabled"), props.disabled), "".concat(resolveClassName(CLASS_PREFIX), "--single-picture"), isSinglePhoto.value), props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false));
2699
+ var _props$extCls, _classes;
2700
+ return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX)), true), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--").concat(props.theme), true), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--disabled"), props.disabled), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--single-picture"), isSinglePhoto.value), _defineProperty(_classes, props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false), _classes));
2629
2701
  });
2630
2702
  var triggerProps = (0,external_vue_namespaceObject.computed)(function () {
2631
2703
  return {
@@ -2633,6 +2705,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2633
2705
  multiple: props.multiple,
2634
2706
  disabled: props.disabled,
2635
2707
  accept: props.accept,
2708
+ isShowPreview: props.isShowPreview,
2636
2709
  selectChange: props.selectChange
2637
2710
  };
2638
2711
  });
@@ -2687,6 +2760,9 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2687
2760
  _iterator.f();
2688
2761
  }
2689
2762
  }
2763
+ function handlePreview(file, files) {
2764
+ emit('preview', file, files);
2765
+ }
2690
2766
  function handleRetry(file) {
2691
2767
  send(file.raw);
2692
2768
  }
@@ -2694,7 +2770,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2694
2770
  return _upload.apply(this, arguments);
2695
2771
  }
2696
2772
  function _upload() {
2697
- _upload = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(file, sendFiles) {
2773
+ _upload = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(file, sendFiles) {
2698
2774
  var beforeResult, _props$beforeUpload;
2699
2775
  return regenerator_default().wrap(function _callee$(_context) {
2700
2776
  while (1) switch (_context.prev = _context.next) {
@@ -2707,7 +2783,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2707
2783
  case 2:
2708
2784
  _context.prev = 2;
2709
2785
  _context.next = 5;
2710
- return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file);
2786
+ return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file, sendFiles);
2711
2787
  case 5:
2712
2788
  beforeResult = _context.sent;
2713
2789
  _context.next = 11;
@@ -2734,7 +2810,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2734
2810
  return _upload.apply(this, arguments);
2735
2811
  }
2736
2812
  function send(file, sendFiles) {
2737
- var headers = props.headers,
2813
+ var type = props.type,
2814
+ headers = props.headers,
2738
2815
  header = props.header,
2739
2816
  data = props.data,
2740
2817
  formDataAttributes = props.formDataAttributes,
@@ -2748,6 +2825,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2748
2825
  customRequest = props.customRequest;
2749
2826
  var uid = file.uid;
2750
2827
  var options = {
2828
+ type: type,
2751
2829
  headers: headers,
2752
2830
  header: header,
2753
2831
  withCredentials: withCredentials,
@@ -2806,7 +2884,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2806
2884
  Object.keys(reqs).forEach(function (uid) {
2807
2885
  if (reqs[uid] instanceof XMLHttpRequest) {
2808
2886
  var xhr = reqs[uid];
2809
- xhr === null || xhr === void 0 || xhr.abort();
2887
+ xhr === null || xhr === void 0 ? void 0 : xhr.abort();
2810
2888
  }
2811
2889
  delete requests.value[uid];
2812
2890
  });
@@ -2818,6 +2896,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2818
2896
  });
2819
2897
  });
2820
2898
  expose({
2899
+ handlePreview: handlePreview,
2821
2900
  handleRemove: handleRemove,
2822
2901
  handleRetry: handleRetry
2823
2902
  });
@@ -2829,10 +2908,12 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2829
2908
  }), slots), slots.tip ? slots.tip() : props.tip && (0,external_vue_namespaceObject.createVNode)("div", {
2830
2909
  "class": "".concat(resolveClassName(CLASS_PREFIX), "__tip")
2831
2910
  }, [props.tip]), (0,external_vue_namespaceObject.createVNode)(upload_list, {
2832
- "files": fileList.value,
2833
- "theme": props.theme,
2834
2911
  "disabled": props.disabled,
2912
+ "files": fileList.value,
2913
+ "isShowPreview": props.isShowPreview,
2835
2914
  "multiple": props.multiple,
2915
+ "theme": props.theme,
2916
+ "onPreview": handlePreview,
2836
2917
  "onRemove": handleRemove,
2837
2918
  "onRetry": handleRetry
2838
2919
  }, {
@@ -2840,6 +2921,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2840
2921
  return isPhotowall.value && (0,external_vue_namespaceObject.createVNode)(upload_trigger, (0,external_vue_namespaceObject.mergeProps)(triggerProps.value, {
2841
2922
  "file": file,
2842
2923
  "onChange": handleFiles,
2924
+ "onPreview": handlePreview,
2843
2925
  "onRemove": handleRemove
2844
2926
  }), slots);
2845
2927
  },