@aplus-frontend/ui 0.6.0-beta.9 → 0.6.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 (510) hide show
  1. package/es/index.mjs +307 -289
  2. package/es/src/ap-button/ap-button.vue.mjs +1 -1
  3. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +9 -8
  4. package/es/src/ap-descriptions/help-message/index.vue2.mjs +1 -1
  5. package/es/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
  6. package/es/src/ap-drawer/components/ApDrawerClose.vue.mjs +4 -0
  7. package/es/src/ap-drawer/components/ApDrawerClose.vue2.mjs +25 -0
  8. package/es/src/ap-drawer/index.d.ts +2 -0
  9. package/es/src/ap-drawer/index.mjs +5 -2
  10. package/es/src/ap-drawer/utils/createDrawer.mjs +38 -33
  11. package/es/src/ap-field/date-range/index.vue.mjs +8 -7
  12. package/es/src/ap-field/hooks/use-date-timezone.mjs +17 -8
  13. package/es/src/ap-field/number/index.vue.d.ts +2 -4
  14. package/es/src/ap-field/radio/index.vue.d.ts +2 -4
  15. package/es/src/ap-field/rate/index.vue.d.ts +2 -4
  16. package/es/src/ap-field/select/index.vue.d.ts +3 -6
  17. package/es/src/ap-field/slider/index.vue.d.ts +2 -4
  18. package/es/src/ap-field/text/index.vue2.mjs +42 -44
  19. package/es/src/ap-field/text/password.vue.mjs +15 -17
  20. package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
  21. package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
  22. package/es/src/ap-form/ap-form.vue2.mjs +89 -77
  23. package/es/src/ap-form/dependency/index.vue.mjs +29 -23
  24. package/es/src/ap-form/drawer-form/index.vue.d.ts +13 -7
  25. package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
  26. package/es/src/ap-form/interface.d.ts +9 -5
  27. package/es/src/ap-form/item/index.vue.d.ts +5 -10
  28. package/es/src/ap-form/item/index.vue.mjs +69 -73
  29. package/es/src/ap-form/item-group/index.vue.mjs +34 -35
  30. package/es/src/ap-form/items/select/index.vue.mjs +12 -14
  31. package/es/src/ap-form/items/text/password.vue.mjs +9 -9
  32. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  33. package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
  34. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
  35. package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
  36. package/es/src/ap-form/provider/index.vue.mjs +6 -5
  37. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +4 -1
  38. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +31 -13
  39. package/es/src/ap-form/search-form/index.vue.d.ts +4 -8
  40. package/es/src/ap-form/search-form/index.vue.mjs +63 -62
  41. package/es/src/ap-form/set/index.vue.mjs +20 -20
  42. package/es/src/ap-grid/editable/form-item.vue.mjs +39 -36
  43. package/es/src/ap-grid/editable/index.vue.mjs +13 -10
  44. package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
  45. package/es/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  46. package/es/src/ap-grid/hooks/use-inner-params.mjs +24 -35
  47. package/es/src/ap-grid/hooks/use-render-columns.mjs +8 -8
  48. package/es/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  49. package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
  50. package/es/src/ap-grid/hooks/use-table-style.d.ts +18 -0
  51. package/es/src/ap-grid/hooks/use-table-style.mjs +28 -0
  52. package/es/src/ap-grid/index.vue.mjs +295 -243
  53. package/es/src/ap-grid/interface.d.ts +32 -3
  54. package/es/src/ap-grid/utils/table.mjs +15 -15
  55. package/es/src/ap-list/index.vue.d.ts +2 -9
  56. package/es/src/ap-list/index.vue.mjs +113 -103
  57. package/es/src/ap-list/interface.d.ts +24 -3
  58. package/es/src/ap-modal/interface.d.ts +2 -1
  59. package/es/src/ap-modal/utils/createModalStream.mjs +24 -24
  60. package/es/src/ap-table/ap-table.vue.d.ts +10 -2
  61. package/es/src/ap-table/ap-table.vue2.mjs +86 -82
  62. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +42 -44
  63. package/es/src/ap-table/constants.d.ts +22 -22
  64. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +24 -5
  65. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +158 -130
  66. package/es/src/ap-table/interface.d.ts +17 -4
  67. package/es/src/ap-table/utils.d.ts +21 -21
  68. package/es/src/business/ap-card/ApCard.vue.d.ts +2 -4
  69. package/es/src/business/ap-card/ApCard.vue2.mjs +34 -33
  70. package/es/src/business/ap-card/index.d.ts +2 -4
  71. package/es/src/business/ap-card/interface.d.ts +5 -0
  72. package/es/src/business/ap-copy/ApCopy.d.ts +52 -0
  73. package/es/src/business/ap-copy/ApCopy.mjs +79 -0
  74. package/es/src/business/ap-copy/constans.d.ts +24 -0
  75. package/es/src/business/ap-copy/constans.mjs +25 -0
  76. package/es/src/business/ap-copy/index.d.ts +102 -0
  77. package/es/src/business/ap-copy/index.mjs +7 -0
  78. package/es/src/business/ap-copy/interface.d.ts +8 -0
  79. package/es/src/business/ap-copy/interface.mjs +1 -0
  80. package/es/src/business/ap-copy/style/css.d.ts +0 -0
  81. package/es/src/business/ap-copy/style/css.js +1 -0
  82. package/es/src/business/ap-copy/style/index.d.ts +0 -0
  83. package/es/src/business/ap-copy/style/index.js +1 -0
  84. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +51 -49
  85. package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  86. package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  87. package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
  88. package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
  89. package/es/src/business/ap-keep-alive/hook.mjs +33 -0
  90. package/es/src/business/ap-keep-alive/index.d.ts +108 -0
  91. package/es/src/business/ap-keep-alive/index.mjs +15 -0
  92. package/es/src/business/ap-keep-alive/interface.d.ts +36 -0
  93. package/es/src/business/ap-keep-alive/interface.mjs +54 -0
  94. package/es/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
  95. package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
  96. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  97. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
  98. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  99. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
  100. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  101. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
  102. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  103. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
  104. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  105. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
  106. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  107. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
  108. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  109. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
  110. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  111. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
  112. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  113. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
  114. package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  115. package/es/src/business/ap-keep-alive/keeper/index.mjs +28 -0
  116. package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  117. package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
  118. package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  119. package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
  120. package/es/src/business/ap-keep-alive/utils.d.ts +23 -0
  121. package/es/src/business/ap-keep-alive/utils.mjs +42 -0
  122. package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
  123. package/es/src/business/ap-label/interface.d.ts +2 -3
  124. package/es/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  125. package/es/src/business/ap-product-info/ApProductInfo.mjs +53 -54
  126. package/es/src/business/ap-product-info/constans.d.ts +4 -0
  127. package/es/src/business/ap-product-info/constans.mjs +4 -0
  128. package/es/src/business/ap-product-info/index.d.ts +15 -0
  129. package/es/src/business/ap-product-info/interface.d.ts +1 -0
  130. package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
  131. package/es/src/business/ap-radio-group/ap-radio-group.vue.mjs +4 -0
  132. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +73 -0
  133. package/es/src/business/ap-radio-group/index.d.ts +66 -0
  134. package/es/src/business/ap-radio-group/index.mjs +8 -0
  135. package/es/src/business/ap-radio-group/interface.d.ts +11 -0
  136. package/es/src/business/ap-radio-group/interface.mjs +1 -0
  137. package/es/src/business/ap-radio-group/style/css.d.ts +0 -0
  138. package/es/src/business/ap-radio-group/style/css.js +1 -0
  139. package/es/src/business/ap-radio-group/style/index.d.ts +0 -0
  140. package/es/src/business/ap-radio-group/style/index.js +1 -0
  141. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  142. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  143. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  144. package/es/src/business/ap-table-modal/index.d.ts +32 -5
  145. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  146. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
  147. package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
  148. package/es/src/business/ap-view/ap-view.vue2.mjs +135 -115
  149. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  150. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  151. package/es/src/business/ap-view/index.d.ts +12 -3
  152. package/es/src/business/ap-view/interface.d.ts +7 -0
  153. package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
  154. package/es/src/business/batch-input-group/index.vue.mjs +10 -9
  155. package/es/src/business/hooks/usePageListApGrid.mjs +33 -28
  156. package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
  157. package/es/src/business/index.d.ts +3 -0
  158. package/es/src/business/index.mjs +36 -30
  159. package/es/src/components.d.ts +1 -0
  160. package/es/src/editable-table/form-item.vue.mjs +23 -23
  161. package/es/src/full-screen/interface.d.ts +5 -6
  162. package/es/src/index.mjs +112 -97
  163. package/es/src/locale/lang/en.mjs +4 -0
  164. package/es/src/locale/lang/zh-cn.mjs +4 -0
  165. package/es/src/mask/index.vue.mjs +21 -20
  166. package/es/src/path-map.mjs +3 -1
  167. package/es/src/resize-observer/interface.d.ts +2 -3
  168. package/es/src/scroll-bar/interface.d.ts +7 -7
  169. package/es/src/scroll-view/interface.d.ts +2 -3
  170. package/es/src/splitter/SplitBar.vue2.mjs +1 -0
  171. package/es/src/splitter/Splitter.vue2.mjs +1 -0
  172. package/es/src/tests/mock-resize-observer.d.ts +2 -0
  173. package/es/src/tests/mock-warning.d.ts +1 -0
  174. package/es/src/tests/utils.d.ts +8 -0
  175. package/es/src/text/group.vue.mjs +7 -6
  176. package/es/src/text/index.vue.mjs +20 -19
  177. package/es/src/version.d.ts +2 -0
  178. package/es/src/version.mjs +4 -0
  179. package/es/src/work-order-modal/createWorkOrder.d.ts +2 -1
  180. package/es/src/work-order-modal/createWorkOrder.mjs +19 -15
  181. package/es/src/work-order-modal/interfaces.d.ts +4 -0
  182. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  183. package/es/src/work-order-modal/work-order-modal.vue.mjs +120 -105
  184. package/es/test/setup.d.ts +5 -0
  185. package/lib/index.js +1 -1
  186. package/lib/src/ap-button/ap-button.vue.js +1 -1
  187. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  188. package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
  189. package/lib/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
  190. package/lib/src/ap-drawer/components/ApDrawerClose.vue.js +1 -0
  191. package/lib/src/ap-drawer/components/ApDrawerClose.vue2.js +1 -0
  192. package/lib/src/ap-drawer/index.d.ts +2 -0
  193. package/lib/src/ap-drawer/index.js +1 -1
  194. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  195. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  196. package/lib/src/ap-field/hooks/use-date-timezone.js +1 -1
  197. package/lib/src/ap-field/number/index.vue.d.ts +2 -4
  198. package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
  199. package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
  200. package/lib/src/ap-field/select/index.vue.d.ts +3 -6
  201. package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
  202. package/lib/src/ap-field/text/index.vue2.js +1 -1
  203. package/lib/src/ap-field/text/password.vue.js +1 -1
  204. package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
  205. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  206. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  207. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  208. package/lib/src/ap-form/drawer-form/index.vue.d.ts +13 -7
  209. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  210. package/lib/src/ap-form/interface.d.ts +9 -5
  211. package/lib/src/ap-form/item/index.vue.d.ts +5 -10
  212. package/lib/src/ap-form/item/index.vue.js +1 -1
  213. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  214. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  215. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  216. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  217. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  218. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
  219. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  220. package/lib/src/ap-form/provider/index.vue.js +1 -1
  221. package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
  222. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  223. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -8
  224. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  225. package/lib/src/ap-form/set/index.vue.js +1 -1
  226. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  227. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  228. package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
  229. package/lib/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  230. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -1
  231. package/lib/src/ap-grid/hooks/use-render-columns.js +1 -1
  232. package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  233. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
  234. package/lib/src/ap-grid/hooks/use-table-style.d.ts +18 -0
  235. package/lib/src/ap-grid/hooks/use-table-style.js +1 -0
  236. package/lib/src/ap-grid/index.vue.js +1 -1
  237. package/lib/src/ap-grid/interface.d.ts +32 -3
  238. package/lib/src/ap-grid/utils/table.js +1 -1
  239. package/lib/src/ap-list/index.vue.d.ts +2 -9
  240. package/lib/src/ap-list/index.vue.js +1 -1
  241. package/lib/src/ap-list/interface.d.ts +24 -3
  242. package/lib/src/ap-modal/interface.d.ts +2 -1
  243. package/lib/src/ap-modal/utils/createModalStream.js +1 -1
  244. package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
  245. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  246. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  247. package/lib/src/ap-table/constants.d.ts +22 -22
  248. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +24 -5
  249. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  250. package/lib/src/ap-table/interface.d.ts +17 -4
  251. package/lib/src/ap-table/utils.d.ts +21 -21
  252. package/lib/src/business/ap-card/ApCard.vue.d.ts +2 -4
  253. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  254. package/lib/src/business/ap-card/index.d.ts +2 -4
  255. package/lib/src/business/ap-card/interface.d.ts +5 -0
  256. package/lib/src/business/ap-copy/ApCopy.d.ts +52 -0
  257. package/lib/src/business/ap-copy/ApCopy.js +1 -0
  258. package/lib/src/business/ap-copy/constans.d.ts +24 -0
  259. package/lib/src/business/ap-copy/constans.js +1 -0
  260. package/lib/src/business/ap-copy/index.d.ts +102 -0
  261. package/lib/src/business/ap-copy/index.js +1 -0
  262. package/lib/src/business/ap-copy/interface.d.ts +8 -0
  263. package/lib/src/business/ap-copy/interface.js +1 -0
  264. package/lib/src/business/ap-copy/style/css.cjs +1 -0
  265. package/lib/src/business/ap-copy/style/css.d.ts +0 -0
  266. package/lib/src/business/ap-copy/style/index.cjs +1 -0
  267. package/lib/src/business/ap-copy/style/index.d.ts +0 -0
  268. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  269. package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  270. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  271. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
  272. package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
  273. package/lib/src/business/ap-keep-alive/hook.js +1 -0
  274. package/lib/src/business/ap-keep-alive/index.d.ts +108 -0
  275. package/lib/src/business/ap-keep-alive/index.js +1 -0
  276. package/lib/src/business/ap-keep-alive/interface.d.ts +36 -0
  277. package/lib/src/business/ap-keep-alive/interface.js +1 -0
  278. package/lib/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
  279. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
  280. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  281. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
  282. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  283. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
  284. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  285. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
  286. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  287. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
  288. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  289. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
  290. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  291. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
  292. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  293. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
  294. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  295. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
  296. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  297. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
  298. package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  299. package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
  300. package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  301. package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
  302. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  303. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
  304. package/lib/src/business/ap-keep-alive/utils.d.ts +23 -0
  305. package/lib/src/business/ap-keep-alive/utils.js +1 -0
  306. package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
  307. package/lib/src/business/ap-label/interface.d.ts +2 -3
  308. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  309. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  310. package/lib/src/business/ap-product-info/constans.d.ts +4 -0
  311. package/lib/src/business/ap-product-info/constans.js +1 -1
  312. package/lib/src/business/ap-product-info/index.d.ts +15 -0
  313. package/lib/src/business/ap-product-info/interface.d.ts +1 -0
  314. package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
  315. package/lib/src/business/ap-radio-group/ap-radio-group.vue.js +1 -0
  316. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -0
  317. package/lib/src/business/ap-radio-group/index.d.ts +66 -0
  318. package/lib/src/business/ap-radio-group/index.js +1 -0
  319. package/lib/src/business/ap-radio-group/interface.d.ts +11 -0
  320. package/lib/src/business/ap-radio-group/interface.js +1 -0
  321. package/lib/src/business/ap-radio-group/style/css.cjs +1 -0
  322. package/lib/src/business/ap-radio-group/style/css.d.ts +0 -0
  323. package/lib/src/business/ap-radio-group/style/index.cjs +1 -0
  324. package/lib/src/business/ap-radio-group/style/index.d.ts +0 -0
  325. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  326. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  327. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  328. package/lib/src/business/ap-table-modal/index.d.ts +32 -5
  329. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  330. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  331. package/lib/src/business/ap-view/ap-view.vue.d.ts +4 -1
  332. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  333. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  334. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  335. package/lib/src/business/ap-view/index.d.ts +12 -3
  336. package/lib/src/business/ap-view/interface.d.ts +7 -0
  337. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  338. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  339. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  340. package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
  341. package/lib/src/business/index.d.ts +3 -0
  342. package/lib/src/business/index.js +1 -1
  343. package/lib/src/components.d.ts +1 -0
  344. package/lib/src/editable-table/form-item.vue.js +1 -1
  345. package/lib/src/full-screen/interface.d.ts +5 -6
  346. package/lib/src/index.js +1 -1
  347. package/lib/src/locale/lang/en.js +1 -1
  348. package/lib/src/locale/lang/zh-cn.js +1 -1
  349. package/lib/src/mask/index.vue.js +1 -1
  350. package/lib/src/path-map.js +1 -1
  351. package/lib/src/resize-observer/interface.d.ts +2 -3
  352. package/lib/src/scroll-bar/interface.d.ts +7 -7
  353. package/lib/src/scroll-view/interface.d.ts +2 -3
  354. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  355. package/lib/src/splitter/Splitter.vue2.js +1 -1
  356. package/lib/src/tests/mock-resize-observer.d.ts +2 -0
  357. package/lib/src/tests/mock-warning.d.ts +1 -0
  358. package/lib/src/tests/utils.d.ts +8 -0
  359. package/lib/src/text/group.vue.js +1 -1
  360. package/lib/src/text/index.vue.js +1 -1
  361. package/lib/src/version.d.ts +2 -0
  362. package/lib/src/version.js +1 -0
  363. package/lib/src/work-order-modal/createWorkOrder.d.ts +2 -1
  364. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  365. package/lib/src/work-order-modal/interfaces.d.ts +4 -0
  366. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  367. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  368. package/lib/test/setup.d.ts +5 -0
  369. package/package.json +18 -14
  370. package/theme/antd-global-overwrite/admin/alert.css +5 -18
  371. package/theme/antd-global-overwrite/admin/alert.less +25 -36
  372. package/theme/antd-global-overwrite/admin/button.css +13 -13
  373. package/theme/antd-global-overwrite/admin/button.less +24 -24
  374. package/theme/antd-global-overwrite/admin/drawer.css +3 -0
  375. package/theme/antd-global-overwrite/admin/drawer.less +5 -0
  376. package/theme/antd-global-overwrite/admin/field.css +42 -0
  377. package/theme/antd-global-overwrite/admin/field.less +43 -0
  378. package/theme/antd-global-overwrite/admin/index.css +93 -634
  379. package/theme/antd-global-overwrite/admin/index.less +1 -3
  380. package/theme/antd-global-overwrite/admin/message.css +2 -9
  381. package/theme/antd-global-overwrite/admin/message.less +2 -10
  382. package/theme/antd-global-overwrite/admin/modal.css +20 -37
  383. package/theme/antd-global-overwrite/admin/modal.less +20 -41
  384. package/theme/antd-global-overwrite/admin/table.css +11 -251
  385. package/theme/antd-global-overwrite/admin/table.less +4 -132
  386. package/theme/antd-global-overwrite/aplus/alert.css +8 -18
  387. package/theme/antd-global-overwrite/aplus/alert.less +27 -34
  388. package/theme/antd-global-overwrite/aplus/button.css +20 -20
  389. package/theme/antd-global-overwrite/aplus/button.less +24 -24
  390. package/theme/antd-global-overwrite/aplus/drawer.css +3 -0
  391. package/theme/antd-global-overwrite/aplus/drawer.less +5 -0
  392. package/theme/antd-global-overwrite/aplus/field.css +36 -0
  393. package/theme/antd-global-overwrite/aplus/field.less +36 -0
  394. package/theme/antd-global-overwrite/aplus/index.css +94 -683
  395. package/theme/antd-global-overwrite/aplus/index.less +0 -3
  396. package/theme/antd-global-overwrite/aplus/message.css +2 -9
  397. package/theme/antd-global-overwrite/aplus/message.less +2 -10
  398. package/theme/antd-global-overwrite/aplus/modal.css +19 -43
  399. package/theme/antd-global-overwrite/aplus/modal.less +20 -49
  400. package/theme/antd-global-overwrite/aplus/table.css +11 -236
  401. package/theme/antd-global-overwrite/aplus/table.less +4 -134
  402. package/theme/ap-action/item-dropdown.css +3 -3
  403. package/theme/ap-action/item.css +21 -10
  404. package/theme/ap-action/item.less +18 -6
  405. package/theme/ap-appendix/ap-appendix.css +10 -10
  406. package/theme/ap-appendix/ap-appendix.less +6 -6
  407. package/theme/ap-attachment/ap-attachment.css +4 -4
  408. package/theme/ap-batch-action/ap-batch-action.css +6 -6
  409. package/theme/ap-batch-action/ap-batch-action.less +3 -3
  410. package/theme/ap-button/ap-button.css +3 -3
  411. package/theme/ap-card/ap-card.css +4 -4
  412. package/theme/ap-card/ap-card.less +1 -1
  413. package/theme/ap-copy/ap-copy.css +96 -0
  414. package/theme/ap-copy/ap-copy.less +61 -0
  415. package/theme/ap-descriptions/ap-descriptions.css +9 -7
  416. package/theme/ap-descriptions/ap-descriptions.less +6 -4
  417. package/theme/ap-download/ap-download.css +6 -6
  418. package/theme/ap-drawer/ap-drawer.css +66 -0
  419. package/theme/ap-drawer/ap-drawer.less +27 -0
  420. package/theme/ap-expand-alert/ap-expand-alert.css +4 -3
  421. package/theme/ap-expand-alert/ap-expand-alert.less +2 -2
  422. package/theme/ap-field/checkbox.css +3 -3
  423. package/theme/ap-field/index.css +3 -3
  424. package/theme/ap-field/number.css +3 -3
  425. package/theme/ap-field/radio.css +3 -3
  426. package/theme/ap-field/text-area.css +3 -3
  427. package/theme/ap-form/ap-form-item-group.css +3 -3
  428. package/theme/ap-form/ap-form-item.css +11 -8
  429. package/theme/ap-form/ap-form-item.less +8 -5
  430. package/theme/ap-form/drawer-form.css +3 -3
  431. package/theme/ap-form/index.css +25 -20
  432. package/theme/ap-form/item-text-group.css +3 -3
  433. package/theme/ap-form/item-text.css +3 -3
  434. package/theme/ap-form/modal-form.css +3 -3
  435. package/theme/ap-form/search-form-sorter.css +14 -12
  436. package/theme/ap-form/search-form-sorter.less +7 -5
  437. package/theme/ap-form/search-form.css +25 -20
  438. package/theme/ap-form/search-form.less +3 -3
  439. package/theme/ap-grid/editable.css +3 -3
  440. package/theme/ap-grid/index.css +73 -40
  441. package/theme/ap-grid/index.less +26 -8
  442. package/theme/ap-group-search/ap-extension-select.css +3 -3
  443. package/theme/ap-group-search/ap-group-search.css +3 -3
  444. package/theme/ap-group-search/ap-popover-select.css +3 -3
  445. package/theme/ap-image/ap-image.css +3 -3
  446. package/theme/ap-input-radio/ap-input-radio.css +3 -3
  447. package/theme/ap-label/ap-label.css +3 -3
  448. package/theme/ap-ladder/ap-ladder.css +6 -6
  449. package/theme/ap-layout/ap-info-layout.css +3 -3
  450. package/theme/ap-list/index.css +3 -3
  451. package/theme/ap-product-info/ap-product-info.css +23 -33
  452. package/theme/ap-product-info/ap-product-info.less +28 -42
  453. package/theme/ap-radio-group/ap-radio-group.css +66 -0
  454. package/theme/ap-radio-group/ap-radio-group.less +26 -0
  455. package/theme/ap-select-layout/ap-select-layout.css +5 -5
  456. package/theme/ap-size-input/ap-size-input.css +3 -3
  457. package/theme/ap-status/ap-status.css +3 -3
  458. package/theme/ap-summary/index.css +3 -3
  459. package/theme/ap-table/ap-table-index.css +3 -3
  460. package/theme/ap-table/ap-table-paragraph-ellipsis.css +4 -4
  461. package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
  462. package/theme/ap-table/ap-table.css +80 -47
  463. package/theme/ap-table/ap-table.less +19 -7
  464. package/theme/ap-table/setting/index.css +18 -12
  465. package/theme/ap-table/setting/modal.css +10 -5
  466. package/theme/ap-table/setting/modal.less +6 -1
  467. package/theme/ap-table/setting/select-group.css +3 -3
  468. package/theme/ap-table/setting/sortable-item-meta.css +5 -5
  469. package/theme/ap-table/setting/sortable-item-meta.less +2 -2
  470. package/theme/ap-table/setting/sortable-item.css +3 -3
  471. package/theme/ap-table/setting/sorter.css +9 -8
  472. package/theme/ap-table/setting/sorter.less +4 -4
  473. package/theme/ap-table-modal/index.css +95 -60
  474. package/theme/ap-table-modal/index.less +15 -13
  475. package/theme/ap-tag/ap-tag-group.css +3 -3
  476. package/theme/ap-tag/ap-tag.css +7 -7
  477. package/theme/ap-tag/ap-tag.less +1 -1
  478. package/theme/ap-title/ap-title.css +3 -3
  479. package/theme/ap-upload/index.css +4 -4
  480. package/theme/ap-upload/multiple-file.css +3 -3
  481. package/theme/ap-upload/picture.css +3 -3
  482. package/theme/ap-upload/single-file.css +4 -4
  483. package/theme/ap-upload/upload.css +3 -3
  484. package/theme/ap-upload-single/index.css +7 -7
  485. package/theme/ap-upload-single/index.less +4 -4
  486. package/theme/ap-view/ap-view.css +10 -10
  487. package/theme/ap-view/ap-view.less +7 -7
  488. package/theme/batch-input-group/index.css +5 -5
  489. package/theme/batch-input-group/popover-input.css +5 -5
  490. package/theme/batch-input-group/popover-input.less +2 -2
  491. package/theme/check-card/index.css +11 -11
  492. package/theme/check-card/index.less +5 -5
  493. package/theme/editable-table/index.css +43 -27
  494. package/theme/full-screen/index.css +3 -3
  495. package/theme/index.css +350 -245
  496. package/theme/index.less +3 -0
  497. package/theme/mask/index.css +3 -3
  498. package/theme/mixins/config.less +3 -3
  499. package/theme/mixins/mixins.css +3 -3
  500. package/theme/mixins/mixins.less +2 -2
  501. package/theme/scroll-bar/index.css +3 -3
  502. package/theme/scroll-view/index.css +3 -3
  503. package/theme/splitter/index.css +7 -7
  504. package/theme/splitter/index.less +1 -1
  505. package/theme/text/group.css +3 -3
  506. package/theme/text/index.css +8 -8
  507. package/theme/text/index.less +4 -4
  508. package/theme/ui-mode.css +53 -83
  509. package/theme/ui-mode.less +103 -83
  510. package/theme/work-order-modal/index.css +3 -3
