@aplus-frontend/ui 6.18.0 → 6.19.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 (285) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +3 -3
  2. package/es/src/ap-action/item/index.vue2.mjs +5 -5
  3. package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
  4. package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
  5. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  6. package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
  7. package/es/src/ap-button/ap-button.vue.mjs +2 -2
  8. package/es/src/ap-button/ap-confirm-button.vue.mjs +2 -2
  9. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -4
  10. package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
  11. package/es/src/ap-download/ap-download.vue.mjs +1 -1
  12. package/es/src/ap-drawer/components/ApDrawerClose.vue2.mjs +2 -2
  13. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  14. package/es/src/ap-field/date/index.vue.mjs +13 -13
  15. package/es/src/ap-field/date-range/index.vue.mjs +16 -16
  16. package/es/src/ap-field/index.mjs +36 -36
  17. package/es/src/ap-field/number/index.vue.mjs +8 -8
  18. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  19. package/es/src/ap-field/rate/index.vue.mjs +2 -2
  20. package/es/src/ap-field/segmented/index.vue.mjs +1 -1
  21. package/es/src/ap-field/select/index.vue.mjs +2 -2
  22. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  23. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  24. package/es/src/ap-field/switch/index.vue.mjs +3 -3
  25. package/es/src/ap-field/text/index.vue2.mjs +2 -2
  26. package/es/src/ap-field/text/password.vue.mjs +2 -2
  27. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  28. package/es/src/ap-field/tree-select/index.vue.mjs +3 -3
  29. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  30. package/es/src/ap-form/ap-form.vue.d.ts +2 -1
  31. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  32. package/es/src/ap-form/drawer-form/index.vue.d.ts +7 -6
  33. package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
  34. package/es/src/ap-form/item/index.vue.mjs +7 -7
  35. package/es/src/ap-form/item-group/index.vue.mjs +1 -1
  36. package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
  37. package/es/src/ap-form/items/date/index.vue.mjs +2 -2
  38. package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
  39. package/es/src/ap-form/items/number/index.vue.d.ts +3 -3
  40. package/es/src/ap-form/items/number/index.vue.mjs +2 -2
  41. package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
  42. package/es/src/ap-form/items/select/index.vue.d.ts +11 -11
  43. package/es/src/ap-form/items/select/index.vue.mjs +2 -2
  44. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  45. package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
  46. package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
  47. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  48. package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
  49. package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -3
  50. package/es/src/ap-form/items/tree-select/index.vue.mjs +2 -2
  51. package/es/src/ap-form/modal-form/index.vue.d.ts +7 -6
  52. package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
  53. package/es/src/ap-form/render/item.vue.mjs +2 -2
  54. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +10 -10
  55. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +23 -23
  56. package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +2 -2
  57. package/es/src/ap-form/search-form/index.vue.d.ts +7 -6
  58. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  59. package/es/src/ap-form/set/index.vue.mjs +1 -1
  60. package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  61. package/es/src/ap-grid/editable/form-item.vue.mjs +9 -9
  62. package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
  63. package/es/src/ap-grid/editable/index.vue.mjs +3 -3
  64. package/es/src/ap-grid/index.vue.d.ts +4 -2
  65. package/es/src/ap-grid/index.vue.mjs +40 -40
  66. package/es/src/ap-list/index.vue.d.ts +4 -2
  67. package/es/src/ap-list/index.vue.mjs +1 -1
  68. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  69. package/es/src/ap-table/ap-table.vue.d.ts +4 -2
  70. package/es/src/ap-table/ap-table.vue2.mjs +14 -13
  71. package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
  72. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +3 -3
  73. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
  74. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
  75. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
  76. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
  77. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
  78. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
  79. package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
  80. package/es/src/ap-table/constants.d.ts +10 -10
  81. package/es/src/ap-table/constants.mjs +45 -45
  82. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  83. package/es/src/ap-table/hooks/use-table-column-state.mjs +3 -3
  84. package/es/src/ap-tag/ap-tag-group.vue.mjs +73 -78
  85. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
  86. package/es/src/ap-tag/ap-tag.vue.mjs +17 -18
  87. package/es/src/ap-tag/interface.d.ts +6 -0
  88. package/es/src/ap-tag/utils.d.ts +1 -0
  89. package/es/src/ap-tag/utils.mjs +12 -0
  90. package/es/src/ap-upload/apUpload.vue.mjs +5 -5
  91. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  92. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
  93. package/es/src/ap-upload/components/Picture.vue.d.ts +7 -2
  94. package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
  95. package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
  96. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
  97. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
  98. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +6 -6
  99. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +9 -9
  100. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +3 -4
  101. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  102. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
  103. package/es/src/business/ap-card/ApCard.vue2.mjs +9 -9
  104. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
  105. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +212 -398
  106. package/es/src/business/ap-draggable-grid/constans.mjs +1 -1
  107. package/es/src/business/ap-draggable-grid/index.d.ts +5 -2
  108. package/es/src/business/ap-draggable-grid/interface.d.ts +3 -2
  109. package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
  110. package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.mjs +14 -0
  111. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  112. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +33 -33
  113. package/es/src/business/ap-expand-alert/index.d.ts +6 -4
  114. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +7 -7
  115. package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
  116. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
  117. package/es/src/business/ap-keep-alive/keep-alive.mjs +3 -3
  118. package/es/src/business/ap-ladder/components/RenderValue.mjs +2 -2
  119. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +1 -1
  120. package/es/src/business/ap-select-layout/index.d.ts +4 -2
  121. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  122. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
  123. package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
  124. package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
  125. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  126. package/es/src/business/ap-table-modal/index.d.ts +5 -17
  127. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  128. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
  129. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
  130. package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
  131. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
  132. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
  133. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
  134. package/es/src/business/ap-view/ap-view.vue2.mjs +2 -2
  135. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +5 -4
  136. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +5 -5
  137. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +5 -4
  138. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +6 -6
  139. package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
  140. package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
  141. package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
  142. package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
  143. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  144. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
  145. package/es/src/check-card/index.vue2.mjs +3 -3
  146. package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
  147. package/es/src/editable-table/form-item.vue.d.ts +4 -2
  148. package/es/src/editable-table/form-item.vue.mjs +38 -37
  149. package/es/src/editable-table/index.vue.d.ts +4 -2
  150. package/es/src/editable-table/index.vue.mjs +16 -15
  151. package/es/src/full-screen/index.vue.mjs +3 -3
  152. package/es/src/hooks/useFullScreen.mjs +5 -5
  153. package/es/src/mask/index.vue.mjs +10 -10
  154. package/es/src/portal/index.vue.mjs +2 -2
  155. package/es/src/scroll-bar/index.vue.mjs +3 -3
  156. package/es/src/scroll-bar/internal.vue.mjs +2 -2
  157. package/es/src/scroll-view/index.vue.d.ts +5 -5
  158. package/es/src/scroll-view/index.vue.mjs +9 -9
  159. package/es/src/splitter/Panel.vue2.mjs +4 -4
  160. package/es/src/splitter/SplitBar.vue2.mjs +7 -7
  161. package/es/src/splitter/Splitter.vue2.mjs +5 -5
  162. package/es/src/tests/wrapper.d.ts +4 -4
  163. package/es/src/text/group.vue.mjs +2 -2
  164. package/es/src/text/index.vue.mjs +5 -5
  165. package/es/src/version.d.ts +1 -1
  166. package/es/src/version.mjs +1 -1
  167. package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
  168. package/es/src/work-order-modal/work-order-modal.vue.d.ts +5 -4
  169. package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
  170. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  171. package/lib/src/ap-field/date/index.vue.js +1 -1
  172. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  173. package/lib/src/ap-field/index.js +1 -1
  174. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  175. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  176. package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
  177. package/lib/src/ap-form/drawer-form/index.vue.d.ts +7 -6
  178. package/lib/src/ap-form/items/number/index.vue.d.ts +3 -3
  179. package/lib/src/ap-form/items/select/index.vue.d.ts +11 -11
  180. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -3
  181. package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -6
  182. package/lib/src/ap-form/search-form/index.vue.d.ts +7 -6
  183. package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  184. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  185. package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
  186. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  187. package/lib/src/ap-grid/index.vue.d.ts +4 -2
  188. package/lib/src/ap-grid/index.vue.js +1 -1
  189. package/lib/src/ap-list/index.vue.d.ts +4 -2
  190. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  191. package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
  192. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  193. package/lib/src/ap-table/constants.d.ts +10 -10
  194. package/lib/src/ap-table/constants.js +1 -1
  195. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  196. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  197. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
  198. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  199. package/lib/src/ap-tag/interface.d.ts +6 -0
  200. package/lib/src/ap-tag/utils.d.ts +1 -0
  201. package/lib/src/ap-tag/utils.js +1 -0
  202. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  203. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  204. package/lib/src/ap-upload/components/Picture.vue.d.ts +7 -2
  205. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  206. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  207. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
  208. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  209. package/lib/src/business/ap-draggable-grid/constans.js +1 -1
  210. package/lib/src/business/ap-draggable-grid/index.d.ts +5 -2
  211. package/lib/src/business/ap-draggable-grid/interface.d.ts +3 -2
  212. package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
  213. package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.js +1 -0
  214. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  215. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  216. package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
  217. package/lib/src/business/ap-select-layout/index.d.ts +4 -2
  218. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  219. package/lib/src/business/ap-table-modal/index.d.ts +5 -17
  220. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +5 -4
  221. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +5 -4
  222. package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
  223. package/lib/src/editable-table/form-item.vue.d.ts +4 -2
  224. package/lib/src/editable-table/form-item.vue.js +1 -1
  225. package/lib/src/editable-table/index.vue.d.ts +4 -2
  226. package/lib/src/editable-table/index.vue.js +1 -1
  227. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  228. package/lib/src/tests/wrapper.d.ts +4 -4
  229. package/lib/src/version.d.ts +1 -1
  230. package/lib/src/version.js +1 -1
  231. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +5 -4
  232. package/package.json +3 -3
  233. package/theme/antd-global-overwrite/admin/alert.css +37 -0
  234. package/theme/antd-global-overwrite/admin/alert.less +51 -0
  235. package/theme/antd-global-overwrite/admin/button.css +27 -0
  236. package/theme/antd-global-overwrite/admin/button.less +31 -0
  237. package/theme/antd-global-overwrite/admin/field.css +42 -0
  238. package/theme/antd-global-overwrite/admin/field.less +43 -0
  239. package/theme/antd-global-overwrite/admin/form.css +57 -0
  240. package/theme/antd-global-overwrite/admin/form.less +97 -0
  241. package/theme/antd-global-overwrite/admin/message.css +10 -0
  242. package/theme/antd-global-overwrite/admin/message.less +13 -0
  243. package/theme/antd-global-overwrite/admin/modal.css +94 -0
  244. package/theme/antd-global-overwrite/admin/modal.less +128 -0
  245. package/theme/antd-global-overwrite/admin/pagination.css +122 -0
  246. package/theme/antd-global-overwrite/admin/pagination.less +91 -0
  247. package/theme/antd-global-overwrite/admin/steps.css +127 -0
  248. package/theme/antd-global-overwrite/admin/steps.less +197 -0
  249. package/theme/antd-global-overwrite/admin/table.css +78 -0
  250. package/theme/antd-global-overwrite/admin/table.less +62 -0
  251. package/theme/antd-global-overwrite/admin/tooltip.css +3 -0
  252. package/theme/antd-global-overwrite/admin/tooltip.less +3 -0
  253. package/theme/antd-global-overwrite/aplus/alert.css +40 -0
  254. package/theme/antd-global-overwrite/aplus/alert.less +55 -0
  255. package/theme/antd-global-overwrite/aplus/button.css +27 -0
  256. package/theme/antd-global-overwrite/aplus/button.less +31 -0
  257. package/theme/antd-global-overwrite/aplus/field.css +42 -0
  258. package/theme/antd-global-overwrite/aplus/field.less +43 -0
  259. package/theme/antd-global-overwrite/aplus/form.css +87 -0
  260. package/theme/antd-global-overwrite/aplus/form.less +133 -0
  261. package/theme/antd-global-overwrite/aplus/message.css +10 -0
  262. package/theme/antd-global-overwrite/aplus/message.less +13 -0
  263. package/theme/antd-global-overwrite/aplus/modal.css +87 -0
  264. package/theme/antd-global-overwrite/aplus/modal.less +120 -0
  265. package/theme/antd-global-overwrite/aplus/pagination.css +147 -0
  266. package/theme/antd-global-overwrite/aplus/pagination.less +108 -0
  267. package/theme/antd-global-overwrite/aplus/steps.css +125 -0
  268. package/theme/antd-global-overwrite/aplus/steps.less +198 -0
  269. package/theme/antd-global-overwrite/aplus/table.css +78 -0
  270. package/theme/antd-global-overwrite/aplus/table.less +61 -0
  271. package/theme/antd-global-overwrite/aplus/tooltip.css +3 -0
  272. package/theme/antd-global-overwrite/aplus/tooltip.less +3 -0
  273. package/theme/antdv-override.css +2 -6
  274. package/theme/antdv-override.less +2 -6
  275. package/theme/ap-draggable-grid/ap-draggable-grid.css +3 -3
  276. package/theme/ap-draggable-grid/ap-draggable-grid.less +3 -4
  277. package/theme/ap-label/ap-label.css +1 -0
  278. package/theme/ap-label/ap-label.less +1 -0
  279. package/theme/ap-table/ap-table-pagination.css +12 -0
  280. package/theme/ap-table/ap-table-pagination.less +14 -0
  281. package/theme/ap-tag/ap-tag.css +5 -2
  282. package/theme/ap-tag/ap-tag.less +5 -2
  283. package/theme/index.css +11 -11
  284. package/theme/ui-mode.css +60 -0
  285. package/theme/ui-mode.less +109 -0
