@aplus-frontend/ui 0.2.29 → 0.3.1

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 (453) hide show
  1. package/es/index.mjs +42 -40
  2. package/es/src/ap-action/group/index.vue.d.ts +3 -30
  3. package/es/src/ap-action/item/index.vue.d.ts +4 -36
  4. package/es/src/ap-action/item/index.vue2.mjs +29 -29
  5. package/es/src/ap-action/item-dropdown/index.vue.d.ts +5 -39
  6. package/es/src/ap-action/item-modal/index.vue.d.ts +5 -33
  7. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +5 -33
  8. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  9. package/es/src/ap-button/ap-action-button.vue.d.ts +5 -31
  10. package/es/src/ap-button/ap-button.vue.d.ts +5 -31
  11. package/es/src/ap-descriptions/ap-descriptions.vue.d.ts +4 -12
  12. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
  13. package/es/src/ap-descriptions/help-message/index.vue.d.ts +4 -15
  14. package/es/src/ap-download/ap-download.vue.d.ts +8 -31
  15. package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
  16. package/es/src/ap-field/checkbox/index.vue.d.ts +5 -32
  17. package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
  18. package/es/src/ap-field/date/index.vue.d.ts +7 -65
  19. package/es/src/ap-field/date/index.vue.mjs +2 -2
  20. package/es/src/ap-field/date-range/index.vue.d.ts +7 -67
  21. package/es/src/ap-field/date-range/index.vue.mjs +2 -2
  22. package/es/src/ap-field/hooks/use-options.d.ts +1 -1
  23. package/es/src/ap-field/number/index.vue.d.ts +12 -169
  24. package/es/src/ap-field/number/index.vue.mjs +3 -3
  25. package/es/src/ap-field/radio/index.vue.d.ts +6 -33
  26. package/es/src/ap-field/radio/index.vue.mjs +5 -5
  27. package/es/src/ap-field/rate/index.vue.d.ts +12 -75
  28. package/es/src/ap-field/rate/index.vue.mjs +4 -4
  29. package/es/src/ap-field/segmented/index.vue.d.ts +7 -33
  30. package/es/src/ap-field/segmented/index.vue.mjs +3 -3
  31. package/es/src/ap-field/select/index.vue.d.ts +12 -234
  32. package/es/src/ap-field/select/index.vue.mjs +4 -4
  33. package/es/src/ap-field/slider/index.vue.d.ts +12 -144
  34. package/es/src/ap-field/slider/index.vue.mjs +3 -3
  35. package/es/src/ap-field/switch/index.vue.d.ts +7 -37
  36. package/es/src/ap-field/switch/index.vue.mjs +4 -4
  37. package/es/src/ap-field/text/index.vue.d.ts +8 -40
  38. package/es/src/ap-field/text/password.vue.d.ts +9 -47
  39. package/es/src/ap-field/text-area/index.vue.d.ts +6 -39
  40. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  41. package/es/src/ap-form/ap-form.vue.d.ts +21 -274
  42. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  43. package/es/src/ap-form/dependency/index.vue.d.ts +4 -12
  44. package/es/src/ap-form/drawer-form/index.vue.d.ts +37 -536
  45. package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
  46. package/es/src/ap-form/hooks/use-watch.d.ts +1 -1
  47. package/es/src/ap-form/item/index.vue.d.ts +37 -278
  48. package/es/src/ap-form/item-group/index.vue.d.ts +5 -29
  49. package/es/src/ap-form/items/checkbox/index.vue.d.ts +5 -37
  50. package/es/src/ap-form/items/date/index.vue.d.ts +5 -37
  51. package/es/src/ap-form/items/date-range/index.vue.d.ts +5 -37
  52. package/es/src/ap-form/items/number/index.vue.d.ts +53 -510
  53. package/es/src/ap-form/items/radio/index.vue.d.ts +14 -219
  54. package/es/src/ap-form/items/select/index.vue.d.ts +6 -38
  55. package/es/src/ap-form/items/switch/index.vue.d.ts +5 -39
  56. package/es/src/ap-form/items/text/group.vue.d.ts +5 -25
  57. package/es/src/ap-form/items/text/index.vue.d.ts +35 -522
  58. package/es/src/ap-form/items/text/password.vue.d.ts +44 -586
  59. package/es/src/ap-form/items/text-area/index.vue.d.ts +14 -507
  60. package/es/src/ap-form/list/index.vue.d.ts +4 -12
  61. package/es/src/ap-form/modal-form/index.vue.d.ts +37 -535
  62. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  63. package/es/src/ap-form/render/control.vue.d.ts +4 -12
  64. package/es/src/ap-form/render/item.vue.d.ts +5 -37
  65. package/es/src/ap-form/search-form/index.vue.d.ts +37 -532
  66. package/es/src/ap-form/search-form/index.vue.mjs +2 -2
  67. package/es/src/ap-form/set/index.vue.d.ts +5 -25
  68. package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +4 -12
  69. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +5 -27
  70. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
  71. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +7 -29
  72. package/es/src/ap-list/index.vue.d.ts +4 -6
  73. package/es/src/ap-list/index.vue.mjs +27 -27
  74. package/es/src/ap-modal/utils/createModal.mjs +10 -10
  75. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +3 -24
  76. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
  77. package/es/src/ap-scroll-bar/index.d.ts +7 -42
  78. package/es/src/ap-table/ap-table.vue.d.ts +3 -5
  79. package/es/src/ap-table/ap-table.vue2.mjs +3 -3
  80. package/es/src/ap-table/components/index/index.vue.d.ts +3 -24
  81. package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
  82. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +2 -11
  83. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +5 -25
  84. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
  85. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +2 -11
  86. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
  87. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +2 -11
  88. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
  89. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +6 -15
  90. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
  91. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +5 -14
  92. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
  93. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +2 -11
  94. package/es/src/ap-table/components/status/index.vue.d.ts +2 -11
  95. package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
  96. package/es/src/ap-table/constants.d.ts +162 -13517
  97. package/es/src/ap-table/hooks/use-table-column-state.d.ts +11 -3
  98. package/es/src/ap-table/hooks/use-table-content-height.d.ts +1 -1
  99. package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
  100. package/es/src/ap-table/hooks/use-table-paging.d.ts +7 -3
  101. package/es/src/ap-table/utils.d.ts +65 -7907
  102. package/es/src/ap-tag/ap-tag-group.vue.d.ts +5 -29
  103. package/es/src/ap-tag/ap-tag-group.vue.mjs +88 -88
  104. package/es/src/ap-tag/ap-tag.vue.d.ts +3 -28
  105. package/es/src/ap-upload/apUpload.vue.d.ts +66 -16
  106. package/es/src/ap-upload/apUpload.vue.mjs +56 -37
  107. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
  108. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
  109. package/es/src/ap-upload/components/Picture.vue.d.ts +6 -10
  110. package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
  111. package/es/src/ap-upload/components/SingleFile.vue.d.ts +2 -2
  112. package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
  113. package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +6 -29
  114. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
  115. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +2 -2
  116. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +10 -10
  117. package/es/src/business/ap-appendix/index.d.ts +7 -108
  118. package/es/src/business/ap-attachment/ApAttachment.d.ts +5 -5
  119. package/es/src/business/ap-attachment/index.d.ts +7 -48
  120. package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +4 -12
  121. package/es/src/business/ap-batch-action/index.d.ts +5 -32
  122. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +3 -11
  123. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  124. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +4 -14
  125. package/es/src/business/ap-batch-action-group/index.d.ts +590 -905
  126. package/es/src/business/ap-button-group/ApButtonGroup.vue.d.ts +2 -19
  127. package/es/src/business/ap-button-group/index.d.ts +5 -603
  128. package/es/src/business/ap-card/ApCard.vue.d.ts +4 -12
  129. package/es/src/business/ap-card/index.d.ts +5 -33
  130. package/es/src/business/ap-card/interface.d.ts +1 -1
  131. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +5 -10
  132. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
  133. package/es/src/business/ap-expand-alert/index.d.ts +6 -8
  134. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +3 -24
  135. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
  136. package/es/src/business/ap-export-group/index.d.ts +7 -146
  137. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +8 -30
  138. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
  139. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +9 -356
  140. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
  141. package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +2 -2
  142. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +18 -18
  143. package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +2 -2
  144. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +34 -34
  145. package/es/src/business/ap-group-search/index.d.ts +711 -2447
  146. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +10 -357
  147. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
  148. package/es/src/business/ap-image/ApImage.vue.d.ts +5 -25
  149. package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
  150. package/es/src/business/ap-image/index.d.ts +7 -139
  151. package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +6 -31
  152. package/es/src/business/ap-input-radio/index.d.ts +14 -339
  153. package/es/src/business/ap-label/ApLabel.d.ts +5 -5
  154. package/es/src/business/ap-label/group/ApLabelGroup.d.ts +5 -5
  155. package/es/src/business/ap-label/index.d.ts +13 -90
  156. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +5 -71
  157. package/es/src/business/ap-ladder/index.d.ts +7 -479
  158. package/es/src/business/ap-select-layout/index.d.ts +5 -7
  159. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +6 -12
  160. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +58 -58
  161. package/es/src/business/ap-size-input/ApSizeInput.d.ts +84 -0
  162. package/es/src/business/ap-size-input/ApSizeInput.mjs +62 -0
  163. package/es/src/business/ap-size-input/constans.d.ts +38 -0
  164. package/es/src/business/ap-size-input/constans.mjs +40 -0
  165. package/es/src/business/ap-size-input/index.d.ts +155 -0
  166. package/es/src/business/ap-size-input/index.mjs +7 -0
  167. package/es/src/business/ap-size-input/interface.d.ts +11 -0
  168. package/es/src/business/ap-size-input/interface.mjs +1 -0
  169. package/es/src/business/ap-size-input/style/css.d.ts +0 -0
  170. package/es/src/business/ap-size-input/style/css.js +1 -0
  171. package/es/src/business/ap-size-input/style/index.d.ts +0 -0
  172. package/es/src/business/ap-size-input/style/index.js +1 -0
  173. package/es/src/business/ap-status/ApStatus.vue.d.ts +3 -28
  174. package/es/src/business/ap-status/group/ApStatusGroup.vue.d.ts +3 -30
  175. package/es/src/business/ap-status/index.d.ts +12 -192
  176. package/es/src/business/ap-summary/ap-summary.vue.d.ts +3 -28
  177. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  178. package/es/src/business/ap-summary/index.d.ts +7 -87
  179. package/es/src/business/ap-table-modal/index.d.ts +15 -1056
  180. package/es/src/business/ap-table-modal/modal-title.vue.d.ts +6 -5
  181. package/es/src/business/ap-table-modal/table-layout/index.vue.d.ts +12 -37
  182. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +8 -58
  183. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
  184. package/es/src/business/ap-title/ApTitle.vue.d.ts +5 -33
  185. package/es/src/business/ap-title/index.d.ts +7 -110
  186. package/es/src/business/ap-title/interface.d.ts +4 -4
  187. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +13 -33
  188. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
  189. package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
  190. package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +2 -2
  191. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +18 -18
  192. package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +2 -2
  193. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +10 -10
  194. package/es/src/business/ap-upload-file/interface.d.ts +2 -0
  195. package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  196. package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
  197. package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  198. package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
  199. package/es/src/business/batch-input-group/index.vue.d.ts +5 -38
  200. package/es/src/business/batch-input-group/index.vue.mjs +5 -5
  201. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +4 -13
  202. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
  203. package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
  204. package/es/src/business/hooks/usePageListApTable.mjs +41 -33
  205. package/es/src/business/index.d.ts +1 -0
  206. package/es/src/business/index.mjs +20 -18
  207. package/es/src/check-card/group.vue.d.ts +7 -45
  208. package/es/src/check-card/index.vue.d.ts +7 -37
  209. package/es/src/config-provider/config-provider.d.ts +5 -5
  210. package/es/src/config-provider/index.d.ts +7 -256
  211. package/es/src/editable-table/form-item.vue.d.ts +5 -7
  212. package/es/src/editable-table/form-item.vue.mjs +3 -3
  213. package/es/src/editable-table/index.vue.d.ts +4 -8
  214. package/es/src/editable-table/index.vue.mjs +6 -6
  215. package/es/src/hooks/useControllableValue.d.ts +1 -1
  216. package/es/src/index.mjs +40 -38
  217. package/es/src/locale/lang/en.mjs +5 -0
  218. package/es/src/locale/lang/zh-cn.mjs +5 -0
  219. package/es/src/path-map.mjs +1 -0
  220. package/es/src/tests/wrapper.d.ts +6 -6
  221. package/es/src/utils/ap-trans-data/index.d.ts +1 -1
  222. package/es/src/utils/ap-trans-data/index.mjs +26 -14
  223. package/es/src/work-order-modal/help-message.vue.d.ts +2 -2
  224. package/es/src/work-order-modal/help-message.vue2.mjs +19 -19
  225. package/es/src/work-order-modal/work-order-modal.vue.d.ts +6 -15
  226. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  227. package/lib/index.js +1 -1
  228. package/lib/src/ap-action/group/index.vue.d.ts +3 -30
  229. package/lib/src/ap-action/item/index.vue.d.ts +4 -36
  230. package/lib/src/ap-action/item/index.vue2.js +1 -1
  231. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +5 -39
  232. package/lib/src/ap-action/item-modal/index.vue.d.ts +5 -33
  233. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +5 -33
  234. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  235. package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -31
  236. package/lib/src/ap-button/ap-button.vue.d.ts +5 -31
  237. package/lib/src/ap-descriptions/ap-descriptions.vue.d.ts +4 -12
  238. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  239. package/lib/src/ap-descriptions/help-message/index.vue.d.ts +4 -15
  240. package/lib/src/ap-download/ap-download.vue.d.ts +8 -31
  241. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  242. package/lib/src/ap-field/checkbox/index.vue.d.ts +5 -32
  243. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  244. package/lib/src/ap-field/date/index.vue.d.ts +7 -65
  245. package/lib/src/ap-field/date/index.vue.js +1 -1
  246. package/lib/src/ap-field/date-range/index.vue.d.ts +7 -67
  247. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  248. package/lib/src/ap-field/hooks/use-options.d.ts +1 -1
  249. package/lib/src/ap-field/number/index.vue.d.ts +12 -169
  250. package/lib/src/ap-field/number/index.vue.js +1 -1
  251. package/lib/src/ap-field/radio/index.vue.d.ts +6 -33
  252. package/lib/src/ap-field/radio/index.vue.js +1 -1
  253. package/lib/src/ap-field/rate/index.vue.d.ts +12 -75
  254. package/lib/src/ap-field/rate/index.vue.js +1 -1
  255. package/lib/src/ap-field/segmented/index.vue.d.ts +7 -33
  256. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  257. package/lib/src/ap-field/select/index.vue.d.ts +12 -234
  258. package/lib/src/ap-field/select/index.vue.js +1 -1
  259. package/lib/src/ap-field/slider/index.vue.d.ts +12 -144
  260. package/lib/src/ap-field/slider/index.vue.js +1 -1
  261. package/lib/src/ap-field/switch/index.vue.d.ts +7 -37
  262. package/lib/src/ap-field/switch/index.vue.js +1 -1
  263. package/lib/src/ap-field/text/index.vue.d.ts +8 -40
  264. package/lib/src/ap-field/text/password.vue.d.ts +9 -47
  265. package/lib/src/ap-field/text-area/index.vue.d.ts +6 -39
  266. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  267. package/lib/src/ap-form/ap-form.vue.d.ts +21 -274
  268. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  269. package/lib/src/ap-form/dependency/index.vue.d.ts +4 -12
  270. package/lib/src/ap-form/drawer-form/index.vue.d.ts +37 -536
  271. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  272. package/lib/src/ap-form/hooks/use-watch.d.ts +1 -1
  273. package/lib/src/ap-form/item/index.vue.d.ts +37 -278
  274. package/lib/src/ap-form/item-group/index.vue.d.ts +5 -29
  275. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +5 -37
  276. package/lib/src/ap-form/items/date/index.vue.d.ts +5 -37
  277. package/lib/src/ap-form/items/date-range/index.vue.d.ts +5 -37
  278. package/lib/src/ap-form/items/number/index.vue.d.ts +53 -510
  279. package/lib/src/ap-form/items/radio/index.vue.d.ts +14 -219
  280. package/lib/src/ap-form/items/select/index.vue.d.ts +6 -38
  281. package/lib/src/ap-form/items/switch/index.vue.d.ts +5 -39
  282. package/lib/src/ap-form/items/text/group.vue.d.ts +5 -25
  283. package/lib/src/ap-form/items/text/index.vue.d.ts +35 -522
  284. package/lib/src/ap-form/items/text/password.vue.d.ts +44 -586
  285. package/lib/src/ap-form/items/text-area/index.vue.d.ts +14 -507
  286. package/lib/src/ap-form/list/index.vue.d.ts +4 -12
  287. package/lib/src/ap-form/modal-form/index.vue.d.ts +37 -535
  288. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  289. package/lib/src/ap-form/render/control.vue.d.ts +4 -12
  290. package/lib/src/ap-form/render/item.vue.d.ts +5 -37
  291. package/lib/src/ap-form/search-form/index.vue.d.ts +37 -532
  292. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  293. package/lib/src/ap-form/set/index.vue.d.ts +5 -25
  294. package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +4 -12
  295. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +5 -27
  296. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
  297. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +7 -29
  298. package/lib/src/ap-list/index.vue.d.ts +4 -6
  299. package/lib/src/ap-list/index.vue.js +1 -1
  300. package/lib/src/ap-modal/utils/createModal.js +1 -1
  301. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +3 -24
  302. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
  303. package/lib/src/ap-scroll-bar/index.d.ts +7 -42
  304. package/lib/src/ap-table/ap-table.vue.d.ts +3 -5
  305. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  306. package/lib/src/ap-table/components/index/index.vue.d.ts +3 -24
  307. package/lib/src/ap-table/components/index/index.vue2.js +1 -1
  308. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +2 -11
  309. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +5 -25
  310. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  311. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +2 -11
  312. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  313. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +2 -11
  314. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  315. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +6 -15
  316. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  317. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +5 -14
  318. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  319. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +2 -11
  320. package/lib/src/ap-table/components/status/index.vue.d.ts +2 -11
  321. package/lib/src/ap-table/components/status/index.vue2.js +1 -1
  322. package/lib/src/ap-table/constants.d.ts +162 -13517
  323. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +11 -3
  324. package/lib/src/ap-table/hooks/use-table-content-height.d.ts +1 -1
  325. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  326. package/lib/src/ap-table/hooks/use-table-paging.d.ts +7 -3
  327. package/lib/src/ap-table/utils.d.ts +65 -7907
  328. package/lib/src/ap-tag/ap-tag-group.vue.d.ts +5 -29
  329. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  330. package/lib/src/ap-tag/ap-tag.vue.d.ts +3 -28
  331. package/lib/src/ap-upload/apUpload.vue.d.ts +66 -16
  332. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  333. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
  334. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  335. package/lib/src/ap-upload/components/Picture.vue.d.ts +6 -10
  336. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  337. package/lib/src/ap-upload/components/SingleFile.vue.d.ts +2 -2
  338. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  339. package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +6 -29
  340. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  341. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +2 -2
  342. package/lib/src/business/ap-appendix/icons/file-icon.vue.js +1 -1
  343. package/lib/src/business/ap-appendix/index.d.ts +7 -108
  344. package/lib/src/business/ap-attachment/ApAttachment.d.ts +5 -5
  345. package/lib/src/business/ap-attachment/index.d.ts +7 -48
  346. package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +4 -12
  347. package/lib/src/business/ap-batch-action/index.d.ts +5 -32
  348. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +3 -11
  349. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  350. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +4 -14
  351. package/lib/src/business/ap-batch-action-group/index.d.ts +590 -905
  352. package/lib/src/business/ap-button-group/ApButtonGroup.vue.d.ts +2 -19
  353. package/lib/src/business/ap-button-group/index.d.ts +5 -603
  354. package/lib/src/business/ap-card/ApCard.vue.d.ts +4 -12
  355. package/lib/src/business/ap-card/index.d.ts +5 -33
  356. package/lib/src/business/ap-card/interface.d.ts +1 -1
  357. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +5 -10
  358. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  359. package/lib/src/business/ap-expand-alert/index.d.ts +6 -8
  360. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +3 -24
  361. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  362. package/lib/src/business/ap-export-group/index.d.ts +7 -146
  363. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +8 -30
  364. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  365. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +9 -356
  366. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  367. package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +2 -2
  368. package/lib/src/business/ap-group-search/images/icon-down.vue.js +1 -1
  369. package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +2 -2
  370. package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +1 -1
  371. package/lib/src/business/ap-group-search/index.d.ts +711 -2447
  372. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +10 -357
  373. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  374. package/lib/src/business/ap-image/ApImage.vue.d.ts +5 -25
  375. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  376. package/lib/src/business/ap-image/index.d.ts +7 -139
  377. package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +6 -31
  378. package/lib/src/business/ap-input-radio/index.d.ts +14 -339
  379. package/lib/src/business/ap-label/ApLabel.d.ts +5 -5
  380. package/lib/src/business/ap-label/group/ApLabelGroup.d.ts +5 -5
  381. package/lib/src/business/ap-label/index.d.ts +13 -90
  382. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +5 -71
  383. package/lib/src/business/ap-ladder/index.d.ts +7 -479
  384. package/lib/src/business/ap-select-layout/index.d.ts +5 -7
  385. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +6 -12
  386. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  387. package/lib/src/business/ap-size-input/ApSizeInput.d.ts +84 -0
  388. package/lib/src/business/ap-size-input/ApSizeInput.js +1 -0
  389. package/lib/src/business/ap-size-input/constans.d.ts +38 -0
  390. package/lib/src/business/ap-size-input/constans.js +1 -0
  391. package/lib/src/business/ap-size-input/index.d.ts +155 -0
  392. package/lib/src/business/ap-size-input/index.js +1 -0
  393. package/lib/src/business/ap-size-input/interface.d.ts +11 -0
  394. package/lib/src/business/ap-size-input/interface.js +1 -0
  395. package/lib/src/business/ap-size-input/style/css.d.ts +0 -0
  396. package/lib/src/business/ap-size-input/style/css.js +1 -0
  397. package/lib/src/business/ap-size-input/style/index.d.ts +0 -0
  398. package/lib/src/business/ap-size-input/style/index.js +1 -0
  399. package/lib/src/business/ap-status/ApStatus.vue.d.ts +3 -28
  400. package/lib/src/business/ap-status/group/ApStatusGroup.vue.d.ts +3 -30
  401. package/lib/src/business/ap-status/index.d.ts +12 -192
  402. package/lib/src/business/ap-summary/ap-summary.vue.d.ts +3 -28
  403. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  404. package/lib/src/business/ap-summary/index.d.ts +7 -87
  405. package/lib/src/business/ap-table-modal/index.d.ts +15 -1056
  406. package/lib/src/business/ap-table-modal/modal-title.vue.d.ts +6 -5
  407. package/lib/src/business/ap-table-modal/table-layout/index.vue.d.ts +12 -37
  408. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +8 -58
  409. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  410. package/lib/src/business/ap-title/ApTitle.vue.d.ts +5 -33
  411. package/lib/src/business/ap-title/index.d.ts +7 -110
  412. package/lib/src/business/ap-title/interface.d.ts +4 -4
  413. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +13 -33
  414. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  415. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
  416. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +2 -2
  417. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -1
  418. package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +2 -2
  419. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
  420. package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
  421. package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  422. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
  423. package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  424. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  425. package/lib/src/business/batch-input-group/index.vue.d.ts +5 -38
  426. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  427. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +4 -13
  428. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  429. package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
  430. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  431. package/lib/src/business/index.d.ts +1 -0
  432. package/lib/src/business/index.js +1 -1
  433. package/lib/src/check-card/group.vue.d.ts +7 -45
  434. package/lib/src/check-card/index.vue.d.ts +7 -37
  435. package/lib/src/config-provider/config-provider.d.ts +5 -5
  436. package/lib/src/config-provider/index.d.ts +7 -256
  437. package/lib/src/editable-table/form-item.vue.d.ts +5 -7
  438. package/lib/src/editable-table/form-item.vue.js +1 -1
  439. package/lib/src/editable-table/index.vue.d.ts +4 -8
  440. package/lib/src/editable-table/index.vue.js +1 -1
  441. package/lib/src/hooks/useControllableValue.d.ts +1 -1
  442. package/lib/src/index.js +1 -1
  443. package/lib/src/locale/lang/en.js +1 -1
  444. package/lib/src/locale/lang/zh-cn.js +1 -1
  445. package/lib/src/path-map.js +1 -1
  446. package/lib/src/tests/wrapper.d.ts +6 -6
  447. package/lib/src/utils/ap-trans-data/index.d.ts +1 -1
  448. package/lib/src/utils/ap-trans-data/index.js +1 -1
  449. package/lib/src/work-order-modal/help-message.vue.d.ts +2 -2
  450. package/lib/src/work-order-modal/help-message.vue2.js +1 -1
  451. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +6 -15
  452. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  453. package/package.json +6 -6
