@aplus-frontend/ui 7.0.0-beta.3 → 7.0.0

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 (199) hide show
  1. package/es/src/ag-grid/hooks/use-columns-def.mjs +71 -70
  2. package/es/src/ag-grid/index.vue.mjs +1 -0
  3. package/es/src/ag-grid/interface.d.ts +1 -0
  4. package/es/src/ag-grid/style/custom-header.d.ts +2 -2
  5. package/es/src/ag-grid/style/editable.d.ts +2 -2
  6. package/es/src/ag-grid/style/index.d.ts +2 -2
  7. package/es/src/ap-action/item-dropdown/index.vue.mjs +18 -17
  8. package/es/src/ap-action/style/dropdown-item.d.ts +2 -2
  9. package/es/src/ap-action/style/index.d.ts +2 -2
  10. package/es/src/ap-button/style/index.d.ts +2 -2
  11. package/es/src/ap-button/utils/index.mjs +16 -16
  12. package/es/src/ap-descriptions/style/index.d.ts +2 -2
  13. package/es/src/ap-download/ap-download.vue.d.ts +4 -4
  14. package/es/src/ap-download/ap-download.vue.mjs +27 -27
  15. package/es/src/ap-download/interface.d.ts +4 -0
  16. package/es/src/ap-download/style/index.d.ts +2 -2
  17. package/es/src/ap-drawer/style/index.d.ts +2 -2
  18. package/es/src/ap-field/style/index.d.ts +2 -2
  19. package/es/src/ap-form/style/drawer-form.d.ts +2 -2
  20. package/es/src/ap-form/style/item-group.d.ts +2 -2
  21. package/es/src/ap-form/style/item-text-group.d.ts +2 -2
  22. package/es/src/ap-form/style/item.d.ts +2 -2
  23. package/es/src/ap-form/style/modal-form.d.ts +2 -2
  24. package/es/src/ap-form/style/search-form-sorter.d.ts +2 -2
  25. package/es/src/ap-form/style/search-form.d.ts +2 -2
  26. package/es/src/ap-grid/style/editable.d.ts +2 -2
  27. package/es/src/ap-grid/style/index.d.ts +2 -2
  28. package/es/src/ap-grid/utils/col.mjs +33 -33
  29. package/es/src/ap-list/style/index.d.ts +2 -2
  30. package/es/src/ap-modal/interface.d.ts +31 -11
  31. package/es/src/ap-modal/utils/createModal.mjs +52 -45
  32. package/es/src/ap-pro-card/style/divider.d.ts +2 -2
  33. package/es/src/ap-pro-card/style/index.d.ts +2 -2
  34. package/es/src/ap-pro-card/style/operation.d.ts +2 -2
  35. package/es/src/ap-pro-card/style/statistic.d.ts +2 -2
  36. package/es/src/ap-pro-card/style/statistics-card.d.ts +2 -2
  37. package/es/src/ap-pro-card/style/title.d.ts +2 -2
  38. package/es/src/ap-table/style/ellipsis.d.ts +2 -2
  39. package/es/src/ap-table/style/index-comp.d.ts +2 -2
  40. package/es/src/ap-table/style/index.d.ts +2 -2
  41. package/es/src/ap-table/style/setting.d.ts +2 -2
  42. package/es/src/ap-tag/style/group.d.ts +2 -2
  43. package/es/src/ap-tag/style/index.d.ts +2 -2
  44. package/es/src/ap-upload/style/index.d.ts +2 -2
  45. package/es/src/business/ag-grid-modal/style/index.d.ts +2 -2
  46. package/es/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
  47. package/es/src/business/ag-grid-modal/utils.mjs +23 -23
  48. package/es/src/business/ap-appendix/style/index.d.ts +3 -3
  49. package/es/src/business/ap-appendix/style/index.mjs +1 -1
  50. package/es/src/business/ap-attachment/ApAttachment.mjs +70 -66
  51. package/es/src/business/ap-attachment/style/index.d.ts +2 -2
  52. package/es/src/business/ap-batch-action/style/index.d.ts +3 -3
  53. package/es/src/business/ap-batch-action/style/index.mjs +1 -1
  54. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +50 -56
  55. package/es/src/business/ap-batch-action-group/style/index.d.ts +3 -0
  56. package/es/src/business/ap-batch-action-group/style/index.mjs +14 -0
  57. package/es/src/business/ap-card/style/index.d.ts +3 -3
  58. package/es/src/business/ap-card/style/index.mjs +8 -8
  59. package/es/src/business/ap-copy/style/index.d.ts +2 -2
  60. package/es/src/business/ap-draggable-grid/style/index.d.ts +2 -2
  61. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
  62. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +57 -49
  63. package/es/src/business/ap-expand-alert/index.d.ts +5 -2
  64. package/es/src/business/ap-expand-alert/interface.d.ts +1 -1
  65. package/es/src/business/ap-expand-alert/style/index.d.ts +2 -2
  66. package/es/src/business/ap-image/style/index.d.ts +3 -3
  67. package/es/src/business/ap-image/style/index.mjs +6 -6
  68. package/es/src/business/ap-input-radio/style/index.d.ts +2 -2
  69. package/es/src/business/ap-label/style/index.d.ts +2 -2
  70. package/es/src/business/ap-ladder/style/index.d.ts +2 -2
  71. package/es/src/business/ap-product-info/style/index.d.ts +2 -2
  72. package/es/src/business/ap-radio-group/style/index.d.ts +2 -2
  73. package/es/src/business/ap-select-layout/style/index.d.ts +2 -2
  74. package/es/src/business/ap-size-input/style/index.d.ts +2 -2
  75. package/es/src/business/ap-status/style/index.d.ts +2 -2
  76. package/es/src/business/ap-summary/style/index.d.ts +2 -2
  77. package/es/src/business/ap-table-modal/style/index.d.ts +2 -2
  78. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
  79. package/es/src/business/ap-title/style/index.d.ts +2 -2
  80. package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
  81. package/es/src/business/ap-value-select-card/style/index.d.ts +2 -2
  82. package/es/src/business/ap-view/style/index.d.ts +3 -3
  83. package/es/src/business/ap-view/style/index.mjs +1 -1
  84. package/es/src/business/batch-input-group/style/index.d.ts +2 -2
  85. package/es/src/business/hooks/usePageListAgGrid.mjs +7 -6
  86. package/es/src/check-card/style/index.d.ts +2 -2
  87. package/es/src/editable-table/style/index.d.ts +2 -2
  88. package/es/src/full-screen/style/index.d.ts +2 -2
  89. package/es/src/mask/style/index.d.ts +2 -2
  90. package/es/src/scroll-bar/style/index.d.ts +2 -2
  91. package/es/src/scroll-view/style/index.d.ts +2 -2
  92. package/es/src/splitter/style/index.d.ts +2 -2
  93. package/es/src/text/style/group.d.ts +2 -2
  94. package/es/src/text/style/index.d.ts +2 -2
  95. package/es/src/utils/cssinjs/index.d.ts +2 -2
  96. package/es/src/utils/cssinjs/index.mjs +41 -35
  97. package/es/src/utils/cssinjs/plugin-specificity.mjs +13 -0
  98. package/es/src/version.d.ts +1 -1
  99. package/es/src/version.mjs +1 -1
  100. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  101. package/lib/src/ag-grid/index.vue.js +1 -1
  102. package/lib/src/ag-grid/interface.d.ts +1 -0
  103. package/lib/src/ag-grid/style/custom-header.d.ts +2 -2
  104. package/lib/src/ag-grid/style/editable.d.ts +2 -2
  105. package/lib/src/ag-grid/style/index.d.ts +2 -2
  106. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  107. package/lib/src/ap-action/style/dropdown-item.d.ts +2 -2
  108. package/lib/src/ap-action/style/index.d.ts +2 -2
  109. package/lib/src/ap-button/style/index.d.ts +2 -2
  110. package/lib/src/ap-button/utils/index.js +1 -1
  111. package/lib/src/ap-descriptions/style/index.d.ts +2 -2
  112. package/lib/src/ap-download/ap-download.vue.d.ts +4 -4
  113. package/lib/src/ap-download/ap-download.vue.js +1 -1
  114. package/lib/src/ap-download/interface.d.ts +4 -0
  115. package/lib/src/ap-download/style/index.d.ts +2 -2
  116. package/lib/src/ap-drawer/style/index.d.ts +2 -2
  117. package/lib/src/ap-field/style/index.d.ts +2 -2
  118. package/lib/src/ap-form/style/drawer-form.d.ts +2 -2
  119. package/lib/src/ap-form/style/item-group.d.ts +2 -2
  120. package/lib/src/ap-form/style/item-text-group.d.ts +2 -2
  121. package/lib/src/ap-form/style/item.d.ts +2 -2
  122. package/lib/src/ap-form/style/modal-form.d.ts +2 -2
  123. package/lib/src/ap-form/style/search-form-sorter.d.ts +2 -2
  124. package/lib/src/ap-form/style/search-form.d.ts +2 -2
  125. package/lib/src/ap-grid/style/editable.d.ts +2 -2
  126. package/lib/src/ap-grid/style/index.d.ts +2 -2
  127. package/lib/src/ap-grid/utils/col.js +1 -1
  128. package/lib/src/ap-list/style/index.d.ts +2 -2
  129. package/lib/src/ap-modal/interface.d.ts +31 -11
  130. package/lib/src/ap-modal/utils/createModal.js +1 -1
  131. package/lib/src/ap-pro-card/style/divider.d.ts +2 -2
  132. package/lib/src/ap-pro-card/style/index.d.ts +2 -2
  133. package/lib/src/ap-pro-card/style/operation.d.ts +2 -2
  134. package/lib/src/ap-pro-card/style/statistic.d.ts +2 -2
  135. package/lib/src/ap-pro-card/style/statistics-card.d.ts +2 -2
  136. package/lib/src/ap-pro-card/style/title.d.ts +2 -2
  137. package/lib/src/ap-table/style/ellipsis.d.ts +2 -2
  138. package/lib/src/ap-table/style/index-comp.d.ts +2 -2
  139. package/lib/src/ap-table/style/index.d.ts +2 -2
  140. package/lib/src/ap-table/style/setting.d.ts +2 -2
  141. package/lib/src/ap-tag/style/group.d.ts +2 -2
  142. package/lib/src/ap-tag/style/index.d.ts +2 -2
  143. package/lib/src/ap-upload/style/index.d.ts +2 -2
  144. package/lib/src/business/ag-grid-modal/style/index.d.ts +2 -2
  145. package/lib/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
  146. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  147. package/lib/src/business/ap-appendix/style/index.d.ts +3 -3
  148. package/lib/src/business/ap-appendix/style/index.js +1 -1
  149. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  150. package/lib/src/business/ap-attachment/style/index.d.ts +2 -2
  151. package/lib/src/business/ap-batch-action/style/index.d.ts +3 -3
  152. package/lib/src/business/ap-batch-action/style/index.js +1 -1
  153. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  154. package/lib/src/business/ap-batch-action-group/style/index.d.ts +3 -0
  155. package/lib/src/business/ap-batch-action-group/style/index.js +1 -0
  156. package/lib/src/business/ap-card/style/index.d.ts +3 -3
  157. package/lib/src/business/ap-card/style/index.js +1 -1
  158. package/lib/src/business/ap-copy/style/index.d.ts +2 -2
  159. package/lib/src/business/ap-draggable-grid/style/index.d.ts +2 -2
  160. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
  161. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  162. package/lib/src/business/ap-expand-alert/index.d.ts +5 -2
  163. package/lib/src/business/ap-expand-alert/interface.d.ts +1 -1
  164. package/lib/src/business/ap-expand-alert/style/index.d.ts +2 -2
  165. package/lib/src/business/ap-image/style/index.d.ts +3 -3
  166. package/lib/src/business/ap-image/style/index.js +1 -1
  167. package/lib/src/business/ap-input-radio/style/index.d.ts +2 -2
  168. package/lib/src/business/ap-label/style/index.d.ts +2 -2
  169. package/lib/src/business/ap-ladder/style/index.d.ts +2 -2
  170. package/lib/src/business/ap-product-info/style/index.d.ts +2 -2
  171. package/lib/src/business/ap-radio-group/style/index.d.ts +2 -2
  172. package/lib/src/business/ap-select-layout/style/index.d.ts +2 -2
  173. package/lib/src/business/ap-size-input/style/index.d.ts +2 -2
  174. package/lib/src/business/ap-status/style/index.d.ts +2 -2
  175. package/lib/src/business/ap-summary/style/index.d.ts +2 -2
  176. package/lib/src/business/ap-table-modal/style/index.d.ts +2 -2
  177. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  178. package/lib/src/business/ap-title/style/index.d.ts +2 -2
  179. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
  180. package/lib/src/business/ap-value-select-card/style/index.d.ts +2 -2
  181. package/lib/src/business/ap-view/style/index.d.ts +3 -3
  182. package/lib/src/business/ap-view/style/index.js +1 -1
  183. package/lib/src/business/batch-input-group/style/index.d.ts +2 -2
  184. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  185. package/lib/src/check-card/style/index.d.ts +2 -2
  186. package/lib/src/editable-table/style/index.d.ts +2 -2
  187. package/lib/src/full-screen/style/index.d.ts +2 -2
  188. package/lib/src/mask/style/index.d.ts +2 -2
  189. package/lib/src/scroll-bar/style/index.d.ts +2 -2
  190. package/lib/src/scroll-view/style/index.d.ts +2 -2
  191. package/lib/src/splitter/style/index.d.ts +2 -2
  192. package/lib/src/text/style/group.d.ts +2 -2
  193. package/lib/src/text/style/index.d.ts +2 -2
  194. package/lib/src/utils/cssinjs/index.d.ts +2 -2
  195. package/lib/src/utils/cssinjs/index.js +1 -1
  196. package/lib/src/utils/cssinjs/plugin-specificity.js +1 -0
  197. package/lib/src/version.d.ts +1 -1
  198. package/lib/src/version.js +1 -1
  199. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