@@ -3,8 +3,9 @@ import { ApTablePaginationConfig, ApTableValueFields, ApTableValueTypes, CommonF
3
3
  import { Recordable } from '../type';
4
4
  import { TableProps } from '@aplus-frontend/antdv';
5
5
  import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
6
- import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
6
+ import { ComputedRef, CSSProperties, VNode } from 'vue';
7
7
  import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots, VxeColumnProps } from 'vxe-table';
8
+ import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
8
9
  export type ColConfigType = VxeTableDefines.ColumnOptions;
9
10
  export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth' | 'className' | 'class'> & {
10
11
  children?: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
@@ -134,9 +135,9 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
134
135
  card?: boolean;
135
136
  /**
136
137
  * request额外请求的参数
137
- * 如果传入响应式数据,将会在变更后重新执行
138
+ * 数据变化后将会重新发起网络请求
138
139
  */
139
- params?: ParamsType | Ref<ParamsType>;
140
+ params?: ParamsType;
140
141
  /**
141
142
  * 请求获取dataSource
142
143
  * @param params
@@ -239,6 +240,10 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
239
240
  * 作为表单项时内部传递,请勿使用
240
241
  */
241
242
  value?: any;
243
+ /**
244
+ * 行是否可以被高亮(传入函数可以获取当前被选中的行)
245
+ */
246
+ rowHighlightable?: boolean | ((current: RecordType) => void);
242
247
  };