@@ -1,5 +1,4 @@
1
1
  import { Oss } from '../hooks/useOss';
2
- import { actionResponse } from '@aplus-frontend/oss';
3
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
3
  declare function setValue(val?: (string | Record<string, any>)[]): void;
5
4
  interface UploadFile extends File {
@@ -18,7 +17,13 @@ declare function __VLS_template(): {
18
17
  pictureContext?(_: {
19
18
  fileList: {
20
19
  oss: {
21
- pauseUpload: (() => Promise< actionResponse>) | undefined;
20
+ pauseUpload: (() => Promise<{
21
+ status: number;
22
+ previewUrl?: string;
23
+ saveUrl?: string;
24
+ originalFileName?: string;
25
+ message: string;
26
+ }>) | undefined;
22
27
  };
23
28
  }[];
24
29
  remove: typeof handleRemove;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@ant-design/icons-vue"),s=require("@aplus-frontend/antdv"),f={style:{display:"flex","align-items":"center"}},p=e.defineComponent({__name:"MenuItemGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(a){const r=a,c=e.ref({});async function t(o,u){var l;const n=(o==null?void 0:o.id)||u;c.value[n]=!0;try{await((l=o==null?void 0:o.onClick)==null?void 0:l.call(o,{selectedRows:r==null?void 0:r.selectedRows}))}finally{c.value[n]=void 0}}return(o,u)=>(e.openBlock(),e.createBlock(e.unref(s.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.menuList,(n,l)=>(e.openBlock(),e.createBlock(e.unref(s.MenuItem),e.mergeProps({key:(n==null?void 0:n.id)||l,ref_for:!0},{...n,onClick:()=>t(n,l),disabled:c.value[(n==null?void 0:n.id)||l]??(n==null?void 0:n.disabled)??!1}),{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.withDirectives(e.createVNode(e.unref(d.LoadingOutlined),{style:{"margin-right":"10px"}},null,512),[[e.vShow,c.value[(n==null?void 0:n.id)||l]]]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[n==null?void 0:n.content]))))])]),_:2},1040))),128))]),_:1}))}});exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@ant-design/icons-vue"),s=require("@aplus-frontend/antdv"),f={style:{display:"flex","align-items":"center"}},p=e.defineComponent({__name:"MenuItemGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(a){const r=a,c=e.ref({});async function t(o,u){var l;const n=(o==null?void 0:o.id)||u;c.value[n]=!0;try{await((l=o==null?void 0:o.onClick)==null?void 0:l.call(o,{selectedRows:r==null?void 0:r.selectedRows}))}finally{c.value[n]=void 0}}return(o,u)=>(e.openBlock(),e.createBlock(e.unref(s.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.menuList,(n,l)=>(e.openBlock(),e.createBlock(e.unref(s.MenuItem),e.mergeProps({key:(n==null?void 0:n.id)||l},{ref_for:!0},{...n,onClick:()=>t(n,l),disabled:c.value[(n==null?void 0:n.id)||l]??(n==null?void 0:n.disabled)??!1}),{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.withDirectives(e.createVNode(e.unref(d.LoadingOutlined),{style:{"margin-right":"10px"}},null,512),[[e.vShow,c.value[(n==null?void 0:n.id)||l]]]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[n==null?void 0:n.content]))))])]),_:2},1040))),128))]),_:1}))}});exports.default=p;
@@ -3,8 +3,8 @@ import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/bu
3
3
  import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
4
4
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
5
  import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
6
+ import { ButtonProps, ItemType, MenuTheme, MenuMode, TableColumnsType } from '@aplus-frontend/antdv';
6
7
  import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
7
- import { ItemType, MenuTheme, MenuMode, TableColumnsType, ButtonProps } from '@aplus-frontend/antdv';
8
8
  import { Key } from '@aplus-frontend/antdv/es/_util/type';
9
9
  import { CSSMotionProps } from '@aplus-frontend/antdv/es/_util/transition';
10
10
  import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from '@aplus-frontend/antdv/es/menu/src/interface';
@@ -63,7 +63,7 @@ declare const ApBatchActionGroup: {
63
63
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
64
64
  };
65
65
  }>>, "type" | "onClick"> & {
66
- type?: ( ButtonType | undefined) | "borderLink";
66
+ type?: ButtonProps["type"] | "borderLink";
67
67
  borderLinkColor?: string;
68
68
  minWidth?: boolean | number | string;
69
69
  lazy?: boolean | number;
@@ -364,7 +364,7 @@ declare const ApBatchActionGroup: {
364
364
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
365
365
  };
366
366
  }>>, "type" | "onClick"> & {
367
- type?: ( ButtonType | undefined) | "borderLink";
367
+ type?: ButtonProps["type"] | "borderLink";
368
368
  borderLinkColor?: string;
369
369
  minWidth?: boolean | number | string;
370
370
  lazy?: boolean | number;
@@ -10,8 +10,8 @@ declare function __VLS_template(): {
10
10
  span: number;
11
11
  row: number;
12
12
  col: number;
13
- showHeight: number | string;
14
- height?: number | string | undefined;
13
+ showHeight?: (number | string) | undefined;
14
+ height: number | string;
15
15
  module: string;
16
16
  };
17
17
  index: number;
@@ -58,6 +58,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
58
58
  };
