@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.2

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 (209) hide show
  1. package/es/src/ap-button/ap-button.vue.mjs +1 -1
  2. package/es/src/ap-form/ap-form.vue2.mjs +57 -58
  3. package/es/src/ap-form/interface.d.ts +4 -0
  4. package/es/src/ap-form/item/index.vue.mjs +33 -28
  5. package/es/src/ap-form/items/checkbox/index.vue.mjs +1 -0
  6. package/es/src/ap-form/items/date/index.vue.mjs +8 -7
  7. package/es/src/ap-form/items/date-range/index.vue.mjs +1 -0
  8. package/es/src/ap-form/items/number/index.vue.mjs +9 -8
  9. package/es/src/ap-form/items/radio/index.vue.mjs +1 -0
  10. package/es/src/ap-form/items/select/index.vue.mjs +7 -6
  11. package/es/src/ap-form/items/switch/index.vue.mjs +1 -0
  12. package/es/src/ap-form/items/text/index.vue2.mjs +8 -7
  13. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  14. package/es/src/ap-form/items/text-area/index.vue.mjs +1 -0
  15. package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -5
  16. package/es/src/ap-form/render/item.vue.mjs +5 -4
  17. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +10 -10
  18. package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +8 -8
  19. package/es/src/ap-form/search-form/index.vue.mjs +36 -35
  20. package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
  21. package/es/src/ap-grid/editable/index.vue.mjs +1 -1
  22. package/es/src/ap-grid/index.vue.mjs +149 -140
  23. package/es/src/ap-grid/interface.d.ts +1 -1
  24. package/es/src/ap-table/ap-table.vue2.mjs +206 -199
  25. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
  26. package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
  27. package/es/src/ap-tag/interface.d.ts +4 -0
  28. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -12
  29. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  30. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +108 -99
  31. package/es/src/business/ap-export-group/index.d.ts +3 -0
  32. package/es/src/business/ap-export-group/interface.d.ts +7 -2
  33. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  34. package/es/src/business/ap-view/ap-view.vue2.mjs +120 -114
  35. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +63 -55
  36. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +38 -38
  37. package/es/src/business/ap-view/interface.d.ts +4 -0
  38. package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
  39. package/es/src/business/hooks/usePageListApGrid.mjs +2 -4
  40. package/es/src/check-card/index.vue2.mjs +1 -1
  41. package/es/src/config-provider/css-var.mjs +2 -2
  42. package/es/src/design-token/index.mjs +9 -3
  43. package/es/src/editable-table/form-item.vue.mjs +1 -1
  44. package/es/src/editable-table/index.vue.mjs +27 -27
  45. package/es/src/locale/lang/en.mjs +1 -1
  46. package/es/src/locale/lang/zh-cn.mjs +1 -1
  47. package/lib/src/ap-button/ap-button.vue.js +1 -1
  48. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  49. package/lib/src/ap-form/interface.d.ts +4 -0
  50. package/lib/src/ap-form/item/index.vue.js +1 -1
  51. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  52. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  53. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  54. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  55. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  56. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  57. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  58. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  59. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  60. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  61. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  62. package/lib/src/ap-form/render/item.vue.js +1 -1
  63. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  64. package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
  65. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  66. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  67. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  68. package/lib/src/ap-grid/index.vue.js +1 -1
  69. package/lib/src/ap-grid/interface.d.ts +1 -1
  70. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  71. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
  72. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  73. package/lib/src/ap-tag/interface.d.ts +4 -0
  74. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  75. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  76. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  77. package/lib/src/business/ap-export-group/index.d.ts +3 -0
  78. package/lib/src/business/ap-export-group/interface.d.ts +7 -2
  79. package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
  80. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  81. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  82. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  83. package/lib/src/business/ap-view/interface.d.ts +4 -0
  84. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  85. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  86. package/lib/src/check-card/index.vue2.js +1 -1
  87. package/lib/src/config-provider/css-var.js +1 -1
  88. package/lib/src/design-token/index.js +1 -1
  89. package/lib/src/editable-table/form-item.vue.js +1 -1
  90. package/lib/src/editable-table/index.vue.js +1 -1
  91. package/lib/src/locale/lang/en.js +1 -1
  92. package/lib/src/locale/lang/zh-cn.js +1 -1
  93. package/package.json +1 -1
  94. package/theme/antd-global-overwrite/admin/index.css +5 -8
  95. package/theme/antd-global-overwrite/admin/modal.css +2 -5
  96. package/theme/antd-global-overwrite/admin/modal.less +3 -3
  97. package/theme/antd-global-overwrite/admin/table.css +3 -3
  98. package/theme/antd-global-overwrite/admin/table.less +3 -3
  99. package/theme/antd-global-overwrite/aplus/index.css +5 -8
  100. package/theme/antd-global-overwrite/aplus/modal.css +2 -5
  101. package/theme/antd-global-overwrite/aplus/modal.less +3 -3
  102. package/theme/antd-global-overwrite/aplus/table.css +3 -3
  103. package/theme/antd-global-overwrite/aplus/table.less +3 -3
  104. package/theme/ap-action/item-dropdown.css +5 -5
  105. package/theme/ap-action/item-dropdown.less +1 -1
  106. package/theme/ap-action/item.css +5 -5
  107. package/theme/ap-action/item.less +1 -1
  108. package/theme/ap-appendix/ap-appendix.css +7 -5
  109. package/theme/ap-appendix/ap-appendix.less +4 -2
  110. package/theme/ap-attachment/ap-attachment.css +7 -7
  111. package/theme/ap-attachment/ap-attachment.less +4 -4
  112. package/theme/ap-batch-action/ap-batch-action.css +9 -6
  113. package/theme/ap-batch-action/ap-batch-action.less +6 -3
  114. package/theme/ap-button/ap-button.css +3 -3
  115. package/theme/ap-card/ap-card.css +3 -3
  116. package/theme/ap-descriptions/ap-descriptions.css +6 -8
  117. package/theme/ap-descriptions/ap-descriptions.less +3 -5
  118. package/theme/ap-download/ap-download.css +10 -13
  119. package/theme/ap-download/ap-download.less +8 -11
  120. package/theme/ap-expand-alert/ap-expand-alert.css +4 -4
  121. package/theme/ap-expand-alert/ap-expand-alert.less +3 -4
  122. package/theme/ap-field/checkbox.css +4 -4
  123. package/theme/ap-field/checkbox.less +2 -1
  124. package/theme/ap-field/index.css +5 -5
  125. package/theme/ap-field/number.css +3 -3
  126. package/theme/ap-field/radio.css +4 -4
  127. package/theme/ap-field/radio.less +1 -1
  128. package/theme/ap-field/text-area.css +3 -3
  129. package/theme/ap-form/ap-form-item-group.css +3 -3
  130. package/theme/ap-form/ap-form-item.css +10 -8
  131. package/theme/ap-form/ap-form-item.less +8 -6
  132. package/theme/ap-form/drawer-form.css +3 -3
  133. package/theme/ap-form/index.css +21 -19
  134. package/theme/ap-form/item-text-group.css +3 -3
  135. package/theme/ap-form/item-text.css +3 -3
  136. package/theme/ap-form/modal-form.css +3 -3
  137. package/theme/ap-form/search-form-sorter.css +12 -12
  138. package/theme/ap-form/search-form-sorter.less +7 -7
  139. package/theme/ap-form/search-form.css +21 -19
  140. package/theme/ap-form/search-form.less +5 -5
  141. package/theme/ap-grid/editable.css +5 -5
  142. package/theme/ap-grid/editable.less +3 -2
  143. package/theme/ap-grid/index.css +43 -32
  144. package/theme/ap-grid/index.less +20 -9
  145. package/theme/ap-group-search/ap-extension-select.css +3 -3
  146. package/theme/ap-group-search/ap-group-search.css +3 -3
  147. package/theme/ap-group-search/ap-popover-select.css +3 -3
  148. package/theme/ap-image/ap-image.css +3 -3
  149. package/theme/ap-input-radio/ap-input-radio.css +3 -3
  150. package/theme/ap-label/ap-label.css +3 -3
  151. package/theme/ap-ladder/ap-ladder.css +6 -6
  152. package/theme/ap-ladder/ap-ladder.less +3 -3
  153. package/theme/ap-layout/ap-info-layout.css +3 -3
  154. package/theme/ap-list/index.css +4 -4
  155. package/theme/ap-list/index.less +2 -1
  156. package/theme/ap-product-info/ap-product-info.css +3 -3
  157. package/theme/ap-select-layout/ap-select-layout.css +11 -11
  158. package/theme/ap-select-layout/ap-select-layout.less +8 -8
  159. package/theme/ap-size-input/ap-size-input.css +3 -3
  160. package/theme/ap-status/ap-status.css +5 -6
  161. package/theme/ap-status/ap-status.less +2 -4
  162. package/theme/ap-summary/index.css +6 -6
  163. package/theme/ap-summary/index.less +3 -3
  164. package/theme/ap-table/ap-table-index.css +8 -8
  165. package/theme/ap-table/ap-table-index.less +5 -5
  166. package/theme/ap-table/ap-table-paragraph-ellipsis.css +3 -3
  167. package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
  168. package/theme/ap-table/ap-table.css +46 -42
  169. package/theme/ap-table/ap-table.less +10 -9
  170. package/theme/ap-table/setting/index.css +7 -7
  171. package/theme/ap-table/setting/modal.css +5 -5
  172. package/theme/ap-table/setting/select-group.css +3 -3
  173. package/theme/ap-table/setting/sortable-item-meta.css +3 -3
  174. package/theme/ap-table/setting/sortable-item.css +3 -3
  175. package/theme/ap-table/setting/sorter.css +5 -5
  176. package/theme/ap-table-modal/index.css +46 -42
  177. package/theme/ap-tag/ap-tag-group.css +3 -3
  178. package/theme/ap-tag/ap-tag-group.less +2 -2
  179. package/theme/ap-tag/ap-tag.css +27 -18
  180. package/theme/ap-tag/ap-tag.less +37 -24
  181. package/theme/ap-title/ap-title.css +5 -5
  182. package/theme/ap-title/ap-title.less +2 -2
  183. package/theme/ap-upload/index.css +6 -6
  184. package/theme/ap-upload/multiple-file.css +4 -4
  185. package/theme/ap-upload/multiple-file.less +1 -1
  186. package/theme/ap-upload/picture.css +5 -5
  187. package/theme/ap-upload/picture.less +2 -2
  188. package/theme/ap-upload/single-file.css +3 -3
  189. package/theme/ap-upload/upload.css +3 -3
  190. package/theme/ap-upload-single/index.css +3 -3
  191. package/theme/ap-view/ap-view.css +7 -3
  192. package/theme/ap-view/ap-view.less +4 -0
  193. package/theme/batch-input-group/index.css +5 -5
  194. package/theme/batch-input-group/popover-input.css +3 -3
  195. package/theme/check-card/index.css +22 -22
  196. package/theme/check-card/index.less +17 -15
  197. package/theme/editable-table/index.css +36 -32
  198. package/theme/editable-table/index.less +9 -7
  199. package/theme/full-screen/index.css +3 -3
  200. package/theme/index.css +174 -147
  201. package/theme/mask/index.css +3 -3
  202. package/theme/mixins/config.less +26 -4
  203. package/theme/mixins/mixins.css +3 -3
  204. package/theme/scroll-bar/index.css +3 -3
  205. package/theme/scroll-view/index.css +3 -3
  206. package/theme/splitter/index.css +8 -8
  207. package/theme/text/group.css +3 -3
  208. package/theme/text/index.css +5 -5
  209. package/theme/work-order-modal/index.css +3 -3