243
248
  export type ApGridVirtualConfig = {
244
249
  x?: false | number;
@@ -289,6 +294,12 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
289
294
  */
290
295
  rowSelection: {
291
296
  selectedRows: ComputedRef<RecordType[]>;
297
+ /**
298
+ * 通过API调用设置行选中
299
+ * @param keys
300
+ * @returns
301
+ */
302
+ setSelectedRowKeys: (keys: (string | number)[]) => void;
292
303
  clearAll: () => void;
293
304
  };
294
305
  /**
@@ -303,4 +314,22 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
303
314
  * @returns
304
315
  */
305
316
  getDataSource: () => RecordType[];
317
+ /**
318
+ * 设置某一行被选中
319
+ * @param nextRow
320
+ * @returns
321
+ */
322
+ setCurrentRow: (nextRow: Partial<RecordType>) => void;
323
+ /**
324
+ * 获取分页参数
325
+ * @returns
326
+ */
327
+ getPaging: () => InternalPagingType;
328
+ /**
329
+ * 设置表格分页参数
330
+ * @param nextPaging 新的分页参数
331
+ * @param refreshImmediately 是否立刻刷新数据,默认为`true`
332
+ * @returns
333
+ */
334
+ setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
306
335
  };
@@ -1,10 +1,10 @@
1
- import { omit as u, isUndefined as l, isFunction as h, isNumber as m } from "lodash-unified";
1
+ import { omit as l, isUndefined as s, isFunction as h, isNumber as m } from "lodash-unified";
2
2
  import { isDef as w } from "../../utils/index.mjs";
