@aplus-frontend/ui 6.39.1 → 6.40.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 (38) hide show
  1. package/es/src/ag-grid/index.vue.mjs +138 -134
  2. package/es/src/ag-grid/interface.d.ts +7 -0
  3. package/es/src/ap-action/interface.d.ts +5 -1
  4. package/es/src/ap-action/item/index.vue2.mjs +17 -16
  5. package/es/src/ap-action/item-dropdown/index.vue.mjs +2 -1
  6. package/es/src/ap-action/item-modal/index.vue.mjs +8 -7
  7. package/es/src/ap-action/item-popconfirm/index.vue.mjs +1 -0
  8. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -9
  9. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  10. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +2 -1
  11. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +28 -28
  12. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -1
  13. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +99 -95
  14. package/es/src/business/ag-grid-modal/interface.d.ts +6 -2
  15. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
  16. package/es/src/version.d.ts +1 -1
  17. package/es/src/version.mjs +1 -1
  18. package/lib/src/ag-grid/index.vue.js +1 -1
  19. package/lib/src/ag-grid/interface.d.ts +7 -0
  20. package/lib/src/ap-action/interface.d.ts +5 -1
  21. package/lib/src/ap-action/item/index.vue2.js +1 -1
  22. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  23. package/lib/src/ap-action/item-modal/index.vue.js +1 -1
  24. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  25. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -9
  26. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.js +1 -1
  27. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +2 -1
  28. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
  29. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -1
  30. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  31. package/lib/src/business/ag-grid-modal/interface.d.ts +6 -2
  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 +5 -5
  36. package/theme/ag-grid-modal/index.css +1 -0
  37. package/theme/ag-grid-modal/index.less +1 -0
  38. package/theme/index.css +1 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as i, useSlots as s, createBlock as c, openBlock as p, mergeProps as m, unref as d, createSlots as f, renderList as u, withCtx as _, renderSlot as y, normalizeProps as A, guardReactiveProps as P } from "vue";
1
+ import { defineComponent as i, useSlots as s, createBlock as p, openBlock as c, mergeProps as m, unref as d, createSlots as f, renderList as u, withCtx as _, renderSlot as y, normalizeProps as A, guardReactiveProps as P } from "vue";
2
2
  import { Modal as B } from "@aplus-frontend/antdv";
3
3
  import "../item/index.vue.mjs";
4
4
  import { omit as k } from "lodash-unified";
