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

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 (46) hide show
  1. package/es/index.mjs +1 -1
  2. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +9 -8
  3. package/es/src/ap-form/interface.d.ts +4 -0
  4. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +33 -13
  5. package/es/src/ap-form/search-form/index.vue.mjs +16 -15
  6. package/es/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  7. package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
  8. package/es/src/ap-grid/index.vue.mjs +272 -238
  9. package/es/src/ap-grid/interface.d.ts +6 -0
  10. package/es/src/ap-grid/utils/table.mjs +6 -7
  11. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
  12. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +99 -96
  13. package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
  14. package/es/src/business/ap-label/interface.d.ts +2 -3
  15. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
  16. package/es/src/version.d.ts +1 -1
  17. package/es/src/version.mjs +1 -1
  18. package/lib/index.js +1 -1
  19. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  20. package/lib/src/ap-form/interface.d.ts +4 -0
  21. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  22. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  23. package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  24. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
  25. package/lib/src/ap-grid/index.vue.js +1 -1
  26. package/lib/src/ap-grid/interface.d.ts +6 -0
  27. package/lib/src/ap-grid/utils/table.js +1 -1
  28. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
  29. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  30. package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
  31. package/lib/src/business/ap-label/interface.d.ts +2 -3
  32. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  33. package/lib/src/version.d.ts +1 -1
  34. package/lib/src/version.js +1 -1
  35. package/package.json +1 -1
  36. package/theme/antd-global-overwrite/admin/index.css +9 -194
  37. package/theme/antd-global-overwrite/admin/table.css +9 -194
  38. package/theme/antd-global-overwrite/admin/table.less +2 -126
  39. package/theme/antd-global-overwrite/aplus/index.css +9 -186
  40. package/theme/antd-global-overwrite/aplus/table.css +9 -186
  41. package/theme/antd-global-overwrite/aplus/table.less +2 -129
  42. package/theme/ap-expand-alert/ap-expand-alert.css +2 -1
  43. package/theme/ap-expand-alert/ap-expand-alert.less +2 -2
  44. package/theme/ap-table-modal/index.css +15 -13
  45. package/theme/ap-table-modal/index.less +15 -13
  46. package/theme/index.css +17 -14
@@ -293,6 +293,12 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
293
293
  */
294
294
  rowSelection: {
295
295
  selectedRows: ComputedRef<RecordType[]>;
296
+ /**
297
+ * 通过API调用设置行选中
298
+ * @param keys
299
+ * @returns
300
+ */
301
+ setSelectedRowKeys: (keys: (string | number)[]) => void;
296
302
  clearAll: () => void;
297
303
  };
298
304
  /**
@@ -1,10 +1,10 @@
1
- import { omit as s, isUndefined as u, isFunction as h, isNumber as m } from "lodash-unified";
1
+ import { omit as l, isUndefined as s, isFunction as h, isNumber as m } from "lodash-unified";
2
2
  import { isDef as w } from "../../utils/index.mjs";
3
3
  const C = 20, b = 50, y = (e) => e.some((t) => !!t.html);
4
4
  function v(e) {
5
5
  var i;
6
6
  const t = {
7
- ...s(e, [
7
+ ...l(e, [
8
8
  "columns",
9
9
  "request",
10
10
  "searchForm",
@@ -29,7 +29,7 @@ function v(e) {
29
29
  return o.shown ? o.shown(r) : !0;
30
30
  },
31
31
  checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
32
- reserve: u(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
32
+ reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
33
33
  } : t.checkboxConfig = {
34
34
  highlight: !0,
35
35
  checkMethod({ row: r }) {
@@ -38,12 +38,11 @@ function v(e) {
38
38
  visibleMethod({ row: r }) {
39
39
  return o.shown ? o.shown(r) : !0;
40
40
  },
41
- checkRowKeys: o.defaultSelectedRowKeys,
42
- reserve: u(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
41
+ reserve: s(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys,
43
42
  range: o.range || !1
44
43
  };
45
44
  }
46
- return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = s(e.expandable, [
45
+ return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = l(e.expandable, [
47
46
  "renderContent",
48
47
  "width",
49
48
  "title"
@@ -54,7 +53,7 @@ function v(e) {
54
53
  }) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = w(e.round) ? e.round : !e.card, t;
55
54
  }
56
55
  function a(e, t, n) {
57
- const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", d = n == null ? void 0 : n[o], f = d !== !1, l = i ? C : b, c = m(d) && d >= 0 ? d : l;
56
+ const i = t === "X", o = i ? "x" : "y", r = i ? "virtualXConfig" : "virtualYConfig", u = n == null ? void 0 : n[o], f = u !== !1, d = i ? C : b, c = m(u) && u >= 0 ? u : d;
58
57
  e[r] = {
59
58
  enabled: f,
60
59
  gt: c,
@@ -58,6 +58,11 @@ export type UseTablePagingParams<DataType, ParamsType> = {
58
58
  * @returns
59
59
  */