@@ -1,52 +1,28 @@
1
1
  import { ApTagGroupProps, ApTagProps, EllipsisProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type ApTagGroupSlots = {
4
4
  tooltip?: (props: {
5
5
  tags: ApTagProps[];
6
6
  }) => void;
7
7
  };
8
8
  declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
9
10
  slots: Readonly<ApTagGroupSlots> & ApTagGroupSlots;
10
11
  refs: {
11
12
  container: HTMLDivElement;
12
13
  };
13
- attrs: Partial<{}>;
14
+ rootEl: any;
14
15
  };
15
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApTagGroupProps>, {
17
- list: () => ApTagProps[];
18
- space: number;
19
- ellipsis: () => {};
20
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApTagGroupProps>, {
21
- list: () => ApTagProps[];
22
- space: number;
23
- ellipsis: () => {};
24
- }>>>, {
17
+ declare const __VLS_component: DefineComponent<ApTagGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTagGroupProps> & Readonly<{}>, {
25
18
  ellipsis: EllipsisProps;
26
19
  space: number;
27
20
  list: ApTagProps[];
28
- }, {}>;
21
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
29
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
23
  export default _default;
31
- type __VLS_WithDefaults<P, D> = {
32
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
33
- default: D[K];
34
- }> : P[K];
35
- };
36
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
37
- type __VLS_TypePropsToOption<T> = {
38
- [K in keyof T]-?: {} extends Pick<T, K> ? {
39
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
40
- } : {
41
- type: PropType<T[K]>;
42
- required: true;
43
- };
44
- };
45
24
  type __VLS_WithTemplateSlots<T, S> = T & {
46
25
  new (): {
47
26
  $slots: S;
48
27
  };
49
28
  };
50
- type __VLS_PrettifyLocal<T> = {
51
- [K in keyof T]: T[K];
52
- } & {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("@aplus-frontend/antdv"),V=require("@ant-design/icons-vue");require("./ap-tag.vue2.js");require("../config-provider/index.js");const b=require("lodash-unified"),N=require("../config-provider/hooks/use-locale.js"),B=require("../config-provider/hooks/use-global-config.js"),T=require("../config-provider/hooks/use-namespace.js"),W=require("./ap-tag.vue.js"),q=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:"16",height:"16",viewBox:"0 0 16 16"},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"master_svg0_1133_24991"},[e.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})])]),e.createElementVNode("g",{"clip-path":"url(#master_svg0_1133_24991)"},[e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"8",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"3.25",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"12.75",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})])])],-1),z=e.defineComponent({__name:"ap-tag-group",props:{list:{default:()=>[]},space:{default:4},ellipsisColor:{},ellipsis:{default:()=>({})}},setup(v){const{t:h}=N.useLocale(),n=v,y=B.useGlobalConfig("uiMode"),{b:x,bm:p}=T.useNamespace("tag-group"),a=e.ref(),r=e.computed(()=>({...{iconColor:"#34B77C",symbol:"icon",text:h("ap.common.more")},...n.ellipsis})),C=e.computed(()=>r.value.tooltip&&typeof r.value.tooltip=="object"?b.omit(r.value.tooltip,["trigger","title"]):{}),c=e.computed(()=>e.unref(u)<n.list.length),u=e.ref(0),w=e.computed(()=>n.list.map(t=>t.text).join("、")),_=e.computed(()=>[x()].filter(Boolean)),E=e.computed(()=>y.value==="aplus"?[p("ellipsis-text","aplus")]:[p("ellipsis-text","admin")]),d=(t,l)=>{let s=document.createElement("canvas");const o=s.getContext("2d");o.font=`${t}px system-ui`;const i=o.measureText(l);return setTimeout(()=>{s=null},0),i.width},m=()=>{let t=0,l=0;if(!a.value)return;const s=a.value.offsetWidth;for(let o of n.list){const i=o.size==="large"?16:12,f=d(o.size==="large"?14:12,o.text)+i+2+n.space;if(t+=f,t>s){t-=f;break}l++}if(l<n.list.length){const i=d(12,r.value.text);n.ellipsis.symbol==="icon"?t+=16:t+=i,t>s&&l--}u.value=l};e.watch(()=>n.list,(t,l)=>{t!==l&&e.nextTick(()=>{m()})},{immediate:!0});const g=()=>{m()};return e.onMounted(()=>{[["ellipsisColor","ellipse.color"]].forEach(([t,l])=>{n[t]&&console.error(`[ApTagGroup]: \`${t}\` is deprecated, please use \`${l}\` instead.`)}),window.addEventListener("resize",g)}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,l)=>(e.openBlock(),e.createBlock(e.unref(k.Tooltip),e.mergeProps({trigger:"hover"},C.value),{title:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip",{tags:t.list},()=>[e.createTextVNode(e.toDisplayString(w.value),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(_.value),ref_key:"container",ref:a,style:e.normalizeStyle({pointerEvents:c.value?"auto":"none"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,o)=>(e.openBlock(),e.createBlock(W.default,e.mergeProps({ref_for:!0},s,{key:o,style:{display:o>=u.value?"none":"inline-block",marginRight:`${t.space}px`}}),null,16,["style"]))),128)),c.value&&r.value.symbol==="icon"?(e.openBlock(),e.createBlock(e.unref(V),{key:0,style:e.normalizeStyle({color:t.ellipsisColor||r.value.iconColor})},{component:e.withCtx(()=>[q]),_:1},8,["style"])):c.value&&r.value.symbol==="text"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(E.value)},e.toDisplayString(r.value.text),3)):e.createCommentVNode("",!0)],6)]),_:3},16))}});exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@aplus-frontend/antdv"),V=require("@ant-design/icons-vue");require("./ap-tag.vue2.js");require("../config-provider/index.js");const b=require("lodash-unified"),N=require("../config-provider/hooks/use-locale.js"),B=require("../config-provider/hooks/use-global-config.js"),T=require("../config-provider/hooks/use-namespace.js"),W=require("./ap-tag.vue.js"),q=e.defineComponent({__name:"ap-tag-group",props:{list:{default:()=>[]},space:{default:4},ellipsisColor:{},ellipsis:{default:()=>({})}},setup(v){const{t:h}=N.useLocale(),r=v,y=B.useGlobalConfig("uiMode"),{b:x,bm:p}=T.useNamespace("tag-group"),a=e.ref(),n=e.computed(()=>({...{iconColor:"#34B77C",symbol:"icon",text:h("ap.common.more")},...r.ellipsis})),C=e.computed(()=>n.value.tooltip&&typeof n.value.tooltip=="object"?b.omit(n.value.tooltip,["trigger","title"]):{}),c=e.computed(()=>e.unref(u)<r.list.length),u=e.ref(0),w=e.computed(()=>r.list.map(t=>t.text).join("、")),E=e.computed(()=>[x()].filter(Boolean)),k=e.computed(()=>y.value==="aplus"?[p("ellipsis-text","aplus")]:[p("ellipsis-text","admin")]),d=(t,l)=>{let s=document.createElement("canvas");const o=s.getContext("2d");o.font=`${t}px system-ui`;const i=o.measureText(l);return setTimeout(()=>{s=null},0),i.width},m=()=>{let t=0,l=0;if(!a.value)return;const s=a.value.offsetWidth;for(let o of r.list){const i=o.size==="large"?16:12,f=d(o.size==="large"?14:12,o.text)+i+2+r.space;if(t+=f,t>s){t-=f;break}l++}if(l<r.list.length){const i=d(12,n.value.text);r.ellipsis.symbol==="icon"?t+=16:t+=i,t>s&&l--}u.value=l};e.watch(()=>r.list,(t,l)=>{t!==l&&e.nextTick(()=>{m()})},{immediate:!0});const g=()=>{m()};return e.onMounted(()=>{[["ellipsisColor","ellipse.color"]].forEach(([t,l])=>{r[t]&&console.error(`[ApTagGroup]: \`${t}\` is deprecated, please use \`${l}\` instead.`)}),window.addEventListener("resize",g)}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,l)=>(e.openBlock(),e.createBlock(e.unref(_.Tooltip),e.mergeProps({trigger:"hover"},C.value),{title:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip",{tags:t.list},()=>[e.createTextVNode(e.toDisplayString(w.value),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"container",ref:a,class:e.normalizeClass(E.value),style:e.normalizeStyle({pointerEvents:c.value?"auto":"none"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,o)=>(e.openBlock(),e.createBlock(W.default,e.mergeProps({ref_for:!0},s,{key:o,style:{display:o>=u.value?"none":"inline-block",marginRight:`${t.space}px`}}),null,16,["style"]))),128)),c.value&&n.value.symbol==="icon"?(e.openBlock(),e.createBlock(e.unref(V),{key:0,style:e.normalizeStyle({color:t.ellipsisColor||n.value.iconColor})},{component:e.withCtx(()=>l[0]||(l[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:"16",height:"16",viewBox:"0 0 16 16"},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"master_svg0_1133_24991"},[e.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})])]),e.createElementVNode("g",{"clip-path":"url(#master_svg0_1133_24991)"},[e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"8",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"3.25",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})]),e.createElementVNode("g",null,[e.createElementVNode("ellipse",{cx:"12.75",cy:"8",rx:"1",ry:"1",fill:"currentColor","fill-opacity":"1"})])])],-1)])),_:1},8,["style"])):c.value&&n.value.symbol==="text"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(k.value)},e.toDisplayString(n.value.text),3)):e.createCommentVNode("",!0)],6)]),_:3},16))}});exports.default=q;
@@ -1,33 +1,8 @@
1
1
  import { ApTagProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApTagProps>, {
4
- size: string;
5
- color: string;
6
- disabled: boolean;
7
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApTagProps>, {
8
- size: string;
9
- color: string;
10
- disabled: boolean;
11
- }>>>, {
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<ApTagProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTagProps> & Readonly<{}>, {
12
4
  size: "small" | "middle" | "large";
13
5
  color: string;
14
6
  disabled: boolean;
15
- }, {}>;
7
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
16
8
  export default _default;
17
- type __VLS_WithDefaults<P, D> = {
18
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
19
- default: D[K];
20
- }> : P[K];
21
- };
22
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
- type __VLS_TypePropsToOption<T> = {
24
- [K in keyof T]-?: {} extends Pick<T, K> ? {
25
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
26
- } : {
27
- type: PropType<T[K]>;
28
- required: true;
29
- };
30
- };
31
- type __VLS_PrettifyLocal<T> = {
32
- [K in keyof T]: T[K];
33
- } & {};
@@ -1,19 +1,21 @@
1
- import { PropType, VNode, DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes, RendererNode, RendererElement } from 'vue';
1
+ import { PropType, VNode, DefineComponent, ExtractPropTypes, ComputedRef, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, ComponentProvideOptions } from 'vue';
2
2
  import { FileUploadType, BeforeUpload, CustomRequest, ApUploadSlots } from './apUploadTypes';
3
3
  import { GetOssAccess } from './hooks/useOss';
4
4
  declare function clear(): void;
5
5
  declare function setValue(val: any): void;
6
6
  declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
7
8
  slots: Readonly<ApUploadSlots> & ApUploadSlots;
8
9
  refs: {
9
10
  uploadRef: unknown;
10
11
  };
11
- attrs: Partial<{}>;
12
+ rootEl: HTMLDivElement;
12
13
  };
13
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
- declare const __VLS_component: DefineComponent<{
15
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
15
16
  dirName: {
16
17
  type: StringConstructor;
18
+ default: undefined;
17
19
  };
18
20
  type: {
19
21
  type: PropType<FileUploadType>;
@@ -29,9 +31,11 @@ declare const __VLS_component: DefineComponent<{
29
31
  };
30
32
  accept: {
31
33
  type: StringConstructor;
34
+ default: undefined;
32
35
  };
33
36
  maxSize: {
34
37
  type: NumberConstructor;
38
+ default: undefined;
35
39
  };
36
40
  title: {
37
41
  type: StringConstructor;
@@ -43,29 +47,46 @@ declare const __VLS_component: DefineComponent<{
43
47
  };
44
48
  maxCount: {
45
49
  type: NumberConstructor;
50
+ default: undefined;
46
51
  };
47
52
  beforeUpload: {
48
53
  type: PropType<BeforeUpload>;
54
+ default: undefined;
49
55
  };
50
56
  customRequest: {
51
57
  type: PropType<CustomRequest>;
58
+ default: undefined;
52
59
  };
53
60
  getOssAccess: {
54
61
  type: PropType<GetOssAccess>;
62
+ default: undefined;
63
+ };
64
+ onChange: {
65
+ type: FunctionConstructor;
66
+ default: undefined;
67
+ };
68
+ maxSizeErrorMsg: {
69
+ type: StringConstructor;
70
+ default: undefined;
71
+ };
72
+ maxCountErrorMsg: {
73
+ type: StringConstructor;
74
+ default: undefined;
75
+ };
76
+ acceptErrorMsg: {
77
+ type: StringConstructor;
78
+ default: undefined;
55
79
  };
56
- onChange: FunctionConstructor;
57
- maxSizeErrorMsg: StringConstructor;
58
- maxCountErrorMsg: StringConstructor;
59
- acceptErrorMsg: StringConstructor;
60
- }, {
80
+ }>, {
61
81
  done: ComputedRef<boolean>;
62
82
  clear: typeof clear;
63
83
  setValue: typeof setValue;
64
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
84
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
65
85
  "update:value": (...args: any[]) => void;
66
86
  }, string, PublicProps, Readonly< ExtractPropTypes<{
67
87
  dirName: {
68
88
  type: StringConstructor;
89
+ default: undefined;
69
90
  };
70
91
  type: {
71
92
  type: PropType<FileUploadType>;
@@ -81,9 +102,11 @@ declare const __VLS_component: DefineComponent<{
81
102
  };
82
103
  accept: {
83
104
  type: StringConstructor;
105
+ default: undefined;
84
106
  };
85
107
  maxSize: {
86
108
  type: NumberConstructor;
109
+ default: undefined;
87
110
  };
88
111
  title: {
89
112
  type: StringConstructor;
@@ -95,31 +118,58 @@ declare const __VLS_component: DefineComponent<{
95
118
  };
96
119
  maxCount: {
97
120
  type: NumberConstructor;
121
+ default: undefined;
98
122
  };
99
123
  beforeUpload: {
100
124
  type: PropType<BeforeUpload>;
125
+ default: undefined;
101
126
  };
102
127
  customRequest: {
103
128
  type: PropType<CustomRequest>;
129
+ default: undefined;
104
130
  };
105
131
  getOssAccess: {
106
132
  type: PropType<GetOssAccess>;
133
+ default: undefined;
134
+ };
135
+ onChange: {
136
+ type: FunctionConstructor;
137
+ default: undefined;
138
+ };
139
+ maxSizeErrorMsg: {
140
+ type: StringConstructor;
141
+ default: undefined;
142
+ };
143
+ maxCountErrorMsg: {
144
+ type: StringConstructor;
145
+ default: undefined;
146
+ };
147
+ acceptErrorMsg: {
148
+ type: StringConstructor;
149
+ default: undefined;
107
150
  };
108
- onChange: FunctionConstructor;
109
- maxSizeErrorMsg: StringConstructor;
110
- maxCountErrorMsg: StringConstructor;
111
- acceptErrorMsg: StringConstructor;
112
- }>> & {
151
+ }>> & Readonly<{
113
152
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
114
- }, {
153
+ }>, {
115
154
  type: FileUploadType;
116
155
  title: string;
156
+ onChange: Function;
117
157
  value: string | unknown[] | Record<string, any>;
158
+ getOssAccess: GetOssAccess;
159
+ dirName: string;
118
160
  needName: boolean | Record<string, any>;
161
+ accept: string;
162
+ maxSize: number;
119
163
  subTitle: string | VNode< RendererNode, RendererElement, {
120
164
  [key: string]: any;
121
165
  }>;
122
- }, {}>;
166
+ beforeUpload: BeforeUpload;
167
+ customRequest: CustomRequest;
168
+ maxSizeErrorMsg: string;
169
+ acceptErrorMsg: string;
170
+ maxCount: number;
171
+ maxCountErrorMsg: string;
172
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
123
173
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
124
174
  export default _default;
125
175
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");require("./components/SingleFile.vue.js");require("./components/MultipleFile.vue.js");require("./components/Picture.vue.js");const E=require("./utils/accept.js"),j=require("./hooks/useOss.js"),z=require("@aplus-frontend/antdv"),h=require("../config-provider/hooks/use-locale.js"),A=require("../config-provider/hooks/use-namespace.js"),U=require("./components/SingleFile.vue2.js"),k=require("./components/MultipleFile.vue2.js"),T=require("./components/Picture.vue2.js"),g=require("../config-provider/hooks/use-global-config.js"),B=e.defineComponent({name:"AplusFileUpload",__name:"apUpload",props:{dirName:{type:String},type:{type:String,default:"singleFile"},value:{type:[String,Object,Array],default:void 0},needName:{type:[Boolean,Object],default:void 0},accept:{type:String},maxSize:{type:Number},title:{type:String,default:""},subTitle:{type:[String,Object],default:""},maxCount:{type:Number},beforeUpload:{type:Function},customRequest:{type:Function},getOssAccess:{type:Function},onChange:Function,maxSizeErrorMsg:String,maxCountErrorMsg:String,acceptErrorMsg:String},emits:["update:value"],setup(f,{expose:_,emit:y}){var p,d,m,v;const{t:i,lang:C}=h.useLocale();E.injectLocaleToAccept(i),j.injectLocaleToOss(i,C);const{b:S}=A.useNamespace("ap-upload"),a=e.ref(null),t=f,b=y,q={singleFile:U.default,multipleFile:k.default,picture:T.default},s=z.Form.useInjectFormItemContext(),M=e.computed({get(){return t.value},set(r){var o;b("update:value",r),s==null||s.onFieldChange(),(o=t.onChange)==null||o.call(t,r)}}),x=g.useGlobalConfig("uiMode"),n=g.useGlobalConfig("apUpload");e.provide("theme",x.value),e.provide("value",M),e.provide("dirName",t.dirName??((p=n.value)==null?void 0:p.dirName)),e.provide("needName",t.needName??((d=n.value)==null?void 0:d.needName)??!1),e.provide("accept",t.accept??((m=n.value)==null?void 0:m.accept)??""),e.provide("maxSize",t.maxSize),e.provide("title",t.title),e.provide("subTitle",t.subTitle),e.provide("maxCount",t.maxCount),e.provide("beforeUpload",t.beforeUpload),e.provide("customRequest",t.customRequest),e.provide("getOssAccess",t.getOssAccess??((v=n.value)==null?void 0:v.getOssAccess)),e.provide("maxSizeErrorMsg",t.maxSizeErrorMsg),e.provide("maxCountErrorMsg",t.maxCountErrorMsg),e.provide("acceptErrorMsg",t.acceptErrorMsg);const F=e.computed(()=>c.value===0),c=e.ref(0);e.provide("uploadingCount",c);function N(){l(void 0)}function l(r){var o,u;(u=(o=a==null?void 0:a.value)==null?void 0:o.setValue)==null||u.call(o,r)}return _({done:F,clear:N,setValue:l}),(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(S)())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q[t.type]),e.mergeProps(r.$attrs,{ref_key:"uploadRef",ref:a}),e.createSlots({_:2},[e.renderList(Object.keys(r.$slots),u=>({name:u,fn:e.withCtx(O=>[e.renderSlot(r.$slots,u,e.normalizeProps(e.guardReactiveProps(O||{})))])}))]),1040))],2))}});exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");require("./components/SingleFile.vue.js");require("./components/MultipleFile.vue.js");require("./components/Picture.vue.js");const E=require("./utils/accept.js"),j=require("./hooks/useOss.js"),z=require("@aplus-frontend/antdv"),h=require("../config-provider/hooks/use-locale.js"),A=require("../config-provider/hooks/use-namespace.js"),U=require("./components/SingleFile.vue2.js"),k=require("./components/MultipleFile.vue2.js"),T=require("./components/Picture.vue2.js"),g=require("../config-provider/hooks/use-global-config.js"),B=e.defineComponent({name:"AplusFileUpload",__name:"apUpload",props:{dirName:{type:String,default:void 0},type:{type:String,default:"singleFile"},value:{type:[String,Object,Array],default:void 0},needName:{type:[Boolean,Object],default:void 0},accept:{type:String,default:void 0},maxSize:{type:Number,default:void 0},title:{type:String,default:""},subTitle:{type:[String,Object],default:""},maxCount:{type:Number,default:void 0},beforeUpload:{type:Function,default:void 0},customRequest:{type:Function,default:void 0},getOssAccess:{type:Function,default:void 0},onChange:{type:Function,default:void 0},maxSizeErrorMsg:{type:String,default:void 0},maxCountErrorMsg:{type:String,default:void 0},acceptErrorMsg:{type:String,default:void 0}},emits:["update:value"],setup(f,{expose:_,emit:y}){var p,d,v,m;const{t:s,lang:C}=h.useLocale();E.injectLocaleToAccept(s),j.injectLocaleToOss(s,C);const{b:S}=A.useNamespace("ap-upload"),a=e.ref(null),t=f,b=y,q={singleFile:U.default,multipleFile:k.default,picture:T.default},n=z.Form.useInjectFormItemContext(),M=e.computed({get(){return t.value},set(o){var r;b("update:value",o),n==null||n.onFieldChange(),(r=t.onChange)==null||r.call(t,o)}}),x=g.useGlobalConfig("uiMode"),i=g.useGlobalConfig("apUpload");e.provide("theme",x.value),e.provide("value",M),e.provide("dirName",t.dirName??((p=i.value)==null?void 0:p.dirName)),e.provide("needName",t.needName??((d=i.value)==null?void 0:d.needName)??!1),e.provide("accept",t.accept??((v=i.value)==null?void 0:v.accept)??""),e.provide("maxSize",t.maxSize),e.provide("title",t.title),e.provide("subTitle",t.subTitle),e.provide("maxCount",t.maxCount),e.provide("beforeUpload",t.beforeUpload),e.provide("customRequest",t.customRequest),e.provide("getOssAccess",t.getOssAccess??((m=i.value)==null?void 0:m.getOssAccess)),e.provide("maxSizeErrorMsg",t.maxSizeErrorMsg),e.provide("maxCountErrorMsg",t.maxCountErrorMsg),e.provide("acceptErrorMsg",t.acceptErrorMsg);const F=e.computed(()=>l.value===0),l=e.ref(0);e.provide("uploadingCount",l);function N(){c(void 0)}function c(o){var r,u;(u=(r=a==null?void 0:a.value)==null?void 0:r.setValue)==null||u.call(r,o)}return _({done:F,clear:N,setValue:c}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(S)())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q[t.type]),e.mergeProps(o.$attrs,{ref_key:"uploadRef",ref:a}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),u=>({name:u,fn:e.withCtx(O=>[e.renderSlot(o.$slots,u,e.normalizeProps(e.guardReactiveProps(O||{})))])}))]),1040))],2))}});exports.default=B;
@@ -1,6 +1,6 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  declare function setValue(val: (string | Record<string, any>)[]): void;
3
3
  declare const _default: DefineComponent<{}, {
4
4
  setValue: typeof setValue;
5
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
5
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
6
6
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const v=require("../utils/returnData.js"),_=require("../hooks/useOss.js"),i=require("@aplus-frontend/antdv"),P=require("@ant-design/icons-vue"),N=require("../utils/accept.js"),O=require("../../config-provider/hooks/use-locale.js"),D=require("../../config-provider/hooks/use-namespace.js"),V={class:"multiple-file-context"},$={key:0},W={key:1},G=e.defineComponent({__name:"MultipleFile",setup(H,{expose:S}){const{t:o}=O.useLocale(),{b:y}=D.useNamespace("ap-upload-multiple-file"),{put:T}=_.useOss(),b=e.inject("theme"),q=e.inject("dirName"),x=e.inject("accept")||"*",w=e.inject("maxSize")??500,A=e.inject("title")||o("ap.apUpload.uploadFile"),m=e.inject("subTitle"),r=e.inject("maxCount")??10,d=e.inject("uploadingCount"),C=e.inject("beforeUpload"),E=e.inject("customRequest"),B=e.inject("getOssAccess"),F=e.inject("maxSizeErrorMsg"),M=e.inject("maxCountErrorMsg"),L=e.inject("acceptErrorMsg"),a=e.inject("value"),l=[],f=e.inject("needName"),c=e.ref(null);e.watch(()=>a==null?void 0:a.value,function(t){var n,s;!((s=(n=c==null?void 0:c.value)==null?void 0:n.fileList)!=null&&s.length)&&t&&j(t)},{immediate:!0});function j(t){if(!t){p=[],c.value.fileList=[],a.value=void 0,l.splice(0,l.length);return}e.nextTick(()=>{const n=t.map(s=>{const u=v.getPath(f,s),h=v.getName(f,s),k=new File([s],h,{});return k.response=u,k.uid=u,k});if(r&&n.length>r){i.message.warning(o("ap.apUpload.fileInitializationException",{maxCount:r}));return}n.forEach(s=>{p.push(s),l.push({uid:s.uid,path:s.response})}),c.value.fileList=n,a.value=t})}S({setValue:j});let p=[],U;function g(t){setTimeout(()=>{const n=c.value.fileList.findIndex(s=>s.uid===t.uid);n>=0&&c.value.fileList.splice(n,1)})}async function R(t){if(r&&r>1&&p.length>=r)return clearTimeout(U),U=setTimeout(()=>{i.message.warning(M||o("ap.apUpload.maxUploadFiles",{maxCount:r}))}),g(t),!1;if(t.size>w*1024*1024)return i.message.warning(F||o("ap.apUpload.maxUploadFileSize",{maxSize:w})),g(t),!1;if(!N.fileMatchesAccept(t,x))return i.message.warning(L||o("ap.apUpload.fileFormatNotSupported")),g(t),!1;if(typeof C=="function"&&await C(t)===!1)return g(t),!1;r&&r===1&&(p=[],a.value=void 0),p.push(t)}async function z(t){if(d.value++,typeof E=="function"){E({onProgress:n=>{setTimeout(()=>{t.onProgress({percent:n})})},onError:n=>{i.message.warning(n||o("ap.apUpload.networkAnomaly")),setTimeout(()=>{t.onError({name:n,message:n})}),d.value--},onSuccess:n=>{setTimeout(()=>{t.onSuccess(n)}),a.value=[...a.value||[],v.getReturnData(f,n,t.file.name)],l.push({uid:t.file.uid,path:n}),d.value--},file:t.file});return}try{const n=await _.getOssInstance(B);t.file.oss=n,T({file:t.file,dirName:q,oss:n,successCallBack(s){t.onSuccess(s),a.value=[...a.value||[],v.getReturnData(f,s,t.file.name)],l.push({uid:t.file.uid,path:s}),d.value--},errorCallBack(s){i.message.warning(s||o("ap.apUpload.networkAnomaly")),t.onError({name:s,message:s}),d.value--},progressCallBack(s){t.onProgress({percent:s})}})}catch(n){i.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:o("ap.apUpload.networkAnomaly")),t.onError({name:(n==null?void 0:n.message)||o("ap.apUpload.networkAnomaly"),message:(n==null?void 0:n.message)||o("ap.apUpload.networkAnomaly")}),d.value--}}function I(t){var s;if(t.response){if(Array.isArray(a.value)){const u=l.findIndex(h=>h.uid===t.uid);u>=0&&(a==null||a.value.splice(u,1),l.splice(u,1)),a.value.length===0&&(a.value=void 0)}}else(s=t==null?void 0:t.oss)==null||s.pauseUpload();const n=p.findIndex(u=>u.uid===t.uid);return p.splice(n,1),Promise.resolve(!0)}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(y)()]:!0,[e.unref(y)("admin")]:e.unref(b)==="admin"})},[e.createVNode(e.unref(i.Upload),{ref_key:"uploadRef",ref:c,accept:e.unref(x),multiple:"",maxCount:e.unref(r),progress:{strokeWidth:3,showInfo:!1,strokeColor:"#0070FF"},beforeUpload:R,customRequest:z,onRemove:I},{default:e.withCtx(()=>[e.createElementVNode("div",V,[e.createVNode(e.unref(i.Button),{class:"file-btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(P.UploadOutlined)),e.createTextVNode(" "+e.toDisplayString(e.unref(A)),1)]),_:1}),e.createElementVNode("div",{class:"sub-title",onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"]))},[typeof e.unref(m)=="string"?(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(e.unref(m)||`${e.unref(o)("ap.apUpload.supportExtension")}:${e.unref(N.getAcceptText)(e.unref(x))}`),1)):e.unref(m)?(e.openBlock(),e.createElementBlock("div",W,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m))))])):e.createCommentVNode("",!0)])])]),_:1},8,["accept","maxCount"])],2))}});exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const v=require("../utils/returnData.js"),_=require("../hooks/useOss.js"),i=require("@aplus-frontend/antdv"),P=require("@ant-design/icons-vue"),N=require("../utils/accept.js"),O=require("../../config-provider/hooks/use-locale.js"),D=require("../../config-provider/hooks/use-namespace.js"),V={class:"multiple-file-context"},$={key:0},W={key:1},G=e.defineComponent({__name:"MultipleFile",setup(H,{expose:b}){const{t:a}=O.useLocale(),{b:y}=D.useNamespace("ap-upload-multiple-file"),{put:q}=_.useOss(),S=e.inject("theme"),T=e.inject("dirName"),x=e.inject("accept")||"*",w=e.inject("maxSize")??500,A=e.inject("title")||a("ap.apUpload.uploadFile"),m=e.inject("subTitle"),r=e.inject("maxCount")??10,d=e.inject("uploadingCount"),C=e.inject("beforeUpload"),E=e.inject("customRequest"),B=e.inject("getOssAccess"),F=e.inject("maxSizeErrorMsg"),M=e.inject("maxCountErrorMsg"),L=e.inject("acceptErrorMsg"),o=e.inject("value"),l=[],f=e.inject("needName"),c=e.ref(null);e.watch(()=>o==null?void 0:o.value,function(t){var n,s;!((s=(n=c==null?void 0:c.value)==null?void 0:n.fileList)!=null&&s.length)&&t&&j(t)},{immediate:!0});function j(t){if(!t){p=[],c.value.fileList=[],o.value=void 0,l.splice(0,l.length);return}e.nextTick(()=>{const n=t.map(s=>{const u=v.getPath(f,s),h=v.getName(f,s),k=new File([s],h,{});return k.response=u,k.uid=u,k});if(r&&n.length>r){i.message.warning(a("ap.apUpload.fileInitializationException",{maxCount:r}));return}n.forEach(s=>{p.push(s),l.push({uid:s.uid,path:s.response})}),c.value.fileList=n,o.value=t})}b({setValue:j});let p=[],U;function g(t){setTimeout(()=>{const n=c.value.fileList.findIndex(s=>s.uid===t.uid);n>=0&&c.value.fileList.splice(n,1)})}async function R(t){if(r&&r>1&&p.length>=r)return clearTimeout(U),U=setTimeout(()=>{i.message.warning(M||a("ap.apUpload.maxUploadFiles",{maxCount:r}))}),g(t),!1;if(t.size>w*1024*1024)return i.message.warning(F||a("ap.apUpload.maxUploadFileSize",{maxSize:w})),g(t),!1;if(!N.fileMatchesAccept(t,x))return i.message.warning(L||a("ap.apUpload.fileFormatNotSupported")),g(t),!1;if(typeof C=="function"&&await C(t)===!1)return g(t),!1;r&&r===1&&(p=[],o.value=void 0),p.push(t)}async function z(t){if(d.value++,typeof E=="function"){E({onProgress:n=>{setTimeout(()=>{t.onProgress({percent:n})})},onError:n=>{i.message.warning(n||a("ap.apUpload.networkAnomaly")),setTimeout(()=>{t.onError({name:n,message:n})}),d.value--},onSuccess:n=>{setTimeout(()=>{t.onSuccess(n)}),o.value=[...o.value||[],v.getReturnData(f,n,t.file.name)],l.push({uid:t.file.uid,path:n}),d.value--},file:t.file});return}try{const n=await _.getOssInstance(B);t.file.oss=n,q({file:t.file,dirName:T,oss:n,successCallBack(s){t.onSuccess(s),o.value=[...o.value||[],v.getReturnData(f,s,t.file.name)],l.push({uid:t.file.uid,path:s}),d.value--},errorCallBack(s){i.message.warning(s||a("ap.apUpload.networkAnomaly")),t.onError({name:s,message:s}),d.value--},progressCallBack(s){t.onProgress({percent:s})}})}catch(n){i.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:a("ap.apUpload.networkAnomaly")),t.onError({name:(n==null?void 0:n.message)||a("ap.apUpload.networkAnomaly"),message:(n==null?void 0:n.message)||a("ap.apUpload.networkAnomaly")}),d.value--}}function I(t){var s;if(t.response){if(Array.isArray(o.value)){const u=l.findIndex(h=>h.uid===t.uid);u>=0&&(o==null||o.value.splice(u,1),l.splice(u,1)),o.value.length===0&&(o.value=void 0)}}else(s=t==null?void 0:t.oss)==null||s.pauseUpload();const n=p.findIndex(u=>u.uid===t.uid);return p.splice(n,1),Promise.resolve(!0)}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(y)()]:!0,[e.unref(y)("admin")]:e.unref(S)==="admin"})},[e.createVNode(e.unref(i.Upload),{ref_key:"uploadRef",ref:c,accept:e.unref(x),multiple:"","max-count":e.unref(r),progress:{strokeWidth:3,showInfo:!1,strokeColor:"#0070FF"},"before-upload":R,"custom-request":z,onRemove:I},{default:e.withCtx(()=>[e.createElementVNode("div",V,[e.createVNode(e.unref(i.Button),{class:"file-btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(P.UploadOutlined)),e.createTextVNode(" "+e.toDisplayString(e.unref(A)),1)]),_:1}),e.createElementVNode("div",{class:"sub-title",onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"]))},[typeof e.unref(m)=="string"?(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(e.unref(m)||`${e.unref(a)("ap.apUpload.supportExtension")}:${e.unref(N.getAcceptText)(e.unref(x))}`),1)):e.unref(m)?(e.openBlock(),e.createElementBlock("div",W,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m))))])):e.createCommentVNode("",!0)])])]),_:1},8,["accept","max-count"])],2))}});exports.default=G;
@@ -1,5 +1,6 @@
1
1
  import { Oss } from '../hooks/useOss';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ import { actionResponse } from '@aplus-frontend/oss';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