2
  import { ApFormToken } from './token';
3
- import { Ref } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
4
  export declare const genSearchFormSorter: GenStyleFunc<ApFormToken>;
5
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
5
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
6
6
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { GenStyleFunc, StyleMixin } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genPopoverStyle: StyleMixin;
4
4
  export declare const genSearchFormStyle: GenStyleFunc;
5
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
5
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
6
6
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genEditableGridStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export type ApGridToken = {
4
4
  apGridFixedScrollingBoxShadowColor: string;
5
5
  };
6
6
  export declare const genApGridStyle: GenStyleFunc<ApGridToken>;
7
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
7
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
8
8
  export default _default;
@@ -1,23 +1,23 @@
1
- import { createVNode as u, Fragment as h } from "vue";
2
- import { isArray as b, isUndefined as E, isString as o, isBoolean as x, isNumber as O, pick as F } from "lodash-unified";
3
- import { valueEnumToArray as S, objectToString as $, getTableTitle as R, getTableRenderType as V, getTableRenderProps as B, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
1
+ import { createVNode as u, Fragment as T } from "vue";
2
+ import { isArray as x, isUndefined as E, isString as o, isBoolean as F, isNumber as O, pick as R } from "lodash-unified";
3
+ import { valueEnumToArray as S, objectToString as $, getTableTitle as v, getTableRenderType as V, getTableRenderProps as B, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
4
4
  import { noRenderAsFormItemValueList as _ } from "../../ap-table/constants.mjs";
5
5
  import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
6
6
  import j from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
7
- function T(e, t) {
7
+ function c(e, t) {
8
8
  if (t)
9
- return b(t) ? t.reduce((r, n) => r?.[n], e) : e?.[t];
9
+ return x(t) ? t.reduce((r, n) => r?.[n], e) : e?.[t];
10
10
  }
11
- function v(e) {
11
+ function A(e) {
12
12
  if (!E(e))
13
- return b(e) ? e.reduce((t, r) => o(r) ? `${t}${t ? "." : ""}${r}` : `${t}[${r}]`, "") : String(e);
13
+ return x(e) ? e.reduce((t, r) => o(r) ? `${t}${t ? "." : ""}${r}` : `${t}[${r}]`, "") : String(e);
14
14
  }
15
- function A(e) {
15
+ function N(e) {
16
16
  if (e)
17
17
  return e === !0 ? "left" : e;
18
18
  }
19
19
  function q(e) {
20
- return x(e) ? {
20
+ return F(e) ? {
21
21
  sortable: e
22
22
  } : e ? {
23
23
  sortable: !0,
@@ -29,7 +29,7 @@ function q(e) {
29
29
  }
30
30
  function I(e) {
31
31
  let t;
32
- return x(e.filters) && e.valueEnum ? t = S(e.valueEnum) : t = e.filters, t?.map((r) => ({
32
+ return F(e.filters) && e.valueEnum ? t = S(e.valueEnum) : t = e.filters, t?.map((r) => ({
33
33
  label: o(r.text) ? r.text : "",
34
34
  value: r.value
35
35
  }));
@@ -65,10 +65,10 @@ function z(e, t, r) {
65
65
  }
66
66
  return r;
67
67
  }
68
- function c(e, t, r) {
69
- const n = F(e, ["width", "minWidth", "align"]);
70
- return n.field = v(e.dataIndex), n.fixed = A(e.fixed), n.slots = {
71
- header: () => R(e, r, void 0, t)
68
+ function y(e, t, r) {
69
+ const n = R(e, ["width", "minWidth", "align"]);
70
+ return n.field = A(e.dataIndex), n.fixed = N(e.fixed), n.slots = {
71
+ header: () => v(e, r, void 0, t)
72
72
  }, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
73
73
  }
74
74
  function D(e, t, r) {
@@ -88,65 +88,65 @@ const G = ({
88
88
  }), l = M(s, d, t.record, n), a = r.renderText?.({
89
89
  value: e,
90
90
  ...t
91
- }) || e, p = r.renderText ? u(h, null, [r.renderText?.({
91
+ }) || e, p = r.renderText ? u(T, null, [r.renderText?.({
92
92
  value: e,
93
93
  ...t
94
94
  })]) : l;
95
95
  let f = i ? z(r, a, p) : p;
96
96
  if (r.customRender) {
97
- const N = r._path || [], w = D(t.record, t.rowIndex, t.params?.rowKey);
97
+ const w = r._path || [], h = D(t.record, t.rowIndex, t.params?.rowKey);
98
98
  f = r.customRender({
99
99
  value: e,
100
100
  ...t,
101
101
  column: r,
102
102
  originalNode: f,
103
103
  originalText: a,
104
- path: [...N, String(w)]
104
+ path: h && [...w, String(h)]
105
105
  });
106
106
  }
107
- return u(h, null, [f]);
107
+ return u(T, null, [f]);
108
108
  };
109
- function y(e, t, r, n) {
110
- const i = F(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
111
- i.field = v(e.dataIndex), i.fixed = A(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
109
+ function b(e, t, r, n) {
110
+ const i = R(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
111
+ i.field = A(e.dataIndex), i.fixed = N(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
112
112
  const s = ({
113
113
  row: d,
114
114
  rowIndex: l
115
115
  }) => G({
116
- value: T(d, e.dataIndex),
117
- text: T(d, e.dataIndex),
116
+ value: c(d, e.dataIndex),
117
+ text: c(d, e.dataIndex),
118
118
  record: d,
119
119
  index: l,
120
120
  renderIndex: l,
121
121
  column: e
122
122
  }, e, n);
123
123
  return i.slots = {
124
- header: () => R(e, r, void 0, t),
124
+ header: () => v(e, r, void 0, t),
125
125
  default: s,
126
126
  footer: s
127
127
  }, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
128
128
  }
129
129
  function X(e, t, r, n) {
130
130
  if (!e.children?.length)
131
- return y(e, t, r, n);
131
+ return b(e, t, r, n);
132
132
  function i(d) {
133
133
  return d.map((l) => {
134
134
  if (l.children?.length) {
135
- const a = c(l, t, r);
135
+ const a = y(l, t, r);
136
136
  return a.children = i(l.children), a;
137
137
  }
138
- return y(l, t, r, n);
138
+ return b(l, t, r, n);
139
139
  });
140
140
  }
141
- const s = c(e, t, r);
141
+ const s = y(e, t, r);
142
142
  return s.children = i(e.children), s;
143
143
  }
144
144
  export {
145
145
  G as contentCustom,
146
- v as dataIndexToField,
147
- T as getValueByDataIndex,
146
+ A as dataIndexToField,
147
+ c as getValueByDataIndex,
148
148
  X as transformCol,
149
- A as transformFixed,
150
- c as transformToColGroup,
151
- y as transformToColumn
149
+ N as transformFixed,
150
+ y as transformToColGroup,
151
+ b as transformToColumn
152
152
  };
@@ -1,8 +1,8 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export type ApListToken = {
4
4
  apListSpinnigOpacity: number;
5
5
  };
6
6
  export declare const genApListStyle: GenStyleFunc<ApListToken>;
7
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
7
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
8
8
  export default _default;
@@ -1,19 +1,19 @@
1
1
  import { ModalProps, ModalFuncProps } from '@aplus-frontend/antdv';
2
2
  import { ModalFunc, ModalStaticFunctions } from '@aplus-frontend/antdv/lib/modal/confirm';
3
- import { AppContext } from 'vue';
4
- export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer' | 'icon'> & Partial<{
3
+ import { AppContext, VNodeChild } from 'vue';
4
+ export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer' | 'icon' | 'footer'> & Partial<{
5
5
  /**
6
6
  * 点击取消回调
7
7
  * @param params content组件内使用defineExpose导出的对象
8
8
  * @returns
9
9
  */
10
- onCancel: (params: ContentRecord) => any | Promise<any>;
10
+ onCancel: (contentExposed: ContentRecord) => any | Promise<any>;
11
11
  /**
12
12
  * 点击确定回调
13
13
  * @param params content组件内使用defineExpose导出的对象
14
14
  * @returns
15
15
  */
16
- onOk: (params: ContentRecord) => any | Promise<any>;
16
+ onOk: (contentExposed: ContentRecord) => any | Promise<any>;
17
17
  /**
18
18
  * 指定弹框挂载的 HTML 节点
19
19
  */
@@ -34,8 +34,28 @@ export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open'
34
34
  * 弹窗的上下文,一般用于获取全局注册组件、vuex 等内容
35
35
  */
36
36
  appContext: AppContext;
37
+ /**
38
+ * 底部内容,当不需要默认底部按钮时,可以设为 :footer="null"
39
+ */
40
+ footer: ((params: {
41
+ /**
42
+ * 原始的底部内容
43
+ */
44
+ originNode: VNodeChild;
45
+ /**
46
+ * 底部按钮
47
+ */
48
+ extra: {
49
+ okBtn: VNodeChild;
50
+ cancelBtn: VNodeChild;
51
+ };
52
+ /**
53
+ * content组件内使用defineExpose导出的对象
54
+ */
55
+ contentExposed: ContentRecord;
56
+ }) => VNodeChild) | VNodeChild;
37
57
  }>;
38
- export type CreateModalFuncReturn = {
58
+ export type CreateModalFuncReturn<ContentRecord = any> = {
39
59
  /**
40
60
  * 销毁弹框
41
61
  * @returns
@@ -46,7 +66,7 @@ export type CreateModalFuncReturn = {
46
66
  * @param newConfig
47
67
  * @returns
48
68
  */
49
- update: (newConfig: CreateModalFuncProps) => void;
69
+ update: (newConfig: CreateModalFuncProps<ContentRecord>) => void;
50
70
  /**
51
71
  * 打开弹框
52
72
  * @returns
@@ -58,7 +78,7 @@ export type CreateModalFuncReturn = {
58
78
  */
59
79
  close: () => void;
60
80
  };
61
- export type CreateModalFunc = (props: CreateModalFuncProps) => CreateModalFuncReturn;
81
+ export type CreateModalFunc = <ContentRecord = any>(props: CreateModalFuncProps<ContentRecord>) => CreateModalFuncReturn<ContentRecord>;
62
82
  export type ModalStreamNextFunc<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = (option?: {
63
83
  /**
64
84
  * 下一步弹框的id
@@ -121,18 +141,18 @@ export type ModalFuncStream<ModalType extends ModalStreamTypeKey = ModalStreamTy
121
141
  export type CreateModalStream<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = Omit<CreateModalFuncProps, 'destroyOnClose' | 'onOk' | 'onCancel'> & {
122
142
  /**
123
143
  * 点击确定回调
124
- * * @param params content组件内使用defineExpose导出的对象
144
+ * * @param contentExposed content组件内使用defineExpose导出的对象
125
145
  * @param next 下一步
126
146
  * @returns
127
147
  */
128
- onOk?: (params: any, next: ModalStreamNextFunc<ModalType>) => any | Promise<any>;
148
+ onOk?: (contentExposed: any, next: ModalStreamNextFunc<ModalType>) => any | Promise<any>;
129
149
  /**
130
150
  * 点击取消回调
131
- * * @param params content组件内使用defineExpose导出的对象
151
+ * * @param contentExposed content组件内使用defineExpose导出的对象
132
152
  * @param next 下一步
133
153
  * @returns
134
154
  */
135
- onCancel?: (params: any, next: ModalStreamNextFunc<ModalType>) => any | Promise<any>;
155
+ onCancel?: (contentExposed: any, next: ModalStreamNextFunc<ModalType>) => any | Promise<any>;
136
156
  };
137
157
  export type ModalStreamTypeKey = keyof ModalStreamType;
138
158
  export type CreateModalStreamProps<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = ModalType extends ModalStreamTypeKey ? {
@@ -1,45 +1,45 @@
1
- import { render as m, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
1
+ import { render as f, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
2
2
  import { Modal as P } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as N, globalConfigCached as f } from "../../config-provider/config-provider.mjs";
4
- import { omit as L } from "lodash-unified";
5
- import { isNumeric as M } from "@aplus-frontend/utils";
3
+ import { ConfigProvider as N, globalConfigCached as m } from "../../config-provider/config-provider.mjs";
4
+ import { omit as E } from "lodash-unified";
5
+ import { isNumeric as L } from "@aplus-frontend/utils";
6
6
  import "../../config-provider/index.mjs";
7
- import { getContainerDom as u, getModalGlobalAppContext as A } from "./util.mjs";
8
- import { getTopWindow as E } from "../../utils/index.mjs";
9
- import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
10
- const z = (p) => {
11
- let o, t;
7
+ import { getContainerDom as u, getModalGlobalAppContext as M } from "./util.mjs";
8
+ import { getTopWindow as A } from "../../utils/index.mjs";
9
+ import { useNamespace as F } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const q = (o) => {
11
+ let t, n;
12
12
  const {
13
- destroyOnClose: a = !0,
14
- wrapperOffset: n = !1
15
- } = p, {
16
- b: s
17
- } = T("ap-modal");
18
- function i() {
19
- o && o(!1), setTimeout(() => {
20
- m(null, r), r.parentElement?.removeChild(r);
13
+ destroyOnClose: i = !0,
14
+ wrapperOffset: r = !1
15
+ } = o, {
16
+ b: p
17
+ } = F("ap-modal");
18
+ function s() {
19
+ t && t(!1), setTimeout(() => {
20
+ f(null, a), a.parentElement?.removeChild(a);
21
21
  }, 500);
22
22
  }
23
23
  function h() {
24
- o && o(!0);
24
+ t && t(!0);
25
25
  }
26
- function c() {
27
- o && o(!1);
26
+ function d() {
27
+ t && t(!1);
28
28
  }
29
29
  function C(e) {
30
- t && t(e);
30
+ n && n(e);
31
31
  }
32
32
  const g = /* @__PURE__ */ b({
33
33
  data() {
34
34
  return {
35
- open: a,
36
- props: p
35
+ open: i,
36
+ props: o
37
37
  };
38
38
  },
39
39
  created() {
40
- o = (e) => {
40
+ t = (e) => {
41
41
  this.open = e;
42
- }, t = (e) => {
42
+ }, n = (e) => {
43
43
  this.props = {
44
44
  ...this.props,
45
45
  ...e
@@ -52,61 +52,68 @@ const z = (p) => {
52
52
  const e = this.props?.content?.component?.exposed ?? void 0;
53
53
  await this.props?.onCancel(e);
54
54
  }
55
- a ? i() : c();
55
+ i ? s() : d();
56
56
  },
57
57
  async handleOk() {
58
58
  try {
59
- if (t({
59
+ if (n({
60
60
  confirmLoading: !0
61
61
  }), this.props?.onOk) {
62
62
  const e = this.props?.content?.component?.exposed ?? void 0;
63
63
  await this.props.onOk(e);
64
64
  }
65
- t({
65
+ n({
66
66
  confirmLoading: !1
67
- }), a ? i() : c();
67
+ }), i ? s() : d();
68
68
  } catch {
69
- t({
69
+ n({
70
70
  confirmLoading: !1
71
71
  });
72
72
  }
73
+ },
74
+ handleFooter(e) {
75
+ return o?.footer !== void 0 ? typeof o.footer == "function" ? o.footer({
76
+ ...e,
77
+ contentExposed: this.props?.content?.component?.exposed ?? void 0
78
+ }) : o.footer : e?.originNode;
73
79
  }
74
80
  },
75
81
  render() {
76
- const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
77
- return l(N, f.value, {
82
+ const e = E(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon", "footer"]);
83
+ return l(N, m.value, {
78
84
  default: () => [l(P, k({
79
85
  class: {
80
- [s()]: !0,
81
- [s("wrapper")]: n
86
+ [p()]: !0,
87
+ [p("wrapper")]: r
82
88
  },
83
89
  centered: !0
84
90
  }, e, {
85
91
  open: this.open,
86
92
  onCancel: this.handleCancel,
87
- onOk: this.handleOk
93
+ onOk: this.handleOk,
94
+ footer: this?.handleFooter
88
95
  }), {
89
96
  default: () => [l("div", {
90
97
  class: {
91
- [s("body-wrapper")]: n
98
+ [p("body-wrapper")]: r
92
99
  },
93
- style: n === !1 ? {} : {
94
- maxHeight: `calc(100vh - ${(n === !0 ? 100 : M(n) ? Number(n) : 100) * 2}px)`
100
+ style: r === !1 ? {} : {
101
+ maxHeight: `calc(100vh - ${(r === !0 ? 100 : L(r) ? Number(r) : 100) * 2}px)`
95
102
  }
96
103
  }, [this.props?.content])]
97
104
  })]
98
105
  });
99
106
  }
100
- }), x = u(f?.value?.getPopupContainer), v = u(p.getContainer), O = x || v || E().document.body, r = document.createElement("div");
101
- O.appendChild(r);
102
- const d = w(g), y = A();
103
- return d.appContext = p.appContext || y || d.appContext, m(d, r), {
104
- destroy: i,
107
+ }), x = u(m?.value?.getPopupContainer), v = u(o.getContainer), y = x || v || A().document.body, a = document.createElement("div");
108
+ y.appendChild(a);
109
+ const c = w(g), O = M();
110
+ return c.appContext = o.appContext || O || c.appContext, f(c, a), {
111
+ destroy: s,
105
112
  update: C,
106
113
  open: h,
107
- close: c
114
+ close: d
108
115
  };
109
116
  };
110
117
  export {
111
- z as createModal
118
+ q as createModal
112
119
  };
@@ -1,6 +1,6 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
2
  import { ProCardToken } from './token';
3
- import { Ref } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
4
  export declare const genProCardDividerStyle: GenStyleFunc<ProCardToken>;
5
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
5
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
6
6
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
2
  import { ProCardToken } from './token';
3
- import { Ref } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
4
  export declare const genProCardStyle: GenStyleFunc<ProCardToken>;
5
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
5
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
6
6
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genProCardOperationStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
2
  import { ProCardToken } from './token';
3
- import { Ref } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
4
  export declare const genProCardStatisticsStyle: GenStyleFunc<ProCardToken>;
5
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
5
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
6
6
  export default _default;
@@ -1,3 +1,3 @@
1
- import { Ref } from 'vue';
2
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
1
+ import { ComputedRef } from 'vue';
2
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genProCardTitleStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genTableEllipsisCellStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genTableIndexCellStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,9 +1,9 @@
1
1
  import { GenStyleFunc, StyleMixin } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export type ApTableToken = {
4
4
  apTableHeaderBg: string;
5
5
  };
6
6
  export declare const genSettingTriggerBtnStyle: StyleMixin;
7
7
  export declare const genApTableStyle: GenStyleFunc<ApTableToken>;
8
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
8
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
9
9
  export default _default;
@@ -1,9 +1,9 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genTableSettingStyle: GenStyleFunc;
4
4
  export declare const genTableSettingSelectGroupStyle: GenStyleFunc;
5
5
  export declare const genTableSettingSortableItemMetaStyle: GenStyleFunc;
6
6
  export declare const genTableSettingSortableItemStyle: GenStyleFunc;
7
7
  export declare const genTableSettingSorterStyle: GenStyleFunc;
8
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
8
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
9
9
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genTagGroupStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genApTagStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,3 +1,3 @@
1
- import { Ref } from 'vue';
2
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
1
+ import { ComputedRef } from 'vue';
2
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { Ref } from 'vue';
2
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
1
+ import { ComputedRef } from 'vue';
2
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { Ref } from 'vue';
2
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
1
+ import { ComputedRef } from 'vue';
2
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
3
3
  export default _default;