@aplus-frontend/ui 0.3.8 → 0.3.10

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 (244) hide show
  1. package/es/src/ap-action/item/index.vue.d.ts +2 -1
  2. package/es/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
  3. package/es/src/ap-action/item-modal/index.vue.d.ts +2 -1
  4. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
  5. package/es/src/ap-button/ap-action-button.vue.d.ts +4 -3
  6. package/es/src/ap-button/ap-action-button.vue.mjs +11 -11
  7. package/es/src/ap-button/ap-button.vue.d.ts +4 -3
  8. package/es/src/ap-button/ap-button.vue.mjs +36 -36
  9. package/es/src/ap-button/interface.d.ts +4 -0
  10. package/es/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
  11. package/es/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
  12. package/es/src/ap-download/ap-download.vue.d.ts +5 -3
  13. package/es/src/ap-field/date/index.vue.d.ts +2 -1
  14. package/es/src/ap-field/date-range/index.vue.d.ts +2 -1
  15. package/es/src/ap-field/number/index.vue.d.ts +2 -1
  16. package/es/src/ap-field/rate/index.vue.d.ts +2 -1
  17. package/es/src/ap-field/segmented/index.vue.d.ts +2 -1
  18. package/es/src/ap-field/select/index.vue.d.ts +2 -1
  19. package/es/src/ap-field/slider/index.vue.d.ts +2 -1
  20. package/es/src/ap-field/switch/index.vue.d.ts +2 -1
  21. package/es/src/ap-field/text/index.vue.d.ts +2 -1
  22. package/es/src/ap-field/text/password.vue.d.ts +2 -1
  23. package/es/src/ap-form/ap-form.vue.d.ts +6 -4
  24. package/es/src/ap-form/dependency/index.vue.d.ts +2 -1
  25. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -2
  26. package/es/src/ap-form/item/index.vue.d.ts +2 -1
  27. package/es/src/ap-form/item-group/index.vue.d.ts +2 -1
  28. package/es/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
  29. package/es/src/ap-form/items/date/index.vue.d.ts +2 -1
  30. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -1
  31. package/es/src/ap-form/items/number/index.vue.d.ts +2 -1
  32. package/es/src/ap-form/items/radio/index.vue.d.ts +2 -1
  33. package/es/src/ap-form/items/select/index.vue.d.ts +2 -1
  34. package/es/src/ap-form/items/switch/index.vue.d.ts +2 -1
  35. package/es/src/ap-form/items/text/group.vue.d.ts +2 -1
  36. package/es/src/ap-form/items/text/index.vue.d.ts +2 -1
  37. package/es/src/ap-form/items/text/password.vue.d.ts +2 -1
  38. package/es/src/ap-form/items/text-area/index.vue.d.ts +2 -1
  39. package/es/src/ap-form/list/index.vue.d.ts +2 -1
  40. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -2
  41. package/es/src/ap-form/modal-form/index.vue.mjs +61 -57
  42. package/es/src/ap-form/render/control.vue.d.ts +2 -1
  43. package/es/src/ap-form/render/item.vue.d.ts +2 -1
  44. package/es/src/ap-form/search-form/index.vue.d.ts +3 -2
  45. package/es/src/ap-form/set/index.vue.d.ts +2 -1
  46. package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
  47. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +3 -2
  48. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
  49. package/es/src/ap-list/index.vue.d.ts +3 -5
  50. package/es/src/ap-list/index.vue.mjs +37 -39
  51. package/es/src/ap-list/interface.d.ts +3 -3
  52. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +1 -1
  53. package/es/src/ap-scroll-bar/index.d.ts +1 -1
  54. package/es/src/ap-table/ap-table.vue.d.ts +3 -5
  55. package/es/src/ap-table/ap-table.vue2.mjs +75 -78
  56. package/es/src/ap-table/components/index/index.vue.d.ts +1 -1
  57. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
  58. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
  59. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
  60. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
  61. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
  62. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
  63. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  64. package/es/src/ap-table/constants.d.ts +1 -1
  65. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  66. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
  67. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +209 -0
  68. package/es/src/ap-table/hooks/use-table-paging.d.ts +13 -3
  69. package/es/src/ap-table/hooks/use-table-paging.mjs +131 -126
  70. package/es/src/ap-table/interface.d.ts +4 -3
  71. package/es/src/ap-table/utils.d.ts +1 -0
  72. package/es/src/ap-table/utils.mjs +10 -5
  73. package/es/src/ap-tag/ap-tag-group.vue.d.ts +2 -1
  74. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -1
  75. package/es/src/ap-upload/apUpload.vue.d.ts +3 -2
  76. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  77. package/es/src/ap-upload/components/Picture.vue.d.ts +5 -9
  78. package/es/src/ap-upload/components/SingleFile.vue.d.ts +1 -1
  79. package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
  80. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
  81. package/es/src/business/ap-appendix/index.d.ts +1 -1
  82. package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -2
  83. package/es/src/business/ap-batch-action/index.d.ts +1 -1
  84. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
  85. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
  86. package/es/src/business/ap-batch-action-group/index.d.ts +887 -5
  87. package/es/src/business/ap-card/ApCard.vue.d.ts +3 -2
  88. package/es/src/business/ap-card/index.d.ts +1 -1
  89. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -5
  90. package/es/src/business/ap-expand-alert/index.d.ts +4 -6
  91. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -2
  92. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +8 -346
  93. package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
  94. package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
  95. package/es/src/business/ap-group-search/index.d.ts +3 -3
  96. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +8 -346
  97. package/es/src/business/ap-image/ApImage.vue.d.ts +2 -1
  98. package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
  99. package/es/src/business/ap-input-radio/index.d.ts +1 -1
  100. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +3 -2
  101. package/es/src/business/ap-ladder/index.d.ts +1 -1
  102. package/es/src/business/ap-select-layout/index.d.ts +3 -4
  103. package/es/src/business/ap-select-layout/interface.d.ts +1 -0
  104. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +3 -5
  105. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +58 -56
  106. package/es/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
  107. package/es/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
  108. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +3 -2
  109. package/es/src/business/ap-title/ApTitle.vue.d.ts +3 -2
  110. package/es/src/business/ap-title/index.d.ts +1 -1
  111. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
  112. package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
  113. package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
  114. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  115. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +1 -1
  116. package/es/src/check-card/group.vue.d.ts +2 -1
  117. package/es/src/check-card/index.vue.d.ts +3 -2
  118. package/es/src/editable-table/form-item.vue.d.ts +3 -5
  119. package/es/src/editable-table/index.vue.d.ts +3 -5
  120. package/es/src/tests/wrapper.d.ts +4 -4
  121. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  122. package/lib/src/ap-action/item/index.vue.d.ts +2 -1
  123. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
  124. package/lib/src/ap-action/item-modal/index.vue.d.ts +2 -1
  125. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
  126. package/lib/src/ap-button/ap-action-button.vue.d.ts +4 -3
  127. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  128. package/lib/src/ap-button/ap-button.vue.d.ts +4 -3
  129. package/lib/src/ap-button/ap-button.vue.js +1 -1
  130. package/lib/src/ap-button/interface.d.ts +4 -0
  131. package/lib/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
  132. package/lib/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
  133. package/lib/src/ap-download/ap-download.vue.d.ts +5 -3
  134. package/lib/src/ap-field/date/index.vue.d.ts +2 -1
  135. package/lib/src/ap-field/date-range/index.vue.d.ts +2 -1
  136. package/lib/src/ap-field/number/index.vue.d.ts +2 -1
  137. package/lib/src/ap-field/rate/index.vue.d.ts +2 -1
  138. package/lib/src/ap-field/segmented/index.vue.d.ts +2 -1
  139. package/lib/src/ap-field/select/index.vue.d.ts +2 -1
  140. package/lib/src/ap-field/slider/index.vue.d.ts +2 -1
  141. package/lib/src/ap-field/switch/index.vue.d.ts +2 -1
  142. package/lib/src/ap-field/text/index.vue.d.ts +2 -1
  143. package/lib/src/ap-field/text/password.vue.d.ts +2 -1
  144. package/lib/src/ap-form/ap-form.vue.d.ts +6 -4
  145. package/lib/src/ap-form/dependency/index.vue.d.ts +2 -1
  146. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -2
  147. package/lib/src/ap-form/item/index.vue.d.ts +2 -1
  148. package/lib/src/ap-form/item-group/index.vue.d.ts +2 -1
  149. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
  150. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -1
  151. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -1
  152. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -1
  153. package/lib/src/ap-form/items/radio/index.vue.d.ts +2 -1
  154. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -1
  155. package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -1
  156. package/lib/src/ap-form/items/text/group.vue.d.ts +2 -1
  157. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -1
  158. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -1
  159. package/lib/src/ap-form/items/text-area/index.vue.d.ts +2 -1
  160. package/lib/src/ap-form/list/index.vue.d.ts +2 -1
  161. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -2
  162. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  163. package/lib/src/ap-form/render/control.vue.d.ts +2 -1
  164. package/lib/src/ap-form/render/item.vue.d.ts +2 -1
  165. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -2
  166. package/lib/src/ap-form/set/index.vue.d.ts +2 -1
  167. package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
  168. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +3 -2
  169. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
  170. package/lib/src/ap-list/index.vue.d.ts +3 -5
  171. package/lib/src/ap-list/index.vue.js +1 -1
  172. package/lib/src/ap-list/interface.d.ts +3 -3
  173. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +1 -1
  174. package/lib/src/ap-scroll-bar/index.d.ts +1 -1
  175. package/lib/src/ap-table/ap-table.vue.d.ts +3 -5
  176. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  177. package/lib/src/ap-table/components/index/index.vue.d.ts +1 -1
  178. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
  179. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
  180. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
  181. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
  182. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
  183. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
  184. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  185. package/lib/src/ap-table/constants.d.ts +1 -1
  186. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  187. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
  188. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -0
  189. package/lib/src/ap-table/hooks/use-table-paging.d.ts +13 -3
  190. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  191. package/lib/src/ap-table/interface.d.ts +4 -3
  192. package/lib/src/ap-table/utils.d.ts +1 -0
  193. package/lib/src/ap-table/utils.js +1 -1
  194. package/lib/src/ap-tag/ap-tag-group.vue.d.ts +2 -1
  195. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -1
  196. package/lib/src/ap-upload/apUpload.vue.d.ts +3 -2
  197. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  198. package/lib/src/ap-upload/components/Picture.vue.d.ts +5 -9
  199. package/lib/src/ap-upload/components/SingleFile.vue.d.ts +1 -1
  200. package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
  201. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
  202. package/lib/src/business/ap-appendix/index.d.ts +1 -1
  203. package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -2
  204. package/lib/src/business/ap-batch-action/index.d.ts +1 -1
  205. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
  206. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
  207. package/lib/src/business/ap-batch-action-group/index.d.ts +887 -5
  208. package/lib/src/business/ap-card/ApCard.vue.d.ts +3 -2
  209. package/lib/src/business/ap-card/index.d.ts +1 -1
  210. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -5
  211. package/lib/src/business/ap-expand-alert/index.d.ts +4 -6
  212. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -2
  213. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +8 -346
  214. package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
  215. package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
  216. package/lib/src/business/ap-group-search/index.d.ts +3 -3
  217. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +8 -346
  218. package/lib/src/business/ap-image/ApImage.vue.d.ts +2 -1
  219. package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
  220. package/lib/src/business/ap-input-radio/index.d.ts +1 -1
  221. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +3 -2
  222. package/lib/src/business/ap-ladder/index.d.ts +1 -1
  223. package/lib/src/business/ap-select-layout/index.d.ts +3 -4
  224. package/lib/src/business/ap-select-layout/interface.d.ts +1 -0
  225. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +3 -5
  226. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  227. package/lib/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
  228. package/lib/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
  229. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +3 -2
  230. package/lib/src/business/ap-title/ApTitle.vue.d.ts +3 -2
  231. package/lib/src/business/ap-title/index.d.ts +1 -1
  232. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
  233. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
  234. package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
  235. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  236. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +1 -1
  237. package/lib/src/check-card/group.vue.d.ts +2 -1
  238. package/lib/src/check-card/index.vue.d.ts +3 -2
  239. package/lib/src/editable-table/form-item.vue.d.ts +3 -5
  240. package/lib/src/editable-table/index.vue.d.ts +3 -5
  241. package/lib/src/tests/wrapper.d.ts +4 -4
  242. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  243. package/package.json +1 -1
  244. package/index.ts +0 -19