4
  declare function setValue(val?: (string | Record<string, any>)[]): void;
4
5
  interface UploadFile extends File {
5
6
  uid: string;
@@ -12,17 +13,12 @@ interface UploadFile extends File {
12
13
  }
13
14
  declare function handleRemove(uploadFile: UploadFile): Promise<boolean>;
14
15
  declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
15
17
  slots: {
16
18
  pictureContext?(_: {
17
19
  fileList: {
18
20
  oss: {
19
- pauseUpload: (() => Promise<{
20
- status: number;
21
- previewUrl?: string;
22
- saveUrl?: string;
23
- originalFileName?: string;
24
- message: string;
25
- }>) | undefined;
21
+ pauseUpload: (() => Promise< actionResponse>) | undefined;
26
22
  };
27
23
  }[];
28
24
  remove: typeof handleRemove;
@@ -31,12 +27,12 @@ declare function __VLS_template(): {
31
27
  refs: {
32
28
  fileRef: HTMLInputElement;
33
29
  };
34
- attrs: Partial<{}>;
30
+ rootEl: HTMLDivElement;
35
31
  };
36
32
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
37
33
  declare const __VLS_component: DefineComponent<{}, {
38
34
  setValue: typeof setValue;
39
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
35
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
40
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
37
  export default _default;
42
38
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const v=require("../utils/returnData.js"),B=require("@ant-design/icons-vue"),x=require("../hooks/useOss.js"),j=require("../utils/accept.js"),l=require("@aplus-frontend/antdv"),G=require("lodash-unified"),H=require("../../config-provider/hooks/use-locale.js"),J=require("../../config-provider/hooks/use-namespace.js"),K=["accept"],Q={class:"picture-context"},W={class:"picture-item-box"},X=["src"],Y={class:"picture-item-shadow"},Z=["onClick"],F={key:0,class:"picture-item-uploading"},ee={class:"picture-title"},te={key:0},ne={key:1},ae=e.defineComponent({__name:"Picture",setup(se,{expose:b}){const{t:i}=H.useLocale(),{b:y}=J.useNamespace("ap-upload-picture"),{put:q}=x.useOss(),V=e.inject("theme"),P=e.inject("dirName"),h=e.inject("accept")||"image/*",k=e.inject("maxSize")??5,_=e.inject("title"),u=e.inject("maxCount")??10,f=e.inject("uploadingCount"),w=e.inject("beforeUpload"),E=e.inject("customRequest"),C=e.inject("getOssAccess"),R=e.inject("maxSizeErrorMsg"),z=e.inject("maxCountErrorMsg"),A=e.inject("acceptErrorMsg"),m=e.ref(null),r=e.inject("value"),g=e.inject("needName");let o=e.ref([]);const p=[];e.watch(()=>r==null?void 0:r.value,async function(t){var s;!((s=o==null?void 0:o.value)!=null&&s.length)&&t&&U(t)},{immediate:!0});function U(t){if(!t){r.value=void 0,p.splice(0,p.length),o.value=[];return}e.nextTick(async()=>{const s=[];for(let n of t){const a=v.getPath(g,n),c=v.getName(g,n),d=await x.getOssInstance(C),T=await d.getSignatureUrl(a),L={...typeof n=="string"?{}:n,...new File([n],c,{}),uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:T,status:"success",percent:100,path:a};s.push(L),d.destroy()}if(u&&s.length>u){l.message.warning(i("ap.apUpload.fileInitializationException",{maxCount:u}));return}s.forEach(n=>{o.value.push(n),p.push({uid:n.uid,path:n.path})}),r.value=t})}b({setValue:U});function I(){var t;(t=m.value)==null||t.click()}function M(t){const s=t.target;D(s==null?void 0:s.files)}function D(t){if(t!=null&&t.length)for(let s=0;s<t.length;s++)$(t[s]);m.value&&(m.value.value="")}let N;async function $(t){if(u&&u>1&&o.value.length>=u)return clearTimeout(N),N=setTimeout(()=>{l.message.warning(z||i("ap.apUpload.maxUploadPicture",{maxCount:u}))}),!1;if(t.size>k*1024*1024)return l.message.warning(R||i("ap.apUpload.maxUploadFileSize",{maxSize:k})),!1;if(!/image\/\w+/.test(t.type)||!j.fileMatchesAccept(t,h))return l.message.warning(A||i("ap.apUpload.pictureFormatNotSupported")),!1;if(typeof w=="function"&&await w(t)===!1)return!1;const s=new FileReader;s.readAsDataURL(t),s.onload=function(){const n={...t,uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:this.result,status:"uploading",percent:0};O(n,t)},s.onerror=function(){l.message.warning(i("ap.apUpload.imageParsingFailed"))}}async function O(t,s){if(f.value++,typeof E=="function"){E({onProgress:n=>{const a=o.value.find(c=>c.uid===t.uid);a&&(a.percent=n)},onError:n=>{l.message.warning(n||i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===t.uid);a>-1&&o.value.splice(a,1),f.value--},onSuccess:n=>{const a=o.value.find(c=>c.uid===t.uid);a&&(a.status="success",a.path=n),r.value=[...r.value||[],v.getReturnData(g,n,s.name)],p.push({uid:t.uid,path:n}),f.value--},file:s});return}try{const n=await x.getOssInstance(C);t.oss=n,o.value.push(t),q({file:s,dirName:P,oss:n,successCallBack(a){const c=o.value.find(d=>d.uid===t.uid);c&&(c.status="success",c.path=a),r.value=[...r.value||[],v.getReturnData(g,a,s.name)],p.push({uid:t.uid,path:a}),f.value--},errorCallBack(a){l.message.warning(a||i("ap.apUpload.networkAnomaly"));const c=o.value.findIndex(d=>d.uid===t.uid);c>-1&&o.value.splice(c,1),f.value--},progressCallBack(a){const c=o.value.find(d=>d.uid===t.uid);c&&(c.percent=a)}})}catch(n){l.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===t.uid);a>-1&&o.value.splice(a,1),f.value--}}function S(t){var n;if(t.path&&r){if(Array.isArray(r.value)){const a=p.findIndex(c=>c.uid===t.uid);a>=0&&(r.value=r==null?void 0:r.value.toSpliced(a,1),p.splice(a,1)),r.value.length===0&&(r.value=void 0)}}else(n=t==null?void 0:t.oss)==null||n.pauseUpload();const s=o.value.findIndex(a=>a.uid===t.uid);return o.value.splice(s,1),Promise.resolve(!0)}return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(y)()]:!0,[e.unref(y)("admin")]:e.unref(V)==="admin"})},[e.createElementVNode("input",{style:{display:"none"},type:"file",ref_key:"fileRef",ref:m,accept:e.unref(h),onChange:M},null,40,K),e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"pictureContext",{fileList:e.unref(o).map(n=>{var a;return{...e.unref(G.omit)(n,"oss"),oss:{pauseUpload:(a=n==null?void 0:n.oss)==null?void 0:a.pauseUpload}}}),remove:S},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),n=>(e.openBlock(),e.createElementBlock("div",{key:n.uid,class:"picture-item"},[e.createElementVNode("div",W,[e.createElementVNode("img",{src:n.thumbUrl,alt:""},null,8,X),e.withDirectives(e.createElementVNode("div",Y,[e.createElementVNode("div",{class:"picture-item-close",onClick:a=>S(n)},[e.createVNode(e.unref(B.CloseOutlined))],8,Z),n.status==="uploading"?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(e.unref(l.Progress),{percent:n.percent,strokeColor:"#ffffff",trailColor:"rgba(255, 255, 255, 0.3)",size:4,showInfo:!1},null,8,["percent"])])):e.createCommentVNode("",!0)],512),[[e.vShow,n.status==="uploading"]])])]))),128))]),e.unref(u)===void 0||e.unref(o).length<e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"picture-upload",onClick:I},[e.createVNode(e.unref(B.PlusOutlined)),e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("ap.apUpload.update")),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ee,[e.unref(_)?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(e.unref(_)),1)):(e.openBlock(),e.createElementBlock("div",ne,e.toDisplayString(`${e.unref(i)("ap.apUpload.supportExtension")}:${e.unref(j.getAcceptText)(e.unref(h))},${e.unref(i)("ap.apUpload.maxUploadPictureSize",{maxSize:e.unref(k)})}`),1))])],2))}});exports.default=ae;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const v=require("../utils/returnData.js"),B=require("@ant-design/icons-vue"),x=require("../hooks/useOss.js"),j=require("../utils/accept.js"),l=require("@aplus-frontend/antdv"),G=require("lodash-unified"),H=require("../../config-provider/hooks/use-locale.js"),J=require("../../config-provider/hooks/use-namespace.js"),K=["accept"],Q={class:"picture-context"},W={class:"picture-item-box"},X=["src"],Y={class:"picture-item-shadow"},Z=["onClick"],F={key:0,class:"picture-item-uploading"},ee={class:"picture-title"},te={key:0},ne={key:1},ae=e.defineComponent({__name:"Picture",setup(se,{expose:b}){const{t:i}=H.useLocale(),{b:y}=J.useNamespace("ap-upload-picture"),{put:q}=x.useOss(),V=e.inject("theme"),P=e.inject("dirName"),h=e.inject("accept")||"image/*",k=e.inject("maxSize")??5,_=e.inject("title"),u=e.inject("maxCount")??10,f=e.inject("uploadingCount"),w=e.inject("beforeUpload"),E=e.inject("customRequest"),U=e.inject("getOssAccess"),R=e.inject("maxSizeErrorMsg"),z=e.inject("maxCountErrorMsg"),A=e.inject("acceptErrorMsg"),m=e.ref(null),r=e.inject("value"),g=e.inject("needName");let o=e.ref([]);const p=[];e.watch(()=>r==null?void 0:r.value,async function(t){var s;!((s=o==null?void 0:o.value)!=null&&s.length)&&t&&C(t)},{immediate:!0});function C(t){if(!t){r.value=void 0,p.splice(0,p.length),o.value=[];return}e.nextTick(async()=>{const s=[];for(let n of t){const a=v.getPath(g,n),c=v.getName(g,n),d=await x.getOssInstance(U),T=await d.getSignatureUrl(a),L={...typeof n=="string"?{}:n,...new File([n],c,{}),uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:T,status:"success",percent:100,path:a};s.push(L),d.destroy()}if(u&&s.length>u){l.message.warning(i("ap.apUpload.fileInitializationException",{maxCount:u}));return}s.forEach(n=>{o.value.push(n),p.push({uid:n.uid,path:n.path})}),r.value=t})}b({setValue:C});function M(){var t;(t=m.value)==null||t.click()}function D(t){const s=t.target;I(s==null?void 0:s.files)}function I(t){if(t!=null&&t.length)for(let s=0;s<t.length;s++)$(t[s]);m.value&&(m.value.value="")}let N;async function $(t){if(u&&u>1&&o.value.length>=u)return clearTimeout(N),N=setTimeout(()=>{l.message.warning(z||i("ap.apUpload.maxUploadPicture",{maxCount:u}))}),!1;if(t.size>k*1024*1024)return l.message.warning(R||i("ap.apUpload.maxUploadFileSize",{maxSize:k})),!1;if(!/image\/\w+/.test(t.type)||!j.fileMatchesAccept(t,h))return l.message.warning(A||i("ap.apUpload.pictureFormatNotSupported")),!1;if(typeof w=="function"&&await w(t)===!1)return!1;const s=new FileReader;s.readAsDataURL(t),s.onload=function(){const n={...t,uid:`${new Date().getTime()}-${Math.random()}`,thumbUrl:this.result,status:"uploading",percent:0};O(n,t)},s.onerror=function(){l.message.warning(i("ap.apUpload.imageParsingFailed"))}}async function O(t,s){if(f.value++,typeof E=="function"){E({onProgress:n=>{const a=o.value.find(c=>c.uid===t.uid);a&&(a.percent=n)},onError:n=>{l.message.warning(n||i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===t.uid);a>-1&&o.value.splice(a,1),f.value--},onSuccess:n=>{const a=o.value.find(c=>c.uid===t.uid);a&&(a.status="success",a.path=n),r.value=[...r.value||[],v.getReturnData(g,n,s.name)],p.push({uid:t.uid,path:n}),f.value--},file:s});return}try{const n=await x.getOssInstance(U);t.oss=n,o.value.push(t),q({file:s,dirName:P,oss:n,successCallBack(a){const c=o.value.find(d=>d.uid===t.uid);c&&(c.status="success",c.path=a),r.value=[...r.value||[],v.getReturnData(g,a,s.name)],p.push({uid:t.uid,path:a}),f.value--},errorCallBack(a){l.message.warning(a||i("ap.apUpload.networkAnomaly"));const c=o.value.findIndex(d=>d.uid===t.uid);c>-1&&o.value.splice(c,1),f.value--},progressCallBack(a){const c=o.value.find(d=>d.uid===t.uid);c&&(c.percent=a)}})}catch(n){l.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:i("ap.apUpload.networkAnomaly"));const a=o.value.findIndex(c=>c.uid===t.uid);a>-1&&o.value.splice(a,1),f.value--}}function S(t){var n;if(t.path&&r){if(Array.isArray(r.value)){const a=p.findIndex(c=>c.uid===t.uid);a>=0&&(r.value=r==null?void 0:r.value.toSpliced(a,1),p.splice(a,1)),r.value.length===0&&(r.value=void 0)}}else(n=t==null?void 0:t.oss)==null||n.pauseUpload();const s=o.value.findIndex(a=>a.uid===t.uid);return o.value.splice(s,1),Promise.resolve(!0)}return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(y)()]:!0,[e.unref(y)("admin")]:e.unref(V)==="admin"})},[e.createElementVNode("input",{ref_key:"fileRef",ref:m,style:{display:"none"},type:"file",accept:e.unref(h),onChange:D},null,40,K),e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"pictureContext",{fileList:e.unref(o).map(n=>{var a;return{...e.unref(G.omit)(n,"oss"),oss:{pauseUpload:(a=n==null?void 0:n.oss)==null?void 0:a.pauseUpload}}}),remove:S},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),n=>(e.openBlock(),e.createElementBlock("div",{key:n.uid,class:"picture-item"},[e.createElementVNode("div",W,[e.createElementVNode("img",{src:n.thumbUrl,alt:""},null,8,X),e.withDirectives(e.createElementVNode("div",Y,[e.createElementVNode("div",{class:"picture-item-close",onClick:a=>S(n)},[e.createVNode(e.unref(B.CloseOutlined))],8,Z),n.status==="uploading"?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(e.unref(l.Progress),{percent:n.percent,"stroke-color":"#ffffff","trail-color":"rgba(255, 255, 255, 0.3)",size:4,"show-info":!1},null,8,["percent"])])):e.createCommentVNode("",!0)],512),[[e.vShow,n.status==="uploading"]])])]))),128))]),e.unref(u)===void 0||e.unref(o).length<e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"picture-upload",onClick:M},[e.createVNode(e.unref(B.PlusOutlined)),e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("ap.apUpload.update")),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ee,[e.unref(_)?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(e.unref(_)),1)):(e.openBlock(),e.createElementBlock("div",ne,e.toDisplayString(`${e.unref(i)("ap.apUpload.supportExtension")}:${e.unref(j.getAcceptText)(e.unref(h))},${e.unref(i)("ap.apUpload.maxUploadPictureSize",{maxSize:e.unref(k)})}`),1))])],2))}});exports.default=ae;
@@ -1,6 +1,6 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  declare function setValue(val?: string | Record<string, any>): void;
3
3
  declare const _default: DefineComponent<{}, {
4
4
  setValue: typeof setValue;
5
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
5
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
6
6
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const w=require("../utils/returnData.js"),A=require("../hooks/useOss.js"),V=require("../utils/accept.js"),s=require("@aplus-frontend/antdv"),Y=require("@ant-design/icons-vue"),M=require("../assets/single-file-icon.png.js"),Z=require("../../config-provider/hooks/use-locale.js"),ee=require("../../config-provider/hooks/use-namespace.js"),te=["accept"],ne={key:0,class:"state-un"},ae=["src"],oe={class:"state-un-title"},re={class:"state-un-subtitle"},le={key:1,class:"state-ing"},se={class:"left"},ce=["src"],ue={class:"center"},ie={class:"center-progress"},pe=e.defineComponent({__name:"SingleFile",setup(de,{expose:O}){const{t:l}=Z.useLocale(),{b:m}=ee.useNamespace("ap-upload-single-file"),{put:R,client:F}=A.useOss(),g=e.inject("theme"),P=e.inject("dirName"),h=e.inject("accept")||"*",_=e.inject("maxSize")??500,T=e.inject("title")||l("ap.apUpload.clickOrDragUpload"),k=e.inject("subTitle"),a=e.inject("value"),y=e.inject("needName"),u=e.inject("uploadingCount"),S=e.inject("beforeUpload"),U=e.inject("customRequest"),L=e.inject("getOssAccess"),I=e.inject("maxSizeErrorMsg"),$=e.inject("acceptErrorMsg"),o=e.ref(null);e.watch(()=>a==null?void 0:a.value,function(t){o.value===null&&t&&j(t)},{immediate:!0});function j(t){t?setTimeout(()=>{const n=w.getName(y,t);r.value=3,o.value=new File([t],n,{}),a.value=t}):(r.value=1,o.value=null,a.value=void 0)}O({setValue:j});const r=e.ref(1),d=e.ref(0),f=e.ref(null),B=e.computed(()=>o.value&&(a==null?void 0:a.value));function G(){var t;r.value===1&&((t=f.value)==null||t.click())}function q(t){t.preventDefault(),t.stopPropagation()}function W(t){t.dataTransfer.dropEffect="copy",t.preventDefault(),t.stopPropagation()}function H(t){b(t)}function J(t){if(t.preventDefault(),t.stopPropagation(),r.value!==1)return;var n=t.dataTransfer,c=[],x=0,z=n.files.length;function i(){x===z-1&&H(c),x++}if(n.items!==void 0)for(var D=0;D<n.items.length;D++){var E=n.items[D];if(E.kind==="file"&&E.webkitGetAsEntry().isFile){var X=E.getAsFile();c.push(X),i()}}else for(let C=0;C<z;C++){var v=n.files[C];if(v.type)c.push(v),i();else try{var N=new FileReader;N.readAsDataURL(v.slice(0,3)),N.addEventListener("load",function(p){console.warn(p,"load"),c.push(v),i()},!1),N.addEventListener("error",function(p){console.warn(p,"error"),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()},!1)}catch(p){console.warn(p),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()}}}async function K(t){const n=t.target;await b(n==null?void 0:n.files),f.value&&(f.value.value="")}async function b(t){if(t!=null&&t.length){if(t[0].size>_*1024*1024){s.message.warning(I||l("ap.apUpload.maxUploadFileSize",{maxSize:_}));return}if(!V.fileMatchesAccept(t[0],h)){s.message.warning($||l("ap.apUpload.fileFormatNotSupported"));return}if(typeof S=="function"&&await S(t[0])===!1)return;if(o.value=t[0],r.value=2,d.value=0,u.value++,typeof U=="function"){U({onProgress:n=>{d.value=n},onError:n=>{s.message.warning(n||l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--},onSuccess:n=>{a.value=w.getReturnData(y,n,o.value.name),r.value=3,u.value--},file:t[0]});return}try{await A.useOssInit(L),R({file:o.value,dirName:P,oss:F,successCallBack(n){a.value=w.getReturnData(y,n,o.value.name),r.value=3,u.value--},errorCallBack(n){s.message.warning(n||l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--},progressCallBack(n){d.value=n}})}catch(n){s.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--}}}function Q(){o.value&&!(a!=null&&a.value)&&F.pauseUpload(),r.value=1,o.value=null,a.value=void 0}return(t,n)=>{var c;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(m)()]:!0,[e.unref(m)("admin")]:e.unref(g)==="admin",[e.unref(m)("un")]:r.value===1}),onClick:G,onDragenter:q,onDragover:W,onDragleave:q,onDrop:J},[e.createElementVNode("input",{style:{display:"none"},type:"file",ref_key:"fileRef",ref:f,accept:e.unref(h),onChange:K},null,40,te),r.value===1?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("img",{class:"state-un-icon",src:e.unref(M.default)},null,8,ae),e.createElementVNode("div",oe,e.toDisplayString(e.unref(T)),1),e.createElementVNode("div",re,e.toDisplayString(typeof e.unref(k)=="string"&&e.unref(k).length>0?e.unref(k):`${e.unref(l)("ap.apUpload.supportExtension")}:${e.unref(V.getAcceptText)(e.unref(h))},${e.unref(l)("ap.apUpload.maxWarnUploadFileSize",{maxSize:e.unref(_)})}`),1)])):e.createCommentVNode("",!0),[2,3].includes(r.value)?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createElementVNode("img",{src:e.unref(M.default)},null,8,ce)]),e.createElementVNode("div",ue,[e.createElementVNode("div",{class:"center-title",style:e.normalizeStyle({color:B.value?"#0070FF":"#182948"})},e.toDisplayString((c=o.value)==null?void 0:c.name),5),e.createElementVNode("div",ie,[B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.Progress),{key:0,percent:d.value,size:4,showInfo:!1,trailColor:e.unref(g)==="admin"?"#D9D9D9":"#DEE4ED",strokeColor:e.unref(g)==="admin"?"#34B77C":"#0070FF"},null,8,["percent","trailColor","strokeColor"]))])]),e.createElementVNode("div",{class:"right",onClick:e.withModifiers(Q,["stop"])},[e.createVNode(e.unref(Y.DeleteOutlined))])])):e.createCommentVNode("",!0)],34)}}});exports.default=pe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const C=require("../utils/returnData.js"),A=require("../hooks/useOss.js"),V=require("../utils/accept.js"),s=require("@aplus-frontend/antdv"),Y=require("@ant-design/icons-vue"),M=require("../assets/single-file-icon.png.js"),Z=require("../../config-provider/hooks/use-locale.js"),ee=require("../../config-provider/hooks/use-namespace.js"),te=["accept"],ne={key:0,class:"state-un"},ae=["src"],oe={class:"state-un-title"},re={class:"state-un-subtitle"},le={key:1,class:"state-ing"},se={class:"left"},ce=["src"],ue={class:"center"},ie={class:"center-progress"},pe=e.defineComponent({__name:"SingleFile",setup(de,{expose:O}){const{t:l}=Z.useLocale(),{b:m}=ee.useNamespace("ap-upload-single-file"),{put:R,client:F}=A.useOss(),g=e.inject("theme"),P=e.inject("dirName"),h=e.inject("accept")||"*",_=e.inject("maxSize")??500,T=e.inject("title")||l("ap.apUpload.clickOrDragUpload"),k=e.inject("subTitle"),a=e.inject("value"),y=e.inject("needName"),u=e.inject("uploadingCount"),S=e.inject("beforeUpload"),U=e.inject("customRequest"),L=e.inject("getOssAccess"),$=e.inject("maxSizeErrorMsg"),I=e.inject("acceptErrorMsg"),o=e.ref(null);e.watch(()=>a==null?void 0:a.value,function(t){o.value===null&&t&&j(t)},{immediate:!0});function j(t){t?setTimeout(()=>{const n=C.getName(y,t);r.value=3,o.value=new File([t],n,{}),a.value=t}):(r.value=1,o.value=null,a.value=void 0)}O({setValue:j});const r=e.ref(1),d=e.ref(0),f=e.ref(null),B=e.computed(()=>o.value&&(a==null?void 0:a.value));function G(){var t;r.value===1&&((t=f.value)==null||t.click())}function q(t){t.preventDefault(),t.stopPropagation()}function W(t){t.dataTransfer.dropEffect="copy",t.preventDefault(),t.stopPropagation()}function H(t){b(t)}function J(t){if(t.preventDefault(),t.stopPropagation(),r.value!==1)return;var n=t.dataTransfer,c=[],x=0,z=n.files.length;function i(){x===z-1&&H(c),x++}if(n.items!==void 0)for(var D=0;D<n.items.length;D++){var E=n.items[D];if(E.kind==="file"&&E.webkitGetAsEntry().isFile){var X=E.getAsFile();c.push(X),i()}}else for(let w=0;w<z;w++){var v=n.files[w];if(v.type)c.push(v),i();else try{var N=new FileReader;N.readAsDataURL(v.slice(0,3)),N.addEventListener("load",function(p){console.warn(p,"load"),c.push(v),i()},!1),N.addEventListener("error",function(p){console.warn(p,"error"),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()},!1)}catch(p){console.warn(p),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()}}}async function K(t){const n=t.target;await b(n==null?void 0:n.files),f.value&&(f.value.value="")}async function b(t){if(t!=null&&t.length){if(t[0].size>_*1024*1024){s.message.warning($||l("ap.apUpload.maxUploadFileSize",{maxSize:_}));return}if(!V.fileMatchesAccept(t[0],h)){s.message.warning(I||l("ap.apUpload.fileFormatNotSupported"));return}if(typeof S=="function"&&await S(t[0])===!1)return;if(o.value=t[0],r.value=2,d.value=0,u.value++,typeof U=="function"){U({onProgress:n=>{d.value=n},onError:n=>{s.message.warning(n||l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--},onSuccess:n=>{a.value=C.getReturnData(y,n,o.value.name),r.value=3,u.value--},file:t[0]});return}try{await A.useOssInit(L),R({file:o.value,dirName:P,oss:F,successCallBack(n){a.value=C.getReturnData(y,n,o.value.name),r.value=3,u.value--},errorCallBack(n){s.message.warning(n||l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--},progressCallBack(n){d.value=n}})}catch(n){s.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:l("ap.apUpload.networkAnomaly")),r.value=1,o.value=null,u.value--}}}function Q(){o.value&&!(a!=null&&a.value)&&F.pauseUpload(),r.value=1,o.value=null,a.value=void 0}return(t,n)=>{var c;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(m)()]:!0,[e.unref(m)("admin")]:e.unref(g)==="admin",[e.unref(m)("un")]:r.value===1}),onClick:G,onDragenter:q,onDragover:W,onDragleave:q,onDrop:J},[e.createElementVNode("input",{ref_key:"fileRef",ref:f,style:{display:"none"},type:"file",accept:e.unref(h),onChange:K},null,40,te),r.value===1?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("img",{class:"state-un-icon",src:e.unref(M.default)},null,8,ae),e.createElementVNode("div",oe,e.toDisplayString(e.unref(T)),1),e.createElementVNode("div",re,e.toDisplayString(typeof e.unref(k)=="string"&&e.unref(k).length>0?e.unref(k):`${e.unref(l)("ap.apUpload.supportExtension")}:${e.unref(V.getAcceptText)(e.unref(h))},${e.unref(l)("ap.apUpload.maxWarnUploadFileSize",{maxSize:e.unref(_)})}`),1)])):e.createCommentVNode("",!0),[2,3].includes(r.value)?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createElementVNode("img",{src:e.unref(M.default)},null,8,ce)]),e.createElementVNode("div",ue,[e.createElementVNode("div",{class:"center-title",style:e.normalizeStyle({color:B.value?"#0070FF":"#182948"})},e.toDisplayString((c=o.value)==null?void 0:c.name),5),e.createElementVNode("div",ie,[B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.Progress),{key:0,percent:d.value,size:4,"show-info":!1,"trail-color":e.unref(g)==="admin"?"#D9D9D9":"#DEE4ED","stroke-color":e.unref(g)==="admin"?"#34B77C":"#0070FF"},null,8,["percent","trail-color","stroke-color"]))])]),e.createElementVNode("div",{class:"right",onClick:e.withModifiers(Q,["stop"])},[e.createVNode(e.unref(Y.DeleteOutlined))])])):e.createCommentVNode("",!0)],34)}}});exports.default=pe;
@@ -1,45 +1,22 @@
1
1
  import { ApAppendixProps, ApAppendixSlots, ApNeedNameModel } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = ApAppendixProps;