@@ -1,28 +1,30 @@
1
- import { defineComponent as ke, useSlots as Be, getCurrentInstance as Fe, ref as k, computed as n, unref as o, watch as B, createElementBlock as F, openBlock as s, normalizeStyle as A, normalizeClass as g, createCommentVNode as S, createElementVNode as I, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as V, createBlock as p, resolveDynamicComponent as L, renderSlot as D, normalizeProps as Ie, guardReactiveProps as Ee } from "vue";
2
- import { VxeTable as Pe, VxeColumn as Y } from "vxe-table";
1
+ import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as F, computed as n, unref as o, watch as B, createElementBlock as I, openBlock as s, normalizeStyle as V, normalizeClass as g, createCommentVNode as b, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as p, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Ee, guardReactiveProps as Pe } from "vue";
2
+ import { VxeTable as Ne, VxeColumn as Y } from "vxe-table";
3
3
  import "vxe-table/es/style.css";
4
4
  import "vxe-pc-ui/es/style.css";
5
5
  import { VxeUI as Z } from "vxe-pc-ui";
6
- import { isUndefined as b, omit as Ne } from "lodash-unified";
7
- import { ApForm as Te } from "../ap-form/index.mjs";
6
+ import { isUndefined as w, omit as Te } from "lodash-unified";
7
+ import { ApForm as ze } from "../ap-form/index.mjs";
8
8
  import "../config-provider/index.mjs";
