@aplus-frontend/ui 0.5.0-beta.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +13 -0
  2. package/es/src/ap-form/hooks/use-watch.d.ts +4 -1
  3. package/es/src/ap-form/hooks/use-watch.mjs +31 -29
  4. package/es/src/ap-form/index.mjs +1 -1
  5. package/es/src/ap-form/search-form/index.vue.mjs +14 -15
  6. package/es/src/ap-grid/constants.d.ts +4 -4
  7. package/es/src/ap-grid/constants.mjs +8 -8
  8. package/es/src/ap-grid/index.vue.mjs +228 -188
  9. package/es/src/ap-grid/interface.d.ts +0 -1
  10. package/es/src/ap-grid/utils/table.mjs +12 -12
  11. package/es/src/ap-modal/enums/modalMessage.d.ts +6 -0
  12. package/es/src/ap-modal/enums/modalMessage.mjs +4 -0
  13. package/es/src/ap-modal/index.d.ts +2 -1
  14. package/es/src/ap-modal/index.mjs +2 -0
  15. package/es/src/ap-modal/interface.d.ts +126 -1
  16. package/es/src/ap-modal/utils/createModalStream.d.ts +2 -0
  17. package/es/src/ap-modal/utils/createModalStream.mjs +99 -0
  18. package/es/src/ap-modal/utils/index.d.ts +1 -0
  19. package/es/src/ap-modal/utils/index.mjs +4 -2
  20. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +4 -7
  21. package/es/src/ap-table/utils.d.ts +1 -4
  22. package/es/src/ap-table/utils.mjs +43 -41
  23. package/es/src/business/ap-attachment/ApAttachment.mjs +13 -13
  24. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +13 -13
  25. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +13 -0
  26. package/es/src/business/ap-ladder/index.d.ts +39 -0
  27. package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -38
  28. package/es/src/business/ap-table-modal/index.d.ts +3 -3
  29. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +1 -1
  30. package/es/src/config-provider/config-provider.mjs +23 -23
  31. package/es/src/utils/config-provider-preset.d.ts +41 -0
  32. package/es/src/utils/config-provider-preset.mjs +24 -15
  33. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +13 -0
  34. package/lib/src/ap-form/hooks/use-watch.d.ts +4 -1
  35. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  36. package/lib/src/ap-form/index.js +1 -1
  37. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  38. package/lib/src/ap-grid/constants.d.ts +4 -4
  39. package/lib/src/ap-grid/constants.js +1 -1
  40. package/lib/src/ap-grid/index.vue.js +1 -1
  41. package/lib/src/ap-grid/interface.d.ts +0 -1
  42. package/lib/src/ap-grid/utils/table.js +1 -1
  43. package/lib/src/ap-modal/enums/modalMessage.d.ts +6 -0
  44. package/lib/src/ap-modal/enums/modalMessage.js +1 -0
  45. package/lib/src/ap-modal/index.d.ts +2 -1
  46. package/lib/src/ap-modal/index.js +1 -1
  47. package/lib/src/ap-modal/interface.d.ts +126 -1
  48. package/lib/src/ap-modal/utils/createModalStream.d.ts +2 -0
  49. package/lib/src/ap-modal/utils/createModalStream.js +1 -0
  50. package/lib/src/ap-modal/utils/index.d.ts +1 -0
  51. package/lib/src/ap-modal/utils/index.js +1 -1
  52. package/lib/src/ap-table/components/dynamic-component/index.vue2.js +1 -1
  53. package/lib/src/ap-table/utils.d.ts +1 -4
  54. package/lib/src/ap-table/utils.js +1 -1
  55. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  56. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  57. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +13 -0
  58. package/lib/src/business/ap-ladder/index.d.ts +39 -0
  59. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  60. package/lib/src/business/ap-table-modal/index.d.ts +3 -3
  61. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +1 -1
  62. package/lib/src/config-provider/config-provider.js +1 -1
  63. package/lib/src/utils/config-provider-preset.d.ts +41 -0
  64. package/lib/src/utils/config-provider-preset.js +1 -1
  65. package/package.json +6 -6
  66. package/theme/ap-grid/index.css +32 -0
  67. package/theme/ap-grid/index.less +42 -0
  68. package/theme/index.css +32 -0