3
4
  declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
4
6
  slots: Readonly<ApAppendixSlots<any>> & ApAppendixSlots<any>;
5
7
  refs: {};
6
- attrs: Partial<{}>;
8
+ rootEl: HTMLDivElement;
7
9
  };
8
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApAppendixProps<any>>, {
10
- needName: boolean;
11
- column: number;
12
- isFileAreaBorder: boolean;
13
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApAppendixProps<any>>, {
14
- needName: boolean;
15
- column: number;
16
- isFileAreaBorder: boolean;
17
- }>>>, {
11
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
12
  column: number;
19
13
  needName: ApNeedNameModel;
20
14
  isFileAreaBorder: boolean;
21
- }, {}>;
15
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
22
16
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
17
  export default _default;
24
- type __VLS_WithDefaults<P, D> = {
25
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
26
- default: D[K];
27
- }> : P[K];
28
- };
29
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
- type __VLS_TypePropsToOption<T> = {
31
- [K in keyof T]-?: {} extends Pick<T, K> ? {
32
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
33
- } : {
34
- type: PropType<T[K]>;
35
- required: true;
36
- };
37
- };
38
18
  type __VLS_WithTemplateSlots<T, S> = T & {
39
19
  new (): {
40
20
  $slots: S;
41
21
  };
42
22
  };