9
- import { noRenderAsFormItemValueList as ze } from "../ap-table/constants.mjs";
10
- import { getColumnOrder as ee, updateFormProps as _e, getFieldProps as Ae, getSearchFormItemRenderNode as Ve, recursionApColumns as oe } from "../ap-table/utils.mjs";
11
- import { useTablePaging as Le } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
- import { Empty as ae, Pagination as De } from "@aplus-frontend/antdv";
13
- import { useInnerParams as Oe } from "./hooks/use-inner-params.mjs";
14
- import { toVxeProps as $e, getRowExpandProps as Ke, getRowSelectionProps as We } from "./utils/table.mjs";
15
- import je from "../ap-table/hooks/use-table-row-selection.mjs";
16
- import { useProvideApTable as He } from "../ap-table/context.mjs";
17
- import { sizeReverseMap as Me, sizeMap as qe, ROW_SELECTION_FIELD as Ue } from "./constants.mjs";
18
- import { useRenderColumns as Ge } from "./hooks/use-render-columns.mjs";
19
- import { useToken as Xe } from "@aplus-frontend/antdv/es/theme/internal";
9
+ import { noRenderAsFormItemValueList as _e } from "../ap-table/constants.mjs";
10
+ import { getColumnOrder as ee, updateFormProps as Ae, getFieldProps as Ve, getSearchFormItemRenderNode as Le, recursionApColumns as oe } from "../ap-table/utils.mjs";
11
+ import { useTablePaging as De } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
+ import { Empty as ae, Pagination as Oe } from "@aplus-frontend/antdv";
13
+ import { useInnerParams as $e } from "./hooks/use-inner-params.mjs";
14
+ import { toVxeProps as Ke, getRowExpandProps as We, getRowSelectionProps as je } from "./utils/table.mjs";
15
+ import He from "../ap-table/hooks/use-table-row-selection.mjs";
16
+ import { useProvideApTable as Me } from "../ap-table/context.mjs";
17
+ import { sizeReverseMap as qe, sizeMap as Ue, ROW_SELECTION_FIELD as Ge } from "./constants.mjs";
18
+ import { useRenderColumns as Xe } from "./hooks/use-render-columns.mjs";
19
+ import { useToken as Je } from "@aplus-frontend/antdv/es/theme/internal";
20
20
  import "../scroll-bar/index.mjs";
