@aplus-frontend/ui 0.6.0-beta.16 → 0.6.0-beta.18

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 (234) hide show
  1. package/es/index.mjs +118 -109
  2. package/es/src/ap-field/date-range/index.vue.mjs +8 -7
  3. package/es/src/ap-field/number/index.vue.d.ts +2 -4
  4. package/es/src/ap-field/radio/index.vue.d.ts +2 -4
  5. package/es/src/ap-field/rate/index.vue.d.ts +2 -4
  6. package/es/src/ap-field/select/index.vue.d.ts +3 -6
  7. package/es/src/ap-field/slider/index.vue.d.ts +2 -4
  8. package/es/src/ap-field/text/index.vue2.mjs +42 -44
  9. package/es/src/ap-field/text/password.vue.mjs +15 -17
  10. package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
  11. package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
  12. package/es/src/ap-form/ap-form.vue2.mjs +18 -17
  13. package/es/src/ap-form/dependency/index.vue.mjs +24 -23
  14. package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -7
  15. package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
  16. package/es/src/ap-form/interface.d.ts +2 -2
  17. package/es/src/ap-form/item/index.vue.d.ts +5 -10
  18. package/es/src/ap-form/items/select/index.vue.mjs +12 -14
  19. package/es/src/ap-form/items/text/password.vue.mjs +9 -9
  20. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  21. package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
  22. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
  23. package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
  24. package/es/src/ap-form/provider/index.vue.mjs +6 -5
  25. package/es/src/ap-form/search-form/index.vue.d.ts +4 -8
  26. package/es/src/ap-form/search-form/index.vue.mjs +50 -50
  27. package/es/src/ap-form/set/index.vue.mjs +7 -6
  28. package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
  29. package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
  30. package/es/src/ap-grid/index.vue.mjs +79 -75
  31. package/es/src/ap-grid/interface.d.ts +13 -0
  32. package/es/src/ap-list/index.vue.d.ts +2 -9
  33. package/es/src/ap-list/index.vue.mjs +116 -106
  34. package/es/src/ap-list/interface.d.ts +20 -0
  35. package/es/src/ap-table/ap-table.vue.d.ts +10 -2
  36. package/es/src/ap-table/ap-table.vue2.mjs +87 -83
  37. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +12 -11
  38. package/es/src/ap-table/constants.d.ts +4 -4
  39. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  40. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +113 -105
  41. package/es/src/ap-table/interface.d.ts +14 -1
  42. package/es/src/ap-table/utils.d.ts +3 -3
  43. package/es/src/business/ap-card/ApCard.vue2.mjs +1 -1
  44. package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  45. package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  46. package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
  47. package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
  48. package/es/src/business/ap-keep-alive/hook.mjs +31 -0
  49. package/es/src/business/ap-keep-alive/index.d.ts +101 -0
  50. package/es/src/business/ap-keep-alive/index.mjs +13 -0
  51. package/es/src/business/ap-keep-alive/interface.d.ts +35 -0
  52. package/es/src/business/ap-keep-alive/interface.mjs +54 -0
  53. package/es/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
  54. package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
  55. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  56. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
  57. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  58. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
  59. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  60. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
  61. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  62. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
  63. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  64. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
  65. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  66. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
  67. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  68. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
  69. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  70. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
  71. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  72. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
  73. package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  74. package/es/src/business/ap-keep-alive/keeper/index.mjs +27 -0
  75. package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  76. package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
  77. package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  78. package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
  79. package/es/src/business/ap-keep-alive/utils.d.ts +22 -0
  80. package/es/src/business/ap-keep-alive/utils.mjs +41 -0
  81. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +23 -23
  82. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  83. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  84. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  85. package/es/src/business/ap-table-modal/index.d.ts +32 -5
  86. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  87. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  88. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  89. package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
  90. package/es/src/business/batch-input-group/index.vue.mjs +10 -9
  91. package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
  92. package/es/src/business/index.d.ts +1 -0
  93. package/es/src/business/index.mjs +18 -16
  94. package/es/src/editable-table/form-item.vue.mjs +23 -23
  95. package/es/src/full-screen/interface.d.ts +5 -6
  96. package/es/src/index.mjs +199 -190
  97. package/es/src/mask/index.vue.mjs +21 -20
  98. package/es/src/resize-observer/interface.d.ts +2 -3
  99. package/es/src/scroll-bar/interface.d.ts +7 -7
  100. package/es/src/scroll-view/interface.d.ts +2 -3
  101. package/es/src/splitter/SplitBar.vue2.mjs +1 -0
  102. package/es/src/splitter/Splitter.vue2.mjs +1 -0
  103. package/es/src/text/group.vue.mjs +7 -6
  104. package/es/src/text/index.vue.mjs +20 -19
  105. package/es/src/version.d.ts +1 -1
  106. package/es/src/version.mjs +1 -1
  107. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  108. package/lib/index.js +1 -1
  109. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  110. package/lib/src/ap-field/number/index.vue.d.ts +2 -4
  111. package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
  112. package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
  113. package/lib/src/ap-field/select/index.vue.d.ts +3 -6
  114. package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
  115. package/lib/src/ap-field/text/index.vue2.js +1 -1
  116. package/lib/src/ap-field/text/password.vue.js +1 -1
  117. package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
  118. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  119. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  120. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  121. package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -7
  122. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  123. package/lib/src/ap-form/interface.d.ts +2 -2
  124. package/lib/src/ap-form/item/index.vue.d.ts +5 -10
  125. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  126. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  127. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  128. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  129. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
  130. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  131. package/lib/src/ap-form/provider/index.vue.js +1 -1
  132. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -8
  133. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  134. package/lib/src/ap-form/set/index.vue.js +1 -1
  135. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  136. package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
  137. package/lib/src/ap-grid/index.vue.js +1 -1
  138. package/lib/src/ap-grid/interface.d.ts +13 -0
  139. package/lib/src/ap-list/index.vue.d.ts +2 -9
  140. package/lib/src/ap-list/index.vue.js +1 -1
  141. package/lib/src/ap-list/interface.d.ts +20 -0
  142. package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
  143. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  144. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  145. package/lib/src/ap-table/constants.d.ts +4 -4
  146. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  147. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  148. package/lib/src/ap-table/interface.d.ts +14 -1
  149. package/lib/src/ap-table/utils.d.ts +3 -3
  150. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  151. package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  152. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  153. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
  154. package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
  155. package/lib/src/business/ap-keep-alive/hook.js +1 -0
  156. package/lib/src/business/ap-keep-alive/index.d.ts +101 -0
  157. package/lib/src/business/ap-keep-alive/index.js +1 -0
  158. package/lib/src/business/ap-keep-alive/interface.d.ts +35 -0
  159. package/lib/src/business/ap-keep-alive/interface.js +1 -0
  160. package/lib/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
  161. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
  162. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  163. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
  164. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  165. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
  166. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  167. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
  168. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  169. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
  170. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  171. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
  172. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  173. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
  174. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  175. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
  176. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  177. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
  178. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  179. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
  180. package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  181. package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
  182. package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  183. package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
  184. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  185. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
  186. package/lib/src/business/ap-keep-alive/utils.d.ts +22 -0
  187. package/lib/src/business/ap-keep-alive/utils.js +1 -0
  188. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
  189. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  190. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  191. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  192. package/lib/src/business/ap-table-modal/index.d.ts +32 -5
  193. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  194. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  195. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  196. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  197. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  198. package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
  199. package/lib/src/business/index.d.ts +1 -0
  200. package/lib/src/business/index.js +1 -1
  201. package/lib/src/editable-table/form-item.vue.js +1 -1
  202. package/lib/src/full-screen/interface.d.ts +5 -6
  203. package/lib/src/index.js +1 -1
  204. package/lib/src/mask/index.vue.js +1 -1
  205. package/lib/src/resize-observer/interface.d.ts +2 -3
  206. package/lib/src/scroll-bar/interface.d.ts +7 -7
  207. package/lib/src/scroll-view/interface.d.ts +2 -3
  208. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  209. package/lib/src/splitter/Splitter.vue2.js +1 -1
  210. package/lib/src/text/group.vue.js +1 -1
  211. package/lib/src/text/index.vue.js +1 -1
  212. package/lib/src/version.d.ts +1 -1
  213. package/lib/src/version.js +1 -1
  214. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  215. package/package.json +7 -6
  216. package/theme/antd-global-overwrite/admin/field.css +12 -0
  217. package/theme/antd-global-overwrite/admin/field.less +16 -0
  218. package/theme/antd-global-overwrite/admin/index.css +12 -0
  219. package/theme/antd-global-overwrite/aplus/field.css +12 -0
  220. package/theme/antd-global-overwrite/aplus/field.less +16 -0
  221. package/theme/antd-global-overwrite/aplus/index.css +12 -0
  222. package/theme/ap-action/item.css +1 -1
  223. package/theme/ap-action/item.less +1 -1
  224. package/theme/ap-card/ap-card.css +1 -1
  225. package/theme/ap-card/ap-card.less +1 -1
  226. package/theme/ap-grid/index.css +6 -1
  227. package/theme/ap-grid/index.less +5 -0
  228. package/theme/ap-table/ap-table.css +6 -1
  229. package/theme/ap-table/ap-table.less +5 -0
  230. package/theme/ap-table-modal/index.css +6 -1
  231. package/theme/editable-table/index.css +1 -1
  232. package/theme/index.css +14 -2
  233. package/theme/ui-mode.css +2 -0
  234. package/theme/ui-mode.less +4 -0