60
60
  onClickReset?: () => void;
61
+ /**
62
+ * 当请求结束后触发的事件
63
+ * @returns
64
+ */
65
+ onAfterRequest?: () => void;
61
66
  };
62
67
  type InternalDataType<DataType = Recordable> = {
63
68
  total: number;
@@ -67,7 +72,7 @@ type InternalDataType<DataType = Recordable> = {
67
72
  export declare const DEFAULT_CURRENT = 1;
68
73
  export declare const DEFAULT_PAGE_SIZE = 20;
69
74
  export type OptionalOnTableChange<T extends (...args: any[]) => any> = (...args: Partial<Parameters<T>>) => ReturnType<T>;
70
- export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset }: UseTablePagingParams<DataType, ParamsType>) => {
75
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest }: UseTablePagingParams<DataType, ParamsType>) => {
71
76
  formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
72
77
  submit: () => void;
73
78
  reset: () => void;
@@ -1,98 +1,101 @@
1
- import { ref as ie, reactive as J, unref as m, nextTick as ce, onMounted as ue, watch as le, computed as A, createVNode as C } from "vue";
2
- import { useTableSortedAndFiltered as fe } from "./use-sorted-filtered.mjs";
1
+ import { ref as ce, reactive as M, unref as m, nextTick as ue, onMounted as le, watch as fe, computed as O, createVNode as C } from "vue";
2
+ import { useTableSortedAndFiltered as ge } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
- import { parseFieldValue as ge, dataIndexToStr as de, isEqualCustom as pe } from "../utils.mjs";
5
- import { isArray as K, isEqualWith as me, isUndefined as Se } from "lodash-unified";
6
- import { isDef as M } from "../../utils/index.mjs";
7
- import { useLocale as he } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as ze } from "../../config-provider/hooks/use-namespace.mjs";
9
- const S = 1, L = 20, Q = {
4
+ import { parseFieldValue as de, dataIndexToStr as pe, isEqualCustom as me } from "../utils.mjs";
5
+ import { isArray as Q, isEqualWith as Se, isUndefined as he } from "lodash-unified";
6
+ import { isDef as $ } from "../../utils/index.mjs";
7
+ import { useLocale as ze } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as Te } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const S = 1, y = 20, G = {
10
10
  defaultCurrent: S,
11
- defaultPageSize: L,
11
+ defaultPageSize: y,
12
12
  showLessItems: !1,
13
13
  showTotal: !0
14
14
  };