59
59
  }>, {
60
60
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
61
+ getGridItems: () => ApDraggableGridItemBase[];
61
62
  refreshGrid: () => void;
62
63
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
63
64
  onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("vue"),ro=require("./constans.js"),eo=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const no=require("../../config-provider/hooks/use-namespace.js"),ao=["data-span","draggable","onDragstart"],so=p.defineComponent({__name:"ApDraggableGrid",props:ro.ApDraggableGridProps(),emits:["onGridListChange"],setup(_,{expose:j,emit:z}){const m=_,{b:I,e:M,m:L}=no.useNamespace("ap-draggable-grid"),$=p.ref(!1),k=p.ref([]),A=p.computed(()=>M("item")),N=p.computed(()=>M("dragging")),q=p.computed(()=>m.customWrapper?`.${m.customWrapper} .${A.value}`:`.${A.value}`),W=p.computed(()=>m.customWrapper?`.${m.customWrapper} .${A.value}:not(.${N.value})`:`.${A.value}:not(.${N.value})`),F=z,D=p.useTemplateRef("gridContainer"),S=p.ref(null),c=p.reactive([]);p.watch(()=>m.gridList,r=>{Array.isArray(r)&&G(r)},{deep:!0,immediate:!0});function G(r){c.splice(0,c.length),r.forEach(s=>{c.push({...s,isDragging:!1,isOverlay:!1})})}const J=r=>({gridColumn:`${r.col} / span ${r.span}`,gridRow:r.row,minHeight:`${m.gridItemHeight}px`,boxShadow:m.gridItemShadow?m.gridItemShadow:"none"}),U=(r,s)=>{S.value=s,c[s].isDragging=!0,k.value=c.map(o=>({row:o.row,col:o.col})),r.dataTransfer&&(r.dataTransfer.setData("text/plain",String(s)),r.dataTransfer.effectAllowed="move")},V=()=>{S.value!==null&&(c[S.value].isDragging=!1,C(),S.value=null),c.forEach(r=>r.isOverlay=!1)};function C(){const r=c.map(s=>({span:s.span,row:s.row,col:s.col,height:s.height?s.height:"",showHeight:s.showHeight?s.showHeight:"",module:s.module}));F("onGridListChange",r)}async function B(){if(G([]),typeof m.request=="function")try{$.value=!0;const r=await m.request();Array.isArray(r)?G(r):console.warn("ApDraggableGrid: 请求函数必须返回一个符合 ApDraggableGridItemBase 数组的格式")}catch(r){console.error("ApDraggableGrid: 请求错误:",r)}finally{$.value=!1}}function X(){k.value.length===c.length&&c.forEach((r,s)=>{const o=k.value[s];r.row=o.row,r.col=o.col})}p.onMounted(async()=>{if(await B(),O(),m.disableDrag||!D.value)return;const r=o=>{if(o.preventDefault(),S.value===null||!o.target)return;const e=document.elementFromPoint(o.clientX,o.clientY);if(!e)return;const t=e.closest(W.value);if(!t)return;const a=Array.from(document.querySelectorAll(q.value)).indexOf(t);a>=0&&a!==S.value&&(c.forEach(f=>f.isOverlay=!1),c[a].isOverlay=!0,H(S.value,a)?o.dataTransfer.dropEffect="move":o.dataTransfer.dropEffect="none")},s=o=>{if(o.preventDefault(),S.value===null)return;const e=document.elementFromPoint(o.clientX,o.clientY);if(!e)return;const t=e.closest(W.value);if(!t)return;const a=Array.from(document.querySelectorAll(q.value)).indexOf(t);a>=0&&Y(S.value,a)?(Q(S.value,a),O(),C()):X(),c.forEach(f=>{f.isDragging=!1,f.isOverlay=!1}),S.value=null};D.value.addEventListener("dragover",r),D.value.addEventListener("drop",s),p.onUnmounted(()=>{D.value&&(D.value.removeEventListener("dragover",r),D.value.removeEventListener("drop",s))})});function H(r,s){const o=c[r],e=c[s];if(o.row===e.row){const t=c.filter(a=>a.row===o.row);let i=0;return t.forEach(a=>{c.indexOf(a)!==r&&c.indexOf(a)!==s&&(i+=a.span)}),i+=o.span+e.span,i<=24}return o.span===e.span&&o.height===e.height?!0:o.span===24?c.filter(a=>a.row===e.row).reduce((a,f)=>a+f.span,0)===24:e.span===24?c.filter(a=>a.row===o.row).reduce((a,f)=>a+f.span,0)===24:!1}function Y(r,s){const o=c[r],e=c[s];if(o.row===e.row)return H(r,s);const t=JSON.parse(JSON.stringify(c)),i=o.row,a=e.row,f=a<i,v=new Map;if(t.forEach((n,u)=>{v.has(n.row)||v.set(n.row,[]),v.get(n.row).push(u)}),o.span===24&&e.span===24){t[r].row=a,t[r].col=1;const n=f?a+1:a-1;t[s].row=n,t[s].col=1;const u=t.map(w=>w.row);t.forEach((w,l)=>{l!==r&&l!==s&&(f?(u[l]>a&&u[l]<i||u[l]===n)&&(w.row+=1):(u[l]>i&&u[l]<a||u[l]===n)&&(w.row-=1))})}else if(o.span===24){const n=t.filter(w=>w.row===a);if(n.reduce((w,l)=>w+l.span,0)!==24)return!1;if(t[r].row=a,t[r].col=1,f){const w=new Set;for(let l=a;l<i;l++)w.add(l);t.forEach((l,y)=>{y!==r&&w.has(l.row)&&(l.row+=1)}),n.forEach(l=>{t.indexOf(l)!==r&&(l.row=a+1)})}else n.forEach(w=>{t.indexOf(w)!==r&&(w.row=i)})}else if(e.span===24){const n=t.filter(w=>w.row===i);if(n.reduce((w,l)=>w+l.span,0)!==24)return!1;t[s].row=i,t[s].col=1,f?n.forEach(w=>{t.indexOf(w)!==s&&(w.row=a+1)}):n.forEach(w=>{t.indexOf(w)!==s&&(w.row=a)})}else if(o.span===e.span)t[r].row=a,t[r].col=e.col,t[s].row=i,t[s].col=o.col;else return!1;const E=new Map;t.forEach(n=>{E.has(n.row)||E.set(n.row,[]),E.get(n.row).push(n)});const R=Array.from(E.keys()).sort((n,u)=>n-u);let g=1;for(const n of R)E.get(n).forEach(w=>{w.row=g}),g++;return K(t)}function K(r){const s={};r.forEach(o=>{s[o.row]||(s[o.row]=[]),s[o.row].push(o)});for(const o in s){const e=s[o];if(e.reduce((a,f)=>a+f.span,0)>24)return!1;e.sort((a,f)=>a.col-f.col);let i=0;for(const a of e){if(a.col<=i)return!1;i=a.col+a.span-1}}return!0}function Q(r,s){const o=c[r],e=c[s],t=JSON.parse(JSON.stringify(c)),i=o.row,a=e.row;if(o.span===24&&e.span===24){Z(o,e,i,a,t);return}if(i===a){const g=o.col;o.col=e.col,e.col=g;return}const f=a<i,v=c.map(g=>g.row),E=c.map(g=>g.col),R=c.map(g=>g.span);if(o.span===24&&e.span===24){const g=i,n=a;o.row=n,o.col=1,o.span=24,e.row=g,e.col=1,e.span=24;const u=Math.abs(g-n),w=new Set;for(let l=Math.min(g,n);l<=Math.max(g,n);l++)w.add(l);if(u!==1){const l=Math.min(g,n),y=Math.max(g,n),h=new Map;if(f){h.set(g,n),h.set(n,n+1);for(let d=n+1;d<g;d++)h.set(d,d+1)}else{h.set(g,n),h.set(n,n-1);for(let d=g+1;d<n;d++)h.set(d,d-1)}c.forEach((d,b)=>{if(b!==r&&b!==s){const T=v[b];T>=l&&T<=y&&h.has(T)&&(d.row=h.get(T),d.col=E[b],d.span=R[b])}})}}else if(o.span===24){const g=c.filter(n=>n.row===a);o.row=a,o.col=1,f?c.forEach((n,u)=>{u!==r&&(n.row===a?n.row=a+1:n.row>a&&n.row<i&&(n.row+=1))}):g.forEach(n=>{c.indexOf(n)!==r&&(n.row=i)})}else if(e.span===24){const g=c.filter(n=>n.row===i);e.row=i,e.col=1,f?(g.forEach(n=>{c.indexOf(n)!==s&&(n.row=a+1)}),c.forEach((n,u)=>{u!==s&&!g.includes(n)&&n.row>a&&n.row<i&&(n.row+=1)})):g.forEach(n=>{c.indexOf(n)!==s&&(n.row=a)})}else o.span===e.span&&(o.row=a,o.col=e.col,e.row=i,e.col=o.col);O()}function Z(r,s,o,e,t){const i=r.module,a=s.module,f=t.map(l=>({...l})),v=new Map;f.forEach(l=>{v.has(l.row)||v.set(l.row,[]),v.get(l.row).push(l)});const E=f.find(l=>l.module===i),R=f.find(l=>l.module===a),g=Array.from(new Set([o,e,...Array.from(v.keys())])).sort((l,y)=>l-y),n={};let u=1;for(const l of g){if(n[u]){u++;continue}if(l===o)u===e&&u++,n[u]=[R],R.row=u,R.col=1,R.span=24,u++;else if(l===e)u===o&&u++,n[u]=[E],E.row=u,E.col=1,E.span=24,u++;else{const h=(v.get(l)||[]).filter(d=>d.module!==i&&d.module!==a);h.length>0&&(h.forEach(d=>{d.row=u,d.col=d===h[0]?1:h[0].col+h[0].span}),n[u]=h,u++)}}c.splice(0,c.length);const w=Object.keys(n).map(Number).sort((l,y)=>l-y);for(const l of w){const y=n[l];y.sort((h,d)=>h.col-d.col),y.forEach(h=>{c.push(h)})}O()}function O(){c.forEach(e=>{if(e.module){const t=x(e.module);t&&(e.span<=0||e.span>24)?(console.log(`Restoring original span ${t} for module ${e.module}`),e.span=t):(e.span<=0&&(e.span=1),e.span>24&&(e.span=24))}else e.span<=0&&(e.span=1),e.span>24&&(e.span=24);e.span===24&&(e.col=1)});const r={};c.forEach(e=>{r[e.row]||(r[e.row]=[]),r[e.row].push(e)}),Object.keys(r).forEach(e=>{const t=parseInt(e),i=r[t];if(i.sort((f,v)=>f.col-v.col),i.length===1&&i[0].span===24){i[0].col=1;return}let a=1;i.forEach((f,v)=>{f.col=a;const E=24-a+1;f.span>E&&(v===0?f.span=Math.min(f.span,24):f.span=E),a+=f.span}),P(i)});const s=Object.keys(r).map(Number).sort((e,t)=>e-t);let o=1;s.forEach(e=>{e!==o&&r[e].forEach(t=>{t.row=o}),o++}),oo()}function x(r){return{1:8,2:16,3:24,4:16,5:8,6:16,7:8,8:24,9:12,10:12}[r]||null}function oo(){const r=[...new Set(c.map(o=>o.row))].sort((o,e)=>o-e);for(let o=0;o<r.length-1;o++)r[o+1]-r[o]!==1&&console.warn(`Row gap detected: ${r[o]} to ${r[o+1]}`);const s={};c.forEach(o=>{s[o.row]||(s[o.row]=[]),s[o.row].push(o)}),Object.keys(s).forEach(o=>{P(s[parseInt(o)])})}function P(r){r.sort((s,o)=>s.col-o.col);for(let s=0;s<r.length;s++){const o=r[s],e=o.col,t=o.span;if(o.span<=0&&(o.span=1),o.span>24&&(o.span=24),o.col<1&&(o.col=1),o.col+o.span-1>24&&(o.col>1?o.col=Math.max(1,25-o.span):o.span=24-o.col+1),s>0){const a=r[s-1],f=a.col+a.span-1;o.col<=f&&(o.col=f+1,o.col+o.span-1>24&&(o.span=Math.max(1,24-o.col+1)))}(e!==o.col||t!==o.span)&&console.warn(`Item layout corrected: col ${e} -> ${o.col}, span ${t} -> ${o.span}`)}}return j({setGridItems:r=>{G(r),O(),C()},refreshGrid:()=>{(async()=>{await B(),O(),C()})()}}),(r,s)=>(p.openBlock(),p.createBlock(p.unref(eo.Spin),{spinning:$.value},{default:p.withCtx(()=>[p.createElementVNode("div",{ref_key:"gridContainer",ref:D,class:p.normalizeClass([$.value?p.unref(I)("loading"):p.unref(I)(),m.customWrapper]),style:p.normalizeStyle({width:typeof r.gridWidth=="number"?`${r.gridWidth}px`:r.gridWidth,gap:`${r.gapWidth}px`})},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c,(o,e)=>(p.openBlock(),p.createElementBlock("div",{key:e,class:p.normalizeClass([p.unref(M)("item"),m.disableDrag?"":p.unref(L)("dragging"),o.isDragging?p.unref(M)("dragging"):"",o.isOverlay?p.unref(M)("overlay"):"",m.disableDrag?"":p.unref(L)("canDrag")]),"data-span":o.span,style:p.normalizeStyle([J(o),{height:o.showHeight?o.showHeight+"px":""}]),draggable:!m.disableDrag,onDragstart:t=>U(t,e),onDragend:V},[p.renderSlot(r.$slots,"item",{item:o,index:e})],46,ao))),128))],6)]),_:3},8,["spinning"]))}});exports.default=so;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),X=require("./constans.js"),Y=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const D=require("./utils/sortItemsByRowAndCol.js"),Z=require("../../config-provider/hooks/use-namespace.js"),ee=["data-span","data-index","data-row","data-col","data-height","data-module","draggable"],oe=r.defineComponent({__name:"ApDraggableGrid",props:X.ApDraggableGridProps(),emits:["onGridListChange"],setup(P,{expose:W,emit:_}){const f=P,{b:R,e:$,m:J}=Z.useNamespace("ap-draggable-grid"),T=r.ref(!1),B=r.ref(!1),x=r.computed(()=>$("item")),M=r.computed(()=>$("dragging")),z=r.computed(()=>f.customWrapper?`.${f.customWrapper} .${x.value}:not(.${M.value})`:`.${x.value}:not(.${M.value})`),j=_,m=r.useTemplateRef("gridContainer"),S=r.ref([]);r.watch(()=>f.gridList,e=>{Array.isArray(e)&&i(e)},{deep:!0,immediate:!0});function i(e){const n=[...e].sort((o,u)=>o.row-u.row);S.value=n.map(o=>({...o})),j("onGridListChange",JSON.parse(JSON.stringify(S.value)))}const U=e=>({gridColumn:`${e.col} / span ${e.span}`,gridRow:e.row,minHeight:e.showHeight?e.showHeight+"px":`${f.gridItemHeight}px`,height:e.showHeight?e.showHeight+"px":`${f.gridItemHeight}px`,boxShadow:f.gridItemShadow?f.gridItemShadow:"none"});async function H(){if(i([]),typeof f.request=="function")try{T.value=!0;const e=await f.request();Array.isArray(e)?(console.log("ApDraggableGrid: 请求到的布局数据:",e),i(e)):console.warn("ApDraggableGrid: 请求函数必须返回一个符合 ApDraggableGridItemBase 数组的格式")}catch(e){console.error("ApDraggableGrid: 请求错误:",e)}finally{T.value=!1}}let C=r.ref(null),N=r.ref(null),v=null,G=!1,y=null;const k=e=>{if(!G&&(G=!0,e.dataTransfer&&e.target instanceof HTMLElement)){const n=e.target.dataset;e.dataTransfer.setData("text/plain",n.module),e.dataTransfer.effectAllowed="move",C.value={span:Number(n.span),col:Number(n.col),row:Number(n.row),module:n.module,height:Number(n.height),index:Number(n.index)},v=e.target,v.style.opacity="0"}},q=e=>{if(e.preventDefault(),y&&clearTimeout(y),y=window.setTimeout(()=>{G=!1,y=null},300),e.dataTransfer&&e.target instanceof HTMLElement){const n=e.target.closest(z.value);if(!n)return;const o=n.dataset;N.value={span:Number(o.span),col:Number(o.col),row:Number(o.row),module:o.module,height:Number(o.height),index:Number(o.index)}}},F=e=>{e.preventDefault(),v&&(v.style.opacity="1",v=null),V(C,N)&&K(C,N),C.value=null,N.value=null,B.value=!1},O=()=>{v&&(v.style.opacity="1",v=null),C.value=null,N.value=null,B.value=!1},V=(e,n)=>{const{span:o,module:u}=e.value,{span:c,module:d}=n.value;return u===d&&o===c?(console.log("如果自己放在自己之上不能交换数据"),!1):!0},K=(e,n)=>{if(!e.value||!n.value)return;const{span:o,col:u,row:c,module:d,height:A,index:l}=e.value,{span:I,col:h,row:p,module:Q,height:L,index:g}=n.value;if(c===p&&u===h&&o===I&&A===L&&d===Q){console.log("从同一位置拖拽到同一位置,不做任何操作");return}let t=[...r.toRaw(S.value)];const E=JSON.parse(JSON.stringify(t));if(c===p)if(l>g){console.log("","从右向左拖拽"),console.log(l,g),console.log(l-g),l-g===1?(t[g].col=o+h,t[l].col=h):(t.forEach((w,a)=>{a<l&&a>=g&&(w.col+=I)}),t[l].col=h);const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局");return}i(s);return}else{console.log(l,g),console.log("","从左向右拖拽"),g-l===1?(t[l].col=I+1,t[g].col=u):(t.forEach((w,a)=>{a>l&&a<=g&&(w.col-=I)}),t[l].col=h);const s=D.sortItemsByRowAndCol(t);if(console.log("交换后的布局:",s),!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}else if(p<c){if(console.log("从下向上拖拽"),o===24){const s=[];for(let a=p;a<c;a++)s.push(a);t.forEach(a=>{s.includes(a.row)&&(a.row+=1)}),t[l].row=p;const w=D.sortItemsByRowAndCol(t);if(!b(w)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(w);return}if(o===I&&A===L){t[l].row=p,t[l].col=h,t[g].row=c,t[g].col=u;const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}}else{if(console.log("从上向下拖拽"),o===24){console.log("如果拖拽元素跨度为24","从上向下拖拽");const s=[];for(let a=c+1;a<=p;a++)s.push(a);t.forEach(a=>{s.includes(a.row)&&(a.row-=1)}),t[l].row=p;const w=D.sortItemsByRowAndCol(t);if(!b(w)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(w);return}if(o===I&&A===L){t[l].row=p,t[l].col=h,t[g].row=c,t[g].col=u;const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}}},b=e=>{const n={};e.forEach(o=>{n[o.row]||(n[o.row]=[]),n[o.row].push(o)});for(const o in n){const u=n[o].sort((d,A)=>d.col-A.col);let c=1;for(const d of u){if(d.col<c)return console.warn(`行 ${o} 中的元素重叠: 元素 ${d.module} 在列 ${d.col}, 但当前列已经是 ${c}`),!1;if(c=d.col+d.span,c>25)return console.warn(`行 ${o} 中的元素超出界限: 元素 ${d.module} 在列 ${d.col} 跨度 ${d.span}`),!1}}return!0};return r.onMounted(async()=>{await H(),!f.disableDrag&&m.value&&(m.value.addEventListener("dragstart",k),m.value.addEventListener("dragover",q),m.value.addEventListener("drop",F),m.value.addEventListener("dragend",O))}),r.onUnmounted(()=>{m.value&&(m.value.removeEventListener("dragstart",k),m.value.removeEventListener("dragover",q),m.value.removeEventListener("drop",F),m.value.removeEventListener("dragend",O),y&&clearTimeout(y))}),W({setGridItems:e=>{i(e)},getGridItems:()=>JSON.parse(JSON.stringify(S.value)),refreshGrid:()=>{(async()=>{await H()})()}}),(e,n)=>(r.openBlock(),r.createBlock(r.unref(Y.Spin),{spinning:T.value},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"gridContainer",ref:m,class:r.normalizeClass([T.value?r.unref(R)("loading"):r.unref(R)(),f.customWrapper]),style:r.normalizeStyle({width:typeof e.gridWidth=="number"?`${e.gridWidth}px`:e.gridWidth,gap:`${e.gapWidth}px`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(o,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,class:r.normalizeClass([r.unref($)("item"),f.disableDrag?"":r.unref(J)("canDrag")]),"data-span":o.span,"data-index":u,"data-row":o.row,"data-col":o.col,"data-height":o.height,"data-module":o.module,style:r.normalizeStyle([U(o)]),draggable:!f.disableDrag},[r.renderSlot(e.$slots,"item",{item:o,index:u})],14,ee))),128))],6)]),_:3},8,["spinning"]))}});exports.default=oe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({gridList:{type:Array,default:()=>[]},request:{type:Function,default:null},gridWidth:{type:[String,Number],default:"100%"},gridItemHeight:{type:Number,default:300},gridItemShadow:{type:String,default:"0px 4px 6px 0px rgba(73, 107, 158, 0.1)"},gapWidth:{type:Number,default:12},disableDrag:{type:Boolean,default:!1},customWrapper:{type:String,default:"ap-draggable-grid"}});exports.ApDraggableGridProps=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({gridList:{type:Array,default:()=>[]},request:{type:Function,default:null},gridWidth:{type:[String,Number],default:"100%"},gridItemHeight:{type:Number,default:100},gridItemShadow:{type:String,default:"0px 4px 6px 0px rgba(73, 107, 158, 0.1)"},gapWidth:{type:Number,default:12},disableDrag:{type:Boolean,default:!1},customWrapper:{type:String,default:"ap-draggable-grid"}});exports.ApDraggableGridProps=e;
@@ -39,6 +39,7 @@ declare const ApDraggableGrid: {
39
39
  onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
40
40
  }>, {
41
41
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
42
+ getGridItems: () => ApDraggableGridItemBase[];
42
43
  refreshGrid: () => void;
43
44
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
44
45
  onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
@@ -97,6 +98,7 @@ declare const ApDraggableGrid: {
97
98
  onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
98
99
  }>, {
99
100
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
101
+ getGridItems: () => ApDraggableGridItemBase[];
100
102
  refreshGrid: () => void;
101
103
  }, {}, {}, {}, {
102
104
  request: () => Promise< ApDraggableGridItemBase[]>;
@@ -148,6 +150,7 @@ declare const ApDraggableGrid: {
148
150
  onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
149
151
  }>, {
150
152
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
153
+ getGridItems: () => ApDraggableGridItemBase[];
151
154
  refreshGrid: () => void;
152
155
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
153
156
  onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
@@ -169,8 +172,8 @@ declare const ApDraggableGrid: {
169
172
  span: number;
170
173
  row: number;
171
174
  col: number;
172
- showHeight: number | string;
173
- height?: number | string | undefined;
175
+ showHeight?: (number | string) | undefined;
176
+ height: number | string;
174
177
  module: string;
175
178
  };
176
179
  index: number;
@@ -2,8 +2,8 @@ export interface ApDraggableGridItemBase {
2
2
  span: number;
3
3
  row: number;
4
4
  col: number;
5
- showHeight: number | string;
6
- height?: number | string;
5
+ showHeight?: number | string;
6
+ height: number | string;
7
7
  module: string;
8
8
  }
9
9
  export interface ApDraggableGridItem extends ApDraggableGridItemBase {
@@ -12,5 +12,6 @@ export interface ApDraggableGridItem extends ApDraggableGridItemBase {
12
12
  }
13
13
  export type ApDraggableGridExpose = {
14
14
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
15
+ getGridItems: () => ApDraggableGridItemBase[];
15
16
  refreshGrid: () => void;
16
17
  };
@@ -0,0 +1,2 @@
1
+ import { ApDraggableGridItem } from '../interface';
2
+ export declare function sortItemsByRowAndCol(items: ApDraggableGridItem[]): ApDraggableGridItem[];
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function w(e){const c=[...e].sort((o,s)=>o.row-s.row),r={};c.forEach(o=>{r[o.row]||(r[o.row]=[]),r[o.row].push(o)});const t=[];return Object.keys(r).map(Number).sort((o,s)=>o-s).forEach(o=>{const s=r[o].sort((n,u)=>n.col-u.col);t.push(...s)}),t}exports.sortItemsByRowAndCol=w;
@@ -1,5 +1,5 @@
1
1
  import { ApExpandAlertProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
3
  declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly onExpand?: ((args_0: "collapse" | "expand") => any) | undefined;
@@ -23,7 +23,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
23
23
  }): any;
24
24
  };
25
25
  emit: ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
26
- }>) => VNode & {
26
+ }>) => VNode<RendererNode, RendererElement, {
27
+ [key: string]: any;
28
+ }> & {
27
29
  __ctx?: Awaited<typeof __VLS_setup>;
28
30
  };
29
31
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@ant-design/icons-vue"),h=require("@aplus-frontend/antdv"),N=require("../../ap-action/index.js");require("../../config-provider/index.js");const i=require("lodash-unified"),T=require("../../config-provider/hooks/use-locale.js"),$=require("../../config-provider/hooks/use-namespace.js"),q=require("../../config-provider/hooks/use-global-config.js"),A=["onClick"],D=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:""},mapLabel:{},separator:{default:"|"},separatorStyle:{default:()=>({})},contentStyle:{default:()=>({})},prefixStyle:{default:()=>({})},rows:{default:2},defaultExpand:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0}},emits:["choose","expand"],setup(g,{expose:v,emit:B}){const f=B,r=g,{t:m}=T.useLocale(),S=e.computed(()=>{if(r.type!="card")return r.type}),l=e.ref(""),s=e.ref(null),w=e.computed(()=>({fontWeight:"400",wordBreak:"break-all",overflow:"hidden",display:"-webkit-box",webkitLineClamp:l.value,webkitBoxOrient:"vertical",lineHeight:"18px"}));function C(){l.value==="1"?(l.value="",f("expand","expand")):(l.value="1",f("expand","collapse"))}const x=e.computed(()=>l.value==="1"?m("ap.apExpandAlert.expand"):m("ap.apExpandAlert.collapse")),u=e.ref(!0),y=e.computed(()=>l.value!=="1");function c(t){t?l.value="":l.value="1"}e.watch(()=>r.data,()=>{l.value="",e.nextTick(()=>{if(s.value){const t=Number(s.value.clientHeight),o=Number(parseInt(s.value.style.lineHeight));t<o*Number(r.rows)&&y.value?u.value=!1:u.value=!0}})},{immediate:!0}),e.watch(()=>r.defaultExpand,t=>{t?e.nextTick(()=>{c(t)}):e.nextTick(()=>{c(t)})},{immediate:!0}),e.onMounted(()=>{e.watch(()=>r.contentStyle,t=>{i.isNil(t.lineHeight)||e.nextTick(()=>{const o=document.querySelector(`#${p} .ant-alert-action`),a=document.querySelector(`#${p} .ant-alert-icon`);o&&o.setAttribute("style",`line-height: ${t.lineHeight}`),a&&a.setAttribute("style",`line-height: ${t.lineHeight}`)})},{deep:!0,immediate:!0,flush:"post"})});const{b:k,e:n,m:E}=$.useNamespace("ap-expand-alert"),p=`${k()}-key-${Date.now()}-${(Math.random()*1e6).toFixed(0)}`,b=q.useGlobalConfig("uiMode","aplus");return v({setExpand:c}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{id:p,class:e.normalizeClass([e.unref(k)(),`${e.unref(E)(e.unref(b))}`])},[e.createVNode(e.unref(h.Alert),{type:S.value,"show-icon":t.showIcon,class:e.normalizeClass([e.unref(n)("antAlert"),t.type=="card"?"card-alert":""])},{action:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.unref(N.ApActionItem),{key:0,size:"small",style:{"font-size":"12px","padding-left":"16px"},onClick:o[0]||(o[0]=a=>C())},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n)("expandText"))},e.toDisplayString(x.value),3),e.createVNode(e.unref(z.DownOutlined),{class:e.normalizeClass(y.value?e.unref(n)("expandIcon"):e.unref(n)("collapseIcon"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)]),message:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"ellipsisBoxRef",ref:s,style:e.normalizeStyle({...w.value,...t.contentStyle}),class:e.normalizeClass(e.unref(n)("alertContent"))},[e.renderSlot(t.$slots,"default",{},()=>[e.unref(i.isString)(t.prefix)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n)("prefix")),style:e.normalizeStyle(t.prefixStyle)},e.toDisplayString(t.prefix),7)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefix),{key:1,style:e.normalizeStyle(t.prefixStyle)},null,8,["style"])),e.unref(i.isString)(t.data)?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(n)("text"))},e.toDisplayString(t.data),3)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(t.data,(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createVNode(e.unref(h.Tooltip),{title:t.tipTitle?t.tipTitle:null},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"item",{record:a,index:d},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n)("showItem")),onClick:V=>t.$emit("choose",a)},e.toDisplayString(t.mapLabel?a[t.mapLabel]:a),11,A)])]),_:2},1032,["title"]),d!==t.data.length-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n)("spliter")),style:e.normalizeStyle(t.separatorStyle)},[e.unref(i.isString)(t.separator)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.separator),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.separator),{key:1}))],6)):e.createCommentVNode("",!0)],64))),128))])],6)]),_:3},8,["type","show-icon","class"])],2))}});exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@ant-design/icons-vue"),h=require("@aplus-frontend/antdv"),N=require("../../ap-action/index.js");require("../../config-provider/index.js");const i=require("lodash-unified"),T=require("../../config-provider/hooks/use-locale.js"),$=require("../../config-provider/hooks/use-namespace.js"),q=require("../../config-provider/hooks/use-global-config.js"),A=["onClick"],D=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:""},mapLabel:{},separator:{type:[Object,Function,String],default:"|"},separatorStyle:{default:()=>({})},contentStyle:{default:()=>({})},prefixStyle:{default:()=>({})},rows:{default:2},defaultExpand:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0}},emits:["choose","expand"],setup(g,{expose:v,emit:S}){const f=S,r=g,{t:m}=T.useLocale(),B=e.computed(()=>{if(r.type!="card")return r.type}),n=e.ref(""),s=e.ref(null),w=e.computed(()=>({fontWeight:"400",wordBreak:"break-all",overflow:"hidden",display:"-webkit-box",webkitLineClamp:n.value,webkitBoxOrient:"vertical",lineHeight:"18px"}));function C(){n.value==="1"?(n.value="",f("expand","expand")):(n.value="1",f("expand","collapse"))}const x=e.computed(()=>n.value==="1"?m("ap.apExpandAlert.expand"):m("ap.apExpandAlert.collapse")),u=e.ref(!0),y=e.computed(()=>n.value!=="1");function c(t){t?n.value="":n.value="1"}e.watch(()=>r.data,()=>{n.value="",e.nextTick(()=>{if(s.value){const t=Number(s.value.clientHeight),o=Number(parseInt(s.value.style.lineHeight));t<o*Number(r.rows)&&y.value?u.value=!1:u.value=!0}})},{immediate:!0}),e.watch(()=>r.defaultExpand,t=>{t?e.nextTick(()=>{c(t)}):e.nextTick(()=>{c(t)})},{immediate:!0}),e.onMounted(()=>{e.watch(()=>r.contentStyle,t=>{i.isNil(t.lineHeight)||e.nextTick(()=>{const o=document.querySelector(`#${p} .ant-alert-action`),a=document.querySelector(`#${p} .ant-alert-icon`);o&&o.setAttribute("style",`line-height: ${t.lineHeight}`),a&&a.setAttribute("style",`line-height: ${t.lineHeight}`)})},{deep:!0,immediate:!0,flush:"post"})});const{b:k,e:l,m:b}=$.useNamespace("ap-expand-alert"),p=`${k()}-key-${Date.now()}-${(Math.random()*1e6).toFixed(0)}`,E=q.useGlobalConfig("uiMode","aplus");return v({setExpand:c}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{id:p,class:e.normalizeClass([e.unref(k)(),`${e.unref(b)(e.unref(E))}`])},[e.createVNode(e.unref(h.Alert),{type:B.value,"show-icon":t.showIcon,class:e.normalizeClass([e.unref(l)("antAlert"),t.type=="card"?"card-alert":""])},{action:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.unref(N.ApActionItem),{key:0,size:"small",style:{"font-size":"12px","padding-left":"16px"},onClick:o[0]||(o[0]=a=>C())},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("expandText"))},e.toDisplayString(x.value),3),e.createVNode(e.unref(z.DownOutlined),{class:e.normalizeClass(y.value?e.unref(l)("expandIcon"):e.unref(l)("collapseIcon"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)]),message:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"ellipsisBoxRef",ref:s,style:e.normalizeStyle({...w.value,...t.contentStyle}),class:e.normalizeClass(e.unref(l)("alertContent"))},[e.renderSlot(t.$slots,"default",{},()=>[e.unref(i.isString)(t.prefix)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("prefix")),style:e.normalizeStyle(t.prefixStyle)},e.toDisplayString(t.prefix),7)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefix),{key:1,style:e.normalizeStyle(t.prefixStyle)},null,8,["style"])),e.unref(i.isString)(t.data)?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(l)("text"))},e.toDisplayString(t.data),3)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(t.data,(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createVNode(e.unref(h.Tooltip),{title:t.tipTitle?t.tipTitle:null},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"item",{record:a,index:d},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("showItem")),onClick:V=>t.$emit("choose",a)},e.toDisplayString(t.mapLabel?a[t.mapLabel]:a),11,A)])]),_:2},1032,["title"]),d!==t.data.length-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("spliter")),style:e.normalizeStyle(t.separatorStyle)},[e.unref(i.isString)(t.separator)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.separator),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.separator),{key:1}))],6)):e.createCommentVNode("",!0)],64))),128))])],6)]),_:3},8,["type","show-icon","class"])],2))}});exports.default=D;
@@ -1,4 +1,4 @@
1
- import { Component, VNode, CSSProperties, PublicProps, ShallowUnwrapRef, Plugin } from 'vue';
1
+ import { Component, VNode, CSSProperties, PublicProps, ShallowUnwrapRef, RendererNode, RendererElement, Plugin } from 'vue';
2
2
  export * from './interface';