@@ -1,25 +1,27 @@
1
- import { defineComponent as ye, getCurrentInstance as Se, useSlots as we, ref as w, computed as n, unref as a, watchEffect as ve, watch as $, createElementBlock as v, openBlock as s, normalizeClass as b, createCommentVNode as R, createElementVNode as H, normalizeStyle as U, createVNode as be, mergeProps as c, createSlots as q, withCtx as f, Fragment as M, renderList as P, createBlock as u, resolveDynamicComponent as E, renderSlot as N, normalizeProps as Re, guardReactiveProps as xe } from "vue";
2
- import { VxeTable as Fe, VxeColumn as G } from "vxe-table";
3
- import ke from "vxe-pc-ui";
1
+ import { defineComponent as Se, getCurrentInstance as we, useSlots as xe, ref as R, computed as n, unref as o, watchEffect as Re, watch as M, createElementBlock as k, openBlock as s, normalizeClass as f, createCommentVNode as y, createElementVNode as F, normalizeStyle as q, createVNode as U, mergeProps as g, createSlots as G, withCtx as h, Fragment as X, renderList as N, createBlock as u, resolveDynamicComponent as _, renderSlot as z, normalizeProps as ke, guardReactiveProps as Fe } from "vue";
2
+ import { VxeTable as Be, VxeColumn as J } from "vxe-table";
3
+ import Ie from "vxe-pc-ui";
4
4
  import "vxe-table/lib/style.css";
5
5
  import "vxe-pc-ui/lib/style.css";
6
- import { isUndefined as x, omit as Be } from "lodash-unified";
7
- import { ApForm as Ie } from "../ap-form/index.mjs";
6
+ import { isUndefined as B, omit as Ee } from "lodash-unified";
7
+ import { ApForm as Pe } from "../ap-form/index.mjs";
8
8
  import "../config-provider/index.mjs";
9
- import { noRenderAsFormItemValueList as Pe } from "../ap-table/constants.mjs";
10
- import { getColumnOrder as X, updateFormProps as Ee, getFieldProps as Ne, getSearchFormItemRenderNode as ze, recursionApColumns as J } from "../ap-table/utils.mjs";
9
+ import { noRenderAsFormItemValueList as Ne } from "../ap-table/constants.mjs";
10
+ import { getColumnOrder as Q, updateFormProps as _e, getFieldProps as ze, getSearchFormItemRenderNode as Ae, recursionApColumns as Y } from "../ap-table/utils.mjs";
11
11
  import { useTablePaging as Te } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
- import { Pagination as Ve } from "@aplus-frontend/antdv";
13
- import { useInnerParams as _e } from "./hooks/use-inner-params.mjs";
14
- import { toVxeProps as Ae, getRowExpandProps as Oe, getRowSelectionProps as Le } from "./utils/table.mjs";
15
- import De from "../ap-table/hooks/use-table-row-selection.mjs";
16
- import { useProvideApTable as Ke } from "../ap-table/context.mjs";
17
- import { sizeReverseMap as je, sizeMap as We } from "./constants.mjs";
18
- import { useRenderColumns as $e } from "./hooks/use-render-columns.mjs";
19
- import { useToken as He } from "@aplus-frontend/antdv/es/theme/internal";
12
+ import { Empty as Z, Pagination as Ve } from "@aplus-frontend/antdv";
13
+ import { useInnerParams as Le } from "./hooks/use-inner-params.mjs";
14
+ import { toVxeProps as Oe, getRowExpandProps as De, getRowSelectionProps as Ke } from "./utils/table.mjs";
15
+ import $e from "../ap-table/hooks/use-table-row-selection.mjs";
16
+ import { useProvideApTable as je } from "../ap-table/context.mjs";
17
+ import { sizeReverseMap as He, sizeMap as We } from "./constants.mjs";
18
+ import { useRenderColumns as Me } from "./hooks/use-render-columns.mjs";
19
+ import { useToken as qe } from "@aplus-frontend/antdv/es/theme/internal";
20
+ import "../scroll-bar/index.mjs";
20
21
  import { useNamespace as Ue } from "../config-provider/hooks/use-namespace.mjs";