21
- import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
22
- import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
23
- import { useLocale as Ye } from "../config-provider/hooks/use-locale.mjs";
24
- import Ze from "../scroll-bar/index.vue.mjs";
25
- const Bo = /* @__PURE__ */ ke({
21
+ import { isDef as Qe } from "../utils/index.mjs";
22
+ import { getValidVNodeList as Ye } from "../utils/slot.mjs";
23
+ import { useNamespace as Ze } from "../config-provider/hooks/use-namespace.mjs";
24
+ import { useGlobalConfig as eo } from "../config-provider/hooks/use-global-config.mjs";
25
+ import { useLocale as oo } from "../config-provider/hooks/use-locale.mjs";
26
+ import ao from "../scroll-bar/index.vue.mjs";
27
+ const No = /* @__PURE__ */ Fe({
26
28
  name: "ApGrid",
27
29
  __name: "index",
28
30
  props: {
@@ -100,8 +102,8 @@ const Bo = /* @__PURE__ */ ke({
100
102
  searchFormWrapperStyle: {},
101
103
  tableWrapperStyle: {},
102
104
  wrapperStyle: {},
103
- manual: { type: Boolean, default: !1 },
104
- size: { default: void 0 },
105
+ manual: { type: Boolean, default: void 0 },
106
+ size: { default: "mini" },
105
107
  adaptive: { type: Boolean, default: !1 },
106
108
  columnResizable: { type: [Boolean, Object], default: !1 },
107
109
  rowKey: { default: "key" },
@@ -112,13 +114,13 @@ const Bo = /* @__PURE__ */ ke({
112
114
  },
113
115
  setup(re, { expose: te }) {
114
116
  var G;
115
- const O = Be(), a = re, w = (G = Fe()) == null ? void 0 : G.appContext.app;
116
- w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(Z), w.__VXE_PC_UI_INSTALLED__ = !0);
117
- const { e: E, b: c, be: le } = Je("ap-grid"), ne = Qe("valueTypeMap"), d = k([]), $ = k([]), m = k(), C = k(a.size), [, i] = Xe(), { t: se } = Ye();
117
+ const C = Be(), a = re, x = (G = Ie()) == null ? void 0 : G.appContext.app;
118
+ x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(Z), x.__VXE_PC_UI_INSTALLED__ = !0);
119
+ const { e: P, b: c, be: le } = Ze("ap-grid"), ne = eo("valueTypeMap"), i = F([]), $ = F([]), m = F(), y = F(a.size), [, d] = Je(), { t: se } = oo();
118
120
  Z.setConfig({
119
121
  i18n: (e, r) => se(`ap.${e}`, r)
120
122
  });
121
- const { renderConfig: de, updateSignal: ie } = Ge(d);
123
+ const { renderConfig: ie, updateSignal: de } = Xe(i);
122
124
  let K = 0;
123
125
  const ce = n(() => {
124
126
  if (m.value)
@@ -128,15 +130,15 @@ const Bo = /* @__PURE__ */ ke({
128
130
  }), W = n(() => {
129
131
  var e, r, l;
130
132
  return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
131
- (t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !ze.includes(t.valueType)
133
+ (t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
132
134
  )) == null ? void 0 : r.sort((t, u) => {
133
- let y = ee(t.order);
134
- return ee(u.order) - y;
135
+ let S = ee(t.order);
136
+ return ee(u.order) - S;
135
137
  })) == null ? void 0 : l.map((t) => {
136
- const u = _e(
138
+ const u = Ae(
137
139
  t,
138
- Ae(t.fieldProps, {})
139
- ), y = {
140
+ Ve(t.fieldProps, {})
141
+ ), S = {
140
142
  ...t,
141
143
  fieldProps: {
142
144
  label: t.title,
@@ -146,35 +148,41 @@ const Bo = /* @__PURE__ */ ke({
146
148
  },
147
149
  renderNode: void 0
148
150
  };
149
- return y.renderNode = Ve(
150
- y,
151
+ return S.renderNode = Le(
152
+ S,
151
153
  o(ne)
152
- ), y;
154
+ ), S;
153
155
  })) || [];
154
- }), ue = n(() => [
156
+ }), ue = n(() => {
157
+ var r;
158
+ return Qe(a.manual) ? a.manual : Ye(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
159
+ var t;
160
+ return ((t = l.type) == null ? void 0 : t.name) === "ApView";
161
+ });
162
+ }), pe = n(() => [
155
163
  c(),
156
164
  a.card ? null : c("wrapper"),
157
165
  a.adaptive ? c("adaptive") : null,
158
166
  a.sticky ? c("sticky") : null
159
- ].filter(Boolean)), j = n(() => oe(o(d), (e) => {
167
+ ].filter(Boolean)), j = n(() => oe(o(i), (e) => {
160
168
  if (e.sorter === !0)
161
169
  return e.key || e.dataIndex;
162
- }).filter(Boolean)), H = n(() => oe(o(d), (e) => {
170
+ }).filter(Boolean)), H = n(() => oe(o(i), (e) => {
163
171
  if (e.filters && !e.onFilter)
164
172
  return e.key || e.dataIndex;
165
173
  }).filter(Boolean)), {
166
- formRef: P,
167
- submit: N,
168
- reset: T,
169
- refresh: pe,
174
+ formRef: N,
175
+ submit: T,
176
+ reset: z,
177
+ refresh: me,
170
178
  data: f,
171
179
  tableProps: M,
172
- setDataSource: me,
173
- handleTableChange: fe
174
- } = Le({
180
+ setDataSource: fe,
181
+ handleTableChange: ge
182
+ } = De({
175
183
  async request(e) {
176
184
  var l;
177
- if (!R.value.preserveSelectedRowKeys && b(a.dataSource) && _(), !b(a.dataSource)) {
185
+ if (!k.value.preserveSelectedRowKeys && w(a.dataSource) && A(), !w(a.dataSource)) {
178
186
  const t = e.pageSize * (e.current - 1);
179
187
  return {
180
188
  data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
@@ -192,72 +200,72 @@ const Bo = /* @__PURE__ */ ke({
192
200
  sortFields: j,
193
201
  defaultParams: a.params,
194
202
  defaultData: a.defaultData,
195
- manual: a.manual,
203
+ manual: o(ue),
196
204
  formatParams: a.beforeSearchSubmit,
197
205
  pagination: a.pagination
198
- }), { sortChangeEvent: ge, filterChangeEvent: he, paginationChangeEvent: ve } = Oe(fe);
199
- He({
200
- columns: n(() => d.value),
206
+ }), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = $e(ge);
207
+ Me({
208
+ columns: n(() => i.value),
201
209
  columnsBackup: n(() => $.value),
202
- size: n(() => C.value ? qe[C.value] : "middle"),
210
+ size: n(() => y.value ? Ue[y.value] : "middle"),
203
211
  updateColumns(e) {
204
212
  var r;
205
- d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
213
+ i.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
206
214
  },
207
215
  updateSize(e) {
208
- C.value = Me[e];
216
+ y.value = qe[e];
209
217
  },
210
218
  renderConfig: n(() => ({
211
219
  className: le("table-header", "title"),
212
- color: i.value.colorPrimary
220
+ color: d.value.colorPrimary
213
221
  })),
214
222
  dataSource: n(() => o(f).records),
215
223
  getSearchFormValues: U,
216
224
  setSearchFormValues: q,
217
- submit: N,
218
- reset: T
225
+ submit: T,
226
+ reset: z
219
227
  });
220
- const Ce = n(
221
- () => d.value.some(
228
+ const ye = n(
229
+ () => i.value.some(
222
230
  (e) => e.fixed === "left" || e.fixed === !0
223
231
  ) ? "left" : void 0
224
- ), ye = n(
225
- () => b(a.loading) ? f.loading : a.loading
226
232
  ), Se = n(
227
- () => b(a.dataSource) ? f.records : a.dataSource
228
- ), { selectedRows: x, rowSelection: R, ...be } = je({
233
+ () => w(a.loading) ? f.loading : a.loading
234
+ ), be = n(
235
+ () => w(a.dataSource) ? f.records : a.dataSource
236
+ ), { selectedRows: R, rowSelection: k, ...we } = He({
229
237
  ...a.rowSelection === !0 ? {} : a.rowSelection,
230
- dataSource: Se,
238
+ dataSource: be,
231
239
  rowKey: a.rowKey
232
- }), z = () => {
240
+ }), _ = () => {
233
241
  const e = m.value;
234
- e && (x.value = [
242
+ e && (R.value = [
235
243
  ...e.getCheckboxReserveRecords(),
236
244
  ...e.getCheckboxRecords()
237
245
  ]);
238
- }, we = () => {
246
+ }, xe = () => {
239
247
  const e = m.value;
240
- e && (x.value = [e.getRadioRecord()]);
248
+ e && (R.value = [e.getRadioRecord()]);
241
249
  };
242
- function xe() {
250
+ function Re() {
243
251
  var e;
244
252
  return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
245
253
  }
246
254
  function q(e) {
247
255
  var r, l, t;
248
- (t = (l = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
256
+ (t = (l = (r = N.value) == null ? void 0 : r.apForm) == null ? void 0 : l.setFieldsValue) == null || t.call(l, e);
249
257
  }
250
258
  function U(e = !1) {
251
259
  var l, t, u;
252
260
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
253
- return (u = (t = (l = P.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : u.call(t, !0);
261
+ return (u = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : u.call(t, !0);
254
262
  }
255
- function _() {
256
- be.clearAll();
263
+ function A() {
264
+ we.clearAll();
257
265
  const e = m.value;
258
- e && (R.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
266
+ e && (k.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
259
267
  }
260
- async function Re(e, r) {
268
+ async function ke(e, r) {
261
269
  var t;
262
270
  const l = f.records[e];
263
271
  if (l)
@@ -267,8 +275,8 @@ const Bo = /* @__PURE__ */ ke({
267
275
  () => [a.columnResizable, a.columns],
268
276
  () => {
269
277
  var r;
270
- const e = xe();
271
- d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
278
+ const e = Re();
279
+ i.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
272
280
  },
273
281
  {
274
282
  deep: !0,
@@ -277,7 +285,7 @@ const Bo = /* @__PURE__ */ ke({
277
285
  ), B(
278
286
  () => a.dataSource,
279
287
  (e) => {
280
- me(e);
288
+ fe(e);
281
289
  },
282
290
  { immediate: !0, deep: !0 }
283
291
  ), B(
@@ -289,40 +297,40 @@ const Bo = /* @__PURE__ */ ke({
289
297
  ), B(
290
298
  () => a.size,
291
299
  (e) => {
292
- C.value = e;
300
+ y.value = e;
293
301
  }
294
302
  ), te({
295
- submit: N,
296
- reset: T,
297
- refresh: pe,
303
+ submit: T,
304
+ reset: z,
305
+ refresh: me,
298
306
  setSearchFormValues: q,
299
307
  getSearchFormValues: U,
300
- getShowColumns: () => o(d),
308
+ getShowColumns: () => o(i),
301
309
  rowSelection: {
302
- selectedRows: n(() => x.value),
303
- clearAll: _
310
+ selectedRows: n(() => R.value),
311
+ clearAll: A
304
312
  },
305
- scrollToRow: Re,
313
+ scrollToRow: ke,
306
314
  getDataSource: () => o(f.records)
307
- }), (e, r) => (s(), F("div", {
308
- class: g(ue.value),
309
- style: A(e.wrapperStyle)
315
+ }), (e, r) => (s(), I("div", {
316
+ class: g(pe.value),
317
+ style: V(e.wrapperStyle)
310
318
  }, [
311
- o(b)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (s(), F("div", {
319
+ o(w)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (s(), I("div", {
312
320
  key: 0,
313
- class: g(e.card ? o(E)("search-wrapper") : null),
314
- style: A(e.searchFormWrapperStyle)
321
+ class: g(e.card ? o(P)("search-wrapper") : null),
322
+ style: V(e.searchFormWrapperStyle)
315
323
  }, [
316
- X(o(Te).SearchForm, h(e.searchForm || {}, {
324
+ X(o(ze).SearchForm, h(e.searchForm || {}, {
317
325
  ref_key: "formRef",
318
- ref: P,
326
+ ref: N,
319
327
  "custom-reset": "",
320
328
  "submit-loading": o(M).loading,
321
- onSubmit: o(N),
322
- onReset: o(T)
329
+ onSubmit: o(T),
330
+ onReset: o(z)
323
331
  }), J({
324
332
  default: v(() => [
325
- (s(!0), F(Q, null, V(W.value, (l) => (s(), p(L(l.renderNode.Comp), h({
333
+ (s(!0), I(Q, null, L(W.value, (l) => (s(), p(D(l.renderNode.Comp), h({
326
334
  key: l.dataIndex,
327
335
  item: l,
328
336
  ref_for: !0
@@ -333,60 +341,61 @@ const Bo = /* @__PURE__ */ ke({
333
341
  ]),
334
342
  _: 2
335
343
  }, [
336
- O.searchFormExtra ? {
344
+ C.searchFormExtra ? {
337
345
  name: "extra",
338
346
  fn: v(() => [
339
- D(e.$slots, "searchFormExtra")
347
+ O(e.$slots, "searchFormExtra")
340
348
  ]),
341
349
  key: "0"
342
350
  } : void 0
343
351
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
344
- ], 6)) : S("", !0),
345
- I("div", {
346
- class: g([o(E)("table-wrapper"), e.card ? o(E)("table-wrapper-card") : null]),
347
- style: A(e.tableWrapperStyle)
352
+ ], 6)) : b("", !0),
353
+ E("div", {
354
+ class: g([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
355
+ style: V(e.tableWrapperStyle)
348
356
  }, [
349
- I("div", {
357
+ E("div", {
350
358
  class: g(o(c)("header-wrapper"))
351
359
  }, [
352
- D(e.$slots, "title", {
353
- selectedRows: o(x),
354
- selectedRowKeys: o(R).selectedRowKeys,
355
- shownColumns: d.value,
356
- clearAll: _
360
+ O(e.$slots, "title", {
361
+ selectedRows: o(R),
362
+ selectedRowKeys: o(k).selectedRowKeys,
363
+ shownColumns: i.value,
364
+ clearAll: A
357
365
  })
358
366
  ], 2),
359
- I("div", {
367
+ E("div", {
360
368
  class: g(o(c)("vxe-wrapper"))
361
369
  }, [
362
- (s(), p(o(Pe), h(o($e)(a), {
370
+ (s(), p(o(Ne), h(o(Ke)(a), {
363
371
  ref_key: "tableRef",
364
372
  ref: m,
365
- key: o(ie),
373
+ key: o(de),
366
374
  data: o(f).records,
367
375
  "sort-config": { remote: j.value.length > 0 },
368
376
  "filter-config": { remote: H.value.length > 0 },
369
- loading: ye.value,
377
+ loading: Se.value,
370
378
  style: {
371
- "--vxe-ui-table-row-checkbox-checked-background-color": o(i).controlItemBgActive,
372
- "--vxe-ui-table-row-hover-checkbox-checked-background-color": o(i).controlItemBgActiveHover,
373
- "--vxe-ui-font-primary-color": o(i).colorPrimary,
379
+ "--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
380
+ "--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
381
+ "--vxe-ui-font-primary-color": o(d).colorPrimary,
374
382
  "--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
375
383
  "--vxe-ui-table-cell-padding-default": "12px",
376
384
  "--vxe-ui-table-cell-padding-medium": "9px",
377
- "--vxe-ui-table-row-radio-checked-background-color": o(i).controlItemBgActive,
378
- "--vxe-ui-table-row-hover-radio-checked-background-color": o(i).controlItemBgActiveHover,
379
- "--vxe-ui-font-color": o(i).colorTextBase,
380
- "--vxe-ui-table-border-color": o(i).colorBorderSecondary,
381
- "--vxe-ui-table-header-font-color": o(i).colorTextBase
385
+ "--vxe-ui-table-row-radio-checked-background-color": o(d).controlItemBgActive,
386
+ "--vxe-ui-table-row-hover-radio-checked-background-color": o(d).controlItemBgActiveHover,
387
+ "--vxe-ui-font-color": o(d).colorTextBase,
388
+ "--vxe-ui-table-border-color": o(d).colorBorderSecondary,
389
+ "--vxe-ui-table-header-font-color": o(d).colorTextBase,
390
+ "--vxe-ui-table-cell-padding-mini": "8px"
382
391
  },
383
- size: C.value,
384
- onSortChange: o(ge),
385
- onFilterChange: o(he),
386
- onCheckboxChange: z,
387
- onCheckboxRangeChange: z,
388
- onCheckboxAll: z,
389
- onRadioChange: we
392
+ size: y.value,
393
+ onSortChange: o(he),
394
+ onFilterChange: o(ve),
395
+ onCheckboxChange: _,
396
+ onCheckboxRangeChange: _,
397
+ onCheckboxAll: _,
398
+ onRadioChange: xe
390
399
  }), J({
391
400
  empty: v(() => [
392
401
  X(o(ae), {
@@ -394,45 +403,45 @@ const Bo = /* @__PURE__ */ ke({
394
403
  }, null, 8, ["image"])
395
404
  ]),
396
405
  default: v(() => [
397
- a.expandable ? (s(), p(o(Y), h({ key: 0 }, o(Ke)(e.expandable), { fixed: Ce.value }), {
406
+ a.expandable ? (s(), p(o(Y), h({ key: 0 }, o(We)(e.expandable), { fixed: ye.value }), {
398
407
  content: v((l) => [
399
- (s(), p(L(a.expandable.renderContent(l))))
408
+ (s(), p(D(a.expandable.renderContent(l))))
400
409
  ]),
401
410
  _: 1
402
- }, 16, ["fixed"])) : S("", !0),
403
- a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(We)(o(R), d.value), { field: o(Ue) }), null, 16, ["field"])) : S("", !0),
404
- (s(!0), F(Q, null, V(o(de), (l) => (s(), p(L(l), {
411
+ }, 16, ["fixed"])) : b("", !0),
412
+ a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k), i.value), { field: o(Ge) }), null, 16, ["field"])) : b("", !0),
413
+ (s(!0), I(Q, null, L(o(ie), (l) => (s(), p(D(l), {
405
414
  key: l.props.colId
406
415
  }))), 128))
407
416
  ]),
408
417
  _: 2
409
418
  }, [
410
- V(o(Ne)(O, ["searchFormExtra"]), (l, t) => ({
419
+ L(o(Te)(C, ["searchFormExtra"]), (l, t) => ({
411
420
  name: t,
412
421
  fn: v((u) => [
413
- D(e.$slots, t, Ie(Ee(u || {})))
422
+ O(e.$slots, t, Ee(Pe(u || {})))
414
423
  ])
415
424
  }))
416
425
  ]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
417
426
  ], 2),
418
- I("div", {
427
+ E("div", {
419
428
  class: g(o(c)("pagination-wrapper"))
420
429
  }, [
421
- e.sticky ? (s(), p(o(Ze), {
430
+ e.sticky ? (s(), p(o(ao), {
422
431
  key: 0,
423
432
  direction: "horizontal",
424
433
  "scroll-container": ce.value,
425
434
  "extra-size": -4.2
426
- }, null, 8, ["scroll-container"])) : S("", !0),
427
- e.pagination !== !1 ? (s(), p(o(De), h({
435
+ }, null, 8, ["scroll-container"])) : b("", !0),
436
+ e.pagination !== !1 ? (s(), p(o(Oe), h({
428
437
  key: 1,
429
438
  class: o(c)("pagination")
430
- }, o(M).pagination, { onChange: o(ve) }), null, 16, ["class", "onChange"])) : S("", !0)
439
+ }, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : b("", !0)
431
440
  ], 2)
432
441
  ], 6)
433
442
  ], 6));
434
443
  }
435
444
  });
436
445
  export {
437
- Bo as default
446
+ No as default
438
447
  };
@@ -19,7 +19,7 @@ export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
19
19
  /**
20
20
  * 在title之后展示一个icon并触发tooltip
21
21
  */
22
- tooltip?: string;
22
+ tooltip?: string | ((column: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>) => VNode);
23
23
  /**
24
24
  * 是否可以复制
25
25
  */