3
3
  declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  attrs: any;
@@ -20,7 +20,7 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
20
20
  props: {
21
21
  readonly onExpand?: ((args_0: "collapse" | "expand") => any) | undefined;
22
22
  readonly onChoose?: ((args_0: T) => any) | undefined;
23
- type?: "warning" | "error" | "success" | "info" | "card" | undefined | undefined;
23
+ type?: "warning" | "error" | "success" | "info" | "card" | undefined;
24
24
  data?: string | T[] | undefined;
25
25
  prefix?: string | undefined;
26
26
  tipTitle?: string | undefined;
@@ -29,7 +29,7 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
29
29
  separatorStyle?: CSSProperties | undefined;
30
30
  contentStyle?: Omit< CSSProperties, "wordBreak" | "overflow" | "display" | "webkitLineClamp" | "webkitBoxOrient"> | undefined;
31
31
  prefixStyle?: CSSProperties | undefined;
32
- rows?: string | number | undefined;
32
+ rows?: (string | number) | undefined;
33
33
  defaultExpand?: boolean | undefined;
34
34
  showIcon?: boolean | undefined;
35
35
  } & PublicProps;
@@ -51,7 +51,9 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
51
51
  }): any;
52
52
  };
53
53
  emit: ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
54
- }>) => VNode & {
54
+ }>) => VNode<RendererNode, RendererElement, {
55
+ [key: string]: any;
56
+ }> & {
55
57
  __ctx?: Awaited<typeof __VLS_setup>;
56
58
  }) & ( Plugin & (new (...args: any[]) => {
57
59
  $props: {
@@ -1,5 +1,5 @@
1
1
  import { ApSelectItem } from './interface';
2
- import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
2
+ import { PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, Plugin } from 'vue';
3
3
  export * from './interface';
4
4
  declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
5
5
  attrs: any;
@@ -38,7 +38,9 @@ declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable
38
38
  (event: "afterEnter", el: Element): void;
39
39
  (event: "afterLeave", el: Element): void;
40
40
  };
41
- }>) => VNode & {
41
+ }>) => VNode<RendererNode, RendererElement, {
42
+ [key: string]: any;
43
+ }> & {
42
44
  __ctx?: Awaited<typeof __VLS_setup>;
43
45
  }) & ( Plugin & (new (...args: any[]) => {
44
46
  $props: {
@@ -1,5 +1,5 @@
1
1
  import { ApSelectItem, ApSelectLayoutProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
3
  declare const _default: <T extends ApSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly onOnSelect?: ((value: T) => any) | undefined;
@@ -19,7 +19,9 @@ declare const _default: <T extends ApSelectItem>(__VLS_props: NonNullable<Awaite
19
19
  (event: "afterEnter", el: Element): void;
20
20
  (event: "afterLeave", el: Element): void;
21
21
  };
22
- }>) => VNode & {
22
+ }>) => VNode<RendererNode, RendererElement, {
23
+ [key: string]: any;
24
+ }> & {
23
25
  __ctx?: Awaited<typeof __VLS_setup>;
24
26
  };
25
27
  export default _default;
@@ -4,8 +4,8 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
4
4
  import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
5
5
  import { Recordable } from '../../type';
6
6
  import { TableColumnsType } from '@aplus-frontend/antdv';
7
- import { ApFormSearchFormPopoverSorterItem } from '../..';
8
7
  import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
8
+ import { ApFormSearchFormPopoverSorterItem } from '../..';
9
9
  /**
10
10
  *
11
11
  */
@@ -42,14 +42,8 @@ declare const ApTableModal: {
42
42
  };
43
43
  y: undefined;
44
44
  };
45
- getPaging: () => Partial<{
46
- current: number;
47
- pageSize: number;
48
- }>;
49
- setPaging: (nextPaging: Partial<{
50
- current: number;
51
- pageSize: number;
52
- }>, refreshImmediately?: boolean) => void;
45
+ getPaging: () => InternalPagingType;
46
+ setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
53
47
  getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
54
48
  setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
55
49
  resetSearchFormSorterItems: () => void;
@@ -153,14 +147,8 @@ declare const ApTableModal: {
153
147
  };
154
148
  y: undefined;
155
149
  };