43
- type __VLS_PrettifyLocal<T> = {
44
- [K in keyof T]: T[K];
45
- } & {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=require("./icons/file-icon.vue.js"),g=require("@aplus-frontend/antdv"),q=require("@aplus-frontend/icon"),w=require("@ant-design/icons-vue");require("../ap-title/ApTitle.vue.js");require("../../ap-download/ap-download.vue2.js");require("../../config-provider/index.js");const V=require("./utils/index.js"),h=require("../../config-provider/hooks/use-namespace.js"),b=require("../../config-provider/hooks/use-locale.js"),C=require("../../config-provider/hooks/use-global-config.js"),x=require("../ap-title/ApTitle.vue2.js"),E=require("../../ap-download/ap-download.vue.js"),O=["onClick"],F=e.defineComponent({__name:"ap-appendix",props:{fileList:{},needName:{type:[Boolean,Object],default:!1},getOssAccess:{},title:{},tooltip:{},column:{default:2},isFileAreaBorder:{type:Boolean,default:!1}},setup(k){const{b:N,e:a,em:f}=h.useNamespace("ap-appendix"),{t:c}=b.useLocale(),t=k,_=C.useGlobalConfig("apUpload"),m=C.useGlobalConfig("downloadCenterTriggerConfig"),r=e.computed(()=>V.getFileInfo(t==null?void 0:t.needName,(t==null?void 0:t.fileList)??[])),y=e.computed(()=>{var l;return t.getOssAccess||((l=_.value)==null?void 0:l.getOssAccess)}),p=e.computed(()=>!(Array.isArray(r.value)&&r.value.length)),n=e.ref([]),B=e.computed(()=>t.title||c("ap.apAppendix.appendix"));async function A(l,s){var i,d;if(!(n.value.findIndex(o=>o===s)>-1)){n.value=[...n.value,s];try{if((i=m.value)!=null&&i.trigger){let o=[l].map(v=>({objectName:v.path,fileName:v.fileName}));await((d=m.value)==null?void 0:d.trigger(o))}}finally{n.value=n.value.filter(o=>o!==s)}}}return(l,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[e.unref(N)()]},{...l.$attrs},{style:{"--ap-appendix-column":`repeat(${Number((t==null?void 0:t.column)||2)}, 1fr)`}}),[e.renderSlot(l.$slots,"title",{fileList:t.fileList},()=>[e.createVNode(x.default,{title:B.value,helpMessage:t==null?void 0:t.tooltip},{suffix:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("suffix")])},[e.renderSlot(l.$slots,"titleSuffix",{fileList:t.fileList}),e.renderSlot(l.$slots,"titleDownloadAllBtn",{fileList:t.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:0,class:e.normalizeClass([e.unref(a)("download-all")]),text:e.unref(c)("ap.apAppendix.downloadAll"),getOssAccess:y.value,fileName:r.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(q.IconVariantDownload))]),_:1},8,["class","text","getOssAccess","fileName"]))])],2)]),_:3},8,["title","helpMessage"])]),e.renderSlot(l.$slots,"fileArea",{fileList:t.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)("file-area")]:!0,[e.unref(f)("file-area","border")]:!!t.isFileAreaBorder})},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content")])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(u,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(a)("file-area-content-item")]:!0,[e.unref(f)("file-area-content-item","loading")]:n.value.includes(i)}),key:i},[e.createVNode(e.unref(g.Tooltip),null,e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(a)("file-area-content-item-content")]:!0,[e.unref(a)("file-area-content-item--loading-content")]:n.value.includes(i)}),onClick:d=>A(u,i)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-icon")])},[n.value.includes(i)?(e.openBlock(),e.createBlock(e.unref(w.LoadingOutlined),{key:0})):(e.openBlock(),e.createBlock(L.default,{key:1}))],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-file-name")])},[e.createVNode(e.unref(g.TypographyText),{ellipsis:"",content:u.fileName},null,8,["content"])],2)],10,O)]),_:2},[n.value.includes(i)?void 0:{name:"title",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("ap.apAppendix.downloadFile")),1)]),key:"0"}]),1024)],2))),128))],2)],2))])],16))}});exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=require("./icons/file-icon.vue.js"),g=require("@aplus-frontend/antdv"),q=require("@aplus-frontend/icon"),w=require("@ant-design/icons-vue");require("../ap-title/ApTitle.vue.js");require("../../ap-download/ap-download.vue2.js");require("../../config-provider/index.js");const V=require("./utils/index.js"),h=require("../../config-provider/hooks/use-namespace.js"),b=require("../../config-provider/hooks/use-locale.js"),C=require("../../config-provider/hooks/use-global-config.js"),x=require("../ap-title/ApTitle.vue2.js"),E=require("../../ap-download/ap-download.vue.js"),F=["onClick"],S=e.defineComponent({__name:"ap-appendix",props:{fileList:{},needName:{type:[Boolean,Object],default:!1},getOssAccess:{},title:{},tooltip:{},column:{default:2},isFileAreaBorder:{type:Boolean,default:!1}},setup(k){const{b:_,e:a,em:f}=h.useNamespace("ap-appendix"),{t:c}=b.useLocale(),t=k,y=C.useGlobalConfig("apUpload"),m=C.useGlobalConfig("downloadCenterTriggerConfig"),r=e.computed(()=>V.getFileInfo(t==null?void 0:t.needName,(t==null?void 0:t.fileList)??[])),N=e.computed(()=>{var l;return t.getOssAccess||((l=y.value)==null?void 0:l.getOssAccess)}),p=e.computed(()=>!(Array.isArray(r.value)&&r.value.length)),n=e.ref([]),B=e.computed(()=>t.title||c("ap.apAppendix.appendix"));async function L(l,s){var o,d;if(!(n.value.findIndex(i=>i===s)>-1)){n.value=[...n.value,s];try{if((o=m.value)!=null&&o.trigger){let i=[l].map(v=>({objectName:v.path,fileName:v.fileName}));await((d=m.value)==null?void 0:d.trigger(i))}}finally{n.value=n.value.filter(i=>i!==s)}}}return(l,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[e.unref(_)()]},{...l.$attrs},{style:{"--ap-appendix-column":`repeat(${Number((t==null?void 0:t.column)||2)}, 1fr)`}}),[e.renderSlot(l.$slots,"title",{fileList:t.fileList},()=>[e.createVNode(x.default,{title:B.value,"help-message":t==null?void 0:t.tooltip},{suffix:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("suffix")])},[e.renderSlot(l.$slots,"titleSuffix",{fileList:t.fileList}),e.renderSlot(l.$slots,"titleDownloadAllBtn",{fileList:t.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:0,class:e.normalizeClass([e.unref(a)("download-all")]),text:e.unref(c)("ap.apAppendix.downloadAll"),"get-oss-access":N.value,"file-name":r.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(q.IconVariantDownload))]),_:1},8,["class","text","get-oss-access","file-name"]))])],2)]),_:3},8,["title","help-message"])]),e.renderSlot(l.$slots,"fileArea",{fileList:t.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)("file-area")]:!0,[e.unref(f)("file-area","border")]:!!t.isFileAreaBorder})},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content")])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(u,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass({[e.unref(a)("file-area-content-item")]:!0,[e.unref(f)("file-area-content-item","loading")]:n.value.includes(o)})},[e.createVNode(e.unref(g.Tooltip),null,e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(a)("file-area-content-item-content")]:!0,[e.unref(a)("file-area-content-item--loading-content")]:n.value.includes(o)}),onClick:d=>L(u,o)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-icon")])},[n.value.includes(o)?(e.openBlock(),e.createBlock(e.unref(w.LoadingOutlined),{key:0})):(e.openBlock(),e.createBlock(A.default,{key:1}))],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-file-name")])},[e.createVNode(e.unref(g.TypographyText),{ellipsis:"",content:u.fileName},null,8,["content"])],2)],10,F)]),_:2},[n.value.includes(o)?void 0:{name:"title",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("ap.apAppendix.downloadFile")),1)]),key:"0"}]),1024)],2))),128))],2)],2))])],16))}});exports.default=S;
@@ -1,3 +1,3 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
- declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
3
3
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../../../_virtual/_plugin-vue_export-helper.js"),Q={},l={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",viewBox:"0 0 16 16"},r=e.createStaticVNode('<defs><clipPath id="master_svg0_183_82058/183_76208"><rect x="0" y="0" width="16" height="16" rx="0"></rect></clipPath></defs><g clip-path="url(#master_svg0_183_82058/183_76208)"><g><rect x="0" y="0" width="16" height="16" rx="0" fill="#FFFFFF" fill-opacity="0.009999999776482582" style="mix-blend-mode:passthrough;"></rect></g><g><path d="M6.4678965625,11.32002357421875L11.4176265625,6.37025357421875Q11.4879565625,6.29993357421875,11.5260165625,6.20804357421875Q11.5640765625,6.11616357421875,11.5640765625,6.0167035742187505Q11.5640765625,5.967463574218749,11.5544665625,5.91916357421875Q11.5448565625,5.87086357421875,11.5260165625,5.82536357421875Q11.5071665625,5.77986357421875,11.4798065625,5.7389235742187505Q11.4524465625,5.69797357421875,11.4176265625,5.66315357421875Q11.3828065625,5.62833357421875,11.3418565625,5.6009735742187505Q11.3009165625,5.57361357421875,11.2554165625,5.55476357421875Q11.2099165625,5.535923574218749,11.1616165625,5.52631357421875Q11.1133165625,5.5167035742187505,11.0640765625,5.5167035742187505Q10.9646165625,5.5167035742187505,10.8727365625,5.55476357421875Q10.7808465625,5.59282357421875,10.7105265625,5.66315357421875L10.7102665625,5.66341357421875L5.7607865625,10.612923574218751Q5.4072265625,10.96648357421875,5.0536665625,10.612923574218751Q4.7001265624999995,10.25935357421875,5.0536765625,9.905773574218749L10.9462265625,4.01326057421875Q11.3855665625,3.57391357421875,12.0068765625,3.57391357421875Q12.6282265625,3.57391357421875,13.0675265625,4.01326157421875Q13.5069265625,4.45258357421875,13.5069265625,5.07391357421875Q13.5069265625,5.69523357421875,13.0675265625,6.13459357421875L7.1749865625,12.02712357421875Q6.4427665625,12.75934357421875,5.4072265625,12.75934357421875Q4.3716865625,12.75934357421875,3.6394565625,12.02712357421875Q2.9072265625,11.29489357421875,2.9072265625,10.25935357421875Q2.9072265625,9.22382357421875,3.6394565625,8.49159357421875L8.5891965625,3.5418455742187502Q8.6595265625,3.47151957421875,8.6975865625,3.37963357421875Q8.735646562500001,3.28774857421875,8.735646562500001,3.18829257421875Q8.735646562500001,3.13904677421875,8.7260365625,3.09074737421875Q8.7164265625,3.04244787421875,8.6975865625,2.99695077421875Q8.6787365625,2.95145357421875,8.651376562500001,2.91050757421875Q8.6240165625,2.86956157421875,8.5891965625,2.83473957421875Q8.5543765625,2.79991757421875,8.513426562500001,2.77255757421875Q8.472476562499999,2.74519857421875,8.4269865625,2.72635257421875Q8.381486562500001,2.70750757421875,8.3331865625,2.69789957421875Q8.284886562499999,2.68829257421875,8.235646562500001,2.68829257421875Q8.1361865625,2.68829257421875,8.0442965625,2.72635257421875Q7.9524165625,2.76441257421875,7.8820865625,2.83473957421875L7.8816965625,2.83512857421875L2.9323545625,7.78448357421875Q1.9072265625,8.80960357421875,1.9072265625,10.25935357421875Q1.9072265625,11.70910357421875,2.9323525625,12.73422357421875Q3.9574765625,13.75931357421875,5.4072265625,13.75931357421875Q6.8569765625,13.75931357421875,7.8820965625,12.73422357421875L13.7746265625,6.8416835742187505Q14.5069265625,6.10944357421875,14.5069265625,5.07391357421875Q14.5069265625,4.03837257421875,13.7746265625,3.30615057421875Q13.0424265625,2.57391357421875,12.0068765625,2.57391357421875Q10.9713365625,2.57391357421875,10.239126562500001,3.30615157421875L4.3465365625,9.19870357421875Q3.9072365625,9.638043574218749,3.9072365625,10.25935357421875Q3.9072365625,10.880663574218751,4.3465565625,11.32002357421875Q4.7859065625,11.75937357421875,5.4072265625,11.75937357421875Q6.0285465625,11.75937357421875,6.4678965625,11.32002357421875Z" fill-rule="evenodd" fill="currentColor" fill-opacity="1"></path></g></g>',2),i=[r];function o(s,n){return e.openBlock(),e.createElementBlock("svg",l,i)}const c=t.default(Q,[["render",o]]);exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Q=require("../../../../_virtual/_plugin-vue_export-helper.js"),l={},r={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",viewBox:"0 0 16 16"};function i(n,t){return e.openBlock(),e.createElementBlock("svg",r,t[0]||(t[0]=[e.createStaticVNode('<defs><clipPath id="master_svg0_183_82058/183_76208"><rect x="0" y="0" width="16" height="16" rx="0"></rect></clipPath></defs><g clip-path="url(#master_svg0_183_82058/183_76208)"><g><rect x="0" y="0" width="16" height="16" rx="0" fill="#FFFFFF" fill-opacity="0.009999999776482582" style="mix-blend-mode:passthrough;"></rect></g><g><path d="M6.4678965625,11.32002357421875L11.4176265625,6.37025357421875Q11.4879565625,6.29993357421875,11.5260165625,6.20804357421875Q11.5640765625,6.11616357421875,11.5640765625,6.0167035742187505Q11.5640765625,5.967463574218749,11.5544665625,5.91916357421875Q11.5448565625,5.87086357421875,11.5260165625,5.82536357421875Q11.5071665625,5.77986357421875,11.4798065625,5.7389235742187505Q11.4524465625,5.69797357421875,11.4176265625,5.66315357421875Q11.3828065625,5.62833357421875,11.3418565625,5.6009735742187505Q11.3009165625,5.57361357421875,11.2554165625,5.55476357421875Q11.2099165625,5.535923574218749,11.1616165625,5.52631357421875Q11.1133165625,5.5167035742187505,11.0640765625,5.5167035742187505Q10.9646165625,5.5167035742187505,10.8727365625,5.55476357421875Q10.7808465625,5.59282357421875,10.7105265625,5.66315357421875L10.7102665625,5.66341357421875L5.7607865625,10.612923574218751Q5.4072265625,10.96648357421875,5.0536665625,10.612923574218751Q4.7001265624999995,10.25935357421875,5.0536765625,9.905773574218749L10.9462265625,4.01326057421875Q11.3855665625,3.57391357421875,12.0068765625,3.57391357421875Q12.6282265625,3.57391357421875,13.0675265625,4.01326157421875Q13.5069265625,4.45258357421875,13.5069265625,5.07391357421875Q13.5069265625,5.69523357421875,13.0675265625,6.13459357421875L7.1749865625,12.02712357421875Q6.4427665625,12.75934357421875,5.4072265625,12.75934357421875Q4.3716865625,12.75934357421875,3.6394565625,12.02712357421875Q2.9072265625,11.29489357421875,2.9072265625,10.25935357421875Q2.9072265625,9.22382357421875,3.6394565625,8.49159357421875L8.5891965625,3.5418455742187502Q8.6595265625,3.47151957421875,8.6975865625,3.37963357421875Q8.735646562500001,3.28774857421875,8.735646562500001,3.18829257421875Q8.735646562500001,3.13904677421875,8.7260365625,3.09074737421875Q8.7164265625,3.04244787421875,8.6975865625,2.99695077421875Q8.6787365625,2.95145357421875,8.651376562500001,2.91050757421875Q8.6240165625,2.86956157421875,8.5891965625,2.83473957421875Q8.5543765625,2.79991757421875,8.513426562500001,2.77255757421875Q8.472476562499999,2.74519857421875,8.4269865625,2.72635257421875Q8.381486562500001,2.70750757421875,8.3331865625,2.69789957421875Q8.284886562499999,2.68829257421875,8.235646562500001,2.68829257421875Q8.1361865625,2.68829257421875,8.0442965625,2.72635257421875Q7.9524165625,2.76441257421875,7.8820865625,2.83473957421875L7.8816965625,2.83512857421875L2.9323545625,7.78448357421875Q1.9072265625,8.80960357421875,1.9072265625,10.25935357421875Q1.9072265625,11.70910357421875,2.9323525625,12.73422357421875Q3.9574765625,13.75931357421875,5.4072265625,13.75931357421875Q6.8569765625,13.75931357421875,7.8820965625,12.73422357421875L13.7746265625,6.8416835742187505Q14.5069265625,6.10944357421875,14.5069265625,5.07391357421875Q14.5069265625,4.03837257421875,13.7746265625,3.30615057421875Q13.0424265625,2.57391357421875,12.0068765625,2.57391357421875Q10.9713365625,2.57391357421875,10.239126562500001,3.30615157421875L4.3465365625,9.19870357421875Q3.9072365625,9.638043574218749,3.9072365625,10.25935357421875Q3.9072365625,10.880663574218751,4.3465565625,11.32002357421875Q4.7859065625,11.75937357421875,5.4072265625,11.75937357421875Q6.0285465625,11.75937357421875,6.4678965625,11.32002357421875Z" fill-rule="evenodd" fill="currentColor" fill-opacity="1"></path></g></g>',2)]))}const o=Q.default(l,[["render",i]]);exports.default=o;