@aplus-frontend/ui 0.6.0-beta.1 → 0.6.0-beta.3

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