@@ -1,152 +1,152 @@
1
- import { ref as ce, reactive as M, unref as m, nextTick as ue, onMounted as le, watch as fe, computed as O, createVNode as C } from "vue";
2
- import { useTableSortedAndFiltered as ge } from "./use-sorted-filtered.mjs";
1
+ import { ref as le, reactive as M, unref as m, nextTick as fe, onMounted as ge, watch as de, computed as y, createVNode as C } from "vue";
2
+ import { useTableSortedAndFiltered as pe } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
- import { parseFieldValue as de, dataIndexToStr as pe, isEqualCustom as me } from "../utils.mjs";
5
- import { isArray as Q, isEqualWith as Se, isUndefined as he } from "lodash-unified";
4
+ import { parseFieldValue as me, dataIndexToStr as Se, isEqualCustom as he } from "../utils.mjs";
5
+ import { isArray as Q, isEqualWith as ze, isUndefined as Te } from "lodash-unified";
6
6
  import { isDef as $ } from "../../utils/index.mjs";
7
- import { useLocale as ze } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as Te } from "../../config-provider/hooks/use-namespace.mjs";
9
- const S = 1, y = 20, G = {
7
+ import { useLocale as Pe } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as we } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const S = 1, I = 20, G = {
10
10
  defaultCurrent: S,
11
- defaultPageSize: y,
11
+ defaultPageSize: I,
12
12
  showLessItems: !1,
13
13
  showTotal: !0
14
14
  };
