@aplus-frontend/ui 0.5.22 → 0.5.24

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 (31) hide show
  1. package/es/src/ap-form/ap-form.vue.d.ts +2 -2
  2. package/es/src/ap-form/ap-form.vue2.mjs +124 -124
  3. package/es/src/ap-form/drawer-form/index.vue.d.ts +5 -5
  4. package/es/src/ap-form/interface.d.ts +3 -2
  5. package/es/src/ap-form/modal-form/index.vue.d.ts +5 -5
  6. package/es/src/ap-form/search-form/index.vue.d.ts +5 -5
  7. package/es/src/ap-grid/editable/form-item.vue.mjs +65 -61
  8. package/es/src/ap-grid/editable/index.vue.mjs +86 -81
  9. package/es/src/ap-grid/editable/interface.d.ts +1 -1
  10. package/es/src/ap-grid/index.vue.mjs +22 -22
  11. package/es/src/ap-grid/interface.d.ts +4 -0
  12. package/es/src/ap-grid/utils/table.d.ts +1 -1
  13. package/es/src/ap-grid/utils/table.mjs +42 -41
  14. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +108 -102
  15. package/es/src/work-order-modal/work-order-modal.vue.d.ts +3 -3
  16. package/lib/src/ap-form/ap-form.vue.d.ts +2 -2
  17. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  18. package/lib/src/ap-form/drawer-form/index.vue.d.ts +5 -5
  19. package/lib/src/ap-form/interface.d.ts +3 -2
  20. package/lib/src/ap-form/modal-form/index.vue.d.ts +5 -5
  21. package/lib/src/ap-form/search-form/index.vue.d.ts +5 -5
  22. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  24. package/lib/src/ap-grid/editable/interface.d.ts +1 -1
  25. package/lib/src/ap-grid/index.vue.js +1 -1
  26. package/lib/src/ap-grid/interface.d.ts +4 -0
  27. package/lib/src/ap-grid/utils/table.d.ts +1 -1
  28. package/lib/src/ap-grid/utils/table.js +1 -1
  29. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  30. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +3 -3
  31. package/package.json +6 -6