156
- getPaging: () => Partial<{
157
- current: number;
158
- pageSize: number;
159
- }>;
160
- setPaging: (nextPaging: Partial<{
161
- current: number;
162
- pageSize: number;
163
- }>, refreshImmediately?: boolean) => void;
150
+ getPaging: () => InternalPagingType;
151
+ setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
164
152
  getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
165
153
  setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
166
154
  resetSearchFormSorterItems: () => void;
@@ -1,13 +1,14 @@
1
1
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
- import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
4
3
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
5
- import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
6
5
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
7
6
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
8
7
  import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
9
8
  import { Recordable } from '../../../type';
10
9
  import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
10
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
+ import { SizeType } from '@aplus-frontend/antdv/es/button';
11
12
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
13
  import { OnCleanup } from '@vue/reactivity';
13
14
  type __VLS_Props = {
@@ -18,7 +19,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
18
19
  $: ComponentInternalInstance;
19
20
  $data: {};
20
21
  $props: {
21
- readonly size?: ButtonSize;
22
+ readonly size?: "small" | "large" | "middle" | undefined;
22
23
  readonly onSubmit?: ((e: Event) => void) | undefined;
23
24
  readonly layout?: string | undefined;
24
25
  readonly disabled?: boolean | undefined;
@@ -108,7 +109,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
108
109
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
109
110
  readonly initialValues?: Recordable | undefined;
110
111
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
111
- readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
112
+ readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
112
113
  readonly syncToUrlPriority?: boolean | undefined;
113
114
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
114
115
  $attrs: {
@@ -1,13 +1,14 @@
1
1
  import { ViewListModel } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
- import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
4
3
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
5
- import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
6
5
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
7
6
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
8
7
  import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
9
8
  import { Recordable } from '../../../type';
10
9
  import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
10
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
+ import { SizeType } from '@aplus-frontend/antdv/es/button';
11
12
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
13
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
13
14
  import { OnCleanup } from '@vue/reactivity';
@@ -19,7 +20,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
19
20
  $: ComponentInternalInstance;
20
21
  $data: {};
21
22
  $props: {
22
- readonly size?: ButtonSize;
23
+ readonly size?: "small" | "large" | "middle" | undefined;
23
24
  readonly onSubmit?: ((e: Event) => void) | undefined;
24
25
  readonly layout?: string | undefined;
25
26
  readonly disabled?: boolean | undefined;
@@ -109,7 +110,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
109
110
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
110
111
  readonly initialValues?: Recordable | undefined;
111
112
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
112
- readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
113
+ readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
113
114
  readonly syncToUrlPriority?: boolean | undefined;
114
115
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
115
116
  $attrs: {
@@ -2,11 +2,7 @@ import { InjectionKey, Ref, ComputedRef } from 'vue';
2
2
  export declare const defaultNamespace = "aplus";
3
3
  export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
4
  export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>;
5
- export declare const useNamespace: (
6
- /**
7
- * 块 一般是指组件名
8
- */
9
- block: string, namespaceOverrides?: Ref<string | undefined>) => {
5
+ export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
10
6
  namespace: ComputedRef<string>;
11
7
  b: (blockSuffix?: string) => string;
12
8
  e: (element?: string) => string;
@@ -1,5 +1,5 @@
1
1
  import { EditableColumnType, EditableTableFormItemExpose, EditableTableFormItemProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
3
  declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableTableFormItemProps<RecordType> & Partial<{}>> & PublicProps;
5
5
  expose(exposed: ShallowUnwrapRef<EditableTableFormItemExpose>): void;
@@ -36,7 +36,9 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
36
36
  }) => void;
37
37
  };
38
38
  emit: {};
39
- }>) => VNode & {
39
+ }>) => VNode<RendererNode, RendererElement, {
40
+ [key: string]: any;
41
+ }> & {
40
42
  __ctx?: Awaited<typeof __VLS_setup>;
41
43
  };
42
44
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),P=require("@aplus-frontend/antdv"),p=require("../ap-form/index.js"),d=require("lodash-unified");require("../config-provider/index.js");const j=require("../ap-form/context.js"),h=require("../utils/index.js"),k=require("./hooks/use-get-columns.js"),z=require("./utils.js"),A=require("../ap-form/utils/get.js"),K=require("../config-provider/hooks/use-namespace.js"),O=require("../config-provider/hooks/use-global-config.js"),G=o.defineComponent({name:"EditableTableFormItem",__name:"form-item",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{default:()=>({})}},setup(g,{expose:x}){const l=g,{internalInstance:t,model:b}=j.useInjectForm(),i=o.ref(A.getModelValue(o.unref(b),l.name)||[]),w=o.useSlots(),y=o.toRef(l,"name"),C=p.ApForm.useWatch(y);o.watch(()=>C.value,async e=>{var u;await o.nextTick(),i.value=e,(u=l.onChange)==null||u.call(l,e)},{deep:!0});const{b:R}=K.useNamespace("editable-table"),c=o.ref(),v=O.useGlobalConfig("valueTypeMap"),B=k.default(l,v);function F(e,u){var n;const s=((n=o.unref(i))==null?void 0:n.length)||0;if(h.isDef(l.maxLength)&&s>=l.maxLength)return;const a={...e||{}};t==null||t.setFieldValue(l.name,a,!0,(r,f)=>{if(!r[f]){r[f]=[a];return}d.isUndefined(u)?r[f].push(a):r[f].splice(u,0,a)})}function T(e,u="suffix"){var r;const s=((r=o.unref(i))==null?void 0:r.length)||0,a=d.isNumber(e)?e:e.length;if(h.isDef(l.maxLength)&&s+a>l.maxLength)return;const n=d.isNumber(e)?new Array(e).fill(0).map(()=>({})):d.cloneDeep(e);t==null||t.setFieldValue(l.name,n,!0,(f,m)=>{if(!f[m]){f[m]=[...n];return}u==="suffix"?f[m].push(...n):f[m].unshift(...n)})}function q(e){const u=new Set(d.isNumber(e)?[e]:e);t==null||t.setFieldValue(l.name,void 0,!0,(s,a)=>{s[a]=s[a].filter((n,r)=>!u.has(r))})}function D(e){var s;const u=new Set(d.isArray(e)?e:[e]);u.size!==0&&((s=t==null?void 0:t.setFieldValue)==null||s.call(t,l.name,void 0,!0,(a,n)=>{a[n]=a[n].filter(r=>!u.has(r[l.rowKey]))}))}function N(){return o.unref(i)}function S(e){var u;return(u=o.unref(i))==null?void 0:u[e]}function V(e,u,s=!0){t==null||t.setFieldValue(l.name,void 0,!0,(a,n)=>{!a[n]||!a[n][e]||(a[n][e]={...s?a[n][e]:{},...u})})}function L(e){t==null||t.setFieldValue(l.name,e)}function _(e,u){var a;const s=e==="end"?i.value.length-1:e;z.scrollToRowIndex(s,(a=c.value)==null?void 0:a.$el,u)}function E(){var e;(e=t==null?void 0:t.setFieldValue)==null||e.call(t,l.name,[])}return x({add:F,remove:q,getRowData:S,getRowsData:N,setRowData:V,addMultiple:T,scrollTo:_,setTableData:L,clear:E,removeByKey:D}),(e,u)=>(o.openBlock(),o.createBlock(o.unref(p.ApForm).FormItem,o.mergeProps(e.formItem,{name:e.name,label:e.label}),{default:o.withCtx(()=>[o.createVNode(o.unref(P.Table),o.mergeProps(o.unref(d.omit)(l,["name","maxLength","onChange"]),{ref_key:"tableRef",ref:c,class:o.unref(R)(),columns:o.unref(B),"data-source":i.value}),o.createSlots({_:2},[o.renderList(o.unref(d.omit)(w,["headerCell"]),(s,a)=>({name:a,fn:o.withCtx(n=>[o.renderSlot(e.$slots,a,o.normalizeProps(o.guardReactiveProps(n||{})))])}))]),1040,["class","columns","data-source"])]),_:3},16,["name","label"]))}});exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),P=require("@aplus-frontend/antdv"),p=require("../ap-form/index.js"),d=require("lodash-unified");require("../config-provider/index.js");const j=require("../ap-form/context.js"),h=require("../utils/index.js"),k=require("./hooks/use-get-columns.js"),z=require("./utils.js"),A=require("../ap-form/utils/get.js"),K=require("../config-provider/hooks/use-namespace.js"),O=require("../config-provider/hooks/use-global-config.js"),G=o.defineComponent({name:"EditableTableFormItem",__name:"form-item",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{default:()=>({})}},setup(g,{expose:x}){const l=g,{internalInstance:t,model:b}=j.useInjectForm(),i=o.ref(A.getModelValue(o.unref(b),l.name)||[]),w=o.useSlots(),y=o.toRef(l,"name"),C=p.ApForm.useWatch(y);o.watch(()=>C.value,async e=>{var u;await o.nextTick(),i.value=e,(u=l.onChange)==null||u.call(l,e)},{deep:!0});const{b:R}=K.useNamespace("editable-table"),m=o.ref(),v=O.useGlobalConfig("valueTypeMap"),F=k.default(l,v);function B(e,u){var n;const s=((n=o.unref(i))==null?void 0:n.length)||0;if(h.isDef(l.maxLength)&&s>=l.maxLength)return;const a={...e||{}};t==null||t.setFieldValue(l.name,a,!0,(r,f)=>{if(!r[f]){r[f]=[a];return}d.isUndefined(u)?r[f].push(a):r[f].splice(u,0,a)})}function T(e,u="suffix"){var r;const s=((r=o.unref(i))==null?void 0:r.length)||0,a=d.isNumber(e)?e:e.length;if(h.isDef(l.maxLength)&&s+a>l.maxLength)return;const n=d.isNumber(e)?new Array(e).fill(0).map(()=>({})):d.cloneDeep(e);t==null||t.setFieldValue(l.name,n,!0,(f,c)=>{if(!f[c]){f[c]=[...n];return}u==="suffix"?f[c].push(...n):f[c].unshift(...n)})}function q(e){const u=new Set(d.isNumber(e)?[e]:e);t==null||t.setFieldValue(l.name,void 0,!0,(s,a)=>{s[a]=s[a].filter((n,r)=>!u.has(r))})}function D(e){var s;const u=new Set(d.isArray(e)?e:[e]);u.size!==0&&((s=t==null?void 0:t.setFieldValue)==null||s.call(t,l.name,void 0,!0,(a,n)=>{a[n]=a[n].filter(r=>!u.has(r[l.rowKey]))}))}function S(){return o.unref(i)}function N(e){var u;return(u=o.unref(i))==null?void 0:u[e]}function V(e,u,s=!0){t==null||t.setFieldValue(l.name,void 0,!0,(a,n)=>{!a[n]||!a[n][e]||(a[n][e]={...s?a[n][e]:{},...u})})}function L(e){t==null||t.setFieldValue(l.name,e)}function _(e,u){var a;const s=e==="end"?i.value.length-1:e;z.scrollToRowIndex(s,(a=m.value)==null?void 0:a.$el,u)}function E(){var e;(e=t==null?void 0:t.setFieldValue)==null||e.call(t,l.name,[])}return x({add:B,remove:q,getRowData:N,getRowsData:S,setRowData:V,addMultiple:T,scrollTo:_,setTableData:L,clear:E,removeByKey:D}),(e,u)=>(o.openBlock(),o.createBlock(o.unref(p.ApForm).FormItem,o.mergeProps(e.formItem,{name:e.name,label:e.label}),{default:o.withCtx(()=>[o.createVNode(o.unref(P.Table),o.mergeProps(o.unref(d.omit)(l,["name","maxLength","onChange"]),{ref_key:"tableRef",ref:m,class:o.unref(R)(),columns:o.unref(F),"data-source":i.value}),o.createSlots({_:2},[o.renderList(o.unref(d.omit)(w,["headerCell"]),(s,a)=>({name:a,fn:o.withCtx(n=>[o.renderSlot(e.$slots,a,o.normalizeProps(o.guardReactiveProps(n||{})))])}))]),1040,["class","columns","data-source"])]),_:3},16,["name","label"]))}});exports.default=G;
@@ -1,6 +1,6 @@
1
1
  import { EditableTableProps, EditableColumnType, EditableTableExpose } from './interface';