15
- function Pe(i) {
16
- return i === !1 ? {} : i == null || i === !0 ? G : {
15
+ function Fe(c) {
16
+ return c === !1 ? {} : c == null || c === !0 ? G : {
17
17
  ...G,
18
- ...i
18
+ ...c
19
19
  };
20
20
  }
21
- function we(i) {
21
+ function be(c) {
22
22
  const f = {};
23
- return i === !1 || (i === !0 || i == null ? (f.current = S, f.pageSize = y) : (f.current = i.defaultCurrent || S, f.pageSize = i.defaultPageSize || y)), f;
23
+ return c === !1 || (c === !0 || c == null ? (f.current = S, f.pageSize = I) : (f.current = c.defaultCurrent || S, f.pageSize = c.defaultPageSize || I)), f;
24
24
  }
25
- const Oe = ({
26
- manual: i = !1,
25
+ const Ie = ({
26
+ manual: c = !1,
27
27
  request: f,
28
- defaultParams: I = {},
29
- defaultData: V = [],
28
+ defaultParams: V = {},
29
+ defaultData: j = [],
30
30
  formatParams: U,
31
31
  paramsValueTypeMap: _,
32
- resetFieldsIgnores: j,
32
+ resetFieldsIgnores: A,
33
33
  filterFields: W,
34
34
  sortFields: Z,
35
35
  namespace: H = "ap-table",
36
36
  pagination: h,
37
- onClickReset: b,
37
+ onClickReset: x,
38
38
  onAfterRequest: E
39
39
  }) => {
40
- let v = 0, c = {};
41
- const X = Pe(h), Y = (e) => U ? U(e) : e, z = ce(), s = M(we(h)), {
40
+ let v = 0, s = {};
41
+ const X = Fe(h), Y = (e) => U ? U(e) : e, z = le(), i = M(be(h)), {
42
42
  getColumnSFConfig: q,
43
43
  setSF: R,
44
44
  clearAll: k,
45
- sortedInfo: A,
46
- filteredInfo: N
47
- } = ge(), {
45
+ sortedInfo: N,
46
+ filteredInfo: B
47
+ } = pe(), {
48
48
  t: T
49
- } = ze(), {
49
+ } = Pe(), {
50
50
  b: P
51
- } = Te(H), o = M({
52
- total: V.length,
53
- records: V,
51
+ } = we(H), o = M({
52
+ total: j.length,
53
+ records: j,
54
54
  loading: !1
55
55
  }), w = () => {
56
56
  var e, t;
57
57
  return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
58
- }, B = async (e) => {
59
- var n;
60
- const t = Y(e), r = Date.now();
61
- v = r, o.loading = !0;
58
+ }, J = async (e) => {
59
+ var r;
60
+ const t = Y(e), n = Date.now();
61
+ v = n, o.loading = !0;
62
62
  try {
63
63
  const a = await f({
64
- ...m(I),
64
+ ...m(V),
65
65
  ...t
66
66
  });
67
- v === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []], o.loading = !1);
67
+ v === n && (o.total = a.total || ((r = a.data) == null ? void 0 : r.length) || 0, o.records = [...a.data || []], o.loading = !1);
68
68
  } catch {
69
- v === r && (o.records = [], o.total = 0, o.loading = !1);
69
+ v === n && (o.records = [], o.total = 0, o.loading = !1);
70
70
  } finally {
71
71
  E == null || E();
72
72
  }
73
- }, J = (e) => {
73
+ }, K = (e) => {
74
74
  const t = {};
75
- return Object.entries(e).forEach(([r, n]) => {
76
- if (t[r] = n, _ && n) {
77
- const a = _[r];
78
- a && (t[r] = de(a, n));
75
+ return Object.entries(e).forEach(([n, r]) => {
76
+ if (t[n] = r, _ && r) {
77
+ const a = _[n];
78
+ a && (t[n] = me(a, r));
79
79
  }
80
80
  }), t;
81
81
  }, ee = async (e) => {
82
- var n, a, l, g, d;
83
- const t = w(), r = {};
84
- Object.entries(t).forEach(([p, F]) => {
85
- j && j.indexOf(p) > -1 && (r[p] = F);
86
- }), await ((a = (n = z.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, r), ue(() => {
82
+ var r, a, l, g, d;
83
+ const t = w(), n = {};
84
+ Object.entries(t).forEach(([p, b]) => {
85
+ A && A.indexOf(p) > -1 && (n[p] = b);
86
+ }), await ((a = (r = z.value) == null ? void 0 : r.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, n), fe(() => {
87
87
  e == null || e();
88
88
  });
89
- }, x = (e) => {
90
- c = e;
91
- const t = J(e);
92
- B(t);
89
+ }, F = (e) => {
90
+ s = e;
91
+ const t = K(e);
92
+ J(t);
93
93
  }, te = (e) => {
94
- x({
95
- ...c,
94
+ F({
95
+ ...s,
96
96
  ...e
97
97
  });
98
98
  }, D = () => {
99
99
  const e = w(), t = h !== !1;
100
- t && (s.current = S), x({
100
+ t && (i.current = S), F({
101
101
  ...e,
102
- filter: c.filter,
103
- sort: c.sort,
102
+ filter: s.filter,
103
+ sort: s.sort,
104
104
  current: t ? S : void 0,
105
- pageSize: t ? c.pageSize || s.pageSize : void 0
105
+ pageSize: t ? s.pageSize || i.pageSize : void 0
106
106
  });
107
- }, re = () => {
108
- k(), c.sort = {}, c.filter = {}, b == null || b(), ee(D);
109
- }, K = () => {
110
- x(c);
111
- }, ne = (e) => {
107
+ }, ne = () => {
108
+ k(), s.sort = {}, s.filter = {}, x == null || x(), ee(D);
109
+ }, O = () => {
110
+ F(s);
111
+ }, re = (e) => {
112
112
  if (h === !1)
113
- K();
113
+ O();
114
114
  else {
115
115
  const {
116
116
  current: t,
117
- pageSize: r
118
- } = s, n = o.total - e, a = Math.ceil(n / r), l = t > a ? a : t;
117
+ pageSize: n
118
+ } = i, r = o.total - e, a = Math.ceil(r / n), l = t > a ? a : t;
119
119
  te({
120
120
  current: l > 0 ? l : 1
121
121
  });
122
122
  }
123
- }, L = (e, t, r) => {
124
- var p, F;
125
- const n = w();
126
- s.current = e.current, s.pageSize = e.pageSize, R(t, r);
127
- const a = Q(r) ? [...r] : [r], l = {};
123
+ }, L = (e, t, n) => {
124
+ var p, b;
125
+ const r = w();
126
+ i.current = e.current, i.pageSize = e.pageSize, R(t, n);
127
+ const a = Q(n) ? [...n] : [n], l = {};
128
128
  for (const u of a)
129
- (p = m(Z)) != null && p.includes(u.columnKey || u.field) && u.order && (l[pe(u.columnKey || u.field)] = u.order);
129
+ (p = m(Z)) != null && p.includes(u.columnKey || u.field) && u.order && (l[Se(u.columnKey || u.field)] = u.order);
130
130
  const g = {};
131
131
  for (const u of Object.keys(t))
132
- (F = m(W)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
132
+ (b = m(W)) != null && b.includes(u) && t[u] && (g[u] = t[u]);
133
133
  const d = {
134
- ...n,
134
+ ...r,
135
135
  filter: g,
136
136
  sort: l,
137
137
  current: e.current,
138
138
  pageSize: e.pageSize
139
139
  };
140
- Se(c, d, me) || x(d);
141
- }, ae = (e, t = N.value || {}, r = A.value || {}) => {
142
- const n = (e == null ? void 0 : e.current) ?? s.current, a = (e == null ? void 0 : e.pageSize) ?? s.pageSize;
140
+ ze(s, d, he) || F(d);
141
+ }, ae = (e, t = B.value || {}, n = N.value || {}) => {
142
+ const r = (e == null ? void 0 : e.current) ?? i.current, a = (e == null ? void 0 : e.pageSize) ?? i.pageSize;
143
143
  L(
144
144
  {
145
- current: n,
145
+ current: r,
146
146
  pageSize: a
147
147
  },
148
148
  t,
149
- r,
149
+ n,
150
150
  // 此参数随意传递,并无使用
151
151
  {
152
152
  action: "sort",
@@ -154,57 +154,57 @@ const Oe = ({
154
154
  }
155
155
  );
156
156
  };
157
- le(() => {
157
+ ge(() => {
158
158
  const e = w(), {
159
159
  current: t,
160
- pageSize: r
161
- } = s;
162
- if (c = {
160
+ pageSize: n
161
+ } = i;
162
+ if (s = {
163
163
  current: t,
164
- pageSize: r,
164
+ pageSize: n,
165
165
  filter: {},
166
166
  sort: {},
167
167
  ...e
168
- }, !i) {
169
- const n = J(c);
170
- B(n);
168
+ }, !c) {
169
+ const r = K(s);
170
+ J(r);
171
171
  }
172
- }), fe(() => m(I), () => {
172
+ }), de(() => m(V), () => {
173
173
  D();
174
174
  }, {
175
175
  deep: !0
176
176
  });
177
- const oe = O(() => {
177
+ const oe = y(() => {
178
178
  if (o.total === 0)
179
179
  return "-";
180
180
  const {
181
181
  current: e,
182
182
  pageSize: t
183
- } = s;
183
+ } = i;
184
184
  return `${e}/${Math.ceil(o.total / t)}`;
185
185
  });
186
186
  function se(e) {
187
187
  Q(e) && (o.records = e, o.total = e.length);
188
188
  }
189
- const ie = O(() => {
189
+ const ie = y(() => {
190
190
  const {
191
191
  showLessItems: e,
192
192
  showTotal: t,
193
- showQuickJumper: r,
194
- showSizeChanger: n,
193
+ showQuickJumper: n,
194
+ showSizeChanger: r,
195
195
  pageSizeOptions: a
196
196
  } = X;
197
197
  return {
198
198
  loading: o.loading,
199
199
  pagination: {
200
- current: s.current,
201
- pageSize: s.pageSize,
200
+ current: i.current,
201
+ pageSize: i.pageSize,
202
202
  total: o.total,
203
- showSizeChanger: $(n) ? n : !e,
204
- showQuickJumper: $(r) ? r : !e,
203
+ showSizeChanger: $(r) ? r : !e,
204
+ showQuickJumper: $(n) ? n : !e,
205
205
  showLessItems: e,
206
206
  size: "default",
207
- pageSizeOptions: he(a) ? ["10", "20", "50", "100"] : a,
207
+ pageSizeOptions: Te(a) ? ["10", "20", "50", "100"] : a,
208
208
  showTotal: t ? (l) => C("span", {
209
209
  class: P("pagination-total-wrapper")
210
210
  }, [T("ap.apTable.pagination.totalLeftPrefix"), " ", C("span", {
@@ -219,27 +219,35 @@ const Oe = ({
219
219
  dataSource: o.records
220
220
  };
221
221
  });
222
+ function ce(e, t = !0) {
223
+ Object.assign(i, e), s.current = e.current, s.pageSize = e.pageSize, t && O();
224
+ }
225
+ function ue() {
226
+ return {
227
+ ...i
228
+ };
229
+ }
222
230
  return {
223
231
  formRef: z,
224
232
  submit: D,
225
- reset: re,
226
- refresh: K,
227
- refreshByDelete: ne,
233
+ reset: ne,
234
+ refresh: O,
235
+ refreshByDelete: re,
228
236
  data: o,
229
- current: s.current,
230
- pageSize: s.pageSize,
231
237
  handleTableChange: L,
232
238
  handleTableChangeOptional: ae,
233
239
  tableProps: ie,
234
- dataSource: O(() => o.records),
240
+ dataSource: y(() => o.records),
235
241
  setDataSource: se,
236
242
  getColumnSFConfig: q,
237
- sortedInfo: A,
238
- filteredInfo: N
243
+ sortedInfo: N,
244
+ filteredInfo: B,
245
+ getPaging: ue,
246
+ setPaging: ce
239
247
  };
240
248
  };
241
249
  export {
242
250
  S as DEFAULT_CURRENT,
243
- y as DEFAULT_PAGE_SIZE,
244
- Oe as useTablePaging
251
+ I as DEFAULT_PAGE_SIZE,
252
+ Ie as useTablePaging
245
253
  };
@@ -9,6 +9,7 @@ import { ApTableIndexProps } from './components/interface';
9
9
  import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
10
10
  import { RowSelectionReturnType } from './hooks/use-table-row-selection';
11
11
  import { PaginationProps } from '@aplus-frontend/antdv';
12
+ import { InternalPagingType } from './hooks/use-table-paging-ng';
12
13
  export type ValueEnumType = {
13
14
  text: string;
14
15
  /**
@@ -371,7 +372,7 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
371
372
  /**
372
373
  * 表格数据源
373
374
  */
374
- dataSource: ComputedRef<RecordType>;
375
+ dataSource: RecordType;
375
376
  /**
376
377
  * 行选中相关的数据和API
377
378
  */
@@ -393,6 +394,18 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
393
394
  };
394
395
  y: undefined;
395
396
  };
397
+ /**
398
+ * 获取分页参数
399
+ * @returns
400
+ */
401
+ getPaging: () => InternalPagingType;
402
+ /**
403
+ * 设置表格分页参数
404
+ * @param nextPaging 新的分页参数
405
+ * @param refreshImmediately 是否立刻刷新数据,默认为`true`
406
+ * @returns
407
+ */
408
+ setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
396
409
  };
397
410
  export type ApTableContextRenderConfig = {
398
411
  color: string;
@@ -1,7 +1,7 @@
1
1
  import { ApColumnType, ValueEnum, ValueEnumType } from './interface';
2
2
  import { ValueTypeRenderConfig } from '../config-provider';
3
3
  import { apTableRenderItemMap } from './constants';
4
- import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ComputedRef, ExtractPropTypes, PropType, CSSProperties, VNodeArrayChildren, RendererNode, RendererElement } from 'vue';
4
+ import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ExtractPropTypes, PropType, CSSProperties, VNodeArrayChildren, RendererNode, RendererElement } from 'vue';
5
5
  import { EditableColumnType } from '../editable-table/interface';
6
6
  import { ColumnType, ColumnGroupType } from '@aplus-frontend/antdv/es/table';
7
7
  import { ApTableDynamicCompProps } from './components/interface';
@@ -534,7 +534,7 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
534
534
  }>, {
535
535
  focus: (options?: InputFocusOptions) => void;
536
536
  blur: () => void;
537
- resizableTextArea: ComputedRef<any>;
537
+ resizableTextArea: any;
538
538
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
539
539
  "update:value": (...args: any[]) => void;
540
540
  }, PublicProps, {
@@ -816,7 +816,7 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
816
816
  }>, {
817
817
  focus: (options?: InputFocusOptions) => void;
818
818
  blur: () => void;
819
- resizableTextArea: ComputedRef<any>;
819
+ resizableTextArea: any;
820
820
  }, {}, {}, {}, {
821
821
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
822
822
  mode: FieldMode;
@@ -16,7 +16,7 @@ const V = { key: 1 }, j = { key: 1 }, G = /* @__PURE__ */ g({
16
16
  ), c = r(() => {
17
17
  var n;
18
18
  return (n = Object.keys((e == null ? void 0 : e.titleProps) || {})) == null ? void 0 : n.length;
19
- }), p = r(() => e.padding ?? (c.value ? "14px 24px 24px" : "24px"));
19
+ }), p = r(() => e.padding ?? (c.value ? "12px 14px 14px" : "12px 14px"));
20
20
  return (n, w) => {
21
21
  var m, d;
22
22
  return t(), s("div", {
@@ -0,0 +1,10 @@
1
+ import { Recordable } from '../../../type';
2
+ import { cacheDataArrType, CacheInterface, PropertyKeyType } from '../interface';
3
+ export default class Cache implements CacheInterface {
4
+ store: Map<PropertyKeyType, Map<string, any>>;
5
+ constructor();
6
+ get(node: PropertyKeyType): Map<string, Recordable> | undefined;
7
+ set(node: PropertyKeyType, data: cacheDataArrType): void;
8
+ has(node: PropertyKeyType): boolean;
9
+ del(node: PropertyKeyType): boolean;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { CacheInterface, PropertyKeyType, cacheDataArrType } from '../interface';
2
+ export declare class LruCacher implements CacheInterface {
3
+ store: Map<PropertyKeyType, Map<PropertyKeyType, any>>;
4
+ maxSize: number;
5
+ isExpired: boolean;
6
+ expiredTimer: ReturnType<typeof setTimeout> | null;
7
+ constructor(max?: number);
8
+ changeMaxSize(maxSize: number): void;
9
+ expireCheck(): void;
10
+ has(ModelKey: PropertyKeyType): boolean;
11
+ get(ModelKey: PropertyKeyType): Map<PropertyKey, any> | null | undefined;
12
+ set(ModelKey: PropertyKeyType, value: Map<string, any> | cacheDataArrType): void;
13
+ del(ModelKey: PropertyKeyType): void;
14
+ clear(): void;
15
+ }
16
+ export default LruCacher;
@@ -0,0 +1,43 @@
1
+ class r {
2
+ constructor(e = 50) {
3
+ this.store = /* @__PURE__ */ new Map(), this.maxSize = e, this.isExpired = !1, this.expiredTimer = null;
4
+ }
5
+ changeMaxSize(e) {
6
+ this.maxSize = e;
7
+ }
8
+ expireCheck() {
9
+ this.isExpired && (clearTimeout(this.expiredTimer), this.expiredTimer = setTimeout(() => {
10
+ this.isExpired = !1;
11
+ }));
12
+ }
13
+ has(e) {
14
+ return this.expireCheck(), this.store.has(e);
15
+ }
16
+ get(e) {
17
+ if (this.expireCheck(), !this.has(e))
18
+ return null;
19
+ const s = this.store.get(e);
20
+ return this.store.delete(e), this.store.set(e, s), s;
21
+ }
22
+ set(e, s) {
23
+ if (this.expireCheck(), !this.isExpired) {
24
+ if (this.has(e))
25
+ this.store.delete(e);
26
+ else if (this.store.size >= this.maxSize) {
27
+ const t = this.store.keys().next().value;
28
+ t && this.store.delete(t);
29
+ }
30
+ Array.isArray(s) && (s = new Map(s)), this.store.set(e, s);
31
+ }
32
+ }
33
+ del(e) {
34
+ this.isExpired = !0, this.store.delete(e);
35
+ }
36
+ clear() {
37
+ this.store.clear();
38
+ }
39
+ }
40
+ export {
41
+ r as LruCacher,
42
+ r as default
43
+ };
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ import { CacheInterface, PropertyKeyType } from './interface';
3
+ type DataModel = {
4
+ getter: (key?: string) => Promise<any>;
5
+ setter: (key: string, data: any) => Promise<any>;
6
+ has: (key: string) => Promise<any>;
7
+ };
8
+ export declare const useApKeepAliveProvide: (cache: CacheInterface, currentModuleKey: Ref<PropertyKeyType>) => void;
9
+ export declare const useApKeepAliveInject: () => DataModel;
10
+ export {};
@@ -0,0 +1,31 @@
1
+ import { provide as o, nextTick as i, inject as v } from "vue";
2
+ const a = Symbol("ApKeepAliveProvideKey"), c = (n, r) => {
3
+ o(a, {
4
+ getter: async (e) => {
5
+ await i();
6
+ const t = n.get(r.value);
7
+ return t ? e ? t == null ? void 0 : t.get(e) : Object.fromEntries(t) : {};
8
+ },
9
+ setter: async (e, t) => {
10
+ await i();
11
+ let s = n.get(r.value);
12
+ return s || (s = /* @__PURE__ */ new Map(), n.set(r.value, s)), s == null ? void 0 : s.set(e, t);
13
+ },
14
+ has: async (e) => {
15
+ await i();
16
+ const t = n.get(r.value);
17
+ return !!(t != null && t.has(e));
18
+ }
19
+ });
20
+ }, l = () => v(a, {
21
+ getter: async () => {
22
+ },
23
+ setter: async () => {
24
+ },
25
+ has: async () => {
26
+ }
27
+ });
28
+ export {
29
+ l as useApKeepAliveInject,
30
+ c as useApKeepAliveProvide
31
+ };
@@ -0,0 +1,101 @@
1
+ import { LruCacher } from './cacher/lru-cacher';
2
+ import { useApKeepAliveInject } from './hook';
3
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
4
+ import { CacheInterface, MatchPattern } from './interface';
5
+ export * from './interface';
6
+ declare const ApKeepAlive: {
7
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
8
+ store: {
9
+ type: PropType<CacheInterface>;
10
+ };
11
+ debug: {
12
+ type: PropType<boolean>;
13
+ default: boolean;
14
+ };
15
+ max: {
16
+ type: PropType<number>;
17
+ };
18
+ exclude: {
19
+ type: PropType<MatchPattern>;
20
+ };
21
+ include: {
22
+ type: PropType<MatchPattern>;
23
+ };
24
+ stopTags: {
25
+ type: PropType<string[]>;
26
+ default: () => never[];
27
+ };
28
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
29
+ [key: string]: any;
30
+ }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
31
+ debug: boolean;
32
+ stopTags: string[];
33
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
34
+ P: {};
35
+ B: {};
36
+ D: {};
37
+ C: {};
38
+ M: {};
39
+ Defaults: {};
40
+ }, Readonly< ExtractPropTypes<{
41
+ store: {
42
+ type: PropType<CacheInterface>;
43
+ };
44
+ debug: {
45
+ type: PropType<boolean>;
46
+ default: boolean;
47
+ };
48
+ max: {
49
+ type: PropType<number>;
50
+ };
51
+ exclude: {
52
+ type: PropType<MatchPattern>;
53
+ };
54
+ include: {
55
+ type: PropType<MatchPattern>;
56
+ };
57
+ stopTags: {
58
+ type: PropType<string[]>;
59
+ default: () => never[];
60
+ };
61
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
62
+ [key: string]: any;
63
+ }>[] | undefined, {}, {}, {}, {
64
+ debug: boolean;
65
+ stopTags: string[];
66
+ }>;
67
+ __isFragment?: never;
68
+ __isTeleport?: never;
69
+ __isSuspense?: never;
70
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
71
+ store: {
72
+ type: PropType<CacheInterface>;
73
+ };
74
+ debug: {
75
+ type: PropType<boolean>;
76
+ default: boolean;
77
+ };
78
+ max: {
79
+ type: PropType<number>;
80
+ };
81
+ exclude: {
82
+ type: PropType<MatchPattern>;
83
+ };
84
+ include: {
85
+ type: PropType<MatchPattern>;
86
+ };
87
+ stopTags: {
88
+ type: PropType<string[]>;
89
+ default: () => never[];
90
+ };
91
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
92
+ [key: string]: any;
93
+ }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
94
+ debug: boolean;
95
+ stopTags: string[];
96
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
97
+ $props: {
98
+ onClick?: () => void;
99
+ };
100
+ }));
101
+ export { ApKeepAlive, LruCacher, useApKeepAliveInject };
@@ -0,0 +1,13 @@
1
+ import { withInstall as e } from "@aplus-frontend/utils";
2
+ import p from "./keep-alive.mjs";
3
+ import { LruCacher as m } from "./cacher/lru-cacher.mjs";
4
+ import { useApKeepAliveInject as l } from "./hook.mjs";
5
+ import { ApKeepAliveProps as c, forceStopTags as v } from "./interface.mjs";
6
+ const t = e(p);
7
+ export {
8
+ t as ApKeepAlive,
9
+ c as ApKeepAliveProps,
10
+ m as LruCacher,
11
+ v as forceStopTags,
12
+ l as useApKeepAliveInject
13
+ };