@@ -16,10 +16,11 @@ const z = /* @__PURE__ */ i({
16
16
  loading: { type: Boolean, default: !1 },
17
17
  icon: {},
18
18
  iconFirst: { type: Boolean },
19
+ tooltip: {},
19
20
  modalProps: { default: () => ({}) }
20
21
  },
21
- setup(t) {
22
- const r = s(), o = t;
22
+ setup(n) {
23
+ const r = s(), o = n;
23
24
  async function a(e) {
24
25
  B.confirm({
25
26
  ...o.modalProps,
@@ -29,11 +30,11 @@ const z = /* @__PURE__ */ i({
29
30
  }
30
31
  });
31
32
  }
32
- return (e, g) => (p(), c(x, m(d(k)(o, ["modalProps", "onAction"]), { onAction: a }), f({ _: 2 }, [
33
- u(r, (h, n) => ({
34
- name: n,
33
+ return (e, g) => (c(), p(x, m(d(k)(o, ["modalProps", "onAction"]), { onAction: a }), f({ _: 2 }, [
34
+ u(r, (h, t) => ({
35
+ name: t,
35
36
  fn: _((l) => [
36
- y(e.$slots, n, A(P(l || {})))
37
+ y(e.$slots, t, A(P(l || {})))
37
38
  ])
38
39
  }))
39
40
  ]), 1040));
@@ -16,6 +16,7 @@ const I = /* @__PURE__ */ f({
16
16
  loading: { type: Boolean, default: !1 },
17
17
  icon: {},
18
18
  iconFirst: { type: Boolean },
19
+ tooltip: {},
19
20
  popconfirmProps: { default: () => ({}) }
20
21
  },
21
22
  setup(a) {
@@ -912,15 +912,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
912
912
  type: PropType<string | number | Partial<Record< Breakpoint, string | number>>>;
913
913
  default: string | number | Partial<Record< Breakpoint, string | number>>;
914
914
  };
915
- footer: {
916
- type: PropType< VueNode | ((params: {
917
- originNode: VueNode;
918
- extra: {
919
- okBtn: VueNode;
920
- cancelBtn: VueNode;
921
- };
922
- }) => VueNode)>;
923
- };
915
+ footer: VueTypeValidableDef<any>;
924
916
  okText: VueTypeValidableDef<any>;
925
917
  okType: PropType<LegacyButtonType>;
926
918
  cancelText: VueTypeValidableDef<any>;
@@ -36,7 +36,7 @@ function L(n) {
36
36
  dataSourceLength: a(
37
37
  () => l.value
38
38
  )
39
- }), m.default;
39
+ }), () => m.default?.();
40
40
  }
41
41
  });
42
42
  return [s, p];
@@ -1,3 +1,4 @@
1
1
  import { AgGridPreviewModalProps, PreviewModalReturnType } from '../interface';
2
+ import { Recordable } from '../../../type';
2
3
  /** ag-grid弹框 */
3
- export declare function useAgGridModal<T = any>(props: AgGridPreviewModalProps<T>): PreviewModalReturnType<T>;
4
+ export declare function useAgGridModal<T extends Recordable = any>(props: AgGridPreviewModalProps<T>): PreviewModalReturnType<T>;
@@ -1,29 +1,29 @@
1
- import { defineComponent as v, ref as w, createVNode as n } from "vue";
2
- import { ApModal as P } from "../../../ap-modal/index.mjs";
1
+ import { defineComponent as P, ref as v, createVNode as n, mergeProps as w } from "vue";
2
+ import { ApModal as y } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { genRequest as y } from "../utils.mjs";
5
- import { useAgGridInstance as I } from "./use-ag-grid-instance.mjs";
6
- import { isFunction as A, isEmpty as f, omitBy as M, isUndefined as _, omit as q } from "lodash-unified";
4
+ import { genRequest as I } from "../utils.mjs";
5
+ import { useAgGridInstance as A } from "./use-ag-grid-instance.mjs";
6
+ import { isFunction as M, isEmpty as f, omitBy as _, isUndefined as q, omit as G } from "lodash-unified";
7
7
  import "../wrapper/index.vue.mjs";
8
- import G from "../wrapper/index.vue2.mjs";
9
- import H from "../../../ag-grid/index.vue.mjs";
10
- function L(o) {
8
+ import H from "../wrapper/index.vue2.mjs";
9
+ import x from "../../../ag-grid/index.vue.mjs";
10
+ function j(r) {
11
11
  let a = null, s = null;
12
- const [r, c] = I(), l = y(o.api, o.getRowKey, r.setDataSourceLength), u = (t) => {
12
+ const [o, c] = A(), l = I(r.api, r.getRowKey, o.setDataSourceLength), u = (t) => {
13
13
  const {
14
14
  title: e,
15
15
  width: i,
16
16
  modalProps: C,
17
17
  ...d
18
- } = A(t) ? t(o) : t;
18
+ } = M(t) ? t(r) : t;
19
19
  f(d) || s?.(d);
20
- const m = M({
20
+ const m = _({
21
21
  title: e,
22
22
  width: i,
23
23
  modalProps: C
24
- }, _);
24
+ }, q);
25
25
  f(m) || a?.update(m);
26
- }, g = /* @__PURE__ */ v({
26
+ }, g = /* @__PURE__ */ P({
27
27
  name: "AgGridModalPreviewContent",
28
28
  props: {
29
29
  modalConfig: {
@@ -32,20 +32,20 @@ function L(o) {
32
32
  }
33
33
  },
34
34
  setup(t) {
35
- const e = w(t.modalConfig);
35
+ const e = v(t.modalConfig);
36
36
  return s = (i) => {
37
37
  e.value = {
38
38
  ...e.value,
39
39
  ...i
40
40
  };
41
41
  }, () => n(c, null, {
42
- default: () => [n(G, {
42
+ default: () => [n(H, {
43
43
  rowHeight: e.value.rowHeight
44
44
  }, {
45
- default: () => [e.value.renderHeader?.(q(r, "setInstance"), {
45
+ default: () => [e.value.renderHeader?.(G(o, "setInstance"), {
46
46
  updateProps: u
47
- }), n(H, {
48
- ref: r.setInstance,
47
+ }), n(x, w({
48
+ ref: o.setInstance,
49
49
  searchForm: {
50
50
  sortable: !1,
51
51
  resize: {
@@ -59,25 +59,25 @@ function L(o) {
59
59
  },
60
60
  rowHeight: e.value.rowHeight,
61
61
  columns: e.value.columns
62
- }, e.value.gridSlots)]
62
+ }, r.gridProps), e.value.gridSlots)]
63
63
  })]
64
64
  });
65
65
  }
66
66
  });
67
67
  function p() {
68
- a = P.createModal({
69
- title: o.title,
70
- width: o.width,
68
+ a = y.createModal({
69
+ title: r.title,
70
+ width: r.width,
71
71
  destroyOnClose: !0,
72
72
  maskClosable: !1,
73
73
  footer: null,
74
74
  afterOpenChange(t) {
75
- t === !1 && (r.setInstance(void 0), r.setDataSourceLength(0), a = null);
75
+ t === !1 && (o.setInstance(void 0), o.setDataSourceLength(0), a = null);
76
76
  },
77
77
  content: n(g, {
78
- modalConfig: o
78
+ modalConfig: r
79
79
  }, null),
80
- ...o.modalProps || {}
80
+ ...r.modalProps || {}
81
81
  });
82
82
  }
83
83
  function h(t) {
@@ -85,11 +85,11 @@ function L(o) {
85
85
  }
86
86
  return {
87
87
  open: h,
88
- refresh: r.refresh,
89
- getAgGridInstance: r.getInstance,
88
+ refresh: o.refresh,
89
+ getAgGridInstance: o.getInstance,
90
90
  updateProps: u
91
91
  };
92
92
  }
93
93
  export {
94
- L as useAgGridModal
94
+ j as useAgGridModal
95
95
  };
@@ -1,2 +1,3 @@
1
1
  import { AgGridSelectModalProps, SelectModalReturnType } from '../interface';
2
- export declare function useAgGridSelectModal<T = any>(props: AgGridSelectModalProps<T>): SelectModalReturnType<T>;
2
+ import { Recordable } from '../../../type';
3
+ export declare function useAgGridSelectModal<T extends Recordable = any>(props: AgGridSelectModalProps<T>): SelectModalReturnType<T>;
@@ -1,58 +1,58 @@
1
- import { defineComponent as L, reactive as q, createVNode as i, onUnmounted as v } from "vue";
1
+ import { defineComponent as _, ref as L, createVNode as i, mergeProps as j, onUnmounted as q } from "vue";
2
2
  import { ApModal as G } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { AsyncCallback as H, genRequest as T, delRowKeyField as F, addRowKeyField as D, getModalLayoutConfig as b } from "../utils.mjs";
5
- import { useAgGridInstance as E } from "./use-ag-grid-instance.mjs";
6
- import { isFunction as m, isEmpty as p, omitBy as U, isUndefined as W, omit as K } from "lodash-unified";
7
- import { ROW_KEY as $ } from "../constants.mjs";
8
- import { useModalTitle as z } from "./use-modal-title.mjs";
9
- import { message as B } from "@aplus-frontend/antdv";
4
+ import { AsyncCallback as H, genRequest as T, delRowKeyField as D, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
5
+ import { useAgGridInstance as U } from "./use-ag-grid-instance.mjs";
6
+ import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as p } from "lodash-unified";
7
+ import { ROW_KEY as B } from "../constants.mjs";
8
+ import { useModalTitle as N } from "./use-modal-title.mjs";
9
+ import { message as V } from "@aplus-frontend/antdv";
10
10
  import "../../../config-provider/index.mjs";
11
11
  import "../modal-layout/index.vue.mjs";
12
12
  import "../wrapper/index.vue.mjs";
13
- import { useLocale as N } from "../../../config-provider/hooks/use-locale.mjs";
14
- import V from "../wrapper/index.vue2.mjs";
15
- import Y from "../modal-layout/index.vue2.mjs";
16
- import J from "../../../ag-grid/index.vue.mjs";
17
- function fe(o) {
18
- let d, f = null, g = null;
19
- const c = new H(), [k, x] = z(), {
20
- t: S
21
- } = N(), [a, M] = E({
13
+ import { useLocale as Y } from "../../../config-provider/hooks/use-locale.mjs";
14
+ import J from "../wrapper/index.vue2.mjs";
15
+ import Q from "../modal-layout/index.vue2.mjs";
16
+ import X from "../../../ag-grid/index.vue.mjs";
17
+ function we(t) {
18
+ let c, f = null, g = null;
19
+ const d = new H(), [K, S] = N(), {
20
+ t: k
21
+ } = Y(), [s, x] = U({
22
22
  onSelectedRows(e) {
23
- x.setCount(e?.length || 0);
23
+ S.setCount(e?.length || 0);
24
24
  }
25
- }), y = T(o.api, o.getRowKey, a.setDataSourceLength), w = (e) => {
25
+ }), w = T(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
26
26
  const {
27
- title: t,
28
- width: n,
29
- modalProps: r,
30
- ...s
31
- } = m(e) ? e(o) : e;
32
- p(s) || g?.(s);
33
- const l = U({
34
- title: t,
35
- width: n,
36
- modalProps: r
37
- }, W);
38
- p(l) || f?.update(l);
39
- }, u = m(o.getRowKey) ? o.getRowKey : (e) => e[o.getRowKey], I = () => {
40
- const e = o.mergeRule || "old", t = a.getSelectedRows() || [];
27
+ title: o,
28
+ width: l,
29
+ modalProps: n,
30
+ ...a
31
+ } = u(e) ? e(W(t)) : e;
32
+ b(a) || g?.(a);
33
+ const r = $({
34
+ title: o,
35
+ width: l,
36
+ modalProps: n
37
+ }, z);
38
+ b(r) || f?.update(r);
39
+ }, m = u(t.getRowKey) ? t.getRowKey : (e) => e[t.getRowKey], P = () => {
40
+ const e = t.mergeRule || "old", o = s.getSelectedRows() || [];
41
41
  return {
42
- keys: _(t),
43
- rows: t.map((s) => {
44
- const l = u(s);
45
- return e === "old" && d?.[l] ? d[l] : F(s);
42
+ keys: O(o),
43
+ rows: o.map((a) => {
44
+ const r = m(a);
45
+ return e === "old" && c?.[r] ? c[r] : D(a);
46
46
  })
47
47
  };
48
48
  }, C = async () => {
49
- const e = I(), t = o.maxCount || 1 / 0;
50
- return e.keys.length > t ? (B.warning(S("ap.apTableModal.messageMaxCount", {
51
- maxCount: t
52
- })), Promise.reject()) : (await o.beforeOk?.(e), o.finishCallback?.(e), c.resolve(e), e);
53
- }, O = () => {
54
- c.reject("modal is closed!");
55
- }, P = /* @__PURE__ */ L({
49
+ const e = P(), o = t.maxCount || 1 / 0;
50
+ return e.keys.length > o ? (V.warning(k("ap.apTableModal.messageMaxCount", {
51
+ maxCount: o
52
+ })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), d.resolve(e), e);
53
+ }, M = () => {
54
+ d.reject("modal is closed!");
55
+ }, I = /* @__PURE__ */ _({
56
56
  name: "AgGridModalSelectContent",
57
57
  props: {
58
58
  modalConfig: {
@@ -65,45 +65,49 @@ function fe(o) {
65
65
  }
66
66
  },
67
67
  setup(e) {
68
- const t = q(e.modalConfig);
69
- return g = (n) => {
70
- Object.assign(t, n);
68
+ const o = L(e.modalConfig);
69
+ return g = (l) => {
70
+ o.value = {
71
+ ...o.value,
72
+ ...l
73
+ };
71
74
  }, () => {
72
- const n = e.selectedRows?.map((r) => D(r, t.getRowKey));
73
- return i(M, null, {
74
- default: () => [i(V, {
75
- rowHeight: t.rowHeight
75
+ const l = e.selectedRows?.map((r) => F(r, o.value.getRowKey)), n = o.value, a = E(n.modalLayout);
76
+ return i(x, null, {
77
+ default: () => [i(J, {
78
+ rowHeight: n.rowHeight
76
79
  }, {
77
- default: () => [o.renderHeader?.(K(a, "setInstance"), {
78
- updateProps: w
79
- }), i(Y, b(t.modalLayout).props, {
80
- default: () => [i(J, {
81
- ref: a.setInstance,
80
+ default: () => [t.renderHeader?.(p(s, "setInstance"), {
81
+ updateProps: y
82
+ }), i(Q, a.props, {
83
+ default: () => [i(X, j({
84
+ ref: s.setInstance,
82
85
  searchForm: {
83
86
  sortable: !1,
84
87
  resize: {
85
88
  target: "form"
86
89
  }
87
90
  },
88
- rowKey: m(t.getRowKey) ? $ : t.getRowKey,
89
- request: y.request,
91
+ rowKey: u(n.getRowKey) ? B : n.getRowKey,
92
+ request: w.request,
90
93
  style: {
91
94
  padding: "0px"
92
95
  },
93
- rowHeight: t.rowHeight,
94
- columns: t.columns,
96
+ rowHeight: n.rowHeight,
97
+ columns: n.columns,
95
98
  rowSelection: {
96
- defaultSelectedRows: n,
99
+ defaultSelectedRows: l,
97
100
  preserveSelectedRowKeys: !0,
98
- type: t.mode || "checkbox",
101
+ type: n.mode || "checkbox",
99
102
  fixed: "left",
100
103
  columnWidth: 38,
101
104
  disabled(r) {
102
- return m(t.disabledCheckbox) ? t.disabledCheckbox(r, K(a, "setInstance")) : t.disabledCheckbox ?? !1;
103
- }
105
+ return u(n.disabledCheckbox) ? n.disabledCheckbox(r, p(s, "setInstance")) : n.disabledCheckbox ?? !1;
106
+ },
107
+ ...t.rowSelection
104
108
  }
105
- }, t.gridSlots)],
106
- ...b(t.modalLayout).slots
109
+ }, t.gridProps), n.gridSlots)],
110
+ ...a.slots
107
111
  })]
108
112
  })]
109
113
  });
@@ -111,55 +115,55 @@ function fe(o) {
111
115
  }
112
116
  });
113
117
  function R(e) {
114
- return i(P, {
115
- modalConfig: o,
118
+ return i(I, {
119
+ modalConfig: t,
116
120
  selectedRows: e
117
121
  }, null);
118
122
  }
119
123
  function A() {
120
- const e = Object.values(d || {}), t = R(e);
124
+ const e = Object.values(c || {}), o = R(e);
121
125
  f = G.createModal({
122
- title: i(k, {
123
- title: o.title,
124
- maxCount: o.maxCount || 1 / 0
125
- }, o.modalTitleSlots),
126
- width: o.width,
126
+ title: i(K, {
127
+ title: t.title,
128
+ maxCount: t.maxCount || 1 / 0
129
+ }, t.modalTitleSlots),
130
+ width: t.width,
127
131
  destroyOnClose: !0,
128
132
  maskClosable: !1,
129
133
  onOk: C,
130
- onCancel: O,
131
- afterOpenChange(n) {
132
- n === !1 && (a.setInstance(void 0), a.setDataSourceLength(0));
134
+ onCancel: M,
135
+ afterOpenChange(l) {
136
+ l === !1 && (s.setInstance(void 0), s.setDataSourceLength(0));
133
137
  },
134
- content: t,
135
- ...o.modalProps || {}
138
+ content: o,
139
+ ...t.modalProps || {}
136
140
  });
137
141
  }
138
- function _(e) {
139
- return e?.map(u) || [];
142
+ function O(e) {
143
+ return e?.map(m) || [];
140
144
  }
141
- function h(e, t, n = !1) {
142
- if (d = e?.reduce((r, s) => {
143
- const l = u(s);
144
- return r[l] = s, r;
145
- }, {}), y.setExtraParams(t?.extraParams), A(), n)
146
- return c.buildPromise();
145
+ function h(e, o, l = !1) {
146
+ if (c = e?.reduce((n, a) => {
147
+ const r = m(a);
148
+ return n[r] = a, n;
149
+ }, {}), w.setExtraParams(o?.extraParams), A(), l)
150
+ return d.buildPromise();
147
151
  }
148
- function j(e, t) {
149
- return h(e, t, !0);
152
+ function v(e, o) {
153
+ return h(e, o, !0);
150
154
  }
151
- return v(() => {
152
- c.reject("component is Unmounted!");
155
+ return q(() => {
156
+ d.reject("component is Unmounted!");
153
157
  }), {
154
158
  open: h,
155
- asyncOpen: j,
156
- refresh: a.refresh,
157
- getAgGridInstance: a.getInstance,
159
+ asyncOpen: v,
160
+ refresh: s.refresh,
161
+ getAgGridInstance: s.getInstance,
158
162
  genContent: R,
159
163
  validate: C,
160
- updateProps: w
164
+ updateProps: y
161
165
  };
162
166
  }
163
167
  export {
164
- fe as useAgGridSelectModal
168
+ we as useAgGridSelectModal
165
169
  };
@@ -1,5 +1,5 @@
1
1
  import { StyleValue, VNodeChild } from 'vue';
2
- import { AgGridColumnType, AgGridExpose, AgGridProps, AgGridSlots } from '../../ag-grid';
2
+ import { AgGridColumnType, AgGridExpose, AgGridProps, AgGridRowSelection, AgGridSlots } from '../../ag-grid';
3
3
  import { CreateModalFuncProps } from '../../ap-modal';
4
4
  import { Recordable } from '../../type';
5
5
  import { GridApi } from './hooks/use-ag-grid-instance';
@@ -26,6 +26,8 @@ export type RefreshType = 'reset' | 'submit' | 'submitWith';
26
26
  export interface AgGridPreviewModalProps<RowType = any> extends AgGridModalBasicProps<RowType> {
27
27
  /** ag-grid 插槽 */
28
28
  gridSlots?: AgGridSlots<RowType>;
29
+ /** ag-grid 额外配置 */
30
+ gridProps?: Omit<AgGridProps<RowType>, 'rowHeight' | 'rowKey'>;
29
31
  }
30
32
  /** 只读模式返回值 */
31
33
  export interface PreviewModalReturnType<RowType = any> {
@@ -67,13 +69,15 @@ export interface AgGridSelectModalProps<RowType = any> extends AgGridModalBasicP
67
69
  /** 禁用选项 */
68
70
  disabledCheckbox?: boolean | ((record: RowType, actions: Omit<GridApi, 'setInstance'>) => boolean);
69
71
  /** 额外的rowSelection配置 */
70
- rowSelection?: Omit<AgGridProps['rowSelection'], 'disabled'>;
72
+ rowSelection?: Omit<AgGridRowSelection<RowType>, 'disabled'>;
71
73
  /** modal标题插槽 */
72
74
  modalTitleSlots?: ModalTitleSlots;
73
75
  /** 在finishCallback执行前执行,返回reject终止后续执行 */
74
76
  beforeOk?: (data: OpenReturnType<RowType>) => Promise<any> | void;
75
77
  /** 设置是否是复杂布局 */
76
78
  modalLayout?: ModalLayoutConfig<RowType>;
79
+ /** ag-grid 额外配置 */
80
+ gridProps?: Omit<AgGridProps<RowType>, 'rowHeight' | 'rowSelection' | 'rowKey'>;
77
81
  }
78
82
  export interface SelectModalReturnType<T = any> {
79
83
  /** 打开弹框 */
@@ -1,8 +1,8 @@
1
- import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as g, openBlock as w, mergeProps as m, withCtx as k, createCommentVNode as U, createVNode as h, resolveDynamicComponent as j } from "vue";
2
- import { message as R, Modal as q } from "@aplus-frontend/antdv";
1
+ import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as w, openBlock as g, mergeProps as m, withCtx as k, createCommentVNode as U, createVNode as h, resolveDynamicComponent as q } from "vue";
2
+ import { message as R, Modal as V } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApTable as V } from "../../ap-table/index.mjs";
5
- import { cloneDeep as $, omit as T } from "lodash-unified";
4
+ import { ApTable as $ } from "../../ap-table/index.mjs";
5
+ import { cloneDeep as j, omit as T } from "lodash-unified";
6
6
  import { transformTableParams as z } from "@aplus-frontend/utils";
7
7
  import "./modal-title.vue.mjs";
8
8
  import { AsyncOpenResultError as y } from "./interface.mjs";
@@ -38,7 +38,7 @@ const ue = /* @__PURE__ */ E({
38
38
  afterOpenChange: {},
39
39
  centered: { type: Boolean, default: void 0 },
40
40
  width: {},
41
- footer: { type: [Object, String, Number, Boolean, null, Array, Function] },
41
+ footer: {},
42
42
  okText: {},
43
43
  okType: {},
44
44
  cancelText: {},
@@ -65,10 +65,10 @@ const ue = /* @__PURE__ */ E({
65
65
  },
66
66
  emits: ["finish"],
67
67
  setup(S, { expose: B, emit: P }) {
68
- const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]), b = d();
68
+ const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]), C = d();
69
69
  let f = null, u = null;
70
- const { t: C } = W(), K = async (t = [], o = {}) => {
71
- switch (a.value = [...t], s.value = !0, v.value = o?.extraParams, b.value = o.apTableDataSources || e.apTableProps?.dataSource, o.refreshMode || "reset") {
70
+ const { t: b } = W(), K = async (t = [], o = {}) => {
71
+ switch (a.value = [...t], s.value = !0, v.value = o?.extraParams, C.value = o.apTableDataSources || e.apTableProps?.dataSource, o.refreshMode || "reset") {
72
72
  case "reset":
73
73
  i.value?.reset();
74
74
  break;
@@ -99,7 +99,7 @@ const ue = /* @__PURE__ */ E({
99
99
  return;
100
100
  }
101
101
  if (e.getRowKey) {
102
- const t = $(r(a)), o = t.map(e.getRowKey);
102
+ const t = j(r(a)), o = t.map(e.getRowKey);
103
103
  if (e.onOk && await e.onOk({
104
104
  keys: o,
105
105
  rows: t
@@ -122,7 +122,7 @@ const ue = /* @__PURE__ */ E({
122
122
  onSelectAll(o, n) {
123
123
  if (n.length > e.maxCount) {
124
124
  R.warning(
125
- C("ap.apTableModal.messageMaxCount", {
125
+ b("ap.apTableModal.messageMaxCount", {
126
126
  maxCount: e.maxCount
127
127
  })
128
128
  );
@@ -130,7 +130,7 @@ const ue = /* @__PURE__ */ E({
130
130
  }
131
131
  const l = i.value?.dataSource;
132
132
  if (o) {
133
- const c = r(l).filter((p) => !a.value.some((L) => t(L) === t(p)));
133
+ const c = r(l).filter((p) => !a.value.some((F) => t(F) === t(p)));
134
134
  a.value = a.value.concat(c);
135
135
  } else
136
136
  a.value = a.value?.filter((c) => !l.some((p) => t(p) === t(c)));
@@ -139,7 +139,7 @@ const ue = /* @__PURE__ */ E({
139
139
  if (n) {
140
140
  if (a.value.length >= e.maxCount) {
141
141
  R.warning(
142
- C("ap.apTableModal.messageMaxCount", {
142
+ b("ap.apTableModal.messageMaxCount", {
143
143
  maxCount: e.maxCount
144
144
  })
145
145
  );
@@ -159,7 +159,7 @@ const ue = /* @__PURE__ */ E({
159
159
  }),
160
160
  ...e.rowSelection || {}
161
161
  };
162
- }), N = () => e.isRenderModalTitleSuffix ? H(
162
+ }), D = () => e.isRenderModalTitleSuffix ? H(
163
163
  J,
164
164
  {
165
165
  title: e.title,
@@ -169,9 +169,9 @@ const ue = /* @__PURE__ */ E({
169
169
  {
170
170
  default: e.renderModalTitleSuffix ?? void 0
171
171
  }
172
- ) : e.title, A = () => i.value, D = () => {
172
+ ) : e.title, L = () => i.value, N = () => {
173
173
  a.value = [];
174
- }, F = (t) => {
174
+ }, A = (t) => {
175
175
  const o = e.getRowKey;
176
176
  if (!o) return;
177
177
  const n = a.value.findIndex(
@@ -182,8 +182,8 @@ const ue = /* @__PURE__ */ E({
182
182
  return B({
183
183
  open: K,
184
184
  close: x,
185
- getApTableInstance: A
186
- }), (t, o) => (w(), g(r(q), m(
185
+ getApTableInstance: L
186
+ }), (t, o) => (g(), w(r(V), m(
187
187
  {
188
188
  open: s.value,
189
189
  "onUpdate:open": o[0] || (o[0] = (n) => s.value = n)
@@ -203,21 +203,21 @@ const ue = /* @__PURE__ */ E({
203
203
  "tableLayoutConfig"
204
204
  ]),
205
205
  {
206
- title: N(),
206
+ title: D(),
207
207
  centered: e.centered ?? !0,
208
208
  onOk: _,
209
209
  onCancel: x
210
210
  }
211
211
  ), {
212
212
  default: k(() => [
213
- e.renderHeader ? (w(), g(j(e.renderHeader), { key: 0 })) : U("", !0),
213
+ e.renderHeader ? (g(), w(q(e.renderHeader), { key: 0 })) : U("", !0),
214
214
  h(Q, m(e.tableLayoutConfig || {}, {
215
215
  "selected-list": a.value,
216
- onClear: D,
217
- onDeleteItem: F
216
+ onClear: N,
217
+ onDeleteItem: A
218
218
  }), {
219
219
  default: k(() => [
220
- h(r(V), m({
220
+ h(r($), m({
221
221
  ref_key: "apTableRef",
222
222
  ref: i,
223
223
  scroll: { y: 450 },
@@ -226,7 +226,7 @@ const ue = /* @__PURE__ */ E({
226
226
  request: O,
227
227
  "row-key": t.getRowKey,
228
228
  "row-selection": I.value,
229
- "data-source": b.value,
229
+ "data-source": C.value,
230
230
  "search-form": {
231
231
  sortable: !1,
232
232
  countPerRow: 2
@@ -1,2 +1,2 @@
1
- declare const _default: "6.39.1";
1
+ declare const _default: "6.40.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.39.1";
1
+ const e = "6.40.0";
2
2
  export {
3
3
  e as default
4
4
  };