21
- import { useGlobalConfig as qe } from "../config-provider/hooks/use-global-config.mjs";
22
- const ga = /* @__PURE__ */ ye({
22
+ import { useGlobalConfig as Ge } from "../config-provider/hooks/use-global-config.mjs";
23
+ import Xe from "../scroll-bar/index.vue.mjs";
24
+ const So = /* @__PURE__ */ Se({
23
25
  name: "ApGrid",
24
26
  __name: "index",
25
27
  props: {
@@ -58,7 +60,7 @@ const ga = /* @__PURE__ */ ye({
58
60
  expandedRowClassName: {},
59
61
  childrenColumnName: { default: "children" },
60
62
  rowExpandable: {},
61
- sticky: { type: [Boolean, Object] },
63
+ sticky: { type: [Boolean, Object], default: !1 },
62
64
  transformCellText: {},
63
65
  rowClassName: {},
64
66
  stripe: { type: Boolean },
@@ -93,7 +95,7 @@ const ga = /* @__PURE__ */ ye({
93
95
  searchFormWrapperStyle: {},
94
96
  tableWrapperStyle: {},
95
97
  manual: { type: Boolean, default: !1 },
96
- size: { default: "medium" },
98
+ size: { default: void 0 },
97
99
  adaptive: { type: Boolean, default: !1 },
98
100
  columnResizable: { type: [Boolean, Object], default: !1 },
99
101
  rowKey: { default: "key" },
@@ -101,256 +103,294 @@ const ga = /* @__PURE__ */ ye({
101
103
  virtual: { type: [Boolean, Object], default: void 0 },
102
104
  expandable: {}
103
105
  },
104
- setup(Q, { expose: Y }) {
106
+ setup(ee, { expose: oe }) {
105
107
  var W;
106
- const m = (W = Se()) == null ? void 0 : W.appContext.app;
107
- m && !m.__VXE_PC_UI_INSTALLED__ && (m.use(ke), m.__VXE_PC_UI_INSTALLED__ = !0);
108
- const z = we(), o = Q, { e: F, b: g, be: Z } = Ue("ap-grid"), ee = qe("valueTypeMap"), d = w([]), T = w([]), h = w(), k = w(o.size), [, ae] = He(), { renderConfig: oe, updateSignal: te } = $e(d);
108
+ const C = (W = we()) == null ? void 0 : W.appContext.app;
109
+ C && !C.__VXE_PC_UI_INSTALLED__ && (C.use(Ie), C.__VXE_PC_UI_INSTALLED__ = !0);
110
+ const A = xe(), a = ee, { e: I, b: i, be: ae } = Ue("ap-grid"), re = Ge("valueTypeMap"), d = R([]), T = R([]), p = R(), b = R(a.size), [, m] = qe(), { renderConfig: te, updateSignal: le } = Me(d);
109
111
  let V = 0;
110
- const _ = n(() => {
111
- var e, l, r;
112
- return V++, ((r = (l = (e = o.columns) == null ? void 0 : e.filter(
113
- (t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !Pe.includes(t.valueType)
114
- )) == null ? void 0 : l.sort((t, i) => {
115
- let p = X(t.order);
116
- return X(i.order) - p;
117
- })) == null ? void 0 : r.map((t) => {
118
- const i = Ee(
119
- t,
120
- Ne(t.fieldProps, {})
121
- ), p = {
122
- ...t,
112
+ const ne = n(() => {
113
+ if (p.value)
114
+ return p.value.$el.querySelector(
115
+ ".vxe-table--header-inner-wrapper"
116
+ );
117
+ }), L = n(() => {
118
+ var e, l, t;
119
+ return V++, ((t = (l = (e = a.columns) == null ? void 0 : e.filter(
120
+ (r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !Ne.includes(r.valueType)
121
+ )) == null ? void 0 : l.sort((r, c) => {
122
+ let v = Q(r.order);
123
+ return Q(c.order) - v;
124
+ })) == null ? void 0 : t.map((r) => {
125
+ const c = _e(
126
+ r,
127
+ ze(r.fieldProps, {})
128
+ ), v = {
129
+ ...r,
123
130
  fieldProps: {
124
- label: t.title,
125
- name: t.dataIndex,
126
- ...i || {},
131
+ label: r.title,
132
+ name: r.dataIndex,
133
+ ...c || {},
127
134
  _signal: V
128
135
  },
129
136
  renderNode: void 0
130
137
  };
131
- return p.renderNode = ze(
132
- p,
133
- a(ee)
134
- ), p;
138
+ return v.renderNode = Ae(
139
+ v,
140
+ o(re)
141
+ ), v;
135
142
  })) || [];
136
- }), re = n(() => [g(), o.card ? null : g("wrapper")].filter(Boolean)), A = n(() => J(a(d), (e) => {
143
+ }), se = n(() => [
144
+ i(),
145
+ a.card ? null : i("wrapper"),
146
+ a.adaptive ? i("adaptive") : null,
147
+ a.sticky ? i("sticky") : null
148
+ ].filter(Boolean)), O = n(() => Y(o(d), (e) => {
137
149
  if (e.sorter === !0)
138
150
  return e.key || e.dataIndex;
139
- }).filter(Boolean)), O = n(() => J(a(d), (e) => {
151
+ }).filter(Boolean)), D = n(() => Y(o(d), (e) => {
140
152
  if (e.filters && !e.onFilter)
141
153
  return e.key || e.dataIndex;
142
154
  }).filter(Boolean)), {
143
- formRef: B,
144
- submit: L,
145
- reset: D,
146
- refresh: le,
147
- data: C,
148
- tableProps: ne,
149
- setDataSource: se,
150
- handleTableChange: de
155
+ formRef: E,
156
+ submit: K,
157
+ reset: $,
158
+ refresh: de,
159
+ data: S,
160
+ tableProps: ie,
161
+ setDataSource: ce,
162
+ handleTableChange: ue
151
163
  } = Te({
152
164
  async request(e) {
153
- var r;
154
- if (!S.value.preserveSelectedRowKeys && x(o.dataSource) && I(), !x(o.dataSource)) {
155
- const t = e.pageSize * (e.current - 1);
165
+ var t;
166
+ if (!x.value.preserveSelectedRowKeys && B(a.dataSource) && P(), !B(a.dataSource)) {
167
+ const r = e.pageSize * (e.current - 1);
156
168
  return {
157
- data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(t, t + e.pageSize)) || [],
158
- total: o.dataSource.length || 0
169
+ data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(r, r + e.pageSize)) || [],
170
+ total: a.dataSource.length || 0
159
171
  };
160
172
  }
161
- const l = await ((r = o.request) == null ? void 0 : r.call(o, e));
173
+ const l = await ((t = a.request) == null ? void 0 : t.call(a, e));
162
174
  return {
163
175
  data: (l == null ? void 0 : l.data) || [],
164
176
  total: (l == null ? void 0 : l.total) || 0
165
177
  };
166
178
  },
167
179
  namespace: "ap-grid",
168
- filterFields: O,
169
- sortFields: A,
170
- defaultParams: o.params,
171
- defaultData: o.defaultData,
172
- manual: o.manual,
173
- formatParams: o.beforeSearchSubmit,
174
- pagination: o.pagination
175
- }), { sortChangeEvent: ie, filterChangeEvent: ue, paginationChangeEvent: ce } = _e(de);
176
- Ke({
180
+ filterFields: D,
181
+ sortFields: O,
182
+ defaultParams: a.params,
183
+ defaultData: a.defaultData,
184
+ manual: a.manual,
185
+ formatParams: a.beforeSearchSubmit,
186
+ pagination: a.pagination
187
+ }), { sortChangeEvent: pe, filterChangeEvent: me, paginationChangeEvent: fe } = Le(ue);
188
+ je({
177
189
  columns: n(() => d.value),
178
190
  columnsBackup: n(() => T.value),
179
- size: n(() => We[k.value]),
191
+ size: n(() => b.value ? We[b.value] : "middle"),
180
192
  updateColumns(e) {
181
193
  d.value = e;
182
194
  },
183
195
  updateSize(e) {
184
- k.value = je[e];
196
+ b.value = He[e];
185
197
  },
186
198
  renderConfig: n(() => ({
187
- className: Z("table-header", "title"),
188
- color: ae.value.colorPrimary
199
+ className: ae("table-header", "title"),
200
+ color: m.value.colorPrimary
189
201
  }))
190
202
  });
191
- const K = n(
203
+ const j = n(
192
204
  () => d.value.some(
193
205
  (e) => e.fixed === "left" || e.fixed === !0
194
206
  ) ? "left" : void 0
195
- ), pe = n(
196
- () => x(o.dataSource) ? C.records : o.dataSource
197
- ), { selectedRows: y, rowSelection: S, ...fe } = De({
198
- ...o.rowSelection === !0 ? {} : o.rowSelection,
199
- dataSource: pe,
200
- rowKey: o.rowKey
201
- }), j = () => {
202
- const e = h.value;
203
- e && (y.value = [
207
+ ), ge = n(
208
+ () => B(a.dataSource) ? S.records : a.dataSource
209
+ ), { selectedRows: w, rowSelection: x, ...he } = $e({
210
+ ...a.rowSelection === !0 ? {} : a.rowSelection,
211
+ dataSource: ge,
212
+ rowKey: a.rowKey
213
+ }), H = () => {
214
+ const e = p.value;
215
+ e && (w.value = [
204
216
  ...e.getCheckboxReserveRecords(),
205
217
  ...e.getCheckboxRecords()
206
218
  ]);
207
- }, me = () => {
208
- const e = h.value;
209
- e && (y.value = [e.getRadioRecord()]);
219
+ }, ve = () => {
220
+ const e = p.value;
221
+ e && (w.value = [e.getRadioRecord()]);
210
222
  };
211
- function ge() {
223
+ function ye() {
212
224
  var e;
213
- return ((e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInTable)) || [];
225
+ return ((e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInTable)) || [];
214
226
  }
215
- function he(e) {
216
- var l, r, t;
217
- (t = (r = (l = B.value) == null ? void 0 : l.apForm) == null ? void 0 : r.setFieldsValue) == null || t.call(r, e);
227
+ function Ce(e) {
228
+ var l, t, r;
229
+ (r = (t = (l = E.value) == null ? void 0 : l.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
218
230
  }
219
- function Ce(e = !1) {
220
- var r, t, i;
231
+ function be(e = !1) {
232
+ var t, r, c;
221
233
  const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
222
- return (i = (t = (r = B.value) == null ? void 0 : r.apForm) == null ? void 0 : t[l]) == null ? void 0 : i.call(t, !0);
234
+ return (c = (r = (t = E.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : c.call(r, !0);
223
235
  }
224
- function I() {
225
- fe.clearAll();
226
- const e = h.value;
227
- e && (S.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
236
+ function P() {
237
+ he.clearAll();
238
+ const e = p.value;
239
+ e && (x.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
228
240
  }
229
- return ve(() => {
230
- const e = ge();
241
+ return Re(() => {
242
+ const e = ye();
231
243
  d.value = e, T.value = e;
232
- }), $(
233
- () => o.dataSource,
244
+ }), M(
245
+ () => a.dataSource,
234
246
  (e) => {
235
- se(e);
247
+ ce(e);
236
248
  },
237
249
  { immediate: !0 }
238
- ), $(
239
- () => a(C).loading,
250
+ ), M(
251
+ () => o(S).loading,
240
252
  (e) => {
241
253
  var l;
242
- (l = o.onLoadingChange) == null || l.call(o, e);
254
+ (l = a.onLoadingChange) == null || l.call(a, e);
243
255
  }
244
- ), Y({
245
- submit: L,
246
- reset: D,
247
- refresh: le,
248
- setSearchFormValues: he,
249
- getSearchFormValues: Ce,
250
- getShowColumns: () => a(d),
256
+ ), oe({
257
+ submit: K,
258
+ reset: $,
259
+ refresh: de,
260
+ setSearchFormValues: Ce,
261
+ getSearchFormValues: be,
262
+ getShowColumns: () => o(d),
251
263
  rowSelection: {
252
- selectedRows: n(() => y.value),
253
- clearAll: I
264
+ selectedRows: n(() => w.value),
265
+ clearAll: P
254
266
  }
255
- }), (e, l) => (s(), v("div", {
256
- class: b(re.value)
267
+ }), (e, l) => (s(), k("div", {
268
+ class: f(se.value)
257
269
  }, [
258
- a(x)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (s(), v("div", {
270
+ o(B)(e.dataSource) && e.searchForm !== !1 && L.value.length > 0 ? (s(), k("div", {
259
271
  key: 0,
260
- class: b(e.card ? a(F)("search-wrapper") : null),
261
- style: U(e.searchFormWrapperStyle)
272
+ class: f(e.card ? o(I)("search-wrapper") : null),
273
+ style: q(e.searchFormWrapperStyle)
262
274
  }, [
263
- be(a(Ie).SearchForm, c(e.searchForm || {}, {
275
+ U(o(Pe).SearchForm, g(e.searchForm || {}, {
264
276
  ref_key: "formRef",
265
- ref: B,
277
+ ref: E,
266
278
  "custom-reset": "",
267
279
  "submit-loading": !1,
268
- onSubmit: a(L),
269
- onReset: a(D)
270
- }), q({
271
- default: f(() => [
272
- (s(!0), v(M, null, P(_.value, (r) => (s(), u(E(r.renderNode.Comp), c({
273
- key: r.dataIndex,
274
- item: r,
280
+ onSubmit: o(K),
281
+ onReset: o($)
282
+ }), G({
283
+ default: h(() => [
284
+ (s(!0), k(X, null, N(L.value, (t) => (s(), u(_(t.renderNode.Comp), g({
285
+ key: t.dataIndex,
286
+ item: t,
275
287
  ref_for: !0
276
- }, r.fieldProps || {}, {
277
- span: r.span,
278
- "custom-render": r.renderNode.render
288
+ }, t.fieldProps || {}, {
289
+ span: t.span,
290
+ "custom-render": t.renderNode.render
279
291
  }), null, 16, ["item", "span", "custom-render"]))), 128))
280
292
  ]),
281
293
  _: 2
282
294
  }, [
283
- z.searchFormExtra ? {
295
+ A.searchFormExtra ? {
284
296
  name: "extra",
285
- fn: f(() => [
286
- N(e.$slots, "searchFormExtra")
297
+ fn: h(() => [
298
+ z(e.$slots, "searchFormExtra")
287
299
  ]),
288
300
  key: "0"
289
301
  } : void 0
290
302
  ]), 1040, ["onSubmit", "onReset"])
291
- ], 6)) : R("", !0),
292
- H("div", {
293
- class: b([a(F)("table-wrapper"), e.card ? a(F)("table-wrapper-card") : null]),
294
- style: U(e.tableWrapperStyle)
303
+ ], 6)) : y("", !0),
304
+ F("div", {
305
+ class: f([o(I)("table-wrapper"), e.card ? o(I)("table-wrapper-card") : null]),
306
+ style: q(e.tableWrapperStyle)
295
307
  }, [
296
- H("div", {
297
- class: b(a(g)("header-wrapper"))
308
+ F("div", {
309
+ class: f(o(i)("header-wrapper"))
298
310
  }, [
299
- N(e.$slots, "title", {
300
- selectedRows: a(y),
301
- selectedRowKeys: a(S).selectedRowKeys,
311
+ z(e.$slots, "title", {
312
+ selectedRows: o(w),
313
+ selectedRowKeys: o(x).selectedRowKeys,
302
314
  shownColumns: d.value,
303
- clearAll: I
315
+ clearAll: P
304
316
  })
305
317
  ], 2),
306
- (s(), u(a(Fe), c(a(Ae)(o), {
307
- ref_key: "tableRef",
308
- ref: h,
309
- key: a(te),
310
- data: a(C).records,
311
- "sort-config": { remote: A.value.length > 0 },
312
- "filter-config": { remote: O.value.length > 0 },
313
- loading: a(C).loading,
314
- "row-config": {
315
- isHover: !0,
316
- keyField: o.rowKey
317
- },
318
- size: k.value,
319
- onSortChange: a(ie),
320
- onFilterChange: a(ue),
321
- onCheckboxChange: j,
322
- onCheckboxAll: j,
323
- onRadioChange: me
324
- }), q({
325
- default: f(() => [
326
- o.expandable ? (s(), u(a(G), c({ key: 0 }, a(Oe)(e.expandable), { fixed: K.value }), {
327
- content: f((r) => [
328
- (s(), u(E(o.expandable.renderContent(r))))
329
- ]),
330
- _: 1
331
- }, 16, ["fixed"])) : R("", !0),
332
- o.rowSelection ? (s(), u(a(G), c({ key: 1 }, a(Le)(a(S)), { fixed: K.value }), null, 16, ["fixed"])) : R("", !0),
333
- (s(!0), v(M, null, P(a(oe), (r) => (s(), u(E(r), {
334
- key: r.props.colId
335
- }))), 128))
336
- ]),
337
- _: 2
318
+ F("div", {
319
+ class: f(o(i)("vxe-wrapper"))
320
+ }, [
321
+ (s(), u(o(Be), g(o(Oe)(a), {
322
+ ref_key: "tableRef",
323
+ ref: p,
324
+ key: o(le),
325
+ data: o(S).records,
326
+ "sort-config": { remote: O.value.length > 0 },
327
+ "filter-config": { remote: D.value.length > 0 },
328
+ loading: o(S).loading,
329
+ "row-config": {
330
+ isHover: !0,
331
+ keyField: a.rowKey
332
+ },
333
+ style: {
334
+ "--vxe-ui-table-row-checkbox-checked-background-color": o(m).controlItemBgActive,
335
+ "--vxe-ui-table-row-hover-checkbox-checked-background-color": o(m).controlItemBgActiveHover,
336
+ "--vxe-ui-font-primary-color": o(m).colorPrimary,
337
+ "--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
338
+ "--vxe-ui-table-cell-padding-default": "12px",
339
+ "--vxe-ui-table-cell-padding-medium": "9px",
340
+ "--vxe-ui-table-row-radio-checked-background-color": o(m).controlItemBgActive,
341
+ "--vxe-ui-table-row-hover-radio-checked-background-color": o(m).controlItemBgActiveHover
342
+ },
343
+ size: b.value,
344
+ onSortChange: o(pe),
345
+ onFilterChange: o(me),
346
+ onCheckboxChange: H,
347
+ onCheckboxAll: H,
348
+ onRadioChange: ve
349
+ }), G({
350
+ empty: h(() => [
351
+ U(o(Z), {
352
+ image: o(Z).PRESENTED_IMAGE_SIMPLE
353
+ }, null, 8, ["image"])
354
+ ]),
355
+ default: h(() => [
356
+ a.expandable ? (s(), u(o(J), g({ key: 0 }, o(De)(e.expandable), { fixed: j.value }), {
357
+ content: h((t) => [
358
+ (s(), u(_(a.expandable.renderContent(t))))
359
+ ]),
360
+ _: 1
361
+ }, 16, ["fixed"])) : y("", !0),
362
+ a.rowSelection ? (s(), u(o(J), g({ key: 1 }, o(Ke)(o(x)), { fixed: j.value }), null, 16, ["fixed"])) : y("", !0),
363
+ (s(!0), k(X, null, N(o(te), (t) => (s(), u(_(t), {
364
+ key: t.props.colId
365
+ }))), 128))
366
+ ]),
367
+ _: 2
368
+ }, [
369
+ N(o(Ee)(A, ["searchFormExtra"]), (t, r) => ({
370
+ name: r,
371
+ fn: h((c) => [
372
+ z(e.$slots, r, ke(Fe(c || {})))
373
+ ])
374
+ }))
375
+ ]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "style", "size", "onSortChange", "onFilterChange"]))
376
+ ], 2),
377
+ F("div", {
378
+ class: f(o(i)("pagination-wrapper"))
338
379
  }, [
339
- P(a(Be)(z, ["searchFormExtra"]), (r, t) => ({
340
- name: t,
341
- fn: f((i) => [
342
- N(e.$slots, t, Re(xe(i || {})))
343
- ])
344
- }))
345
- ]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "size", "onSortChange", "onFilterChange"])),
346
- e.pagination !== !1 ? (s(), u(a(Ve), c({
347
- key: 0,
348
- class: a(g)("pagination")
349
- }, a(ne).pagination, { onChange: a(ce) }), null, 16, ["class", "onChange"])) : R("", !0)
380
+ e.sticky ? (s(), u(o(Xe), {
381
+ key: 0,
382
+ direction: "horizontal",
383
+ "scroll-container": ne.value
384
+ }, null, 8, ["scroll-container"])) : y("", !0),
385
+ e.pagination !== !1 ? (s(), u(o(Ve), g({
386
+ key: 1,
387
+ class: o(i)("pagination")
388
+ }, o(ie).pagination, { onChange: o(fe) }), null, 16, ["class", "onChange"])) : y("", !0)
389
+ ], 2)
350
390
  ], 6)
351
391
  ], 2));
352
392
  }
353
393
  });
354
394
  export {
355
- ga as default
395
+ So as default
356
396
  };
@@ -180,7 +180,6 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
180
180
  size?: 'medium' | 'small' | 'mini';
181
181
  /**
182
182
  * 表格是否自适应高度
183
- * @deprecated 暂未实现
184
183
  */
185
184
  adaptive?: boolean;
186
185
  /**
@@ -1,11 +1,11 @@
1
- import { isUndefined as d, omit as a, isFunction as c, isNumber as f } from "lodash-unified";
1
+ import { omit as u, isUndefined as d, isFunction as c, isNumber as f } from "lodash-unified";
2
2
  const h = 30, b = 50;
3
- function y(e) {
3
+ function R(e) {
4
4
  var i, l, n;
5
5
  const t = {
6
- ...e
6
+ ...u(e, ["columns", "request", "searchForm", "dataSource"])
7
7
  };
8
- if (e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
8
+ if (e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
9
9
  resizable: !0
10
10
  }), e.rowSelection) {
11
11
  const o = e.rowSelection === !0 ? {} : e.rowSelection;
@@ -25,7 +25,7 @@ function y(e) {
25
25
  reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
26
26
  };
27
27
  }
28
- return t.border = e.bordered, e.expandable && (t.expandConfig = a(e.expandable, [
28
+ return t.border = e.bordered, e.expandable && (t.expandConfig = u(e.expandable, [
29
29
  "renderContent",
30
30
  "width",
31
31
  "title"
@@ -33,23 +33,23 @@ function y(e) {
33
33
  enabled: !1
34
34
  }, t.virtualYConfig = {
35
35
  enabled: !1
36
- }) : (u(t, "X", (l = e.virtual) == null ? void 0 : l.x), u(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
36
+ }) : (a(t, "X", (l = e.virtual) == null ? void 0 : l.x), a(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
37
37
  }
38
- function u(e, t, i) {
38
+ function a(e, t, i) {
39
39
  const l = t === "X", n = l ? "virtualXConfig" : "virtualYConfig", o = i !== !1, r = l ? h : b, s = f(i) && i >= 0 ? i : r;
40
40
  e[n] = {
41
41
  enabled: o,
42
42
  gt: s
43
43
  };
44
44
  }
45
- function C(e) {
45
+ function v(e) {
46
46
  const t = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
47
47
  return {
48
48
  type: t,
49
49
  width: i
50
50
  };
51
51
  }
52
- function R(e) {
52
+ function y(e) {
53
53
  const t = (e == null ? void 0 : e.width) || "auto";
54
54
  return {
55
55
  type: "expand",
@@ -58,7 +58,7 @@ function R(e) {
58
58
  };
59
59
  }
60
60
  export {
61
- R as getRowExpandProps,
62
- C as getRowSelectionProps,
63
- y as toVxeProps
61
+ y as getRowExpandProps,
62
+ v as getRowSelectionProps,
63
+ R as toVxeProps
64
64
  };
@@ -0,0 +1,6 @@
1
+ export declare enum ModalMessage {
2
+ /**
3
+ * 弹框不需要关闭
4
+ */
5
+ NOT_NEED_CLOSE = "Info: [aplus-ui: ApModal.createModalStream] The modal does not need to be closed"
6
+ }
@@ -0,0 +1,4 @@
1
+ var o = /* @__PURE__ */ ((e) => (e.NOT_NEED_CLOSE = "Info: [aplus-ui: ApModal.createModalStream] The modal does not need to be closed", e))(o || {});
2
+ export {
3
+ o as ModalMessage
4
+ };
@@ -1,8 +1,9 @@
1
1
  import { Modal as _Modal } from '@aplus-frontend/antdv';
2
- import { CreateModalFunc } from './interface';
2
+ import { CreateModalFunc, CreateModalStreamFunc } from './interface';
3
3
  export * from './interface';
4
4
  type ApModalMixedProps = typeof _Modal & {
5
5
  createModal: CreateModalFunc;
6
+ createModalStream: CreateModalStreamFunc;
6
7
  };
7
8
  declare const ApModal: ApModalMixedProps;
8
9
  export { ApModal };
@@ -2,8 +2,10 @@ import { Modal as r } from "@aplus-frontend/antdv";
2
2
  import "./utils/index.mjs";
3
3
  import "./interface.mjs";
4
4
  import { createModal as a } from "./utils/createModal.mjs";
5
+ import { createModalStream as t } from "./utils/createModalStream.mjs";
5
6
  const o = r;
6
7
  o.createModal = a;
8
+ o.createModalStream = t;
7
9
  o.name = "ApModal";
8
10
  export {
9
11
  o as ApModal