@@ -1,13 +1,14 @@
1
1
  import { ApFormSetProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
4
5
  slots: Readonly<{
5
6
  default: any;
6
7
  }> & {
7
8
  default: any;
8
9
  };
9
10
  refs: {};
10
- attrs: Partial<{}>;
11
+ rootEl: any;
11
12
  };
12
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
14
  declare const __VLS_component: DefineComponent<ApFormSetProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormSetProps> & Readonly<{}>, {
@@ -1,6 +1,7 @@
1
1
  import { ApInfoLayoutPropsMixed } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
4
5
  slots: Readonly<{
5
6
  [key: string]: any;
6
7
  /**
@@ -59,10 +60,10 @@ declare function __VLS_template(): {
59
60
  content(): any;
60
61
  };
61
62
  refs: {};
62
- attrs: Partial<{}>;
63
+ rootEl: HTMLDivElement;
63
64
  };
64
65
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
65
- declare const __VLS_component: DefineComponent<ApInfoLayoutPropsMixed, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutPropsMixed> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
66
+ declare const __VLS_component: DefineComponent<ApInfoLayoutPropsMixed, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutPropsMixed> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
66
67
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
67
68
  export default _default;
68
69
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  import { ApInfoLayoutAdminProps } from '../interface';
3
3
  declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
4
5
  slots: {
5
6
  header?(_: {}): any;
6
7
  default?(_: {}): any;
@@ -9,13 +10,13 @@ declare function __VLS_template(): {
9
10
  containerRef: HTMLDivElement;
10
11
  headerRef: HTMLDivElement;
11
12
  };
12
- attrs: Partial<{}>;
13
+ rootEl: HTMLDivElement;
13
14
  };
14
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
16
  declare const __VLS_component: DefineComponent<ApInfoLayoutAdminProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutAdminProps> & Readonly<{}>, {
16
17
  bordered: boolean;
17
18
  headerStyle: CSSProperties;
18
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
19
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
19
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
21
  export default _default;
21
22
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,6 +1,7 @@
1
1
  import { ApInfoLayoutAplusProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
4
5
  slots: {
5
6
  header?(_: {}): any;
6
7
  title?(_: {}): any;
@@ -9,7 +10,7 @@ declare function __VLS_template(): {
9
10
  content?(_: {}): any;
10
11
  };
11
12
  refs: {};
12
- attrs: Partial<{}>;
13
+ rootEl: HTMLDivElement;
13
14
  };
14
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
16
  declare const __VLS_component: DefineComponent<ApInfoLayoutAplusProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -19,7 +20,7 @@ declare const __VLS_component: DefineComponent<ApInfoLayoutAplusProps, {}, {}, {
19
20
  }>, {
20
21
  toEl: string | HTMLElement;
21
22
  telDisabled: boolean;
22
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
23
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
23
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
25
  export default _default;
25
26
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,9 +1,9 @@
1
1
  import { ApListProps } from './interface';
2
2
  import { Recordable } from '../type';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
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
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType>> & PublicProps;
6
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & Partial<{}> & ApListProps<RecordType>> & PublicProps;
7
7
  expose(exposed: ShallowUnwrapRef<{
8
8
  submit: () => void;
9
9
  reset: () => void;
@@ -41,9 +41,7 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
41
41
  }): any;
42
42
  };
43
43
  emit: {};
44
- }>) => VNode<RendererNode, RendererElement, {
45
- [key: string]: any;
46
- }> & {
44
+ }>) => VNode & {
47
45
  __ctx?: Awaited<typeof __VLS_setup>;
48
46
  };
49
47
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv");require("../ap-table/index.js");require("../config-provider/index.js");const c=require("lodash-unified"),R=require("./hooks/use-offline-list.js");require("vue-virtual-scroller/dist/vue-virtual-scroller.css");const m=require("vue-virtual-scroller"),$=require("../config-provider/hooks/use-namespace.js"),j=require("../ap-table/hooks/use-table-paging.js"),A=e.defineComponent({__name:"index",props:{dataSource:{},loading:{type:Boolean,default:void 0},onItem:{},params:{},request:{},defaultData:{},onLoadingChange:{},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},manual:{type:Boolean},containerStyle:{type:[Boolean,null,String,Object,Array]},contentStyle:{type:[Boolean,null,String,Object,Array]},footerWarpperStyle:{type:[Boolean,null,String,Object,Array]},virtual:{default:void 0},rowKey:{}},setup(b,{expose:C}){const z=s.Empty.PRESENTED_IMAGE_SIMPLE,r=b,{b:i,e:P}=$.useNamespace("ap-list"),g=e.ref(),{formRef:p,submit:S,reset:y,handleTableChange:q,data:d,refresh:w,refreshByDelete:D,tableProps:v}=j.useTablePaging({async request(t){var a;const n=await((a=r.request)==null?void 0:a.call(r,t));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},defaultParams:r.params,defaultData:r.defaultData,manual:r.manual,defaultCurrent:r.pagination?r.pagination.defaultCurrent:void 0,defaultPageSize:r.pagination?r.pagination.defaultPageSize:void 0,formatParams:r.beforeSearchSubmit}),E={form:p},{pagination:h,dataSource:V,onChange:I}=R.useOfflineList(r);function N(t,n){if(e.unref(u)){I(t,n);return}q({current:t,pageSize:n},{},{},{currentDataSource:[],action:"paginate"})}const l=e.computed(()=>e.unref(u)?e.unref(V):e.unref(d).records),f=e.computed(()=>c.isUndefined(r.loading)?e.unref(d).loading:r.loading),O=e.computed(()=>{var t,n;return r.pagination===!1||r.virtual?!1:((t=r.pagination)==null?void 0:t.hideOnSinglePage)!==!0?!0:e.unref(u)?(((n=r.dataSource)==null?void 0:n.length)||0)>e.unref(h).pageSize:e.unref(d).total>e.unref(v).pagination.pageSize}),u=e.computed(()=>!c.isUndefined(r.dataSource));e.watch(()=>e.unref(f),t=>{var n;(n=r.onLoadingChange)==null||n.call(r,t)});function T(t){var n,a;(a=(n=g.value)==null?void 0:n.querySelector(t||":first-child"))==null||a.scrollIntoView({behavior:"smooth",block:"center"})}function F(t=!1){var o;const n=(o=p.value)==null?void 0:o.apForm,a=t?n==null?void 0:n.getFieldsValueTransformed:n==null?void 0:n.getFieldsValue;return(a==null?void 0:a())||{}}return C({submit:()=>S(),reset:()=>y(),refresh:()=>w(),refreshByDelete:t=>D(t),scrollToFirstRow:T,getSearchFormValuesIfSetted:F}),(t,n)=>(e.openBlock(),e.createBlock(e.unref(s.Spin),{spinning:f.value,class:e.normalizeClass(e.unref(i)("spin"))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)()),style:e.normalizeStyle(t.containerStyle)},[e.renderSlot(t.$slots,"header",{formIns:E,submit:e.unref(S),reset:e.unref(y)}),l.value.length===0?e.renderSlot(t.$slots,"empty",{key:0,loading:f.value},()=>[e.createVNode(e.unref(s.Empty),{image:e.unref(z)},null,8,["image"])]):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"contentRef",ref:g,style:e.normalizeStyle(t.contentStyle)},[t.virtual?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(c.isNumber)(t.virtual)?(e.openBlock(),e.createBlock(e.unref(m.RecycleScroller),{key:0,class:e.normalizeClass(e.unref(i)("scroll-wrapper")),items:l.value,"item-size":t.virtual,"key-field":r.rowKey||"id"},{default:e.withCtx(({item:a,index:o})=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:3},8,["class","items","item-size","key-field"])):(e.openBlock(),e.createBlock(e.unref(m.DynamicScroller),{key:1,items:l.value,"min-item-size":t.virtual.minItemSize,class:e.normalizeClass(e.unref(i)("scroll-wrapper"))},{default:e.withCtx(({item:a,index:o,active:L})=>{var k,B;return[e.createVNode(e.unref(m.DynamicScrollerItem),{item:a,active:L,"data-index":o,"size-dependencies":(B=(k=t.virtual).sizeDependencies)==null?void 0:B.call(k,a)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:2},1032,["item","active","data-index","size-dependencies"])]}),_:3},8,["items","min-item-size","class"]))],64)):e.renderSlot(t.$slots,"renderContent",{key:1,dataSource:l.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(a,o)=>e.renderSlot(t.$slots,"renderItem",{item:a,index:o})),256))])],4)),O.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(P)("footer")),style:e.normalizeStyle(t.footerWarpperStyle)},[e.createVNode(e.unref(s.Pagination),e.mergeProps(u.value?e.unref(h):e.unref(c.omit)(e.unref(v).pagination,["showTotal"]),{onChange:N}),null,16)],6)):e.createCommentVNode("",!0)],6)]),_:3},8,["spinning","class"]))}});exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv"),R=require("../ap-table/hooks/use-table-paging-ng.js");require("../config-provider/index.js");const c=require("lodash-unified"),$=require("./hooks/use-offline-list.js");require("vue-virtual-scroller/dist/vue-virtual-scroller.css");const m=require("vue-virtual-scroller"),j=require("../config-provider/hooks/use-namespace.js"),A=e.defineComponent({__name:"index",props:{dataSource:{},loading:{type:Boolean,default:void 0},onItem:{},params:{},request:{},defaultData:{},onLoadingChange:{},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},manual:{type:Boolean},containerStyle:{type:[Boolean,null,String,Object,Array]},contentStyle:{type:[Boolean,null,String,Object,Array]},footerWarpperStyle:{type:[Boolean,null,String,Object,Array]},virtual:{default:void 0},rowKey:{}},setup(b,{expose:C}){const z=s.Empty.PRESENTED_IMAGE_SIMPLE,r=b,{b:i,e:w}=j.useNamespace("ap-list"),g=e.ref(),{formRef:p,submit:S,reset:y,handleTableChange:q,data:f,refresh:P,refreshByDelete:D,tableProps:h}=R.useTablePaging({async request(t){var a;const n=await((a=r.request)==null?void 0:a.call(r,t));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},defaultParams:r.params,defaultData:r.defaultData,manual:r.manual,pagination:r.pagination,formatParams:r.beforeSearchSubmit}),E={form:p},{pagination:v,dataSource:N,onChange:V}=$.useOfflineList(r);function I(t,n){if(e.unref(u)){V(t,n);return}q({current:t,pageSize:n},{},{},{currentDataSource:[],action:"paginate"})}const l=e.computed(()=>e.unref(u)?e.unref(N):e.unref(f).records),d=e.computed(()=>c.isUndefined(r.loading)?e.unref(f).loading:r.loading),O=e.computed(()=>{var t,n;return r.pagination===!1||r.virtual?!1:((t=r.pagination)==null?void 0:t.hideOnSinglePage)!==!0?!0:e.unref(u)?(((n=r.dataSource)==null?void 0:n.length)||0)>e.unref(v).pageSize:e.unref(f).total>e.unref(h).pagination.pageSize}),u=e.computed(()=>!c.isUndefined(r.dataSource));e.watch(()=>e.unref(d),t=>{var n;(n=r.onLoadingChange)==null||n.call(r,t)});function T(t){var n,a;(a=(n=g.value)==null?void 0:n.querySelector(t||":first-child"))==null||a.scrollIntoView({behavior:"smooth",block:"center"})}function F(t=!1){var o;const n=(o=p.value)==null?void 0:o.apForm,a=t?n==null?void 0:n.getFieldsValueTransformed:n==null?void 0:n.getFieldsValue;return(a==null?void 0:a())||{}}return C({submit:()=>S(),reset:()=>y(),refresh:()=>P(),refreshByDelete:t=>D(t),scrollToFirstRow:T,getSearchFormValuesIfSetted:F}),(t,n)=>(e.openBlock(),e.createBlock(e.unref(s.Spin),{spinning:d.value,class:e.normalizeClass(e.unref(i)("spin"))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)()),style:e.normalizeStyle(t.containerStyle)},[e.renderSlot(t.$slots,"header",{formIns:E,submit:e.unref(S),reset:e.unref(y)}),l.value.length===0?e.renderSlot(t.$slots,"empty",{key:0,loading:d.value},()=>[e.createVNode(e.unref(s.Empty),{image:e.unref(z)},null,8,["image"])]):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"contentRef",ref:g,style:e.normalizeStyle(t.contentStyle)},[t.virtual?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(c.isNumber)(t.virtual)?(e.openBlock(),e.createBlock(e.unref(m.RecycleScroller),{key:0,class:e.normalizeClass(e.unref(i)("scroll-wrapper")),items:l.value,"item-size":t.virtual,"key-field":r.rowKey||"id"},{default:e.withCtx(({item:a,index:o})=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:3},8,["class","items","item-size","key-field"])):(e.openBlock(),e.createBlock(e.unref(m.DynamicScroller),{key:1,items:l.value,"min-item-size":t.virtual.minItemSize,class:e.normalizeClass(e.unref(i)("scroll-wrapper"))},{default:e.withCtx(({item:a,index:o,active:L})=>{var k,B;return[e.createVNode(e.unref(m.DynamicScrollerItem),{item:a,active:L,"data-index":o,"size-dependencies":(B=(k=t.virtual).sizeDependencies)==null?void 0:B.call(k,a)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:2},1032,["item","active","data-index","size-dependencies"])]}),_:3},8,["items","min-item-size","class"]))],64)):e.renderSlot(t.$slots,"renderContent",{key:1,dataSource:l.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(a,o)=>e.renderSlot(t.$slots,"renderItem",{item:a,index:o})),256))])],4)),O.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(w)("footer")),style:e.normalizeStyle(t.footerWarpperStyle)},[e.createVNode(e.unref(s.Pagination),e.mergeProps(u.value?e.unref(v):e.unref(c.omit)(e.unref(h).pagination,["showTotal"]),{onChange:I}),null,16)],6)):e.createCommentVNode("",!0)],6)]),_:3},8,["spinning","class"]))}});exports.default=A;
@@ -1,4 +1,4 @@
1
- import { StyleValue } from 'vue';
1
+ import { Ref, StyleValue } from 'vue';
2
2
  import { RequestData } from '../ap-table';
3
3
  import { Recordable } from '../type';
4
4
  export type ApListProps<RecordType = any, ParamsType = Recordable> = {
@@ -16,9 +16,9 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
16
16
  */
17
17
  onItem?: (record: RecordType, index: number) => void;
18
18
  /**
19
- * 依赖的额外的参数(该参数变更不会触发网络请求)
19
+ * 依赖的额外的参数,传入响应式参数会在变更后重新执行
20
20
  */
21
- params?: ParamsType;
21
+ params?: ParamsType | Ref<ParamsType>;
22
22
  /**
23
23
  * 请求数据
24
24
  * @param params
@@ -2,5 +2,5 @@ import { ApScrollBarProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<ApScrollBarProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApScrollBarProps> & Readonly<{}>, {
4
4
  type: "horizontal" | "vertical";
5
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
5
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
6
6
  export default _default;
@@ -4,7 +4,7 @@ export * from './interface';
4
4
  declare const ApScrollBar: {
5
5
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApScrollBarProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
6
6
  type: "horizontal" | "vertical";
7
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
7
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
8
8
  P: {};
9
9
  B: {};
10
10
  D: {};
@@ -1,9 +1,9 @@
1
1
  import { ApColumnType, ApTableProps } from './interface';
2
2
  import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
3
3
  import { RowSelectionReturnType } from './hooks/use-table-row-selection';
4
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode, RendererNode, RendererElement } from 'vue';
4
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode } from 'vue';
5
5
  declare const _default: <RecordType>(__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
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType>> & PublicProps;
6
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & Partial<{}> & ApTableProps<RecordType>> & PublicProps;
7
7
  expose(exposed: ShallowUnwrapRef<{
8
8
  submit: () => void;
9
9
  reset: () => void;
@@ -76,9 +76,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
76
76
  }) => void;
77
77
  };
78
78
  emit: {};
79
- }>) => VNode<RendererNode, RendererElement, {
80
- [key: string]: any;
81
- }> & {
79
+ }>) => VNode & {
82
80
  __ctx?: Awaited<typeof __VLS_setup>;
83
81
  };
84
82
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=require("@aplus-frontend/antdv"),le=require("@aplus-frontend/antdv/es/theme/internal"),se=require("../ap-form/index.js"),O=require("./constants.js");require("../config-provider/index.js");const ue=require("./hooks/use-table-paging.js"),i=require("lodash-unified"),u=require("./utils.js"),de=require("./hooks/use-table-content-height.js"),ie=require("./hooks/use-table-row-selection.js"),ce=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const fe=require("./context.js"),pe=require("../config-provider/hooks/use-namespace.js"),me=require("../config-provider/hooks/use-global-config.js"),ge=require("./components/paragraph-ellipsis/index.vue2.js"),ye=require("./components/setting/modal/index.vue2.js"),Se=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},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:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(_,{expose:K}){const t=_;let R=0;const m=e.useSlots(),[,A]=le.useToken(),{e:w,b:c,be:B}=pe.useNamespace("ap-table"),x=me.useGlobalConfig("valueTypeMap"),{height:D,contentRef:U}=de.default(),b=e.ref(t.size),d=e.ref([]),T=e.ref([]);fe.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>T.value),size:e.computed(()=>b.value),updateColumns(r){d.value=r},updateSize(r){b.value=r}});const F=e.computed(()=>{var r,a,n;return R++,((n=(a=(r=t.columns)==null?void 0:r.filter(o=>!o.hideInSearch&&o.dataIndex&&(o.valueType||o.customRenderFormItem)&&!O.noRenderAsFormItemValueList.includes(o.valueType)))==null?void 0:a.sort((o,s)=>{let l=u.getColumnOrder(o.order);return u.getColumnOrder(s.order)-l}))==null?void 0:n.map(o=>{const s=u.updateFormProps(o,u.getFieldProps(o.fieldProps,{})),l={...o,fieldProps:{label:o.title,name:o.dataIndex,...s||{},_signal:R},renderNode:void 0};return l.renderNode=u.getSearchFormItemRenderNode(l,e.unref(x)),l}))||[]}),j=e.computed(()=>u.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),$=e.computed(()=>u.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),W=e.computed(()=>i.isUndefined(t.dataSource)?h.value.records:t.dataSource),{rowSelection:g,selectedRows:y,...S}=ie.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:W}),{formRef:C,submit:k,reset:z,tableProps:P,refresh:H,data:h,setDataSource:M,getColumnSFConfig:G}=ue.useTablePaging({async request(r){var n,o;if(!g.value.preserveSelectedRowKeys&&i.isUndefined(t.dataSource)&&S.clearAll(),!i.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const a=await((n=t.request)==null?void 0:n.call(t,r));return(o=t.onLoad)==null||o.call(t,(a==null?void 0:a.data)||[]),{data:(a==null?void 0:a.data)||[],total:(a==null?void 0:a.total)||0}},filterFields:$,sortFields:j,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,defaultCurrent:t.pagination?t.pagination.defaultCurrent:void 0,defaultPageSize:t.pagination?t.pagination.defaultPageSize:void 0,formatParams:t.beforeSearchSubmit,showLessItems:t.pagination?t.pagination.showLessItems:void 0,showTotal:t.pagination?t.pagination.showTotal:void 0}),J=()=>{var n;let r=((n=t.columns)==null?void 0:n.filter(o=>!o.hideInTable))||[];function a(o,s){return o.map(l=>({resizable:ce.isDef(l.resizable)?l.resizable:t.columnResizable,...i.omit(u.apColumnToColumn(l),["ellipsis"]),...G(l),fixed:s?s.fixed:l.fixed,title:u.getTableTitle(l,B("table-header","title"),m.headerCell,e.unref(A).colorPrimary),customRender({value:f,...p}){var V,E;const q=u.getTableRenderType(l),ne=u.getTableRenderProps({...l,valueType:q},{value:f,...p}),ae=u.getTableCellRenderNode(q,ne,p.record,e.unref(x)),I=((V=l.renderText)==null?void 0:V.call(l,{value:f,...p}))||f,oe=l.renderText?e.createVNode(e.Fragment,null,[(E=l.renderText)==null?void 0:E.call(l,{value:f,...p})]):ae;let v=Z(l,I,oe);return l.customRender&&(v=l.customRender({value:f,...p,column:l,originalNode:v,originalText:I})),v},children:a(l.children||[],s||l)}))}return a(r)};e.watchEffect(()=>{const r=J();d.value=r,T.value=r});const Q=e.computed(()=>{var a,n;if(t.adaptive&&(h.value.total>0||((a=t.dataSource)==null?void 0:a.length)))return{y:e.unref(D),x:((n=t.scroll)==null?void 0:n.x)||"100%"};if(t.scroll)return t.scroll}),X=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(a=>a.ellipsis))return"fixed"}),N=e.computed(()=>{var n;const r=e.unref(P),a=e.unref(g);return{...t,...r,rowSelection:t.rowSelection===!0||((n=t.rowSelection)==null?void 0:n.mode)==="internal"?{...a,preserveSelectedRowKeys:i.isUndefined(t.dataSource)?a.preserveSelectedRowKeys:!0}:t.rowSelection,loading:i.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(Q)}}),Y=e.computed(()=>[c(),t.card?null:c("wrapper"),t.adaptive?c("adaptive"):null].filter(Boolean));function Z(r,a,n){return O.noRenderAsFormItemValueList.includes(r.valueType)?n:r.copyable||r.ellipsis?e.createVNode(ge.default,{copyable:r.copyable,ellipsis:r.ellipsis?i.isBoolean(r.ellipsis)?{tooltip:n,rows:1}:{...r.ellipsis,tooltip:n}:!1,content:n},null):n}e.watch(()=>e.unref(h).loading,r=>{var a;(a=t.onLoadingChange)==null||a.call(t,r)}),e.watch(()=>t.dataSource,r=>{M(r)},{immediate:!0});function ee(r){var a,n,o;(o=(n=(a=C.value)==null?void 0:a.apForm)==null?void 0:n.setFieldsValue)==null||o.call(n,r)}function re(r=!1){var n,o,s;const a=r?"getFieldsValueTransformed":"getFieldsValue";return(s=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o[a])==null?void 0:s.call(o,!0)}function te(){return e.unref(d)}return K({submit:()=>k(),reset:()=>z(),refresh:()=>H(),setSearchFormValues:ee,getSearchFormValues:re,getShownColumns:te,dataSource:e.computed(()=>e.unref(h).records),rowSelection:{selectedRows:e.computed(()=>e.unref(y)),...S}}),(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Y.value)},[e.unref(i.isUndefined)(r.dataSource)&&r.searchForm!==!1&&F.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(se.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(P).loading,onSubmit:e.unref(k),onReset:e.unref(z)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,n=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderNode),e.mergeProps({key:n.dataIndex,ref_for:!0},n.fieldProps||{},{span:n.span}),null,16,["span"]))),128))]),_:2},[m.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:U,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(B)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),m.title?(e.openBlock(),e.createBlock(e.unref(L.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(ye.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),e.createVNode(e.unref(L.Table),e.mergeProps({class:e.unref(c)("table")},N.value,{size:b.value,"table-layout":X.value,columns:d.value,onResizeColumn:a[0]||(a[0]=(n,o)=>o.width=n)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:N.value.dataSource,selectedRows:e.unref(y)})]),_:2},[e.renderList(e.unref(i.omit)(m,["title","searchFormExtra","headerCell","summary"]),(n,o)=>({name:o,fn:e.withCtx(s=>[e.renderSlot(r.$slots,o,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=Se;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),O=require("@aplus-frontend/antdv"),le=require("@aplus-frontend/antdv/es/theme/internal"),se=require("../ap-form/index.js"),_=require("./constants.js");require("../config-provider/index.js");const ue=require("./hooks/use-table-paging-ng.js"),i=require("lodash-unified"),s=require("./utils.js"),de=require("./hooks/use-table-content-height.js"),ie=require("./hooks/use-table-row-selection.js"),ce=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const fe=require("./context.js"),pe=require("../config-provider/hooks/use-namespace.js"),me=require("../config-provider/hooks/use-global-config.js"),ge=require("./components/paragraph-ellipsis/index.vue2.js"),ye=require("./components/setting/modal/index.vue2.js"),Se=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},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:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(K,{expose:L}){const t=K;let R=0;const m=e.useSlots(),[,A]=le.useToken(),{e:w,b:c,be:B}=pe.useNamespace("ap-table"),x=me.useGlobalConfig("valueTypeMap"),{height:U,contentRef:D}=de.default(),b=e.ref(t.size),d=e.ref([]),T=e.ref([]);fe.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>T.value),size:e.computed(()=>b.value),updateColumns(r){d.value=r},updateSize(r){b.value=r}});const F=e.computed(()=>{var r,n,o;return R++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!_.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:R},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(x)),l}))||[]}),j=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),$=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),W=e.computed(()=>i.isUndefined(t.dataSource)?h.records:t.dataSource),{rowSelection:g,selectedRows:y,...S}=ie.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:W}),{formRef:C,submit:k,reset:z,tableProps:N,refresh:H,data:h,setDataSource:M,getColumnSFConfig:G}=ue.useTablePaging({async request(r){var o,a;if(!g.value.preserveSelectedRowKeys&&i.isUndefined(t.dataSource)&&S.clearAll(),!i.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:$,sortFields:j,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),J=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:ce.isDef(l.resizable)?l.resizable:t.columnResizable,...i.omit(s.apColumnToColumn(l),["ellipsis"]),...G(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,B("table-header","title"),m.headerCell,e.unref(A).colorPrimary),customRender({value:f,...p}){var E,I;const q=s.getTableRenderType(l),oe=s.getTableRenderProps({...l,valueType:q},{value:f,...p}),ne=s.getTableCellRenderNode(q,oe,p.record,e.unref(x)),V=((E=l.renderText)==null?void 0:E.call(l,{value:f,...p}))||f,ae=l.renderText?e.createVNode(e.Fragment,null,[(I=l.renderText)==null?void 0:I.call(l,{value:f,...p})]):ne;let v=Z(l,V,ae);return l.customRender&&(v=l.customRender({value:f,...p,column:l,originalNode:v,originalText:V})),v},children:n(l.children||[],u||l)}))}return n(r)};e.watchEffect(()=>{const r=J();d.value=r,T.value=r});const Q=e.computed(()=>{var n,o;if(t.adaptive&&(h.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(U),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),X=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),P=e.computed(()=>{var o;const r=e.unref(N),n=e.unref(g);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:i.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:i.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(Q)}}),Y=e.computed(()=>[c(),t.card?null:c("wrapper"),t.adaptive?c("adaptive"):null].filter(Boolean));function Z(r,n,o){return _.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(ge.default,{copyable:r.copyable,ellipsis:r.ellipsis?i.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(h).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{M(r)},{immediate:!0});function ee(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function re(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function te(){return e.unref(d)}return L({submit:()=>k(),reset:()=>z(),refresh:()=>H(),setSearchFormValues:ee,getSearchFormValues:re,getShownColumns:te,dataSource:e.computed(()=>e.unref(h).records),rowSelection:{selectedRows:e.computed(()=>e.unref(y)),...S}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Y.value)},[e.unref(i.isUndefined)(r.dataSource)&&r.searchForm!==!1&&F.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(se.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(N).loading,onSubmit:e.unref(k),onReset:e.unref(z)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode),e.mergeProps({key:o.dataIndex,ref_for:!0},o.fieldProps||{},{span:o.span}),null,16,["span"]))),128))]),_:2},[m.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:D,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(B)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),m.title?(e.openBlock(),e.createBlock(e.unref(O.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(ye.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),e.createVNode(e.unref(O.Table),e.mergeProps({class:e.unref(c)("table")},P.value,{size:b.value,"table-layout":X.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:P.value.dataSource,selectedRows:e.unref(y)})]),_:2},[e.renderList(e.unref(i.omit)(m,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=Se;
@@ -2,5 +2,5 @@ import { ApTableIndexProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<ApTableIndexProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableIndexProps> & Readonly<{}>, {
4
4
  bordered: boolean;
5
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
5
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
6
6
  export default _default;
@@ -7,5 +7,5 @@ interface Props {
7
7
  tooltip?: VNodeChild;
8
8
  };
9
9
  }
10
- declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
11
11
  export default _default;
@@ -5,9 +5,10 @@ type TableSettingModalSlots = {
5
5
  trigger?: any;
6
6
  };
7
7
  declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
8
9
  slots: Readonly<TableSettingModalSlots> & TableSettingModalSlots;
9
10
  refs: {};
10
- attrs: Partial<{}>;
11
+ rootEl: any;
11
12
  };
12
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
14
  declare const __VLS_component: DefineComponent<ApTableSettingModalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingModalProps> & Readonly<{}>, {
@@ -1,4 +1,4 @@
1
1
  import { ApTableSettingSelectGroupProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- declare const _default: DefineComponent<ApTableSettingSelectGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingSelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: DefineComponent<ApTableSettingSelectGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingSelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
4
4
  export default _default;
@@ -1,4 +1,4 @@
1
1
  import { SortableItemProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- declare const _default: DefineComponent<SortableItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SortableItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: DefineComponent<SortableItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SortableItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
4
4
  export default _default;
@@ -7,5 +7,5 @@ declare const _default: DefineComponent<SortableItemMetaProps, {}, {}, {}, {}, C
7
7
  }, string, PublicProps, Readonly<SortableItemMetaProps> & Readonly<{
8
8
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
9
9
  "onUpdate:value"?: ((open: ApColumnState) => any) | undefined;
10
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
10
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
11
11
  export default _default;
@@ -5,5 +5,5 @@ declare const _default: DefineComponent<ApTableSettingSorterProps, {}, {}, {}, {
5
5
  "update:value": (value: ApColumnState[]) => any;
6
6
  }, string, PublicProps, Readonly<ApTableSettingSorterProps> & Readonly<{
7
7
  "onUpdate:value"?: ((value: ApColumnState[]) => any) | undefined;
8
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
8
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
9
9
  export default _default;
@@ -1,4 +1,4 @@
1
1
  import { ApTableSettingTreeSelectProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
4
4
  export default _default;
@@ -1290,7 +1290,7 @@ export declare const apTableRenderItemMap: {
1290
1290
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1291
1291
  index: DefineComponent<ApTableIndexProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApTableIndexProps> & Readonly<{}>, {
1292
1292
  bordered: boolean;
1293
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1293
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1294
1294
  status: DefineComponent<ApTableStatusProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApTableStatusProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1295
1295
  password: {
1296
1296
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApFieldTextPasswordProps> & Readonly<{
@@ -4,18 +4,18 @@ export declare const useTableColumnState: (columnSetting: ApTableSettingType, in
4
4
  columnState: Ref<{
5
5
  key: string | number;
6
6
  show?: boolean | undefined;
7
- fixed?: ("left" | "right") | undefined;
7
+ fixed?: "left" | "right" | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  label?: any;
10
- children?: any[] | undefined;
10
+ children?: /*elided*/ any[] | undefined;
11
11
  order?: number | undefined;
12
12
  }[], ApColumnState[] | {
13
13
  key: string | number;
14
14
  show?: boolean | undefined;
15
- fixed?: ("left" | "right") | undefined;
15
+ fixed?: "left" | "right" | undefined;
16
16
  disabled?: boolean | undefined;
17
17
  label?: any;
18
- children?: any[] | undefined;
18
+ children?: /*elided*/ any[] | undefined;
19
19
  order?: number | undefined;
20
20
  }[]>;
21
21
  selectAll: () => void;
@@ -0,0 +1,87 @@
1
+ import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
2
+ import { Ref, ComputedRef } from 'vue';
3
+ import { ApTablePaginationConfig, RequestData } from '../interface';
4
+ import { Recordable } from '../../type';
5
+ import { ApFormSearchFormExpose } from '../../ap-form';
6
+ import { TablePaginationConfig } from '@aplus-frontend/antdv';
7
+ import { FilterValue, SorterResult, TableCurrentDataSource } from '@aplus-frontend/antdv/es/table/interface';
8
+ import { ApColumnType } from '..';
9
+ export type UseTablePagingParams<DataType, ParamsType> = {
10
+ request: (params: any) => Promise<RequestData<DataType>>;
11
+ /**
12
+ * 是否手动执行,页面初始化后不执行网络请求,需要手动触发
13
+ * @param params
14
+ * @returns
15
+ */
16
+ manual?: boolean;
17
+ /**
18
+ * 额外的默认请求参数
19
+ * @description 如果传入响应式数据,将会在数据改变后重新请求
20
+ */
21
+ defaultParams?: ParamsType | Ref<ParamsType>;
22
+ /**
23
+ * 默认的数据源(只生效一次)
24
+ */
25
+ defaultData?: DataType[];
26
+ /**
27
+ * 数据请求前格式化请求参数
28
+ * @param values
29
+ * @returns
30
+ */
31
+ formatParams?: (values: any) => any;
32
+ /**
33
+ * 特殊类型参数类型对照表(会根据该对照表运行默认的参数格式化)
34
+ */
35
+ paramsValueTypeMap?: Record<string, any>;
36
+ /**
37
+ * 重设表单需要忽略的字段
38
+ */
39
+ resetFieldsIgnores?: string[];
40
+ /**
41
+ * 需要后端筛选的字段列表
42
+ */
43
+ filterFields?: Ref<DataIndex[]>;
44
+ /**
45
+ * 需要后端筛选的排序字段列表
46
+ */
47
+ sortFields?: Ref<DataIndex[]>;
48
+ /**
49
+ * 分页相关
50
+ */
51
+ pagination?: boolean | ApTablePaginationConfig;
52
+ };
53
+ type InternalDataType<DataType = Recordable> = {
54
+ total: number;
55
+ records: DataType[];
56
+ loading: boolean;
57
+ };
58
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
59
+ formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
60
+ submit: () => void;
61
+ reset: () => void;
62
+ refresh: () => void;
63
+ refreshByDelete: (n: number) => void;
64
+ data: InternalDataType<DataType>;
65
+ current: number | undefined;
66
+ pageSize: number | undefined;
67
+ handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
68
+ tableProps: ComputedRef<{
69
+ loading: boolean;
70
+ pagination: {
71
+ current: number;
72
+ pageSize: number;
73
+ total: number;
74
+ showSizeChanger: boolean;
75
+ showQuickJumper: boolean;
76
+ showLessItems: boolean | undefined;
77
+ size: string;
78
+ showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
79
+ };
80
+ onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
81
+ dataSource: DataType[];
82
+ }>;
83
+ dataSource: ComputedRef<DataType[]>;
84
+ setDataSource: (dataSource?: DataType[]) => void;
85
+ getColumnSFConfig: (column: ApColumnType) => Recordable;
86
+ };
87
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),Y=require("./use-sorted-filtered.js");require("../../config-provider/index.js");const x=require("../utils.js"),v=require("lodash-unified"),k=require("../../config-provider/hooks/use-locale.js"),ee=require("../../config-provider/hooks/use-namespace.js"),w=1,j=10;function te(g){const l={};return g&&(g===!0?(l.current=w,l.pageSize=j):(l.current=g.defaultCurrent||w,l.pageSize=g.defaultPageSize||j)),l}const re=({manual:g=!1,request:l,defaultParams:y={},defaultData:E=[],formatParams:A,paramsValueTypeMap:L,resetFieldsIgnores:V,filterFields:U,sortFields:_,pagination:p={defaultCurrent:1,defaultPageSize:10,showLessItems:!1,showTotal:!0}})=>{let C=0,c={};const I=p??{},M=e=>A?A(e):e,m=n.ref(),i=n.reactive(te(p)),{getColumnSFConfig:B,setSF:K,clearAll:$}=Y.useTableSortedAndFiltered(),{t:T}=k.useLocale(),{b:z}=ee.useNamespace("ap-table"),a=n.reactive({total:E.length,records:E,loading:!1}),P=()=>{var e,t;return((t=(e=m.value)==null?void 0:e.apForm)==null?void 0:t.getFieldsValueTransformed(!0))||{}},N=async e=>{var o;const t=M(e),r=Date.now();C=r,a.loading=!0;try{const s=await l({...n.unref(y),...t});C===r&&(a.total=s.total||((o=s.data)==null?void 0:o.length)||0,a.records=[...s.data||[]])}catch{C===r&&(a.records=[],a.total=0)}finally{a.loading=!1}},D=e=>{const t={};return Object.entries(e).forEach(([r,o])=>{if(t[r]=o,L&&o){const s=L[r];s&&(t[r]=x.parseFieldValue(s,o))}}),t},G=async e=>{var o,s,f,d,S;const t=P(),r={};Object.entries(t).forEach(([h,b])=>{V&&V.indexOf(h)>-1&&(r[h]=b)}),await((s=(o=m.value)==null?void 0:o.apForm)==null?void 0:s.resetFields()),(S=(d=(f=m.value)==null?void 0:f.apForm)==null?void 0:d.setFieldsValue)==null||S.call(d,r),n.nextTick(()=>{e==null||e()})},F=e=>{c=e;const t=D(e);N(t)},J=e=>{F({...c,...e})},q=()=>{const e=P();p&&(i.current=w),F({...e,filter:c.filter,sort:c.sort,current:p?w:void 0,pageSize:p?c.pageSize||i.pageSize:void 0})},Q=()=>{$(),c.sort={},c.filter={},G(q)},R=()=>{F(c)},W=e=>{if(!p)R();else{const{current:t,pageSize:r}=i,o=a.total-e,s=Math.ceil(o/r),f=t>s?s:t;J({current:f>0?f:1})}},O=(e,t,r)=>{var h,b;const o=P();i.current=e.current,i.pageSize=e.pageSize,K(t,r);const s=v.isArray(r)?[...r]:[r],f={};for(const u of s)(h=n.unref(_))!=null&&h.includes(u.columnKey||u.field)&&u.order&&(f[x.dataIndexToStr(u.columnKey||u.field)]=u.order);const d={};for(const u of Object.keys(t))(b=n.unref(U))!=null&&b.includes(u)&&t[u]&&(d[u]=t[u]);const S={...o,filter:d,sort:f,current:e.current,pageSize:e.pageSize};v.isEqualWith(c,S,x.isEqualCustom)||F(S)};n.onMounted(()=>{const e=P(),{current:t,pageSize:r}=i;if(c={current:t,pageSize:r,filter:{},sort:{},...e},!g){const o=D(c);N(o)}}),n.watch(()=>n.unref(y),()=>{q()},{deep:!0});const Z=n.computed(()=>{if(a.total===0)return"-";const{current:e,pageSize:t}=i;return`${e}/${Math.ceil(a.total/t)}`});function H(e){v.isArray(e)&&(a.records=e,a.total=e.length)}const X=n.computed(()=>{const{showLessItems:e,showTotal:t}=I;return{loading:a.loading,pagination:{current:i.current,pageSize:i.pageSize,total:a.total,showSizeChanger:!e,showQuickJumper:!e,showLessItems:e,size:"default",showTotal:t?r=>n.createVNode("span",{class:z("pagination-total-wrapper")},[T("ap.apTable.pagination.totalLeftPrefix")," ",n.createVNode("span",{class:z("pagination-count-text")},[r])," ",T("ap.apTable.pagination.totalLeftSuffix"),n.createVNode("span",{class:z("pagination--total-right")},[T("ap.apTable.pagination.totalRightPrefix")," ",n.createVNode("span",{class:z("pagination-count-text")},[n.unref(Z)])," ",T("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:O,dataSource:a.records}});return{formRef:m,submit:q,reset:Q,refresh:R,refreshByDelete:W,data:a,current:i.current,pageSize:i.pageSize,handleTableChange:O,tableProps:X,dataSource:n.computed(()=>a.records),setDataSource:H,getColumnSFConfig:B}};exports.useTablePaging=re;
@@ -62,8 +62,18 @@ export type UseTablePagingParams<DataType, ParamsType> = {
62
62
  * 用于显示数据总量和当前数据顺序
63
63
  */
64
64
  showTotal?: boolean;
65
+ /**
66
+ * 是否分页
67
+ */
68
+ pagination?: boolean;
65
69
  };
66
- export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, showLessItems, showTotal }: UseTablePagingParams<DataType, ParamsType>) => {
70
+ /**
71
+ * ApTable表格分页请求和管理数据实现
72
+ * @deprecated 已弃用,将在下一个次要版本移出,请自行实现
73
+ * @param param0
74
+ * @returns
75
+ */
76
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, showLessItems, showTotal, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
67
77
  formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
68
78
  submit: () => void;
69
79
  reset: () => void;
@@ -78,8 +88,8 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
78
88
  records: DataType[];
79
89
  loading: boolean;
80
90
  }>;
81
- current: Ref<number, number>;
82
- pageSize: Ref<number, number>;
91
+ current: Ref<number | undefined, number | undefined>;
92
+ pageSize: Ref<number | undefined, number | undefined>;
83
93
  handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
84
94
  tableProps: ComputedRef<{
85
95
  loading: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),x=require("../utils.js"),V=require("lodash-unified");require("../../config-provider/index.js");const ee=require("./use-sorted-filtered.js"),te=require("../../config-provider/hooks/use-locale.js"),ae=require("../../config-provider/hooks/use-namespace.js"),re=({manual:D=!1,defaultCurrent:E=1,defaultPageSize:y=10,request:R,defaultParams:M={},defaultData:B=[],formatParams:z,paramsValueTypeMap:C,resetFieldsIgnores:N,filterFields:K,sortFields:L,showLessItems:P=!1,showTotal:$=!0})=>{let q=0,s={};const J=e=>z?z(e):e,c=t.ref(),l=t.ref(E),d=t.ref(y),{getColumnSFConfig:Q,setSF:U,clearAll:W}=ee.useTableSortedAndFiltered(),{t:S}=te.useLocale(),{b:T}=ae.useNamespace("ap-table"),n=t.ref({total:0,records:B,loading:!1}),w=async e=>{var o;const r=J(e),a=Date.now();q=a,n.value.loading=!0;try{const u=await R({...M,...r});q===a&&(n.value.total=u.total||((o=u.data)==null?void 0:o.length)||0,n.value.records=[...u.data||[]])}catch{q===a&&(n.value.records=[],n.value.total=0)}finally{n.value.loading=!1}},A=e=>{const r={};return Object.entries(e).forEach(([a,o])=>{if(r[a]=o,C&&o){const u=C[a];u&&(r[a]=x.parseFieldValue(u,o))}}),r},G=async e=>{var o,u,g,p,m,f,h;const r=((u=(o=c.value)==null?void 0:o.apForm)==null?void 0:u.getFieldsValueTransformed(!0))||{},a={};Object.entries(r).forEach(([v,b])=>{N&&N.indexOf(v)>-1&&(a[v]=b)}),await((p=(g=c.value)==null?void 0:g.apForm)==null?void 0:p.resetFields()),(h=(f=(m=c.value)==null?void 0:m.apForm)==null?void 0:f.setFieldsValue)==null||h.call(f,a),t.nextTick(()=>{e==null||e()})},F=e=>{s=e;const r=A(e);w(r)},H=e=>{F({...s,...e})},O=()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};l.value=1,F({...e,filter:s.filter,sort:s.sort,current:1,pageSize:s.pageSize||y})},X=()=>{W(),s.sort={},s.filter={},G(O)},Y=()=>{F(s)},Z=e=>{const r=t.unref(n).total-e,a=Math.ceil(r/t.unref(d)),o=t.unref(l)>a?a:t.unref(l);H({current:o>0?o:1})},j=(e,r,a)=>{var f,h,v,b;const o=((h=(f=c.value)==null?void 0:f.apForm)==null?void 0:h.getFieldsValueTransformed(!0))||{};l.value=e.current,d.value=e.pageSize,U(r,a);const u=V.isArray(a)?[...a]:[a],g={};for(const i of u)(v=t.unref(L))!=null&&v.includes(i.columnKey||i.field)&&i.order&&(g[x.dataIndexToStr(i.columnKey||i.field)]=i.order);const p={};for(const i of Object.keys(r))(b=t.unref(K))!=null&&b.includes(i)&&r[i]&&(p[i]=r[i]);const m={...o,filter:p,sort:g,current:e.current,pageSize:e.pageSize};V.isEqualWith(s,m,x.isEqualCustom)||F(m)};t.onMounted(()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};if(s={current:t.unref(l),pageSize:t.unref(d),filter:{},sort:{},...e},!D){const o=A(s);w(o)}});const _=t.computed(()=>t.unref(n).total===0?"-":`${t.unref(l.value)}/${Math.ceil(t.unref(n).total/t.unref(d))}`);function I(e){V.isArray(e)&&(n.value.records=e,n.value.total=e.length)}const k=t.computed(()=>({loading:t.unref(n).loading,pagination:{current:t.unref(l),pageSize:t.unref(d),total:t.unref(n).total,showSizeChanger:!P,showQuickJumper:!P,showLessItems:P,size:"default",showTotal:$?e=>t.createVNode("span",{class:T("pagination-total-wrapper")},[S("ap.apTable.pagination.totalLeftPrefix")," ",t.createVNode("span",{class:T("pagination-count-text")},[e])," ",S("ap.apTable.pagination.totalLeftSuffix"),t.createVNode("span",{class:T("pagination--total-right")},[S("ap.apTable.pagination.totalRightPrefix")," ",t.createVNode("span",{class:T("pagination-count-text")},[t.unref(_)])," ",S("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:j,dataSource:t.unref(n).records}));return{formRef:c,submit:O,reset:X,refresh:Y,refreshByDelete:Z,data:n,current:l,pageSize:d,handleTableChange:j,tableProps:k,dataSource:t.computed(()=>t.unref(n).records),setDataSource:I,getColumnSFConfig:Q}};exports.useTablePaging=re;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),z=require("../utils.js"),V=require("lodash-unified");require("../../config-provider/index.js");const te=require("./use-sorted-filtered.js"),re=require("../../config-provider/hooks/use-locale.js"),ae=require("../../config-provider/hooks/use-namespace.js"),ne=({manual:R=!1,defaultCurrent:M=1,defaultPageSize:y=10,request:B,defaultParams:K={},defaultData:L=[],formatParams:C,paramsValueTypeMap:N,resetFieldsIgnores:w,filterFields:_,sortFields:$,showLessItems:q=!1,showTotal:J=!0,pagination:g=!0})=>{let x=0,u={};const Q=e=>C?C(e):e,c=t.ref(),f=t.ref(g?M:void 0),p=t.ref(g?y:void 0),{getColumnSFConfig:U,setSF:W,clearAll:G}=te.useTableSortedAndFiltered(),{t:T}=re.useLocale(),{b:F}=ae.useNamespace("ap-table"),n=t.ref({total:0,records:L,loading:!1}),A=async e=>{var o;const r=Q(e),a=Date.now();x=a,n.value.loading=!0;try{const s=await B({...K,...r});x===a&&(n.value.total=s.total||((o=s.data)==null?void 0:o.length)||0,n.value.records=[...s.data||[]])}catch{x===a&&(n.value.records=[],n.value.total=0)}finally{n.value.loading=!1}},O=e=>{const r={};return Object.entries(e).forEach(([a,o])=>{if(r[a]=o,N&&o){const s=N[a];s&&(r[a]=z.parseFieldValue(s,o))}}),r},H=async e=>{var o,s,l,m,h,d,v;const r=((s=(o=c.value)==null?void 0:o.apForm)==null?void 0:s.getFieldsValueTransformed(!0))||{},a={};Object.entries(r).forEach(([S,P])=>{w&&w.indexOf(S)>-1&&(a[S]=P)}),await((m=(l=c.value)==null?void 0:l.apForm)==null?void 0:m.resetFields()),(v=(d=(h=c.value)==null?void 0:h.apForm)==null?void 0:d.setFieldsValue)==null||v.call(d,a),t.nextTick(()=>{e==null||e()})},b=e=>{u=e;const r=O(e);A(r)},X=e=>{b({...u,...e})},j=()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};g&&(f.value=1),b({...e,filter:u.filter,sort:u.sort,current:g?1:void 0,pageSize:g?u.pageSize||y:void 0})},Y=()=>{G(),u.sort={},u.filter={},H(j)},D=()=>{b(u)},Z=e=>{if(!g)D();else{const r=t.unref(f),a=t.unref(p),o=t.unref(n).total-e,s=Math.ceil(o/a),l=r>s?s:r;X({current:l>0?l:1})}},E=(e,r,a)=>{var d,v,S,P;const o=((v=(d=c.value)==null?void 0:d.apForm)==null?void 0:v.getFieldsValueTransformed(!0))||{};f.value=e.current,p.value=e.pageSize,W(r,a);const s=V.isArray(a)?[...a]:[a],l={};for(const i of s)(S=t.unref($))!=null&&S.includes(i.columnKey||i.field)&&i.order&&(l[z.dataIndexToStr(i.columnKey||i.field)]=i.order);const m={};for(const i of Object.keys(r))(P=t.unref(_))!=null&&P.includes(i)&&r[i]&&(m[i]=r[i]);const h={...o,filter:m,sort:l,current:e.current,pageSize:e.pageSize};V.isEqualWith(u,h,z.isEqualCustom)||b(h)};t.onMounted(()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};if(u={current:t.unref(f),pageSize:t.unref(p),filter:{},sort:{},...e},!R){const o=O(u);A(o)}});const I=t.computed(()=>t.unref(n).total===0?"-":`${t.unref(f.value)}/${Math.ceil(t.unref(n).total/t.unref(p))}`);function k(e){V.isArray(e)&&(n.value.records=e,n.value.total=e.length)}const ee=t.computed(()=>({loading:t.unref(n).loading,pagination:{current:t.unref(f),pageSize:t.unref(p),total:t.unref(n).total,showSizeChanger:!q,showQuickJumper:!q,showLessItems:q,size:"default",showTotal:J?e=>t.createVNode("span",{class:F("pagination-total-wrapper")},[T("ap.apTable.pagination.totalLeftPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[e])," ",T("ap.apTable.pagination.totalLeftSuffix"),t.createVNode("span",{class:F("pagination--total-right")},[T("ap.apTable.pagination.totalRightPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[t.unref(I)])," ",T("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:E,dataSource:t.unref(n).records}));return{formRef:c,submit:j,reset:Y,refresh:D,refreshByDelete:Z,data:n,current:f,pageSize:p,handleTableChange:E,tableProps:ee,dataSource:t.computed(()=>t.unref(n).records),setDataSource:k,getColumnSFConfig:U}};exports.useTablePaging=ne;
@@ -3,7 +3,7 @@ import { CompareFn, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/e
3
3
  import { ApFormItemProps, ApFormSearchFormProps } from '../ap-form';
4
4
  import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps } from '../ap-form/items/interface';
5
5
  import { Recordable } from '../type';
6
- import { ComputedRef, CSSProperties, VNode } from 'vue';
6
+ import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
7
7
  import { ApActionGroupProps } from '../ap-action';
8
8
  import { ApTableIndexProps } from './components/interface';
9
9
  import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
@@ -243,9 +243,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
243
243
  */
244
244
  card?: boolean;
245
245
  /**
246
- * request额外请求的参数,这些参数在变更时将不会自动发起网络请求
246
+ * request额外请求的参数
247
+ * 如果传入响应式数据,将会在变更后重新执行
247
248
  */
248
- params?: ParamsType;
249
+ params?: ParamsType | Ref<ParamsType>;
249
250
  /**
250
251
  * 自定义渲染搜索表单
251
252
  * @deprecated 未实现 暂不可用
@@ -708,4 +708,5 @@ export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassN
708
708
  }> | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
709
709
  export declare function recursionApColumns<ReturnType = any>(columns: (ColumnType | ColumnGroupType<any>)[], handler: (column: ColumnType) => ReturnType): ReturnType[];
710
710
  export declare function isEqualCustom(value: any, other: any): boolean | undefined;
711
+ export declare function falseToUndefined(obj: any): any;
711
712
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("lodash-unified"),d=require("./constants.js"),b=require("@fruits-chain/utils");require("../ap-form/index.js");const g=require("@aplus-frontend/antdv"),j=require("@ant-design/icons-vue"),O=require("../ap-form/item/index.vue.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const p=(e,t,n)=>{let o={};return u.isObject(e)?Object.keys(e).forEach(r=>{u.isObject(e[r])?o[r]=p(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},N=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return u.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function E(e){return u.isArray(e)?e.join("."):e}function F(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const m=e=>F(e)==="map"?e:new Map(Object.entries(e||{})),c=e=>{const t=[],n=m(e);return n.forEach((o,r)=>{const s=n.get(r)||n.get(`${r}`);if(s){if(typeof s=="object"&&(s!=null&&s.text)){t.push({text:s==null?void 0:s.text,value:r,label:s==null?void 0:s.text,disabled:s.disabled});return}t.push({text:s,label:s,value:r})}}),t},S=e=>u.isUndefined(e)||e<0?0:e;function y(e,t){return!e||!u.isFunction(e)?e:e(t)}function V(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function v(e,t,n,o){var l;const r=d.apTableRenderItemMap[e];if(r)return i.createVNode(r,i.mergeProps(t,{mode:"read"}),null);const s=o==null?void 0:o[e];return((l=s==null?void 0:s.render)==null?void 0:l.call(s,t.value,n,t))||t.value}function C(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return i.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=d.apTableFormItemMap[e.valueType];if(n)return n;const o=t==null?void 0:t[e.valueType];return()=>{var s;const r=(s=o==null?void 0:o.renderFormItem)==null?void 0:s.call(o,e.fieldProps.field);return r?i.createVNode(O.default,i.mergeProps(e.fieldProps,{span:e.span}),h(r)?r:{default:()=>[r]}):null}}function P(e,t){const n=y(e.fieldProps,t),o=(n==null?void 0:n.field)||n||{},r=e.valueType==="switch",s=e.valueType==="index",l=r?{checked:t.value}:{value:s?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...u.omit(o,["request"]),...l}}function q(e){const t={...e};return u.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=c(e.valueEnum)),t}function I(e,t){var o;const n=t||{};return e.valueEnum&&!((o=n.field)!=null&&o.options)&&(n.field={...n.field,options:c(e.valueEnum)}),n}function A(e){if(!b.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function _(e,t,n,o){const r=n==null?void 0:n({title:e.title,column:e}),s=(r==null?void 0:r.filter(T=>T.type!==Symbol.for("v-cmt")))||[];if(r&&s.length>0)return r;const a=u.isString(e.title)?i.createVNode("span",{class:t,title:e.title},[e.title]):e.title,f=e.tooltip?u.isFunction(e.tooltip)?e.tooltip(e):i.createVNode(i.Fragment,null,[e.tooltip]):null;return f?i.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[a,i.createVNode(g.Tooltip,{title:f,placement:"bottom"},{default:()=>[i.createVNode(j.QuestionCircleOutlined,{style:{padding:"4px",color:o,verticalAlign:"middle"}},null)]})]):a}function R(e,t){const n=[];function o(r){var s;for(const l of r)(s=l.children)!=null&&s.length?o(l.children):n.push(t(l))}return o(e),n}function w(e,t){if(u.isArray(e)&&u.isArray(t))return u.isEqual(u.sortBy(e),u.sortBy(t));if(u.isPlainObject(e)&&u.isPlainObject(t)){const n=o=>u.every(o,r=>r==null)||u.isEmpty(o);if(n(e)&&n(t))return!0}}exports.apColumnToColumn=q;exports.dataIndexToStr=E;exports.formatParamsValueType=p;exports.getColumnOrder=S;exports.getFieldProps=y;exports.getSearchFormItemRenderNode=C;exports.getTableCellRenderNode=v;exports.getTableRenderProps=P;exports.getTableRenderType=V;exports.getTableTitle=_;exports.isEqualCustom=w;exports.objectToMap=m;exports.objectToString=A;exports.parseFieldValue=N;exports.recursionApColumns=R;exports.updateFormProps=I;exports.valueEnumToArray=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),d=require("./constants.js"),b=require("@fruits-chain/utils");require("../ap-form/index.js");const g=require("@aplus-frontend/antdv"),j=require("@ant-design/icons-vue"),O=require("../ap-form/item/index.vue.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const p=(e,t,n)=>{let o={};return i.isObject(e)?Object.keys(e).forEach(r=>{i.isObject(e[r])?o[r]=p(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},N=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function E(e){return i.isArray(e)?e.join("."):e}function F(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const m=e=>F(e)==="map"?e:new Map(Object.entries(e||{})),c=e=>{const t=[],n=m(e);return n.forEach((o,r)=>{const s=n.get(r)||n.get(`${r}`);if(s){if(typeof s=="object"&&(s!=null&&s.text)){t.push({text:s==null?void 0:s.text,value:r,label:s==null?void 0:s.text,disabled:s.disabled});return}t.push({text:s,label:s,value:r})}}),t},S=e=>i.isUndefined(e)||e<0?0:e;function y(e,t){return!e||!i.isFunction(e)?e:e(t)}function V(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function v(e,t,n,o){var l;const r=d.apTableRenderItemMap[e];if(r)return u.createVNode(r,u.mergeProps(t,{mode:"read"}),null);const s=o==null?void 0:o[e];return((l=s==null?void 0:s.render)==null?void 0:l.call(s,t.value,n,t))||t.value}function C(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return u.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=d.apTableFormItemMap[e.valueType];if(n)return n;const o=t==null?void 0:t[e.valueType];return()=>{var s;const r=(s=o==null?void 0:o.renderFormItem)==null?void 0:s.call(o,e.fieldProps.field);return r?u.createVNode(O.default,u.mergeProps(e.fieldProps,{span:e.span}),h(r)?r:{default:()=>[r]}):null}}function P(e,t){const n=y(e.fieldProps,t),o=(n==null?void 0:n.field)||n||{},r=e.valueType==="switch",s=e.valueType==="index",l=r?{checked:t.value}:{value:s?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...i.omit(o,["request"]),...l}}function q(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=c(e.valueEnum)),t}function I(e,t){var o;const n=t||{};return e.valueEnum&&!((o=n.field)!=null&&o.options)&&(n.field={...n.field,options:c(e.valueEnum)}),n}function A(e){if(!b.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function _(e,t,n,o){const r=n==null?void 0:n({title:e.title,column:e}),s=(r==null?void 0:r.filter(T=>T.type!==Symbol.for("v-cmt")))||[];if(r&&s.length>0)return r;const a=i.isString(e.title)?u.createVNode("span",{class:t,title:e.title},[e.title]):e.title,f=e.tooltip?i.isFunction(e.tooltip)?e.tooltip(e):u.createVNode(u.Fragment,null,[e.tooltip]):null;return f?u.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[a,u.createVNode(g.Tooltip,{title:f,placement:"bottom"},{default:()=>[u.createVNode(j.QuestionCircleOutlined,{style:{padding:"4px",color:o,verticalAlign:"middle"}},null)]})]):a}function R(e,t){const n=[];function o(r){var s;for(const l of r)(s=l.children)!=null&&s.length?o(l.children):n.push(t(l))}return o(e),n}function w(e,t){if(i.isArray(e)&&i.isArray(t))return i.isEqual(i.sortBy(e),i.sortBy(t));if(i.isPlainObject(e)&&i.isPlainObject(t)){const n=o=>i.every(o,r=>r==null)||i.isEmpty(o);if(n(e)&&n(t))return!0}}function x(e){if(e!==!1)return e}exports.apColumnToColumn=q;exports.dataIndexToStr=E;exports.falseToUndefined=x;exports.formatParamsValueType=p;exports.getColumnOrder=S;exports.getFieldProps=y;exports.getSearchFormItemRenderNode=C;exports.getTableCellRenderNode=v;exports.getTableRenderProps=P;exports.getTableRenderType=V;exports.getTableTitle=_;exports.isEqualCustom=w;exports.objectToMap=m;exports.objectToString=A;exports.parseFieldValue=N;exports.recursionApColumns=R;exports.updateFormProps=I;exports.valueEnumToArray=c;
@@ -6,11 +6,12 @@ type ApTagGroupSlots = {
6
6
  }) => void;
7
7
  };
8
8
  declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
9
10
  slots: Readonly<ApTagGroupSlots> & ApTagGroupSlots;
10
11
  refs: {
11
12
  container: HTMLDivElement;
12
13
  };
13
- attrs: Partial<{}>;
14
+ rootEl: any;
14
15
  };
15
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
17
  declare const __VLS_component: DefineComponent<ApTagGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTagGroupProps> & Readonly<{}>, {