2
2
  import { Recordable } from '../type';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
4
4
  declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
6
  readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -39,7 +39,9 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
39
39
  }) => void;
40
40
  };
41
41
  emit: (event: "update:value", ...args: any[]) => void;
42
- }>) => VNode & {
42
+ }>) => VNode<RendererNode, RendererElement, {
43
+ [key: string]: any;
44
+ }> & {
43
45
  __ctx?: Awaited<typeof __VLS_setup>;
44
46
  };
45
47
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),K=require("@aplus-frontend/antdv"),v=require("../ap-form/index.js"),f=require("lodash-unified");require("../config-provider/index.js");require("../hooks/index.js");const g=require("../utils/index.js"),O=require("./utils.js"),U=require("./hooks/use-get-columns.js"),G=require("../config-provider/hooks/use-namespace.js"),$=require("../hooks/useControllableValue.js"),H=require("../config-provider/hooks/use-global-config.js"),W=t.defineComponent({name:"EditableTable",__name:"index",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},name:{default:"ap-editable-table-inner-name"},onFieldChange:{}},emits:["update:value"],setup(w,{expose:y,emit:C}){const o=w,{b}=G.useNamespace("editable-table"),R=t.useSlots(),F=C,x=t.ref(),{value:p,updateValue:B}=$.useControllableValue(o,F),i=t.ref(),V=H.useGlobalConfig("valueTypeMap"),h=v.ApForm.useWatch(o.name,i);t.watch(()=>h.value,e=>{var n;B(e),(n=o.onChange)==null||n.call(o,e)},{deep:!0,flush:"post"}),t.watch(p,e=>{var n;e!==t.unref(h)&&(f.isEqual(e,t.unref(h))||(n=i.value)==null||n.setFieldValue(o.name,e))},{deep:!0});const q=U.default(o,V);function N(){var e;(e=i.value)==null||e.resetFields()}function T(e){return e?(f.isArray(e)?e:[e]).map(a=>f.isArray(a)?[o.name,...a]:[o.name,a]):void 0}async function S(e,n){var l;const a=await((l=i.value)==null?void 0:l.validateFields(T(e),n));return a==null?void 0:a[o.name]}function _(e,n){var u,r,s;const a=((u=t.unref(p))==null?void 0:u.length)||0;if(g.isDef(o.maxLength)&&a>=o.maxLength)return;const l={...e||{}};(s=(r=i.value)==null?void 0:r.setFieldValue)==null||s.call(r,o.name,l,!0,(d,c)=>{if(!d[c]){d[c]=[l];return}f.isUndefined(n)?d[c].push(l):d[c].splice(n,0,l)})}function A(e,n="suffix"){var r,s,d;const a=((r=t.unref(p))==null?void 0:r.length)||0,l=f.isNumber(e)?e:e.length;if(g.isDef(o.maxLength)&&a+l>o.maxLength)return;const u=f.isNumber(e)?new Array(e).fill(0).map(()=>({})):f.cloneDeep(e);(d=(s=i.value)==null?void 0:s.setFieldValue)==null||d.call(s,o.name,u,!0,(c,m)=>{if(!c[m]){c[m]=[...u];return}n==="suffix"?c[m].push(...u):c[m].unshift(...u)})}function D(e){var a,l;const n=new Set(f.isNumber(e)?[e]:e);(l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter((s,d)=>!n.has(d))})}function L(e){var a,l;const n=new Set(f.isArray(e)?e:[e]);n.size!==0&&((l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter(s=>!n.has(s[o.rowKey]))}))}function E(){return t.unref(p)}function k(e){var n;(n=i.value)==null||n.setFieldValue(o.name,e)}function P(e){var n;return(n=t.unref(p))==null?void 0:n[e]}function j(e,n,a=!0){var l,u;(u=(l=i.value)==null?void 0:l.setFieldValue)==null||u.call(l,o.name,void 0,!0,(r,s)=>{!r[s]||!r[s][e]||(r[s][e]={...a?r[s][e]:{},...n})})}function z(e,n){var l;const a=e==="end"?p.value.length-1:e;O.scrollToRowIndex(a,(l=x.value)==null?void 0:l.$el,n)}function I(){var e,n;(n=(e=i.value)==null?void 0:e.setFieldValue)==null||n.call(e,o.name,[])}return y({resetFields:N,validateFields:S,add:_,remove:D,getRowData:P,getRowsData:E,setRowData:j,addMultiple:A,scrollTo:z,clear:I,setTableData:k,removeByKey:L}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(v.ApForm),{ref_key:"formRef",ref:i,"initial-values":{[o.name]:t.unref(p)}},{default:t.withCtx(()=>[t.createVNode(t.unref(v.ApForm).FormItem,{name:e.name,"no-style":""},{default:t.withCtx(()=>[t.createVNode(t.unref(K.Table),t.mergeProps(t.unref(f.omit)(o,["name","value","onUpdate:value","maxLength","onChange"]),{ref_key:"tableRef",ref:x,class:t.unref(b)(),columns:t.unref(q),"data-source":t.unref(p)}),t.createSlots({_:2},[t.renderList(t.unref(f.omit)(R,["headerCell"]),(a,l)=>({name:l,fn:t.withCtx(u=>[t.renderSlot(e.$slots,l,t.normalizeProps(t.guardReactiveProps(u||{})))])}))]),1040,["class","columns","data-source"])]),_:3},8,["name"])]),_:3},8,["initial-values"]))}});exports.default=W;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),K=require("@aplus-frontend/antdv"),v=require("../ap-form/index.js"),f=require("lodash-unified");require("../config-provider/index.js");require("../hooks/index.js");const g=require("../utils/index.js"),O=require("./utils.js"),U=require("./hooks/use-get-columns.js"),G=require("../config-provider/hooks/use-namespace.js"),$=require("../hooks/useControllableValue.js"),H=require("../config-provider/hooks/use-global-config.js"),W=t.defineComponent({name:"EditableTable",__name:"index",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},name:{default:"ap-editable-table-inner-name"},onFieldChange:{}},emits:["update:value"],setup(y,{expose:w,emit:C}){const o=y,{b}=G.useNamespace("editable-table"),R=t.useSlots(),F=C,x=t.ref(),{value:p,updateValue:B}=$.useControllableValue(o,F),i=t.ref(),V=H.useGlobalConfig("valueTypeMap"),h=v.ApForm.useWatch(o.name,i);t.watch(()=>h.value,e=>{var n;B(e),(n=o.onChange)==null||n.call(o,e)},{deep:!0,flush:"post"}),t.watch(p,e=>{var n;e!==t.unref(h)&&(f.isEqual(e,t.unref(h))||(n=i.value)==null||n.setFieldValue(o.name,e))},{deep:!0});const q=U.default(o,V);function N(){var e;(e=i.value)==null||e.resetFields()}function S(e){return e?(f.isArray(e)?e:[e]).map(a=>f.isArray(a)?[o.name,...a]:[o.name,a]):void 0}async function T(e,n){var l;const a=await((l=i.value)==null?void 0:l.validateFields(S(e),n));return a==null?void 0:a[o.name]}function _(e,n){var u,r,s;const a=((u=t.unref(p))==null?void 0:u.length)||0;if(g.isDef(o.maxLength)&&a>=o.maxLength)return;const l={...e||{}};(s=(r=i.value)==null?void 0:r.setFieldValue)==null||s.call(r,o.name,l,!0,(d,c)=>{if(!d[c]){d[c]=[l];return}f.isUndefined(n)?d[c].push(l):d[c].splice(n,0,l)})}function A(e,n="suffix"){var r,s,d;const a=((r=t.unref(p))==null?void 0:r.length)||0,l=f.isNumber(e)?e:e.length;if(g.isDef(o.maxLength)&&a+l>o.maxLength)return;const u=f.isNumber(e)?new Array(e).fill(0).map(()=>({})):f.cloneDeep(e);(d=(s=i.value)==null?void 0:s.setFieldValue)==null||d.call(s,o.name,u,!0,(c,m)=>{if(!c[m]){c[m]=[...u];return}n==="suffix"?c[m].push(...u):c[m].unshift(...u)})}function D(e){var a,l;const n=new Set(f.isNumber(e)?[e]:e);(l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter((s,d)=>!n.has(d))})}function L(e){var a,l;const n=new Set(f.isArray(e)?e:[e]);n.size!==0&&((l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter(s=>!n.has(s[o.rowKey]))}))}function E(){return t.unref(p)}function k(e){var n;(n=i.value)==null||n.setFieldValue(o.name,e)}function P(e){var n;return(n=t.unref(p))==null?void 0:n[e]}function j(e,n,a=!0){var l,u;(u=(l=i.value)==null?void 0:l.setFieldValue)==null||u.call(l,o.name,void 0,!0,(r,s)=>{!r[s]||!r[s][e]||(r[s][e]={...a?r[s][e]:{},...n})})}function z(e,n){var l;const a=e==="end"?p.value.length-1:e;O.scrollToRowIndex(a,(l=x.value)==null?void 0:l.$el,n)}function I(){var e,n;(n=(e=i.value)==null?void 0:e.setFieldValue)==null||n.call(e,o.name,[])}return w({resetFields:N,validateFields:T,add:_,remove:D,getRowData:P,getRowsData:E,setRowData:j,addMultiple:A,scrollTo:z,clear:I,setTableData:k,removeByKey:L}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(v.ApForm),{ref_key:"formRef",ref:i,"initial-values":{[o.name]:t.unref(p)}},{default:t.withCtx(()=>[t.createVNode(t.unref(v.ApForm).FormItem,{name:e.name,"no-style":""},{default:t.withCtx(()=>[t.createVNode(t.unref(K.Table),t.mergeProps(t.unref(f.omit)(o,["name","value","onUpdate:value","maxLength","onChange"]),{ref_key:"tableRef",ref:x,class:t.unref(b)(),columns:t.unref(q),"data-source":t.unref(p)}),t.createSlots({_:2},[t.renderList(t.unref(f.omit)(R,["headerCell"]),(a,l)=>({name:l,fn:t.withCtx(u=>[t.renderSlot(e.$slots,l,t.normalizeProps(t.guardReactiveProps(u||{})))])}))]),1040,["class","columns","data-source"])]),_:3},8,["name"])]),_:3},8,["initial-values"]))}});exports.default=W;
@@ -1,5 +1,5 @@
1
1
  import { ScrollOptions, ScrollViewProps } from './interface';