15
- function Te(i) {
16
- return i === !1 ? {} : i == null || i === !0 ? Q : {
17
- ...Q,
15
+ function Pe(i) {
16
+ return i === !1 ? {} : i == null || i === !0 ? G : {
17
+ ...G,
18
18
  ...i
19
19
  };
20
20
  }
21
- function Pe(i) {
21
+ function we(i) {
22
22
  const f = {};
23
- return i === !1 || (i === !0 || i == null ? (f.current = S, f.pageSize = L) : (f.current = i.defaultCurrent || S, f.pageSize = i.defaultPageSize || L)), f;
23
+ return i === !1 || (i === !0 || i == null ? (f.current = S, f.pageSize = y) : (f.current = i.defaultCurrent || S, f.pageSize = i.defaultPageSize || y)), f;
24
24
  }
25
- const Ae = ({
25
+ const Oe = ({
26
26
  manual: i = !1,
27
27
  request: f,
28
- defaultParams: O = {},
29
- defaultData: y = [],
30
- formatParams: I,
31
- paramsValueTypeMap: V,
32
- resetFieldsIgnores: U,
33
- filterFields: R,
34
- sortFields: $,
35
- namespace: G = "ap-table",
28
+ defaultParams: I = {},
29
+ defaultData: V = [],
30
+ formatParams: U,
31
+ paramsValueTypeMap: _,
32
+ resetFieldsIgnores: j,
33
+ filterFields: W,
34
+ sortFields: Z,
35
+ namespace: H = "ap-table",
36
36
  pagination: h,
37
- onClickReset: b
37
+ onClickReset: b,
38
+ onAfterRequest: E
38
39
  }) => {
39
- let E = 0, c = {};
40
- const W = Te(h), Z = (e) => I ? I(e) : e, z = ie(), s = J(Pe(h)), {
41
- getColumnSFConfig: H,
42
- setSF: X,
43
- clearAll: Y,
44
- sortedInfo: _,
45
- filteredInfo: j
46
- } = fe(), {
40
+ let v = 0, c = {};
41
+ const X = Pe(h), Y = (e) => U ? U(e) : e, z = ce(), s = M(we(h)), {
42
+ getColumnSFConfig: q,
43
+ setSF: R,
44
+ clearAll: k,
45
+ sortedInfo: A,
46
+ filteredInfo: N
47
+ } = ge(), {
47
48
  t: T
48
- } = he(), {
49
+ } = ze(), {
49
50
  b: P
50
- } = ze(G), o = J({
51
- total: y.length,
52
- records: y,
51
+ } = Te(H), o = M({
52
+ total: V.length,
53
+ records: V,
53
54
  loading: !1
54
55
  }), w = () => {
55
56
  var e, t;
56
57
  return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
57
- }, q = async (e) => {
58
+ }, B = async (e) => {
58
59
  var n;
59
- const t = Z(e), r = Date.now();
60
- E = r, o.loading = !0;
60
+ const t = Y(e), r = Date.now();
61
+ v = r, o.loading = !0;
61
62
  try {
62
63
  const a = await f({
63
- ...m(O),
64
+ ...m(I),
64
65
  ...t
65
66
  });
66
- E === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []], o.loading = !1);
67
+ v === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []], o.loading = !1);
67
68
  } catch {
68
- E === r && (o.records = [], o.total = 0, o.loading = !1);
69
+ v === r && (o.records = [], o.total = 0, o.loading = !1);
70
+ } finally {
71
+ E == null || E();
69
72
  }
70
- }, N = (e) => {
73
+ }, J = (e) => {
71
74
  const t = {};
72
75
  return Object.entries(e).forEach(([r, n]) => {
73
- if (t[r] = n, V && n) {
74
- const a = V[r];
75
- a && (t[r] = ge(a, n));
76
+ if (t[r] = n, _ && n) {
77
+ const a = _[r];
78
+ a && (t[r] = de(a, n));
76
79
  }
77
80
  }), t;
78
- }, k = async (e) => {
81
+ }, ee = async (e) => {
79
82
  var n, a, l, g, d;
80
83
  const t = w(), r = {};
81
84
  Object.entries(t).forEach(([p, F]) => {
82
- U && U.indexOf(p) > -1 && (r[p] = F);
83
- }), await ((a = (n = z.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, r), ce(() => {
85
+ j && j.indexOf(p) > -1 && (r[p] = F);
86
+ }), await ((a = (n = z.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, r), ue(() => {
84
87
  e == null || e();
85
88
  });
86
89
  }, x = (e) => {
87
90
  c = e;
88
- const t = N(e);
89
- q(t);
90
- }, ee = (e) => {
91
+ const t = J(e);
92
+ B(t);
93
+ }, te = (e) => {
91
94
  x({
92
95
  ...c,
93
96
  ...e
94
97
  });
95
- }, v = () => {
98
+ }, D = () => {
96
99
  const e = w(), t = h !== !1;
97
100
  t && (s.current = S), x({
98
101
  ...e,
@@ -101,32 +104,32 @@ const Ae = ({
101
104
  current: t ? S : void 0,
102
105
  pageSize: t ? c.pageSize || s.pageSize : void 0
103
106
  });
104
- }, te = () => {
105
- Y(), c.sort = {}, c.filter = {}, b == null || b(), k(v);
106
- }, B = () => {
107
+ }, re = () => {
108
+ k(), c.sort = {}, c.filter = {}, b == null || b(), ee(D);
109
+ }, K = () => {
107
110
  x(c);
108
- }, re = (e) => {
111
+ }, ne = (e) => {
109
112
  if (h === !1)
110
- B();
113
+ K();
111
114
  else {
112
115
  const {
113
116
  current: t,
114
117
  pageSize: r
115
118
  } = s, n = o.total - e, a = Math.ceil(n / r), l = t > a ? a : t;
116
- ee({
119
+ te({
117
120
  current: l > 0 ? l : 1
118
121
  });
119
122
  }
120
- }, D = (e, t, r) => {
123
+ }, L = (e, t, r) => {
121
124
  var p, F;
122
125
  const n = w();
123
- s.current = e.current, s.pageSize = e.pageSize, X(t, r);
124
- const a = K(r) ? [...r] : [r], l = {};
126
+ s.current = e.current, s.pageSize = e.pageSize, R(t, r);
127
+ const a = Q(r) ? [...r] : [r], l = {};
125
128
  for (const u of a)
126
- (p = m($)) != null && p.includes(u.columnKey || u.field) && u.order && (l[de(u.columnKey || u.field)] = u.order);
129
+ (p = m(Z)) != null && p.includes(u.columnKey || u.field) && u.order && (l[pe(u.columnKey || u.field)] = u.order);
127
130
  const g = {};
128
131
  for (const u of Object.keys(t))
129
- (F = m(R)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
132
+ (F = m(W)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
130
133
  const d = {
131
134
  ...n,
132
135
  filter: g,
@@ -134,10 +137,10 @@ const Ae = ({
134
137
  current: e.current,
135
138
  pageSize: e.pageSize
136
139
  };
137
- me(c, d, pe) || x(d);
138
- }, ne = (e, t = j.value || {}, r = _.value || {}) => {
140
+ Se(c, d, me) || x(d);
141
+ }, ae = (e, t = N.value || {}, r = A.value || {}) => {
139
142
  const n = (e == null ? void 0 : e.current) ?? s.current, a = (e == null ? void 0 : e.pageSize) ?? s.pageSize;
140
- D(
143
+ L(
141
144
  {
142
145
  current: n,
143
146
  pageSize: a
@@ -151,7 +154,7 @@ const Ae = ({
151
154
  }
152
155
  );
153
156
  };
154
- ue(() => {
157
+ le(() => {
155
158
  const e = w(), {
156
159
  current: t,
157
160
  pageSize: r
@@ -163,15 +166,15 @@ const Ae = ({
163
166
  sort: {},
164
167
  ...e
165
168
  }, !i) {
166
- const n = N(c);
167
- q(n);
169
+ const n = J(c);
170
+ B(n);
168
171
  }
169
- }), le(() => m(O), () => {
170
- v();
172
+ }), fe(() => m(I), () => {
173
+ D();
171
174
  }, {
172
175
  deep: !0
173
176
  });
174
- const ae = A(() => {
177
+ const oe = O(() => {
175
178
  if (o.total === 0)
176
179
  return "-";
177
180
  const {
@@ -180,28 +183,28 @@ const Ae = ({
180
183
  } = s;
181
184
  return `${e}/${Math.ceil(o.total / t)}`;
182
185
  });
183
- function oe(e) {
184
- K(e) && (o.records = e, o.total = e.length);
186
+ function se(e) {
187
+ Q(e) && (o.records = e, o.total = e.length);
185
188
  }
186
- const se = A(() => {
189
+ const ie = O(() => {
187
190
  const {
188
191
  showLessItems: e,
189
192
  showTotal: t,
190
193
  showQuickJumper: r,
191
194
  showSizeChanger: n,
192
195
  pageSizeOptions: a
193
- } = W;
196
+ } = X;
194
197
  return {
195
198
  loading: o.loading,
196
199
  pagination: {
197
200
  current: s.current,
198
201
  pageSize: s.pageSize,
199
202
  total: o.total,
200
- showSizeChanger: M(n) ? n : !e,
201
- showQuickJumper: M(r) ? r : !e,
203
+ showSizeChanger: $(n) ? n : !e,
204
+ showQuickJumper: $(r) ? r : !e,
202
205
  showLessItems: e,
203
206
  size: "default",
204
- pageSizeOptions: Se(a) ? ["10", "20", "50", "100"] : a,
207
+ pageSizeOptions: he(a) ? ["10", "20", "50", "100"] : a,
205
208
  showTotal: t ? (l) => C("span", {
206
209
  class: P("pagination-total-wrapper")
207
210
  }, [T("ap.apTable.pagination.totalLeftPrefix"), " ", C("span", {
@@ -210,33 +213,33 @@ const Ae = ({
210
213
  class: P("pagination--total-right")
211
214
  }, [T("ap.apTable.pagination.totalRightPrefix"), " ", C("span", {
212
215
  class: P("pagination-count-text")
213
- }, [m(ae)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
216
+ }, [m(oe)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
214
217
  },
215
- onChange: D,
218
+ onChange: L,
216
219
  dataSource: o.records
217
220
  };
218
221
  });
219
222
  return {
220
223
  formRef: z,
221
- submit: v,
222
- reset: te,
223
- refresh: B,
224
- refreshByDelete: re,
224
+ submit: D,
225
+ reset: re,
226
+ refresh: K,
227
+ refreshByDelete: ne,
225
228
  data: o,
226
229
  current: s.current,
227
230
  pageSize: s.pageSize,
228
- handleTableChange: D,
229
- handleTableChangeOptional: ne,
230
- tableProps: se,
231
- dataSource: A(() => o.records),
232
- setDataSource: oe,
233
- getColumnSFConfig: H,
234
- sortedInfo: _,
235
- filteredInfo: j
231
+ handleTableChange: L,
232
+ handleTableChangeOptional: ae,
233
+ tableProps: ie,
234
+ dataSource: O(() => o.records),
235
+ setDataSource: se,
236
+ getColumnSFConfig: q,
237
+ sortedInfo: A,
238
+ filteredInfo: N
236
239
  };
237
240
  };
238
241
  export {
239
242
  S as DEFAULT_CURRENT,
240
- L as DEFAULT_PAGE_SIZE,
241
- Ae as useTablePaging
243
+ y as DEFAULT_PAGE_SIZE,
244
+ Oe as useTablePaging
242
245
  };
@@ -1,29 +1,28 @@
1
- import { defineComponent as n, createVNode as o, mergeProps as l, createTextVNode as m } from "vue";
1
+ import { defineComponent as n, createVNode as o, mergeProps as a, createTextVNode as l } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
- import f from "../ApLabel.mjs";
4
- import { omit as t } from "lodash-unified";
5
- import { ApLabelGroupProps as s } from "../constans.mjs";
6
- import { Tag as c } from "@aplus-frontend/antdv";
7
- import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
3
+ import m from "../ApLabel.mjs";
4
+ import { omit as s } from "lodash-unified";
5
+ import { ApLabelGroupProps as c } from "../constans.mjs";
6
+ import "../../../ap-tag/index.mjs";
7
+ import { useNamespace as f } from "../../../config-provider/hooks/use-namespace.mjs";
8
+ import i from "../../../ap-tag/ap-tag.vue.mjs";
8
9
  const {
9
10
  b: p
10
- } = g("ap-label-group"), x = /* @__PURE__ */ n({
11
+ } = f("ap-label-group"), _ = /* @__PURE__ */ n({
11
12
  name: "ApLabelGroup",
12
- props: s(),
13
+ props: c(),
13
14
  setup(r) {
14
- const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(c, t(u, ["text"]), {
15
- default: () => [u.text]
16
- })) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
15
+ const t = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(i, u, null)) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
17
16
  return () => o("div", {
18
17
  class: p()
19
- }, [r.columns ? r.columns.map((e, u) => o(f, l({
18
+ }, [r.columns ? r.columns.map((e, u) => o(m, a({
20
19
  key: u,
21
20
  show: r.value === e.value
22
- }, t(e, ["value", "tagConfig", "customRender"])), {
23
- custom: a(e)
24
- })) : o("div", null, [m("columns数组不能为空")])]);
21
+ }, s(e, ["value", "tagConfig", "customRender"])), {
22
+ custom: t(e)
23
+ })) : o("div", null, [l("columns数组不能为空")])]);
25
24
  }
26
25
  });
27
26
  export {
28
- x as default
27
+ _ as default
29
28
  };
@@ -1,6 +1,6 @@
1
1
  import { BadgeProps } from '@aplus-frontend/antdv';
2
2
  import { TooltipPlacement } from '@aplus-frontend/antdv/es/tooltip/Tooltip';
3
- import { TagProps } from '@aplus-frontend/antdv/es/tag';
3
+ import { ApTagProps } from '../../ap-tag';
4
4
  import { VNode, VNodeChild } from 'vue';
5
5
  type Recordable = Record<string, any>;
6
6
  export type ApLabelProps = BadgeProps & Partial<{
@@ -12,9 +12,8 @@ export type ApLabelProps = BadgeProps & Partial<{
12
12
  show: boolean;
13
13
  toolTipBgColor: string;
14
14
  }>;
15
- export type tagConfigKey = TagProps & {
15
+ export type tagConfigKey = ApTagProps & {
16
16
  value: number | string | undefined | null;
17
- text: string;
18
17
  };
19
18
  export type ApLabelGroupItemProps<T extends Recordable = Recordable> = ApLabelProps & {
20
19
  value?: string | number | null | undefined;
@@ -1,17 +1,16 @@
1
- import { defineComponent as U, ref as m, unref as s, computed as q, h as V, createBlock as k, openBlock as T, mergeProps as y, withCtx as h, createCommentVNode as $, createVNode as S, resolveDynamicComponent as z } from "vue";
2
- import { message as B, Modal as W } from "@aplus-frontend/antdv";
1
+ import { defineComponent as H, ref as m, unref as s, computed as U, h as q, createBlock as k, openBlock as T, mergeProps as y, withCtx as h, createCommentVNode as V, createVNode as S, resolveDynamicComponent as $ } from "vue";
2
+ import { message as R, Modal as z } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApTable as Y } from "../../ap-table/index.mjs";
5
- import { cloneDeep as J, omit as R } from "lodash-unified";
4
+ import { ApTable as W } from "../../ap-table/index.mjs";
5
+ import { cloneDeep as J, omit as B } from "lodash-unified";
6
6
  import { transformTableParams as Q } from "@aplus-frontend/utils";
7
7
  import "./modal-title.vue.mjs";
8
8
  import { AsyncOpenResultError as b } from "./interface.mjs";
9
9
  import "./table-layout/index.vue.mjs";
10
- import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
11
- import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
12
- import j from "./modal-title.vue2.mjs";
13
- import ee from "./table-layout/index.vue2.mjs";
14
- const pe = /* @__PURE__ */ U({
10
+ import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
11
+ import Y from "./modal-title.vue2.mjs";
12
+ import Z from "./table-layout/index.vue2.mjs";
13
+ const ce = /* @__PURE__ */ H({
15
14
  __name: "table-modal",
16
15
  props: {
17
16
  columns: {},
@@ -62,10 +61,10 @@ const pe = /* @__PURE__ */ U({
62
61
  mousePosition: {}
63
62
  },
64
63
  emits: ["finish"],
65
- setup(M, { expose: P, emit: K }) {
66
- const e = M, _ = K, i = m(!1), x = m({}), d = m(null), a = m([]), C = m();
64
+ setup(P, { expose: M, emit: K }) {
65
+ const e = P, _ = K, i = m(!1), x = m({}), d = m(null), a = m([]), C = m();
67
66
  let c = null, n = null;
68
- const I = X("uiMode", "admin"), { t: g } = Z(), D = async (o = [], t = {}) => {
67
+ const { t: g } = X(), I = async (o = [], t = {}) => {
69
68
  var l, r, u;
70
69
  switch (a.value = [...o], i.value = !0, x.value = t == null ? void 0 : t.extraParams, C.value = t.apTableDataSources || ((l = e.apTableProps) == null ? void 0 : l.dataSource), t.refreshMode || "reset") {
71
70
  case "reset":
@@ -82,7 +81,7 @@ const pe = /* @__PURE__ */ U({
82
81
  });
83
82
  }, w = () => {
84
83
  i.value = !1, c = null, n == null || n(b.ModalCancel), n = null;
85
- }, L = async (o) => {
84
+ }, D = async (o) => {
86
85
  o = Q({
87
86
  ...o,
88
87
  ...x.value
@@ -92,7 +91,7 @@ const pe = /* @__PURE__ */ U({
92
91
  data: l,
93
92
  total: r
94
93
  };
95
- }, N = () => {
94
+ }, L = () => {
96
95
  if (a.value.length > e.maxCount) {
97
96
  n == null || n(b.ExceedMaxCount);
98
97
  return;
@@ -105,7 +104,7 @@ const pe = /* @__PURE__ */ U({
105
104
  return;
106
105
  }
107
106
  i.value = !1;
108
- }, A = q(() => {
107
+ }, N = U(() => {
109
108
  if (!e.getRowKey) return;
110
109
  const o = e.getRowKey;
111
110
  return {
@@ -116,7 +115,7 @@ const pe = /* @__PURE__ */ U({
116
115
  onSelectAll(t, l) {
117
116
  var u, p;
118
117
  if (l.length > e.maxCount) {
119
- B.warning(
118
+ R.warning(
120
119
  g("ap.apTableModal.messageMaxCount", {
121
120
  maxCount: e.maxCount
122
121
  })
@@ -125,7 +124,7 @@ const pe = /* @__PURE__ */ U({
125
124
  }
126
125
  const r = (u = d.value) == null ? void 0 : u.dataSource;
127
126
  if (t) {
128
- const f = s(r).filter((v) => !a.value.some((F) => o(F) === o(v)));
127
+ const f = s(r).filter((v) => !a.value.some((G) => o(G) === o(v)));
129
128
  a.value = a.value.concat(f);
130
129
  } else
131
130
  a.value = (p = a.value) == null ? void 0 : p.filter((f) => !r.some((v) => o(v) === o(f)));
@@ -133,7 +132,7 @@ const pe = /* @__PURE__ */ U({
133
132
  onSelect(t, l) {
134
133
  if (l) {
135
134
  if (a.value.length >= e.maxCount) {
136
- B.warning(
135
+ R.warning(
137
136
  g("ap.apTableModal.messageMaxCount", {
138
137
  maxCount: e.maxCount
139
138
  })
@@ -154,8 +153,8 @@ const pe = /* @__PURE__ */ U({
154
153
  }),
155
154
  ...e.rowSelection || {}
156
155
  };
157
- }), O = () => e.isRenderModalTitleSuffix ? V(
158
- j,
156
+ }), A = () => e.isRenderModalTitleSuffix ? q(
157
+ Y,
159
158
  {
160
159
  title: e.title,
161
160
  count: a.value.length || 0,
@@ -164,9 +163,9 @@ const pe = /* @__PURE__ */ U({
164
163
  {
165
164
  default: e.renderModalTitleSuffix ?? void 0
166
165
  }
167
- ) : e.title, G = () => d.value, H = () => {
166
+ ) : e.title, O = () => d.value, E = () => {
168
167
  a.value = [];
169
- }, E = (o) => {
168
+ }, F = (o) => {
170
169
  const t = e.getRowKey;
171
170
  if (!t) return;
172
171
  const l = a.value.findIndex(
@@ -174,16 +173,16 @@ const pe = /* @__PURE__ */ U({
174
173
  );
175
174
  a.value.splice(l, 1);
176
175
  };
177
- return P({
178
- open: D,
176
+ return M({
177
+ open: I,
179
178
  close: w,
180
- getApTableInstance: G
181
- }), (o, t) => (T(), k(s(W), y(
179
+ getApTableInstance: O
180
+ }), (o, t) => (T(), k(s(z), y(
182
181
  {
183
182
  open: i.value,
184
183
  "onUpdate:open": t[0] || (t[0] = (l) => i.value = l)
185
184
  },
186
- s(R)(e, [
185
+ s(B)(e, [
187
186
  "api",
188
187
  "getRowKey",
189
188
  "centered",
@@ -198,33 +197,35 @@ const pe = /* @__PURE__ */ U({
198
197
  "tableLayoutConfig"
199
198
  ]),
200
199
  {
201
- title: O(),
202
- "body-style": { maxHeight: "calc(100vh - 205px)", overflowY: "scroll" },
200
+ title: A(),
203
201
  centered: e.centered ?? !0,
204
- onOk: N,
202
+ onOk: L,
205
203
  onCancel: w
206
204
  }
207
205
  ), {
208
206
  default: h(() => [
209
- e.renderHeader ? (T(), k(z(e.renderHeader), { key: 0 })) : $("", !0),
210
- S(ee, y(e.tableLayoutConfig || {}, {
207
+ e.renderHeader ? (T(), k($(e.renderHeader), { key: 0 })) : V("", !0),
208
+ S(Z, y(e.tableLayoutConfig || {}, {
211
209
  "selected-list": a.value,
212
- onClear: H,
213
- onDeleteItem: E
210
+ onClear: E,
211
+ onDeleteItem: F
214
212
  }), {
215
213
  default: h(() => [
216
- S(s(Y), y({
214
+ S(s(W), y({
217
215
  ref_key: "apTableRef",
218
216
  ref: d,
219
- scroll: { y: "100%" },
217
+ scroll: { y: 450 },
220
218
  style: { padding: "0px" },
221
219
  columns: o.columns,
222
- request: L,
220
+ request: D,
223
221
  "row-key": o.getRowKey,
224
- "row-selection": A.value,
225
- bordered: s(I) === "admin",
226
- "data-source": C.value
227
- }, s(R)(e.apTableProps, "dataSource")), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
222
+ "row-selection": N.value,
223
+ "data-source": C.value,
224
+ "search-form": {
225
+ sortable: !1,
226
+ countPerRow: 2
227
+ }
228
+ }, s(B)(e.apTableProps, "dataSource")), null, 16, ["columns", "row-key", "row-selection", "data-source"])
228
229
  ]),
229
230
  _: 1
230
231
  }, 16, ["selected-list"])
@@ -234,5 +235,5 @@ const pe = /* @__PURE__ */ U({
234
235
  }
235
236
  });
236
237
  export {
237
- pe as default
238
+ ce as default
238
239
  };