@@ -1,15 +1,15 @@
1
- import { defineComponent as O, useSlots as P, toRef as H, ref as g, unref as r, watch as W, nextTick as G, createBlock as K, openBlock as M, mergeProps as y, withCtx as C, createVNode as U, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
- import { ApForm as w } from "../../ap-form/index.mjs";
3
- import { isArray as Y, isNumber as d, cloneDeep as f, omit as Z } from "lodash-unified";
1
+ import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as f, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as g, withCtx as y, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
+ import { ApForm as C } from "../../ap-form/index.mjs";
3
+ import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
- import { isDef as m } from "../../utils/index.mjs";
6
- import { useGetEditableColumns as I } from "../hooks/use-editable-columns.mjs";
5
+ import { isDef as w } from "../../utils/index.mjs";
6
+ import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
7
7
  import "../index.vue2.mjs";
8
- import { useInjectForm as ee } from "../../ap-form/context.mjs";
9
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useGlobalConfig as ae } from "../../config-provider/hooks/use-global-config.mjs";
11
- import te from "../index.vue.mjs";
12
- const he = /* @__PURE__ */ O({
8
+ import { useInjectForm as ae } from "../../ap-form/context.mjs";
9
+ import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
11
+ import ne from "../index.vue.mjs";
12
+ const ye = /* @__PURE__ */ P({
13
13
  name: "EditableGrid",
14
14
  __name: "form-item",
15
15
  props: {
@@ -154,105 +154,109 @@ const he = /* @__PURE__ */ O({
154
154
  setup(x, {
155
155
  expose: b
156
156
  }) {
157
- const R = P(), t = x, {
157
+ const R = A(), l = x, {
158
158
  b: B
159
- } = oe("editable-grid");
159
+ } = te("editable-grid");
160
160
  function S(e, o) {
161
- return Y(o) ? o.reduce((n, l) => n == null ? void 0 : n[l], e) : e == null ? void 0 : e[o];
161
+ return Z(o) ? o.reduce((n, t) => n == null ? void 0 : n[t], e) : e == null ? void 0 : e[o];
162
162
  }
163
163
  const {
164
164
  internalInstance: a,
165
165
  model: F
166
- } = ee(), i = H(t.name), u = g(S(r(F), i.value) || []), N = w.useWatch(i);
166
+ } = ae(), p = H(l.name), d = h(S(f(F), p.value) || []), N = C.useWatch(p);
167
167
  W(() => N.value, async (e) => {
168
168
  var o;
169
- await G(), u.value = e, (o = t.onChange) == null || o.call(t, e);
169
+ await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
170
170
  }, {
171
171
  deep: !0
172
172
  });
173
- const p = g(), v = ae("valueTypeMap"), D = I(t, v);
173
+ const c = h(), v = le("valueTypeMap"), D = oe(l, v);
174
174
  function L(e, o) {
175
175
  var s;
176
- const n = ((s = r(u)) == null ? void 0 : s.length) || 0;
177
- if (m(t.maxLength) && n >= t.maxLength)
176
+ const n = ((s = f(d)) == null ? void 0 : s.length) || 0;
177
+ if (w(l.maxLength) && n >= l.maxLength)
178
178
  return;
179
- const l = [...r(u) || []];
180
- m(o) ? l.splice(o, 0, {
179
+ const t = {
181
180
  ...e || {}
182
- }) : l.push({
183
- ...e || {}
184
- }), a == null || a.setFieldValue(t.name, l);
181
+ };
182
+ a == null || a.setFieldValue(l.name, t, !0, (u, r) => {
183
+ console.log("run add", u[r]), u[r] || (u[r] = [t]), I(o) ? u[r].push(t) : u[r].splice(o, 0, t);
184
+ });
185
185
  }
186
186
  function V(e, o = "suffix") {
187
- var h;
188
- const n = ((h = r(u)) == null ? void 0 : h.length) || 0, l = d(e) ? e : e.length;
189
- if (m(t.maxLength) && n + l > t.maxLength)
187
+ var u;
188
+ const n = ((u = f(d)) == null ? void 0 : u.length) || 0, t = m(e) ? e : e.length;
189
+ if (w(l.maxLength) && n + t > l.maxLength)
190
190
  return;
191
- const s = [...r(u) || []], c = d(e) ? new Array(e).fill(0).map(() => ({})) : f(e);
192
- o === "suffix" ? s.push(...c) : s.unshift(...c), a == null || a.setFieldValue(t.name, s);
191
+ const s = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
192
+ a == null || a.setFieldValue(l.name, s, !0, (r, i) => {
193
+ r[i] || (r[i] = [...s]), o === "suffix" ? r[i].push(...s) : r[i].unshift(...s);
194
+ });
193
195
  }
194
- function _(e) {
195
- let o = f(r(u) || []);
196
- const n = d(e) ? [e] : e;
197
- o = o.filter((l, s) => !n.includes(s)), a == null || a.setFieldValue(t.name, o);
196
+ function T(e) {
197
+ const o = new Set(m(e) ? [e] : e);
198
+ a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
199
+ n[t] = n[t].filter((s, u) => !o.has(u));
200
+ });
198
201
  }
199
- function E() {
200
- return r(u);
202
+ function _() {
203
+ return f(d);
201
204
  }
202
- function T(e) {
205
+ function E(e) {
203
206
  var o;
204
- return (o = r(u)) == null ? void 0 : o[e];
207
+ return (o = f(d)) == null ? void 0 : o[e];
205
208
  }
206
209
  function k(e, o, n = !0) {
207
- const l = f(r(u));
208
- l[e] && (l[e] = {
209
- ...n ? l[e] : {},
210
- ...o
211
- }, a == null || a.setFieldValue(t.name, [...l]));
210
+ a == null || a.setFieldValue(l.name, null, !0, (t, s) => {
211
+ !t[s] || !t[s][e] || (t[s][e] = {
212
+ ...n ? t[s][e] : {},
213
+ ...o
214
+ });
215
+ });
212
216
  }
213
217
  function j(e) {
214
- a == null || a.setFieldValue(t.name, e);
218
+ a == null || a.setFieldValue(l.name, e);
215
219
  }
216
220
  function z(e) {
217
221
  var n;
218
- const o = e === "end" ? u.value.length - 1 : e;
219
- (n = p.value) == null || n.scrollToRow(o);
222
+ const o = e === "end" ? d.value.length - 1 : e;
223
+ (n = c.value) == null || n.scrollToRow(o);
220
224
  }
221
- function A() {
225
+ function O() {
222
226
  var e;
223
- (e = a == null ? void 0 : a.setFieldValue) == null || e.call(a, t.name, []);
227
+ (e = a == null ? void 0 : a.setFieldValue) == null || e.call(a, l.name, []);
224
228
  }
225
229
  return b({
226
230
  add: L,
227
- remove: _,
228
- getRowData: T,
229
- getRowsData: E,
231
+ remove: T,
232
+ getRowData: E,
233
+ getRowsData: _,
230
234
  setRowData: k,
231
235
  addMultiple: V,
232
236
  scrollTo: z,
233
237
  setTableData: j,
234
- clear: A
235
- }), (e, o) => (M(), K(r(w).FormItem, y(e.formItem, {
238
+ clear: O
239
+ }), (e, o) => (U(), K(f(C).FormItem, g(e.formItem, {
236
240
  name: e.name,
237
241
  label: e.label
238
242
  }), {
239
- default: C(() => [U(te, y(r(Z)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
243
+ default: y(() => [$(ne, g(f(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
240
244
  ref_key: "tableRef",
241
- ref: p,
242
- class: r(B)(),
243
- columns: r(D),
244
- "data-source": u.value,
245
+ ref: c,
246
+ class: f(B)(),
247
+ columns: f(D),
248
+ "data-source": d.value,
245
249
  "search-form": !1
246
- }), $({
250
+ }), q({
247
251
  _: 2
248
- }, [q(R, (n, l) => ({
249
- name: l,
250
- fn: C((s) => [J(e.$slots, l, Q(X(s || {})))])
252
+ }, [J(R, (n, t) => ({
253
+ name: t,
254
+ fn: y((s) => [Q(e.$slots, t, X(Y(s || {})))])
251
255
  }))]), 1040, ["class", "columns", "data-source"])]),
252
256
  _: 3
253
257
  }, 16, ["name", "label"]));
254
258
  }
255
259
  });
256
260
  export {
257
- he as default
261
+ ye as default
258
262
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as M, useSlots as U, ref as w, watch as v, unref as n, createBlock as $, openBlock as q, withCtx as c, createVNode as R, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
2
- import { ApForm as p } from "../../ap-form/index.mjs";
3
- import { isEqual as ae, isArray as b, isNumber as h, cloneDeep as y, omit as te } from "lodash-unified";
1
+ import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, createBlock as q, openBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
2
+ import { ApForm as g } from "../../ap-form/index.mjs";
3
+ import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { isDef as g } from "../../utils/index.mjs";
7
- import { useGetEditableColumns as le } from "../hooks/use-editable-columns.mjs";
6
+ import { isDef as b } from "../../utils/index.mjs";
7
+ import { useGetEditableColumns as ne } from "../hooks/use-editable-columns.mjs";
8
8
  import "../index.vue2.mjs";
9
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs";
11
- import { useGlobalConfig as re } from "../../config-provider/hooks/use-global-config.mjs";
12
- import se from "../index.vue.mjs";
13
- const we = /* @__PURE__ */ M({
9
+ import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
11
+ import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import ie from "../index.vue.mjs";
13
+ const Re = /* @__PURE__ */ U({
14
14
  name: "EditableGrid",
15
15
  __name: "index",
16
16
  props: {
@@ -155,128 +155,133 @@ const we = /* @__PURE__ */ M({
155
155
  expose: F,
156
156
  emit: S
157
157
  }) {
158
- const N = U(), t = B, {
158
+ const N = $(), t = B, {
159
159
  b: V
160
- } = oe("editable-grid"), _ = S, C = w(), {
161
- value: s,
160
+ } = se("editable-grid"), _ = S, C = w(), {
161
+ value: m,
162
162
  updateValue: L
163
- } = ne(t, _), u = w(), D = re("valueTypeMap"), m = p.useWatch(t.name, u);
164
- v(() => m.value, (e) => {
163
+ } = re(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
164
+ x(() => c.value, (e) => {
165
165
  var a;
166
166
  L(e), (a = t.onChange) == null || a.call(t, e);
167
167
  }, {
168
- deep: !0
169
- }), v(s, (e) => {
168
+ deep: !0,
169
+ flush: "post"
170
+ }), x(m, (e) => {
170
171
  var a;
171
- e !== n(m) && (ae(e, n(m)) || (a = u.value) == null || a.setFieldValue(t.name, e));
172
+ e !== u(c) && (ae(e, u(c)) || (a = i.value) == null || a.setFieldValue(t.name, e));
172
173
  }, {
173
174
  deep: !0
174
175
  });
175
- const E = le(t, D);
176
- function k() {
176
+ const D = ne(t, E);
177
+ function T() {
177
178
  var e;
178
- (e = u.value) == null || e.resetFields();
179
+ (e = i.value) == null || e.resetFields();
179
180
  }
180
- function A(e) {
181
- return e ? (b(e) ? e : [e]).map((o) => b(o) ? [t.name, ...o] : [t.name, o]) : void 0;
181
+ function k(e) {
182
+ return e ? (R(e) ? e : [e]).map((l) => R(l) ? [t.name, ...l] : [t.name, l]) : void 0;
182
183
  }
183
- async function T(e, a) {
184
- var l;
185
- const o = await ((l = u.value) == null ? void 0 : l.validateFields(A(e), a));
186
- return o == null ? void 0 : o[t.name];
184
+ async function A(e, a) {
185
+ var o;
186
+ const l = await ((o = i.value) == null ? void 0 : o.validateFields(k(e), a));
187
+ return l == null ? void 0 : l[t.name];
187
188
  }
188
189
  function j(e, a) {
189
- var r, d, i;
190
- const o = ((r = n(s)) == null ? void 0 : r.length) || 0;
191
- if (g(t.maxLength) && o >= t.maxLength)
190
+ var n, s, r;
191
+ const l = ((n = u(m)) == null ? void 0 : n.length) || 0;
192
+ if (b(t.maxLength) && l >= t.maxLength)
192
193
  return;
193
- const l = [...n(s) || []];
194
- g(a) ? l.splice(a, 0, {
194
+ const o = {
195
195
  ...e || {}
196
- }) : l.push({
197
- ...e || {}
198
- }), (i = (d = u.value) == null ? void 0 : d.setFieldValue) == null || i.call(d, t.name, l);
196
+ };
197
+ (r = (s = i.value) == null ? void 0 : s.setFieldValue) == null || r.call(s, t.name, o, !0, (d, f) => {
198
+ console.log("run add", d[f]), d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
199
+ });
199
200
  }
200
201
  function z(e, a = "suffix") {
201
- var i, f, x;
202
- const o = ((i = n(s)) == null ? void 0 : i.length) || 0, l = h(e) ? e : e.length;
203
- if (g(t.maxLength) && o + l > t.maxLength)
202
+ var s, r, d;
203
+ const l = ((s = u(m)) == null ? void 0 : s.length) || 0, o = y(e) ? e : e.length;
204
+ if (b(t.maxLength) && l + o > t.maxLength)
204
205
  return;
205
- const r = [...n(s) || []], d = h(e) ? new Array(e).fill(0).map(() => ({})) : y(e);
206
- a === "suffix" ? r.push(...d) : r.unshift(...d), (x = (f = u.value) == null ? void 0 : f.setFieldValue) == null || x.call(f, t.name, r);
206
+ const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
207
+ (d = (r = i.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, n, !0, (f, p) => {
208
+ f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
209
+ });
207
210
  }
208
- function O(e) {
209
- var l, r;
210
- let a = y(n(s) || []);
211
- const o = h(e) ? [e] : e;
212
- a = a.filter((d, i) => !o.includes(i)), (r = (l = u.value) == null ? void 0 : l.setFieldValue) == null || r.call(l, t.name, a);
211
+ function I(e) {
212
+ var l, o;
213
+ const a = new Set(y(e) ? [e] : e);
214
+ (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, s) => {
215
+ n[s] = n[s].filter((r, d) => !a.has(d));
216
+ });
213
217
  }
214
- function P() {
215
- return n(s);
218
+ function O() {
219
+ return u(m);
216
220
  }
217
- function H(e) {
221
+ function P(e) {
218
222
  var a;
219
- (a = u.value) == null || a.setFieldValue(t.name, e);
223
+ (a = i.value) == null || a.setFieldValue(t.name, e);
220
224
  }
221
- function I(e) {
225
+ function H(e) {
222
226
  var a;
223
- return (a = n(s)) == null ? void 0 : a[e];
227
+ return (a = u(m)) == null ? void 0 : a[e];
224
228
  }
225
- function W(e, a, o = !0) {
226
- var r, d;
227
- const l = y(n(s));
228
- l[e] && (l[e] = {
229
- ...o ? l[e] : {},
230
- ...a
231
- }, (d = (r = u.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, [...l]));
229
+ function W(e, a, l = !0) {
230
+ var o, n;
231
+ (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, null, !0, (s, r) => {
232
+ !s[r] || !s[r][e] || (s[r][e] = {
233
+ ...l ? s[r][e] : {},
234
+ ...a
235
+ });
236
+ });
232
237
  }
233
238
  function G(e) {
234
- var o;
235
- const a = e === "end" ? s.value.length - 1 : e;
236
- (o = C.value) == null || o.scrollToRow(a);
239
+ var l;
240
+ const a = e === "end" ? m.value.length - 1 : e;
241
+ (l = C.value) == null || l.scrollToRow(a);
237
242
  }
238
243
  function K() {
239
244
  var e, a;
240
- (a = (e = u.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
245
+ (a = (e = i.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
241
246
  }
242
247
  return F({
243
- resetFields: k,
244
- validateFields: T,
248
+ resetFields: T,
249
+ validateFields: A,
245
250
  add: j,
246
- remove: O,
247
- getRowData: I,
248
- getRowsData: P,
251
+ remove: I,
252
+ getRowData: H,
253
+ getRowsData: O,
249
254
  setRowData: W,
250
255
  addMultiple: z,
251
256
  scrollTo: G,
252
257
  clear: K,
253
- setTableData: H
254
- }), (e, a) => (q(), $(n(p), {
258
+ setTableData: P
259
+ }), (e, a) => (J(), q(u(g), {
255
260
  ref_key: "formRef",
256
- ref: u,
261
+ ref: i,
257
262
  "initial-values": {
258
- [t.name]: n(s)
263
+ [t.name]: u(m)
259
264
  },
260
265
  style: {
261
266
  height: "100%"
262
267
  }
263
268
  }, {
264
- default: c(() => [R(n(p).FormItem, {
269
+ default: h(() => [v(u(g).FormItem, {
265
270
  name: e.name,
266
271
  "no-style": ""
267
272
  }, {
268
- default: c(() => [R(se, J(n(te)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
273
+ default: h(() => [v(ie, Q(u(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
269
274
  ref_key: "tableRef",
270
275
  ref: C,
271
- class: n(V)(),
272
- columns: n(E),
273
- "data-source": n(s),
276
+ class: u(V)(),
277
+ columns: u(D),
278
+ "data-source": u(m),
274
279
  "search-form": !1
275
- }), Q({
280
+ }), X({
276
281
  _: 2
277
- }, [X(N, (o, l) => ({
278
- name: l,
279
- fn: c((r) => [Y(e.$slots, l, Z(ee(r || {})))])
282
+ }, [Y(N, (l, o) => ({
283
+ name: o,
284
+ fn: h((n) => [Z(e.$slots, o, M(ee(n || {})))])
280
285
  }))]), 1040, ["class", "columns", "data-source"])]),
281
286
  _: 3
282
287
  }, 8, ["name"])]),
@@ -285,5 +290,5 @@ const we = /* @__PURE__ */ M({
285
290
  }
286
291
  });
287
292
  export {
288
- we as default
293
+ Re as default
289
294
  };
@@ -6,7 +6,7 @@ import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
6
6
  import { EditableTableExpose } from '../../editable-table';
7
7
  import { NamePath } from '@aplus-frontend/antdv/es/form/interface';
8
8
  import { ApFormItemProps } from '../../ap-form';
9
- export type EditableGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>, 'children' | 'customRender' | 'hideInSearch' | 'hideInTable' | 'tooltip' | 'customRenderFormItem' | 'fieldProps'> & {
9
+ export type EditableGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>, 'children' | 'customRender' | 'hideInSearch' | 'tooltip' | 'customRenderFormItem' | 'fieldProps'> & {
10
10
  children?: EditableGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
11
11
  /**
12
12
  * 在title之后展示一个icon并触发tooltip
@@ -1,4 +1,4 @@
1
- import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as k, computed as n, unref as o, watch as T, createElementBlock as F, openBlock as s, normalizeStyle as z, normalizeClass as f, createCommentVNode as C, createElementVNode as B, createVNode as U, mergeProps as g, createSlots as G, withCtx as v, Fragment as X, renderList as A, createBlock as u, resolveDynamicComponent as _, renderSlot as V, normalizeProps as J, guardReactiveProps as Pe } from "vue";
1
+ import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as k, computed as n, unref as o, watch as T, createElementBlock as F, openBlock as s, normalizeStyle as z, normalizeClass as f, createCommentVNode as C, createElementVNode as B, createVNode as U, mergeProps as g, createSlots as G, withCtx as v, Fragment as X, renderList as A, createBlock as c, resolveDynamicComponent as _, renderSlot as V, normalizeProps as J, guardReactiveProps as Pe } from "vue";
2
2
  import { VxeTable as Ee, VxeColumn as Q } from "vxe-table";
3
3
  import "vxe-table/es/style.css";
4
4
  import "vxe-pc-ui/es/style.css";
@@ -126,11 +126,11 @@ const ko = /* @__PURE__ */ Fe({
126
126
  var e, l, t;
127
127
  return O++, ((t = (l = (e = a.columns) == null ? void 0 : e.filter(
128
128
  (r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !ze.includes(r.valueType)
129
- )) == null ? void 0 : l.sort((r, c) => {
129
+ )) == null ? void 0 : l.sort((r, u) => {
130
130
  let y = Z(r.order);
131
- return Z(c.order) - y;
131
+ return Z(u.order) - y;
132
132
  })) == null ? void 0 : t.map((r) => {
133
- const c = Ae(
133
+ const u = Ae(
134
134
  r,
135
135
  _e(r.fieldProps, {})
136
136
  ), y = {
@@ -138,7 +138,7 @@ const ko = /* @__PURE__ */ Fe({
138
138
  fieldProps: {
139
139
  label: r.title,
140
140
  name: r.dataIndex,
141
- ...c || {},
141
+ ...u || {},
142
142
  _signal: O
143
143
  },
144
144
  renderNode: void 0
@@ -148,7 +148,7 @@ const ko = /* @__PURE__ */ Fe({
148
148
  o(le)
149
149
  ), y;
150
150
  })) || [];
151
- }), ce = n(() => [
151
+ }), ue = n(() => [
152
152
  d(),
153
153
  a.card ? null : d("wrapper"),
154
154
  a.adaptive ? d("adaptive") : null,
@@ -163,7 +163,7 @@ const ko = /* @__PURE__ */ Fe({
163
163
  formRef: P,
164
164
  submit: j,
165
165
  reset: W,
166
- refresh: ue,
166
+ refresh: ce,
167
167
  data: h,
168
168
  tableProps: M,
169
169
  setDataSource: pe,
@@ -239,9 +239,9 @@ const ko = /* @__PURE__ */ Fe({
239
239
  (r = (t = (l = P.value) == null ? void 0 : l.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
240
240
  }
241
241
  function Re(e = !1) {
242
- var t, r, c;
242
+ var t, r, u;
243
243
  const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
244
- return (c = (r = (t = P.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : c.call(r, !0);
244
+ return (u = (r = (t = P.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : u.call(r, !0);
245
245
  }
246
246
  function N() {
247
247
  be.clearAll();
@@ -269,7 +269,7 @@ const ko = /* @__PURE__ */ Fe({
269
269
  (e) => {
270
270
  pe(e);
271
271
  },
272
- { immediate: !0 }
272
+ { immediate: !0, deep: !0 }
273
273
  ), T(
274
274
  () => o(h).loading,
275
275
  (e) => {
@@ -279,7 +279,7 @@ const ko = /* @__PURE__ */ Fe({
279
279
  ), re({
280
280
  submit: j,
281
281
  reset: W,
282
- refresh: ue,
282
+ refresh: ce,
283
283
  setSearchFormValues: xe,
284
284
  getSearchFormValues: Re,
285
285
  getShowColumns: () => o(i),
@@ -289,7 +289,7 @@ const ko = /* @__PURE__ */ Fe({
289
289
  },
290
290
  scrollToRow: ke
291
291
  }), (e, l) => (s(), F("div", {
292
- class: f(ce.value),
292
+ class: f(ue.value),
293
293
  style: z(e.wrapperStyle)
294
294
  }, [
295
295
  o(b)(e.dataSource) && e.searchForm !== !1 && K.value.length > 0 ? (s(), F("div", {
@@ -306,7 +306,7 @@ const ko = /* @__PURE__ */ Fe({
306
306
  onReset: o(W)
307
307
  }), G({
308
308
  default: v(() => [
309
- (s(!0), F(X, null, A(K.value, (t) => (s(), u(_(t.renderNode.Comp), g({
309
+ (s(!0), F(X, null, A(K.value, (t) => (s(), c(_(t.renderNode.Comp), g({
310
310
  key: t.dataIndex,
311
311
  item: t,
312
312
  ref_for: !0
@@ -343,7 +343,7 @@ const ko = /* @__PURE__ */ Fe({
343
343
  B("div", {
344
344
  class: f(o(d)("vxe-wrapper"))
345
345
  }, [
346
- (s(), u(o(Ee), g(o(Ke)(a), {
346
+ (s(), c(o(Ee), g(o(Ke)(a), {
347
347
  ref_key: "tableRef",
348
348
  ref: p,
349
349
  key: o(ie),
@@ -379,14 +379,14 @@ const ko = /* @__PURE__ */ Fe({
379
379
  }, null, 8, ["image"])
380
380
  ]),
381
381
  default: v(() => [
382
- a.expandable ? (s(), u(o(Q), g({ key: 0 }, o($e)(e.expandable), { fixed: he.value }), {
382
+ a.expandable ? (s(), c(o(Q), g({ key: 0 }, o($e)(e.expandable), { fixed: he.value }), {
383
383
  content: v((t) => [
384
- (s(), u(_(a.expandable.renderContent(t))))
384
+ (s(), c(_(a.expandable.renderContent(t))))
385
385
  ]),
386
386
  _: 1
387
387
  }, 16, ["fixed"])) : C("", !0),
388
- a.rowSelection ? (s(), u(o(Q), J(g({ key: 1 }, o(He)(o(R), i.value))), null, 16)) : C("", !0),
389
- (s(!0), F(X, null, A(o(se), (t) => (s(), u(_(t), {
388
+ a.rowSelection ? (s(), c(o(Q), J(g({ key: 1 }, o(He)(o(R), i.value))), null, 16)) : C("", !0),
389
+ (s(!0), F(X, null, A(o(se), (t) => (s(), c(_(t), {
390
390
  key: t.props.colId
391
391
  }))), 128))
392
392
  ]),
@@ -394,8 +394,8 @@ const ko = /* @__PURE__ */ Fe({
394
394
  }, [
395
395
  A(o(Ne)(L, ["searchFormExtra"]), (t, r) => ({
396
396
  name: r,
397
- fn: v((c) => [
398
- V(e.$slots, r, J(Pe(c || {})))
397
+ fn: v((u) => [
398
+ V(e.$slots, r, J(Pe(u || {})))
399
399
  ])
400
400
  }))
401
401
  ]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "style", "size", "onSortChange", "onFilterChange"]))
@@ -403,12 +403,12 @@ const ko = /* @__PURE__ */ Fe({
403
403
  B("div", {
404
404
  class: f(o(d)("pagination-wrapper"))
405
405
  }, [
406
- e.sticky ? (s(), u(o(Ye), {
406
+ e.sticky ? (s(), c(o(Ye), {
407
407
  key: 0,
408
408
  direction: "horizontal",
409
409
  "scroll-container": de.value
410
410
  }, null, 8, ["scroll-container"])) : C("", !0),
411
- e.pagination !== !1 ? (s(), u(o(De), g({
411
+ e.pagination !== !1 ? (s(), c(o(De), g({
412
412
  key: 1,
413
413
  class: o(d)("pagination")
414
414
  }, o(M).pagination, { onChange: o(ve) }), null, 16, ["class", "onChange"])) : C("", !0)
@@ -234,6 +234,10 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
234
234
  export type ApGridVirtualConfig = {
235
235
  x?: false | number;
236
236
  y?: false | number;
237
+ /**
238
+ * 指定每次渲染更多的数据,值越大渲染耗时就越久
239
+ */
240
+ oSize?: number;
237
241
  };
238
242
  export type ApGridColumnProps<RecordType> = {
239
243
  column: ApGridColumnType<RecordType>;
@@ -1,7 +1,7 @@
1
1
  import { VxeTableEventProps, VxeTableProps } from 'vxe-table';
2
2
  import { ApGridColumnType, ApGridProps, ApGridRowSelection } from '../interface';
3
3
  import { RowSelectionType } from '@aplus-frontend/antdv/es/table/interface';
4
- export declare function toVxeProps<RecordType>(props: any): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
4
+ export declare function toVxeProps<RecordType>(props: ApGridProps): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
5
5
  export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true, columns: ApGridColumnType[]): {
6
6
  type: RowSelectionType;
7
7
  width: string | number;