2
- import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar';
2
+ import { ScrollBarDirection, InternalScrollBarProps, ColorType } from '../scroll-bar';
3
3
  import { CreateComponentPublicInstanceWithMixins, Ref, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
4
4
  declare function scroll(x?: number, y?: number): void;
5
5
  declare function scrollTo({ smooth, left, top }: ScrollOptions): void;
@@ -106,8 +106,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
106
106
  onScroll?: ((percent: number) => void) | undefined;
107
107
  disabled?: boolean | undefined;
108
108
  trackSpeed?: number | undefined;
109
- barColor?: import("csstype").Property.BackgroundColor | undefined;
110
- trackColor?: import("csstype").Property.BackgroundColor | undefined;
109
+ barColor?: ColorType;
110
+ trackColor?: ColorType;
111
111
  trackWidth?: number | undefined;
112
112
  showTrack?: boolean | undefined;
113
113
  onScrollStart?: ((percent: number) => void) | undefined;
@@ -118,8 +118,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
118
118
  onScroll?: ((percent: number) => void) | undefined;
119
119
  disabled?: boolean | undefined;
120
120
  trackSpeed?: number | undefined;
121
- barColor?: import("csstype").Property.BackgroundColor | undefined;
122
- trackColor?: import("csstype").Property.BackgroundColor | undefined;
121
+ barColor?: ColorType;
122
+ trackColor?: ColorType;
123
123
  trackWidth?: number | undefined;
124
124
  showTrack?: boolean | undefined;
125
125
  onScrollStart?: ((percent: number) => void) | undefined;