3
- const y = 20, C = 50, b = (e) => e.some((t) => !!t.html);
3
+ const C = 20, b = 50, y = (e) => e.some((t) => !!t.html);
4
4
  function v(e) {
5
5
  var i;
6
6
  const t = {
7
- ...u(e, [
7
+ ...l(e, [
8
8
  "columns",
9
9
  "request",
10
10
  "searchForm",
@@ -16,8 +16,9 @@ function v(e) {
16
16
  };
17
17
  if (t.rowConfig = {
18
18
  isHover: !0,
19
- keyField: e.rowKey
20
- }, t.columnConfig = {}, b(e.columns || []) && (t.rowConfig.useKey = !0, t.columnConfig.useKey = !0), e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig.resizable = !0), e.rowSelection) {
19
+ keyField: e.rowKey,
20
+ isCurrent: !!e.rowHighlightable
21
+ }, t.columnConfig = {}, y(e.columns || []) && (t.rowConfig.useKey = !0, t.columnConfig.useKey = !0), e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig.resizable = !0), e.rowSelection) {
21
22
  const o = e.rowSelection === !0 ? {} : e.rowSelection;
22
23
  o.type === "radio" ? t.radioConfig = {
23
24
  highlight: !0,
@@ -28,7 +29,7 @@ function v(e) {
28
29
  return o.shown ? o.shown(r) : !0;
29
30
  },
30
31
  checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
31
- reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
32
+ reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
32
33
  } : t.checkboxConfig = {
33
34
  highlight: !0,
34
35
  checkMethod({ row: r }) {
@@ -37,12 +38,11 @@ function v(e) {
37
38
  visibleMethod({ row: r }) {
38
39
  return o.shown ? o.shown(r) : !0;
39
40
  },
40
- checkRowKeys: o.defaultSelectedRowKeys,
41
- reserve: l(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
41
+ reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
42
42
  range: o.range || !1
43
43
  };
44
44
  }
45
- return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = u(e.expandable, [
45
+ return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = l(e.expandable, [
46
46
  "renderContent",
47
47
  "width",
48
48
  "title"
@@ -50,22 +50,22 @@ function v(e) {
50
50
  enabled: !1
51
51
  }, t.virtualYConfig = {
52
52
  enabled: !1
53
- }) : (f(t, "X", e.virtual), f(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
53
+ }) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
54
54
  }
55
- function f(e, t, n) {
56
- const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o], a = d !== !1, s = i ? y : C, c = m(d) && d >= 0 ? d : s;
55
+ function a(e, t, n) {
56
+ const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", u = n == null ? void 0 : n[o], f = u !== !1, d = i ? C : b, c = m(u) && u >= 0 ? u : d;
57
57
  e[r] = {
58
- enabled: a,
58
+ enabled: f,
59
59
  gt: c,
60
60
  oSize: (n == null ? void 0 : n.oSize) || 0
61
61
  };
62
62
  }
63
- function x(e) {
63
+ function g(e) {
64
64
  return e === !0 ? "left" : e;
65
65
  }
66
66
  function K(e, t) {
67
67
  const n = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
68
- let o = e === !0 ? void 0 : x(e.fixed);
68
+ let o = e === !0 ? void 0 : g(e.fixed);
69
69
  return o || (o === !1 ? o = void 0 : o = t.some(
70
70
  (r) => r.fixed === "left" || r.fixed === !0
71
71
  ) ? "left" : void 0), {
@@ -1,17 +1,10 @@
1
- import { ApListProps } from './interface';
1
+ import { ApListExpose, ApListProps } from './interface';
2
2
  import { Recordable } from '../type';
3
3
  import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
4
4
  import { ApFormSearchFormExpose } from '..';
5
5
  declare const _default: <RecordType extends Recordable>(__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<{
6
6
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
7
- expose(exposed: ShallowUnwrapRef<{
8
- submit: () => void;
9
- reset: () => void;
10
- refresh: () => void;
11
- refreshByDelete: (n: number) => void;
12
- scrollToFirstRow: (selector?: string) => void;
13
- getSearchFormValuesIfSetted: (transform?: boolean) => Partial<any>;
14
- }>): void;
7
+ expose(exposed: ShallowUnwrapRef<ApListExpose>): void;
15
8
  attrs: any;
16
9
  slots: {
17
10
  header?(_: {
@@ -1,13 +1,14 @@
1
- import { defineComponent as X, ref as Y, unref as e, computed as p, watch as Z, createElementBlock as s, openBlock as i, normalizeStyle as v, normalizeClass as l, renderSlot as u, createElementVNode as _, createCommentVNode as I, createVNode as g, Fragment as E, createBlock as O, withCtx as h, renderList as x, mergeProps as ee } from "vue";
2
- import { Empty as V, Spin as te, Pagination as ae } from "@aplus-frontend/antdv";
3
- import { useTablePaging as ne } from "../ap-table/hooks/use-table-paging-ng.mjs";
1
+ import { defineComponent as _, ref as x, toRef as ee, unref as t, computed as p, watch as te, createElementBlock as s, openBlock as i, normalizeStyle as h, normalizeClass as l, renderSlot as u, createElementVNode as ae, createCommentVNode as I, createVNode as g, Fragment as F, createBlock as V, withCtx as b, renderList as ne, mergeProps as re } from "vue";
2
+ import { Empty as E, Spin as oe, Pagination as ie } from "@aplus-frontend/antdv";
3
+ import { useTablePaging as le } from "../ap-table/hooks/use-table-paging-ng.mjs";
4
4
  import "../config-provider/index.mjs";
5
- import { isUndefined as F, isNumber as re, omit as oe } from "lodash-unified";
6
- import { useOfflineList as ie } from "./hooks/use-offline-list.mjs";
5
+ import { isUndefined as L, isNumber as se, omit as ue } from "lodash-unified";
6
+ import { useOfflineList as ce } from "./hooks/use-offline-list.mjs";
7
7
  import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
8
- import { RecycleScroller as le, DynamicScroller as se, DynamicScrollerItem as ue } from "vue-virtual-scroller";
9
- import { useNamespace as ce } from "../config-provider/hooks/use-namespace.mjs";
10
- const be = /* @__PURE__ */ X({
8
+ import { RecycleScroller as me, DynamicScroller as de, DynamicScrollerItem as fe } from "vue-virtual-scroller";
9
+ import { useNamespace as pe } from "../config-provider/hooks/use-namespace.mjs";
10
+ const De = /* @__PURE__ */ _({
11
+ name: "ApList",
11
12
  __name: "index",
12
13
  props: {
13
14
  dataSource: {},
@@ -27,140 +28,149 @@ const be = /* @__PURE__ */ X({
27
28
  rowKey: {},
28
29
  adaptive: { type: Boolean, default: !1 }
29
30
  },
30
- setup(L, { expose: N }) {
31
- const R = V.PRESENTED_IMAGE_SIMPLE, n = L, { b: m, e: y, bm: T, m: $ } = ce("ap-list"), b = Y(), {
32
- formRef: k,
31
+ setup(O, { expose: R }) {
32
+ const N = E.PRESENTED_IMAGE_SIMPLE, r = O, { b: d, e: y, bm: T, m: $ } = pe("ap-list"), k = x(), {
33
+ formRef: S,
33
34
  submit: w,
34
35
  reset: B,
35
- handleTableChange: j,
36
- data: S,
37
- refresh: q,
38
- refreshByDelete: A,
39
- tableProps: D
40
- } = ne({
41
- async request(t) {
42
- var r;
43
- const a = await ((r = n.request) == null ? void 0 : r.call(n, t));
36
+ handleTableChange: A,
37
+ data: v,
38
+ refresh: j,
39
+ refreshByDelete: q,
40
+ tableProps: D,
41
+ getPaging: K,
42
+ setPaging: M
43
+ } = le({
44
+ async request(e) {
45
+ var n;
46
+ const a = await ((n = r.request) == null ? void 0 : n.call(r, e));
44
47
  return {
45
48
  data: (a == null ? void 0 : a.data) || [],
46
49
  total: (a == null ? void 0 : a.total) || 0
47
50
  };
48
51
  },
49
- defaultParams: n.params,
50
- defaultData: n.defaultData,
51
- manual: n.manual,
52
- pagination: n.pagination,
53
- formatParams: n.beforeSearchSubmit
54
- }), K = { form: k }, {
55
- pagination: z,
56
- dataSource: M,
57
- onChange: W
58
- } = ie(n);
59
- function G(t, a) {
60
- if (e(f)) {
61
- W(t, a);
52
+ params: ee(r, "params"),
53
+ defaultData: r.defaultData,
54
+ manual: r.manual,
55
+ pagination: r.pagination,
56
+ formatParams: r.beforeSearchSubmit
57
+ }), W = { form: S }, {
58
+ pagination: P,
59
+ dataSource: G,
60
+ onChange: U
61
+ } = ce(r);
62
+ function H(e, a) {
63
+ if (t(f)) {
64
+ U(e, a);
62
65
  return;
63
66
  }
64
- j(
65
- { current: t, pageSize: a },
67
+ A(
68
+ { current: e, pageSize: a },
66
69
  {},
67
70
  {},
68
71
  { currentDataSource: [], action: "paginate" }
69
72
  );
70
73
  }
71
- const c = p(() => e(f) ? e(M) : e(S).records), d = p(() => F(n.loading) ? e(S).loading : n.loading), U = p(() => {
72
- var t, a;
73
- return n.pagination === !1 || n.virtual ? !1 : ((t = n.pagination) == null ? void 0 : t.hideOnSinglePage) !== !0 ? !0 : e(f) ? (((a = n.dataSource) == null ? void 0 : a.length) || 0) > e(z).pageSize : e(S).total > e(D).pagination.pageSize;
74
- }), f = p(() => !F(n.dataSource));
75
- Z(
76
- () => e(d),
77
- (t) => {
74
+ const c = p(() => t(f) ? t(G) : t(v).records), m = p(() => L(r.loading) ? t(v).loading : r.loading), J = p(() => {
75
+ var e, a;
76
+ return r.pagination === !1 || r.virtual ? !1 : ((e = r.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(f) ? (((a = r.dataSource) == null ? void 0 : a.length) || 0) > t(P).pageSize : t(v).total > t(D).pagination.pageSize;
77
+ }), f = p(() => !L(r.dataSource));
78
+ te(
79
+ () => t(m),
80
+ (e) => {
78
81
  var a;
79
- (a = n.onLoadingChange) == null || a.call(n, t);
82
+ (a = r.onLoadingChange) == null || a.call(r, e);
80
83
  }
81
84
  );
82
- function H(t) {
83
- var a, r;
84
- (r = (a = b.value) == null ? void 0 : a.querySelector(t || ":first-child")) == null || r.scrollIntoView({ behavior: "smooth", block: "center" });
85
+ function Q(e) {
86
+ var a, n;
87
+ (n = (a = k.value) == null ? void 0 : a.querySelector(e || ":first-child")) == null || n.scrollIntoView({ behavior: "smooth", block: "center" });
85
88
  }
86
- function J(t = !1) {
89
+ function X(e = !1) {
87
90
  var o;
88
- const a = (o = k.value) == null ? void 0 : o.apForm, r = t ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
89
- return (r == null ? void 0 : r()) || {};
91
+ const a = (o = S.value) == null ? void 0 : o.apForm, n = e ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
92
+ return (n == null ? void 0 : n()) || {};
90
93
  }
91
- return N({
94
+ function Y(e) {
95
+ var a, n, o;
96
+ (o = (n = (a = S.value) == null ? void 0 : a.apForm) == null ? void 0 : n.setFieldsValue) == null || o.call(n, e);
97
+ }
98
+ return R({
92
99
  submit: () => w(),
93
100
  reset: () => B(),
94
- refresh: () => q(),
95
- refreshByDelete: (t) => A(t),
96
- scrollToFirstRow: H,
97
- getSearchFormValuesIfSetted: J
98
- }), (t, a) => (i(), s("div", {
99
- class: l([e(m)(), { [e($)("adaptive")]: t.adaptive }]),
100
- style: v(t.containerStyle)
101
+ refresh: () => j(),
102
+ refreshByDelete: (e) => q(e),
103
+ scrollToFirstRow: Q,
104
+ getSearchFormValuesIfSetted: X,
105
+ setPaging: M,
106
+ getPaging: K,
107
+ setSearchFormValuesIfSetted: Y
108
+ }), (e, a) => (i(), s("div", {
109
+ class: l([t(d)(), { [t($)("adaptive")]: e.adaptive }]),
110
+ style: h(e.containerStyle)
101
111
  }, [
102
- u(t.$slots, "header", {
103
- formIns: K,
104
- submit: e(w),
105
- reset: e(B)
112
+ u(e.$slots, "header", {
113
+ formIns: W,
114
+ submit: t(w),
115
+ reset: t(B)
106
116
  }),
107
- _("div", {
117
+ ae("div", {
108
118
  class: l([
109
- e(m)("content-container"),
110
- { [e(T)("content-container", "spinning")]: d.value }
119
+ t(d)("content-container"),
120
+ { [t(T)("content-container", "spinning")]: m.value }
111
121
  ])
112
122
  }, [
113
- d.value ? (i(), s("div", {
123
+ m.value ? (i(), s("div", {
114
124
  key: 0,
115
- class: l(e(y)("spin-wrapper"))
125
+ class: l(t(y)("spin-wrapper"))
116
126
  }, [
117
- g(e(te), { spinning: d.value }, null, 8, ["spinning"])
127
+ g(t(oe), { spinning: m.value }, null, 8, ["spinning"])
118
128
  ], 2)) : I("", !0),
119
- c.value.length === 0 ? u(t.$slots, "empty", {
129
+ c.value.length === 0 ? u(e.$slots, "empty", {
120
130
  key: 1,
121
- loading: d.value
131
+ loading: m.value
122
132
  }, () => [
123
- g(e(V), { image: e(R) }, null, 8, ["image"])
133
+ g(t(E), { image: t(N) }, null, 8, ["image"])
124
134
  ]) : (i(), s("div", {
125
135
  key: 2,
126
136
  ref_key: "contentRef",
127
- ref: b,
128
- style: v(t.contentStyle),
129
- class: l(e(y)("content"))
137
+ ref: k,
138
+ style: h(e.contentStyle),
139
+ class: l(t(y)("content"))
130
140
  }, [
131
- t.virtual ? (i(), s(E, { key: 0 }, [
132
- e(re)(t.virtual) ? (i(), O(e(le), {
141
+ e.virtual ? (i(), s(F, { key: 0 }, [
142
+ t(se)(e.virtual) ? (i(), V(t(me), {
133
143
  key: 0,
134
- class: l(e(m)("scroll-wrapper")),
144
+ class: l(t(d)("scroll-wrapper")),
135
145
  items: c.value,
136
- "item-size": t.virtual,
137
- "key-field": n.rowKey || "id"
146
+ "item-size": e.virtual,
147
+ "key-field": r.rowKey || "id"
138
148
  }, {
139
- default: h(({ item: r, index: o }) => [
140
- u(t.$slots, "renderItem", {
141
- item: r,
149
+ default: b(({ item: n, index: o }) => [
150
+ u(e.$slots, "renderItem", {
151
+ item: n,
142
152
  index: o
143
153
  })
144
154
  ]),
145
155
  _: 3
146
- }, 8, ["class", "items", "item-size", "key-field"])) : (i(), O(e(se), {
156
+ }, 8, ["class", "items", "item-size", "key-field"])) : (i(), V(t(de), {
147
157
  key: 1,
148
158
  items: c.value,
149
- "min-item-size": t.virtual.minItemSize,
150
- class: l(e(m)("scroll-wrapper"))
159
+ "min-item-size": e.virtual.minItemSize,
160
+ class: l(t(d)("scroll-wrapper"))
151
161
  }, {
152
- default: h(({ item: r, index: o, active: Q }) => {
153
- var C, P;
162
+ default: b(({ item: n, index: o, active: Z }) => {
163
+ var z, C;
154
164
  return [
155
- g(e(ue), {
156
- item: r,
157
- active: Q,
165
+ g(t(fe), {
166
+ item: n,
167
+ active: Z,
158
168
  "data-index": o,
159
- "size-dependencies": (P = (C = t.virtual).sizeDependencies) == null ? void 0 : P.call(C, r)
169
+ "size-dependencies": (C = (z = e.virtual).sizeDependencies) == null ? void 0 : C.call(z, n)
160
170
  }, {
161
- default: h(() => [
162
- u(t.$slots, "renderItem", {
163
- item: r,
171
+ default: b(() => [
172
+ u(e.$slots, "renderItem", {
173
+ item: n,
164
174
  index: o
165
175
  })
166
176
  ]),
@@ -170,30 +180,30 @@ const be = /* @__PURE__ */ X({
170
180
  }),
171
181
  _: 3
172
182
  }, 8, ["items", "min-item-size", "class"]))
173
- ], 64)) : u(t.$slots, "renderContent", {
183
+ ], 64)) : u(e.$slots, "renderContent", {
174
184
  key: 1,
175
185
  dataSource: c.value
176
186
  }, () => [
177
- (i(!0), s(E, null, x(c.value, (r, o) => u(t.$slots, "renderItem", {
178
- item: r,
187
+ (i(!0), s(F, null, ne(c.value, (n, o) => u(e.$slots, "renderItem", {
188
+ item: n,
179
189
  index: o
180
190
  })), 256))
181
191
  ])
182
192
  ], 6))
183
193
  ], 2),
184
- U.value ? (i(), s("div", {
194
+ J.value ? (i(), s("div", {
185
195
  key: 0,
186
- class: l(e(y)("footer")),
187
- style: v(t.footerWarpperStyle)
196
+ class: l(t(y)("footer")),
197
+ style: h(e.footerWarpperStyle)
188
198
  }, [
189
- g(e(ae), ee(
190
- f.value ? e(z) : e(oe)(e(D).pagination, ["showTotal"]),
191
- { onChange: G }
199
+ g(t(ie), re(
200
+ f.value ? t(P) : t(ue)(t(D).pagination, ["showTotal"]),
201
+ { onChange: H }
192
202
  ), null, 16)
193
203
  ], 6)) : I("", !0)
194
204
  ], 6));
195
205
  }
196
206
  });
197
207
  export {
198
- be as default
208
+ De as default
199
209
  };
@@ -1,6 +1,7 @@
1
- import { Ref, StyleValue } from 'vue';
1
+ import { StyleValue } from 'vue';
2
2
  import { RequestData } from '../ap-table';
3
3
  import { Recordable } from '../type';
4
+ import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
4
5
  export type ApListProps<RecordType = any, ParamsType = Recordable> = {
5
6
  /**
6
7
  * 列表数据源,传入后`request`和`defaultData`都将失效
@@ -16,9 +17,10 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
16
17
  */
17
18
  onItem?: (record: RecordType, index: number) => void;
18
19
  /**
19
- * 依赖的额外的参数,传入响应式参数会在变更后重新执行
20
+ * 依赖的额外的参数
21
+ * 变更后会重新发起网络请求
20
22
  */
21
- params?: ParamsType | Ref<ParamsType>;
23
+ params?: ParamsType;
22
24
  /**
23
25
  * 请求数据
24
26
  * @param params
@@ -126,4 +128,23 @@ export type ApListExpose = {
126
128
  * @returns
127
129
  */
128
130
  getSearchFormValuesIfSetted: (transform?: boolean) => Recordable;
131
+ /**
132
+ * 设置查询表单的值
133
+ * @description 只有在自定义查询表单并且绑定了formRef才能设置查询表单的值
134
+ * @param fields 将要设置的值
135
+ * @returns
136
+ */
137
+ setSearchFormValuesIfSetted: (fields: any) => void;
138
+ /**
139
+ * 获取分页参数
140
+ * @returns
141
+ */
142
+ getPaging: () => InternalPagingType;
143
+ /**
144
+ * 设置表格分页参数
145
+ * @param nextPaging 新的分页参数
146
+ * @param refreshImmediately 是否立刻刷新数据,默认为`true`
147
+ * @returns
148
+ */
149
+ setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
129
150
  };
@@ -134,9 +134,10 @@ export type CreateModalStreamProps<ModalType extends ModalStreamTypeKey = ModalS
134
134
  /**
135
135
  * 弹框属性
136
136
  * @param params 上一步弹框传递的参数
137
+ * @param next 下一步
137
138
  * @returns
138
139
  */
139
- props: (params: any) => Promise<ModalStreamType[ModalType]>;
140
+ props: (params: any, next: ModalStreamNextFunc<ModalType>) => Promise<ModalStreamType[ModalType]>;
140
141
  } : never;
141
142
  export type CreateModalStreamFunc<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = (streamList: CreateModalStreamProps<ModalType>[], firstModalId?: string) => void;
142
143
  export type ApModalType = keyof Omit<ModalStaticFunctions, 'warn'>;
@@ -2,24 +2,24 @@ import { isValid as L } from "@aplus-frontend/utils";
2
2
  import { createModal as P } from "./createModal.mjs";
3
3
  import { Modal as V } from "@aplus-frontend/antdv";
4
4
  import { ModalMessage as S } from "../enums/modalMessage.mjs";
5
- const G = (_, F) => {
5
+ const G = (u, F) => {
6
6
  var O;
7
- const l = F ?? (Array.isArray(_) ? (O = _[0]) == null ? void 0 : O.modalId : void 0), d = /* @__PURE__ */ new Map();
8
- let T, u, E = 1e3;
9
- const y = async ({
10
- modalId: a,
7
+ const y = F ?? (Array.isArray(u) ? (O = u[0]) == null ? void 0 : O.modalId : void 0), d = /* @__PURE__ */ new Map();
8
+ let T, _, E = 1e3;
9
+ const l = async ({
10
+ modalId: f,
11
11
  params: o,
12
12
  handleCurrentModal: t
13
13
  }) => {
14
14
  T = o;
15
- const w = _.find((n) => n.modalId === a);
15
+ const w = u.find((n) => n.modalId === f);
16
16
  let s = !1;
17
- if (u) {
18
- const n = d.get(u), i = {
17
+ if (_) {
18
+ const n = d.get(_), i = {
19
19
  ...n,
20
20
  destroy: () => {
21
- var f;
22
- (f = n == null ? void 0 : n.destroy) == null || f.call(n), d.delete(u);
21
+ var a;
22
+ (a = n == null ? void 0 : n.destroy) == null || a.call(n), d.delete(_);
23
23
  },
24
24
  open: () => {
25
25
  s = !0;
@@ -31,22 +31,22 @@ const G = (_, F) => {
31
31
  k(w);
32
32
  }), s;
33
33
  }, I = () => {
34
- var a;
34
+ var f;
35
35
  for (const [o, t] of d)
36
- (a = t == null ? void 0 : t.destroy) == null || a.call(t);
37
- }, k = async (a) => {
36
+ (f = t == null ? void 0 : t.destroy) == null || f.call(t);
37
+ }, k = async (f) => {
38
38
  var g, A, C, z;
39
39
  const {
40
40
  modalId: o,
41
41
  modalType: t = "createModal",
42
42
  props: w
43
- } = a;
44
- u = o;
45
- const s = d.get(o), n = await (w == null ? void 0 : w(T));
43
+ } = f;
44
+ _ = o;
45
+ const s = d.get(o), n = await (w == null ? void 0 : w(T, async (e) => (a = !0, await l(e))));
46
46
  E = Math.max((n == null ? void 0 : n.zIndex) ?? 0, E), E += 1;
47
- let i, f = !1;
47
+ let i, a = !1;
48
48
  if (t === "createModal") {
49
- const e = n, m = async (r) => (f = !0, await y(r));
49
+ const e = n, m = async (r) => (a = !0, await l(r));
50
50
  i = {
51
51
  ...e,
52
52
  destroyOnClose: !1,
@@ -54,31 +54,31 @@ const G = (_, F) => {
54
54
  onOk: async (r) => {
55
55
  var N;
56
56
  const c = await ((N = e == null ? void 0 : e.onOk) == null ? void 0 : N.call(e, r, m));
57
- if (f || I(), c)
57
+ if (a || I(), c)
58
58
  throw new Error(S.NOT_NEED_CLOSE);
59
59
  },
60
60
  onCancel: async (r) => {
61
61
  var N;
62
62
  const c = await ((N = e == null ? void 0 : e.onCancel) == null ? void 0 : N.call(e, r, m));
63
- if (f || I(), c)
63
+ if (a || I(), c)
64
64
  throw new Error(S.NOT_NEED_CLOSE);
65
65
  }
66
66
  };
67
67
  } else {
68
- const e = n, m = async (r) => (f = !0, await y(r));
68
+ const e = n, m = async (r) => (a = !0, await l(r));
69
69
  i = {
70
70
  ...e,
71
71
  zIndex: E,
72
72
  onOk: async () => {
73
73
  var c;
74
74
  const r = await ((c = e == null ? void 0 : e.onOk) == null ? void 0 : c.call(e, m));
75
- if (f || I(), r)
75
+ if (a || I(), r)
76
76
  throw new Error(S.NOT_NEED_CLOSE);
77
77
  },
78
78
  onCancel: async () => {
79
79
  var c;
80
80
  const r = await ((c = e == null ? void 0 : e.onCancel) == null ? void 0 : c.call(e, m));
81
- if (f || I(), r)
81
+ if (a || I(), r)
82
82
  throw new Error(S.NOT_NEED_CLOSE);
83
83
  }
84
84
  };
@@ -91,7 +91,7 @@ const G = (_, F) => {
91
91
  (A = e == null ? void 0 : e.open) == null || A.call(e), d.set(o, e);
92
92
  } else
93
93
  (z = (C = V) == null ? void 0 : C[t]) == null || z.call(C, i);
94
- }, D = _.find((a) => L(l) && a.modalId === l);
94
+ }, D = u.find((f) => L(y) && f.modalId === y);
95
95
  D !== void 0 && k(D);
96
96
  };
97
97
  export {