@aplus-frontend/ui 7.19.7 → 7.19.8

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, useSlots as W, ref as z, computed as o, createBlock as L, openBlock as w, unref as n, mergeProps as P, createSlots as S, renderList as T, withCtx as _, renderSlot as $, normalizeProps as x, guardReactiveProps as M } from "vue";
1
+ import { defineComponent as B, useSlots as W, ref as z, computed as o, createBlock as L, openBlock as w, unref as a, mergeProps as P, createSlots as S, renderList as T, withCtx as _, renderSlot as $, normalizeProps as x, guardReactiveProps as M } from "vue";
2
2
  import { Button as N } from "@aplus-frontend/antdv";
3
3
  import { wait as A } from "@aplus-frontend/utils";
4
4
  import { omit as D } from "lodash-unified";
@@ -34,15 +34,15 @@ const q = 72, E = 300, X = /* @__PURE__ */ B({
34
34
  onClick: {}
35
35
  },
36
36
  setup(f) {
37
- const m = W(), e = f, { b: l } = R("ap-action-button"), y = I("ap-action-button"), r = z(!1), b = o(
37
+ const m = W(), e = f, { b: i } = R("ap-action-button"), y = I("ap-action-button"), l = z(!1), b = o(
38
38
  () => e.borderLinkColor || "var(--ap-button-border-link-color)"
39
- ), i = o(
40
- () => e.type === "borderLink" && !e.disabled ? b.value : void 0
41
39
  ), s = o(
42
- () => O(i.value)
40
+ () => e.type === "borderLink" && !e.disabled ? b.value : void 0
41
+ ), u = o(
42
+ () => O(s.value)
43
43
  ), h = o(() => e.minWidth === !0 ? `${q}px` : typeof e.minWidth == "number" ? `${e.minWidth}px` : typeof e.minWidth == "string" ? e.minWidth : void 0), v = o(
44
44
  () => (e.type === "borderLink" ? "default" : e.type) || "default"
45
- ), u = o(() => e.loading ?? r.value ?? !1), c = o(() => e.lazy === !0 ? E : typeof e.lazy == "number" && e.lazy >= 0 ? e.lazy : 0);
45
+ ), c = o(() => e.loading ?? l.value ?? !1), d = o(() => e.lazy === !0 ? E : typeof e.lazy == "number" && e.lazy >= 0 ? e.lazy : 0);
46
46
  function k() {
47
47
  const t = D(e, [
48
48
  "type",
@@ -57,39 +57,39 @@ const q = 72, E = 300, X = /* @__PURE__ */ B({
57
57
  onclick: g
58
58
  } : {};
59
59
  }
60
- async function g() {
61
- if (u.value) return;
62
- const t = j(e.onClick), d = Date.now();
60
+ async function g(t) {
61
+ if (c.value) return;
62
+ const r = j(e.onClick, t), p = Date.now();
63
63
  try {
64
- t && (r.value = !0, await t);
64
+ r && (l.value = !0, await r);
65
65
  } finally {
66
- if (t) {
67
- const a = Date.now() - d;
68
- a < c.value && await A(c.value - a), r.value = !1;
66
+ if (r) {
67
+ const n = Date.now() - p;
68
+ n < d.value && await A(d.value - n), l.value = !1;
69
69
  }
70
70
  }
71
71
  }
72
- return (t, d) => (w(), L(n(N), P({
72
+ return (t, r) => (w(), L(a(N), P({
73
73
  class: {
74
- [n(l)()]: !0,
75
- [`${n(l)()}-border-link`]: s.value,
76
- [`${n(y)}`]: !0
74
+ [a(i)()]: !0,
75
+ [`${a(i)()}-border-link`]: u.value,
76
+ [`${a(y)}`]: !0
77
77
  }
78
78
  }, {
79
79
  ...t.$attrs,
80
80
  ...k()
81
81
  }, {
82
82
  style: {
83
- color: i.value,
83
+ color: s.value,
84
84
  minWidth: h.value,
85
- "--button-border-color": s.value
85
+ "--button-border-color": u.value
86
86
  },
87
- loading: u.value
87
+ loading: c.value
88
88
  }), S({ _: 2 }, [
89
- T(m, (a, p) => ({
90
- name: p,
89
+ T(m, (p, n) => ({
90
+ name: n,
91
91
  fn: _((C) => [
92
- $(t.$slots, p, x(M(C || {})))
92
+ $(t.$slots, n, x(M(C || {})))
93
93
  ])
94
94
  }))
95
95
  ]), 1040, ["class", "style", "loading"]));
@@ -4,7 +4,7 @@ export type ApButtonProps = Omit<ButtonProps, 'type' | 'onClick'> & {
4
4
  borderLinkColor?: string;
5
5
  minWidth?: boolean | number | string;
6
6
  lazy?: boolean | number;
7
- onClick?: () => any | Promise<any>;
7
+ onClick?: (e: MouseEvent) => any | Promise<any>;
8
8
  };
9
9
  export type ApActionButtonProps = ApButtonProps;
10
10
  export type ApButtonSlots = {
@@ -1,5 +1,5 @@
1
1
  import { ModalFuncProps } from '@aplus-frontend/antdv';
2
2
  export declare function isPromise(fn: any): any;
3
- export declare const isAsynchronous: (fn: any) => any;
3
+ export declare const isAsynchronous: (fn: any, e: MouseEvent) => any;
4
4
  export declare const transferOpacityColor: (thisColor?: string, thisOpacity?: string) => string | undefined;
5
5
  export declare const confirmHandle: (ModalFuncProps: ModalFuncProps) => Promise<unknown>;
@@ -3,36 +3,36 @@ import { omit as a } from "lodash-unified";
3
3
  function f(o) {
4
4
  return typeof o == "object" && typeof o.then == "function" ? o : !1;
5
5
  }
6
- const m = (o) => typeof o == "function" && f(o?.()), h = (o, c = "0.7") => {
6
+ const m = (o, n) => typeof o == "function" && f(o?.(n)), h = (o, n = "0.7") => {
7
7
  try {
8
8
  let t = o?.toLowerCase();
9
9
  if (t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
10
10
  if (t.length === 4) {
11
11
  let e = "#";
12
- for (let n = 1; n < 4; n += 1)
13
- e += t.slice(n, n + 1).concat(t.slice(n, n + 1));
12
+ for (let c = 1; c < 4; c += 1)
13
+ e += t.slice(c, c + 1).concat(t.slice(c, c + 1));
14
14
  t = e;
15
15
  }
16
16
  const r = [];
17
17
  for (let e = 1; e < 7; e += 2)
18
18
  r.push(parseInt("0x" + t.slice(e, e + 2)));
19
- return "rgba(" + r.join(",") + "," + c + ")";
19
+ return "rgba(" + r.join(",") + "," + n + ")";
20
20
  }
21
21
  if (t && t.startsWith("rgb")) {
22
22
  let r = t.match(/(\d(\.\d+)?)+/g);
23
- return r = r?.slice(0, 3)?.concat(c), "rgba(" + r.join(",") + ")";
23
+ return r = r?.slice(0, 3)?.concat(n), "rgba(" + r.join(",") + ")";
24
24
  }
25
25
  return t;
26
26
  } catch {
27
27
  return;
28
28
  }
29
29
  }, p = (o) => {
30
- const { onOk: c = () => ({}) } = o;
30
+ const { onOk: n = () => ({}) } = o;
31
31
  return new Promise((t, s) => {
32
32
  i.confirm({
33
33
  onOk: async () => {
34
34
  try {
35
- await c(), t(!0);
35
+ await n(), t(!0);
36
36
  } catch (r) {
37
37
  s(r);
38
38
  }
@@ -1,29 +1,29 @@
1
- import { defineComponent as C, ref as P, createVNode as n, mergeProps as w } from "vue";
2
- import { isFunction as y, isEmpty as f, omitBy as I, isUndefined as A, omit as H } from "lodash-unified";
1
+ import { defineComponent as C, ref as P, createVNode as n, mergeProps as H } from "vue";
2
+ import { isFunction as w, isEmpty as g, omitBy as y, isUndefined as I, omit as x } from "lodash-unified";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { ApModal as M } from "../../../ap-modal/index.mjs";
5
- import { genRequest as _ } from "../utils.mjs";
4
+ import { ApModal as A } from "../../../ap-modal/index.mjs";
5
+ import { genRequest as M } from "../utils.mjs";
6
6
  import "../wrapper/index.vue.mjs";
7
- import { useAgGridInstance as q } from "./use-ag-grid-instance.mjs";
8
- import G from "../wrapper/index.vue2.mjs";
9
- import x from "../../../ag-grid/index.vue.mjs";
7
+ import { useAgGridInstance as _ } from "./use-ag-grid-instance.mjs";
8
+ import q from "../wrapper/index.vue2.mjs";
9
+ import G from "../../../ag-grid/index.vue.mjs";
10
10
  function j(r) {
11
11
  let a = null, l = null;
12
- const [o, c] = q(), s = _(r.api, r.getRowKey, o.setDataSourceLength), u = (t) => {
12
+ const [o, f] = _(), s = M(r.api, r.getRowKey, o.setDataSourceLength), u = (t) => {
13
13
  const {
14
14
  title: e,
15
15
  width: i,
16
16
  modalProps: v,
17
- ...d
18
- } = y(t) ? t(r) : t;
19
- f(d) || l?.(d);
20
- const m = I({
17
+ ...m
18
+ } = w(t) ? t(r) : t;
19
+ g(m) || l?.(m);
20
+ const d = y({
21
21
  title: e,
22
22
  width: i,
23
23
  modalProps: v
24
- }, A);
25
- f(m) || a?.update(m);
26
- }, g = /* @__PURE__ */ C({
24
+ }, I);
25
+ g(d) || a?.update(d);
26
+ }, c = /* @__PURE__ */ C({
27
27
  name: "AgGridModalPreviewContent",
28
28
  props: {
29
29
  modalConfig: {
@@ -38,14 +38,16 @@ function j(r) {
38
38
  ...e.value,
39
39
  ...i
40
40
  };
41
- }, () => n(c, null, {
42
- default: () => [n(G, {
41
+ }, () => n(f, null, {
42
+ default: () => [n(q, {
43
43
  height: e.value.height,
44
- rowHeight: e.value.rowHeight
44
+ rowHeight: e.value.rowHeight,
45
+ minHeight: e.value.minHeight,
46
+ maxHeight: e.value.maxHeight
45
47
  }, {
46
- default: () => [e.value.renderHeader?.(H(o, "setInstance"), {
48
+ default: () => [e.value.renderHeader?.(x(o, "setInstance"), {
47
49
  updateProps: u
48
- }), n(x, w({
50
+ }), n(G, H({
49
51
  ref: o.setInstance,
50
52
  searchForm: {
51
53
  sortable: !1,
@@ -67,7 +69,7 @@ function j(r) {
67
69
  }
68
70
  });
69
71
  function h() {
70
- a = M.createModal({
72
+ a = A.createModal({
71
73
  title: r.title,
72
74
  width: r.width,
73
75
  destroyOnClose: !0,
@@ -76,7 +78,7 @@ function j(r) {
76
78
  afterOpenChange(t) {
77
79
  t === !1 && (o.setInstance(void 0), o.setDataSourceLength(0), a = null);
78
80
  },
79
- content: n(g, {
81
+ content: n(c, {
80
82
  modalConfig: r
81
83
  }, null),
82
84
  ...r.modalProps || {}
@@ -1,6 +1,6 @@
1
- import { defineComponent as _, ref as H, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
1
+ import { defineComponent as O, ref as _, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
2
2
  import { message as q } from "@aplus-frontend/antdv";
3
- import { isFunction as u, cloneDeep as D, isEmpty as b, omitBy as G, isUndefined as T, omit as S } from "lodash-unified";
3
+ import { isFunction as u, cloneDeep as D, isEmpty as b, omitBy as G, isUndefined as T, omit as x } from "lodash-unified";
4
4
  import "../../../ag-grid/index.mjs";
5
5
  import { ApModal as F } from "../../../ap-modal/index.mjs";
6
6
  import "../../../config-provider/index.mjs";
@@ -14,45 +14,45 @@ import { useLocale as Y } from "../../../config-provider/hooks/use-locale.mjs";
14
14
  import J from "../wrapper/index.vue2.mjs";
15
15
  import Q from "../modal-layout/index.vue2.mjs";
16
16
  import X from "../../../ag-grid/index.vue.mjs";
17
- function we(t) {
17
+ function we(o) {
18
18
  let d, f = null, g = null;
19
- const c = new U(), [x, K] = V(), {
19
+ const c = new U(), [S, K] = V(), {
20
20
  t: k
21
21
  } = Y(), [s, p] = N({
22
22
  onSelectedRows(e) {
23
23
  K.setCount(e?.length || 0);
24
24
  }
25
- }), w = W(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
25
+ }), w = W(o.api, o.getRowKey, s.setDataSourceLength), y = (e) => {
26
26
  const {
27
- title: o,
27
+ title: t,
28
28
  width: l,
29
29
  modalProps: n,
30
30
  ...a
31
- } = u(e) ? e(D(t)) : e;
31
+ } = u(e) ? e(D(o)) : e;
32
32
  b(a) || g?.(a);
33
33
  const r = G({
34
- title: o,
34
+ title: t,
35
35
  width: l,
36
36
  modalProps: n
37
37
  }, T);
38
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() || [];
39
+ }, m = u(o.getRowKey) ? o.getRowKey : (e) => e[o.getRowKey], P = () => {
40
+ const e = o.mergeRule || "old", t = s.getSelectedRows() || [];
41
41
  return {
42
- keys: A(o),
43
- rows: o.map((a) => {
42
+ keys: I(t),
43
+ rows: t.map((a) => {
44
44
  const r = m(a);
45
45
  return e === "old" && d?.[r] ? d[r] : $(a);
46
46
  })
47
47
  };
48
48
  }, h = async () => {
49
- const e = P(), o = t.maxCount || 1 / 0;
50
- return e.keys.length > o ? (q.warning(k("ap.apTableModal.messageMaxCount", {
51
- maxCount: o
52
- })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), c.resolve(e), e);
53
- }, M = () => {
49
+ const e = P(), t = o.maxCount || 1 / 0;
50
+ return e.keys.length > t ? (q.warning(k("ap.apTableModal.messageMaxCount", {
51
+ maxCount: t
52
+ })), Promise.reject()) : (await o.beforeOk?.(e), o.finishCallback?.(e), c.resolve(e), e);
53
+ }, v = () => {
54
54
  c.reject("modal is closed!");
55
- }, I = /* @__PURE__ */ _({
55
+ }, M = /* @__PURE__ */ O({
56
56
  name: "AgGridModalSelectContent",
57
57
  props: {
58
58
  modalConfig: {
@@ -65,20 +65,22 @@ function we(t) {
65
65
  }
66
66
  },
67
67
  setup(e) {
68
- const o = H(e.modalConfig);
68
+ const t = _(e.modalConfig);
69
69
  return g = (l) => {
70
- o.value = {
71
- ...o.value,
70
+ t.value = {
71
+ ...t.value,
72
72
  ...l
73
73
  };
74
74
  }, () => {
75
- const l = e.selectedRows?.map((r) => z(r, o.value.getRowKey)), n = o.value, a = B(n.modalLayout);
75
+ const l = e.selectedRows?.map((r) => z(r, t.value.getRowKey)), n = t.value, a = B(n.modalLayout);
76
76
  return i(p, null, {
77
77
  default: () => [i(J, {
78
78
  height: n.height,
79
- rowHeight: n.rowHeight
79
+ rowHeight: n.rowHeight,
80
+ minHeight: t.value.minHeight,
81
+ maxHeight: t.value.maxHeight
80
82
  }, {
81
- default: () => [t.renderHeader?.(S(s, "setInstance"), {
83
+ default: () => [o.renderHeader?.(x(s, "setInstance"), {
82
84
  updateProps: y
83
85
  }), i(Q, a.props, {
84
86
  default: () => [i(X, L({
@@ -103,12 +105,12 @@ function we(t) {
103
105
  fixed: "left",
104
106
  columnWidth: 38,
105
107
  disabled(r) {
106
- return u(n.disabledCheckbox) ? n.disabledCheckbox(r, S(s, "setInstance")) : n.disabledCheckbox ?? !1;
108
+ return u(n.disabledCheckbox) ? n.disabledCheckbox(r, x(s, "setInstance")) : n.disabledCheckbox ?? !1;
107
109
  },
108
- ...t.rowSelection
110
+ ...o.rowSelection
109
111
  },
110
- autoHeight: !!o.value.height
111
- }, t.gridProps), n.gridSlots)],
112
+ autoHeight: !!t.value.height
113
+ }, o.gridProps), n.gridSlots)],
112
114
  ...a.slots
113
115
  })]
114
116
  })]
@@ -117,49 +119,49 @@ function we(t) {
117
119
  }
118
120
  });
119
121
  function C(e) {
120
- return i(I, {
121
- modalConfig: t,
122
+ return i(M, {
123
+ modalConfig: o,
122
124
  selectedRows: e
123
125
  }, null);
124
126
  }
125
- function v() {
126
- const e = Object.values(d || {}), o = C(e);
127
+ function H() {
128
+ const e = Object.values(d || {}), t = C(e);
127
129
  f = F.createModal({
128
- title: i(x, {
129
- title: t.title,
130
- maxCount: t.maxCount || 1 / 0,
131
- isShowDefaultSuffix: t.mode !== "radio"
132
- }, t.modalTitleSlots),
133
- width: t.width,
130
+ title: i(S, {
131
+ title: o.title,
132
+ maxCount: o.maxCount || 1 / 0,
133
+ isShowDefaultSuffix: o.mode !== "radio"
134
+ }, o.modalTitleSlots),
135
+ width: o.width,
134
136
  destroyOnClose: !0,
135
137
  maskClosable: !1,
136
138
  onOk: h,
137
- onCancel: M,
139
+ onCancel: v,
138
140
  afterOpenChange(l) {
139
141
  l === !1 && (s.setInstance(void 0), s.setDataSourceLength(0));
140
142
  },
141
- content: o,
142
- ...t.modalProps || {}
143
+ content: t,
144
+ ...o.modalProps || {}
143
145
  });
144
146
  }
145
- function A(e) {
147
+ function I(e) {
146
148
  return e?.map(m) || [];
147
149
  }
148
- function R(e, o, l = !1) {
150
+ function R(e, t, l = !1) {
149
151
  if (d = e?.reduce((n, a) => {
150
152
  const r = m(a);
151
153
  return n[r] = a, n;
152
- }, {}), w.setExtraParams(o?.extraParams), v(), l)
154
+ }, {}), w.setExtraParams(t?.extraParams), H(), l)
153
155
  return c.buildPromise();
154
156
  }
155
- function O(e, o) {
156
- return R(e, o, !0);
157
+ function A(e, t) {
158
+ return R(e, t, !0);
157
159
  }
158
160
  return j(() => {
159
161
  c.reject("component is Unmounted!");
160
162
  }), {
161
163
  open: R,
162
- asyncOpen: O,
164
+ asyncOpen: A,
163
165
  refresh: s.refresh,
164
166
  getAgGridInstance: s.getInstance,
165
167
  genContent: C,
@@ -20,6 +20,8 @@ export interface AgGridModalBasicProps<TableRowType = any> {
20
20
  }) => VNodeChild;
21
21
  rowHeight?: number;
22
22
  height?: CSSProperties['height'];
23
+ minHeight?: CSSProperties['height'];
24
+ maxHeight?: CSSProperties['height'];
23
25
  }
24
26
  /** 刷新方式 */
25
27
  export type RefreshType = 'reset' | 'submit' | 'submitWith';
@@ -2,6 +2,8 @@ import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, Com
2
2
  type __VLS_Props = {
3
3
  rowHeight?: number;
4
4
  height?: CSSProperties['height'];
5
+ minHeight?: CSSProperties['height'];
6
+ maxHeight?: CSSProperties['height'];
5
7
  };
6
8
  declare function __VLS_template(): {
7
9
  attrs: Partial<{}>;
@@ -16,6 +18,8 @@ declare function __VLS_template(): {
16
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
19
  declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
20
  height: import("csstype").Property.Height<string | number>;
21
+ maxHeight: import("csstype").Property.Height<string | number>;
22
+ minHeight: import("csstype").Property.Height<string | number>;
19
23
  rowHeight: number;
20
24
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
21
25
  wrapperContainer: HTMLDivElement;
@@ -1,43 +1,45 @@
1
- import { defineComponent as h, useTemplateRef as g, computed as p, ref as f, watch as d, onMounted as m, createElementBlock as H, openBlock as v, normalizeStyle as y, unref as w, renderSlot as S } from "vue";
2
- import { SMALL_HEIGHT as l, LARGER_HEIGHT as _ } from "../constants.mjs";
3
- import { useAgGridModalInject as L } from "../hooks/use-ag-grid-instance.mjs";
4
- const k = /* @__PURE__ */ h({
1
+ import { defineComponent as c, useTemplateRef as g, computed as s, ref as p, watch as d, onMounted as f, createElementBlock as m, openBlock as H, normalizeStyle as v, renderSlot as y } from "vue";
2
+ import { LARGER_HEIGHT as w, SMALL_HEIGHT as S } from "../constants.mjs";
3
+ import { useAgGridModalInject as _ } from "../hooks/use-ag-grid-instance.mjs";
4
+ const E = /* @__PURE__ */ c({
5
5
  __name: "index",
6
6
  props: {
7
7
  rowHeight: { default: 32 },
8
- height: { default: void 0 }
8
+ height: { default: void 0 },
9
+ minHeight: { default: S },
10
+ maxHeight: { default: w }
9
11
  },
10
- setup(c) {
11
- const u = c, t = g("wrapperContainer"), s = L(), r = p(
12
- () => s?.dataSourceLength?.value || 0
13
- ), i = f(l), a = () => {
14
- const e = t.value?.clientHeight, o = t.value?.querySelector(
12
+ setup(h) {
13
+ const t = h, o = g("wrapperContainer"), u = _(), a = s(
14
+ () => u?.dataSourceLength?.value || 0
15
+ ), r = p(t.minHeight), l = () => {
16
+ const e = o.value?.clientHeight, i = o.value?.querySelector(
15
17
  ".ag-body.ag-layout-normal"
16
18
  )?.clientHeight;
17
19
  let n = 0;
18
- !e || !o ? n = 0 : n = e - o, r.value * u.rowHeight > 480 - n && (i.value = _);
20
+ !e || !i ? n = 0 : n = e - i, a.value * t.rowHeight > 480 - n && (r.value = t.maxHeight);
19
21
  };
20
22
  return d(
21
- () => r.value,
23
+ () => a.value,
22
24
  () => {
23
- a();
25
+ l();
24
26
  }
25
- ), m(() => {
26
- a();
27
- }), (e, o) => (v(), H("div", {
27
+ ), f(() => {
28
+ l();
29
+ }), (e, i) => (H(), m("div", {
28
30
  ref_key: "wrapperContainer",
29
- ref: t,
30
- style: y({
31
- minHeight: e.height ? "unset" : w(l),
32
- height: e.height ?? i.value,
31
+ ref: o,
32
+ style: v({
33
+ minHeight: e.height ? "unset" : t.minHeight,
34
+ height: e.height ?? r.value,
33
35
  display: "flex",
34
36
  flexDirection: "column"
35
37
  })
36
38
  }, [
37
- S(e.$slots, "default")
39
+ y(e.$slots, "default")
38
40
  ], 4));
39
41
  }
40
42
  });
41
43
  export {
42
- k as default
44
+ E as default
43
45
  };
@@ -76,7 +76,7 @@ declare const ApBatchActionGroup: {
76
76
  borderLinkColor?: string;
77
77
  minWidth?: boolean | number | string;
78
78
  lazy?: boolean | number;
79
- onClick?: () => any | Promise<any>;
79
+ onClick?: (e: MouseEvent) => any | Promise<any>;
80
80
  } & {
81
81
  content?: VNodeChild;
82
82
  }) | ({
@@ -398,7 +398,7 @@ declare const ApBatchActionGroup: {
398
398
  borderLinkColor?: string;
399
399
  minWidth?: boolean | number | string;
400
400
  lazy?: boolean | number;
401
- onClick?: () => any | Promise<any>;
401
+ onClick?: (e: MouseEvent) => any | Promise<any>;
402
402
  } & {
403
403
  content?: VNodeChild;
404
404
  }) | ({
@@ -717,7 +717,7 @@ declare const ApBatchActionGroup: {
717
717
  borderLinkColor?: string;
718
718
  minWidth?: boolean | number | string;
719
719
  lazy?: boolean | number;
720
- onClick?: () => any | Promise<any>;
720
+ onClick?: (e: MouseEvent) => any | Promise<any>;
721
721
  } & {
722
722
  content?: VNodeChild;
723
723
  }) | ({
@@ -1,2 +1,2 @@
1
- declare const _default: "7.19.7";
1
+ declare const _default: "7.19.8";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "7.19.7";
1
+ const e = "7.19.8";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("@aplus-frontend/antdv"),W=require("@aplus-frontend/utils"),z=require("lodash-unified");require("../config-provider/index.js");const L=require("./style/index.js"),p=require("./utils/index.js"),q=require("../config-provider/hooks/use-namespace.js"),_=72,w=300,P=e.defineComponent({__name:"ap-button",props:{prefixCls:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object],default:void 0},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onMousedown:{},autoInsertSpace:{type:Boolean},iconPosition:{},color:{},variant:{},type:{default:"default"},borderLinkColor:{},minWidth:{type:[Boolean,Number,String],default:!1},lazy:{type:[Boolean,Number],default:!0},onClick:{}},setup(f){const y=e.useSlots(),t=f,{b:a}=q.useNamespace("ap-action-button"),m=L.default("ap-action-button"),n=e.ref(!1),b=e.computed(()=>t.borderLinkColor||"var(--ap-button-border-link-color)"),i=e.computed(()=>t.type==="borderLink"&&!t.disabled?b.value:void 0),l=e.computed(()=>p.transferOpacityColor(i.value)),v=e.computed(()=>t.minWidth===!0?`${_}px`:typeof t.minWidth=="number"?`${t.minWidth}px`:typeof t.minWidth=="string"?t.minWidth:void 0),h=e.computed(()=>(t.type==="borderLink"?"default":t.type)||"default"),u=e.computed(()=>t.loading??n.value??!1),s=e.computed(()=>t.lazy===!0?w:typeof t.lazy=="number"&&t.lazy>=0?t.lazy:0);function g(){const o=z.omit(t,["type","borderLinkColor","minWidth","onClick","loading"]);return o?{...o,type:h.value,onclick:k}:{}}async function k(){if(u.value)return;const o=p.isAsynchronous(t.onClick),c=Date.now();try{o&&(n.value=!0,await o)}finally{if(o){const r=Date.now()-c;r<s.value&&await W.wait(s.value-r),n.value=!1}}}return(o,c)=>(e.openBlock(),e.createBlock(e.unref(B.Button),e.mergeProps({class:{[e.unref(a)()]:!0,[`${e.unref(a)()}-border-link`]:l.value,[`${e.unref(m)}`]:!0}},{...o.$attrs,...g()},{style:{color:i.value,minWidth:v.value,"--button-border-color":l.value},loading:u.value}),e.createSlots({_:2},[e.renderList(y,(r,d)=>({name:d,fn:e.withCtx(C=>[e.renderSlot(o.$slots,d,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["class","style","loading"]))}});exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("@aplus-frontend/antdv"),W=require("@aplus-frontend/utils"),z=require("lodash-unified");require("../config-provider/index.js");const L=require("./style/index.js"),p=require("./utils/index.js"),q=require("../config-provider/hooks/use-namespace.js"),_=72,w=300,P=e.defineComponent({__name:"ap-button",props:{prefixCls:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object],default:void 0},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onMousedown:{},autoInsertSpace:{type:Boolean},iconPosition:{},color:{},variant:{},type:{default:"default"},borderLinkColor:{},minWidth:{type:[Boolean,Number,String],default:!1},lazy:{type:[Boolean,Number],default:!0},onClick:{}},setup(f){const y=e.useSlots(),t=f,{b:i}=q.useNamespace("ap-action-button"),m=L.default("ap-action-button"),a=e.ref(!1),b=e.computed(()=>t.borderLinkColor||"var(--ap-button-border-link-color)"),l=e.computed(()=>t.type==="borderLink"&&!t.disabled?b.value:void 0),u=e.computed(()=>p.transferOpacityColor(l.value)),v=e.computed(()=>t.minWidth===!0?`${_}px`:typeof t.minWidth=="number"?`${t.minWidth}px`:typeof t.minWidth=="string"?t.minWidth:void 0),h=e.computed(()=>(t.type==="borderLink"?"default":t.type)||"default"),s=e.computed(()=>t.loading??a.value??!1),c=e.computed(()=>t.lazy===!0?w:typeof t.lazy=="number"&&t.lazy>=0?t.lazy:0);function g(){const o=z.omit(t,["type","borderLinkColor","minWidth","onClick","loading"]);return o?{...o,type:h.value,onclick:k}:{}}async function k(o){if(s.value)return;const r=p.isAsynchronous(t.onClick,o),d=Date.now();try{r&&(a.value=!0,await r)}finally{if(r){const n=Date.now()-d;n<c.value&&await W.wait(c.value-n),a.value=!1}}}return(o,r)=>(e.openBlock(),e.createBlock(e.unref(B.Button),e.mergeProps({class:{[e.unref(i)()]:!0,[`${e.unref(i)()}-border-link`]:u.value,[`${e.unref(m)}`]:!0}},{...o.$attrs,...g()},{style:{color:l.value,minWidth:v.value,"--button-border-color":u.value},loading:s.value}),e.createSlots({_:2},[e.renderList(y,(d,n)=>({name:n,fn:e.withCtx(C=>[e.renderSlot(o.$slots,n,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["class","style","loading"]))}});exports.default=P;
@@ -4,7 +4,7 @@ export type ApButtonProps = Omit<ButtonProps, 'type' | 'onClick'> & {
4
4
  borderLinkColor?: string;
5
5
  minWidth?: boolean | number | string;
6
6
  lazy?: boolean | number;
7
- onClick?: () => any | Promise<any>;
7
+ onClick?: (e: MouseEvent) => any | Promise<any>;
8
8
  };
9
9
  export type ApActionButtonProps = ApButtonProps;
10
10
  export type ApButtonSlots = {
@@ -1,5 +1,5 @@
1
1
  import { ModalFuncProps } from '@aplus-frontend/antdv';
2
2
  export declare function isPromise(fn: any): any;
3
- export declare const isAsynchronous: (fn: any) => any;
3
+ export declare const isAsynchronous: (fn: any, e: MouseEvent) => any;
4
4
  export declare const transferOpacityColor: (thisColor?: string, thisOpacity?: string) => string | undefined;
5
5
  export declare const confirmHandle: (ModalFuncProps: ModalFuncProps) => Promise<unknown>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@aplus-frontend/antdv"),l=require("lodash-unified");function c(e){return typeof e=="object"&&typeof e.then=="function"?e:!1}const f=e=>typeof e=="function"&&c(e?.()),u=(e,s="0.7")=>{try{let t=e?.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(t.length===4){let o="#";for(let n=1;n<4;n+=1)o+=t.slice(n,n+1).concat(t.slice(n,n+1));t=o}const r=[];for(let o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgba("+r.join(",")+","+s+")"}if(t&&t.startsWith("rgb")){let r=t.match(/(\d(\.\d+)?)+/g);return r=r?.slice(0,3)?.concat(s),"rgba("+r.join(",")+")"}return t}catch{return}},h=e=>{const{onOk:s=()=>({})}=e;return new Promise((t,i)=>{a.Modal.confirm({onOk:async()=>{try{await s(),t(!0)}catch(r){i(r)}},onCancel:()=>{t(!1)},...l.omit(e,["onOk"])})})};exports.confirmHandle=h;exports.isAsynchronous=f;exports.isPromise=c;exports.transferOpacityColor=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@aplus-frontend/antdv"),l=require("lodash-unified");function c(e){return typeof e=="object"&&typeof e.then=="function"?e:!1}const f=(e,n)=>typeof e=="function"&&c(e?.(n)),u=(e,n="0.7")=>{try{let t=e?.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(t.length===4){let o="#";for(let s=1;s<4;s+=1)o+=t.slice(s,s+1).concat(t.slice(s,s+1));t=o}const r=[];for(let o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgba("+r.join(",")+","+n+")"}if(t&&t.startsWith("rgb")){let r=t.match(/(\d(\.\d+)?)+/g);return r=r?.slice(0,3)?.concat(n),"rgba("+r.join(",")+")"}return t}catch{return}},h=e=>{const{onOk:n=()=>({})}=e;return new Promise((t,i)=>{a.Modal.confirm({onOk:async()=>{try{await n(),t(!0)}catch(r){i(r)}},onCancel:()=>{t(!1)},...l.omit(e,["onOk"])})})};exports.confirmHandle=h;exports.isAsynchronous=f;exports.isPromise=c;exports.transferOpacityColor=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("lodash-unified");require("../../../ag-grid/index.js");const _=require("../../../ap-modal/index.js"),q=require("../utils.js");require("../wrapper/index.vue.js");const y=require("./use-ag-grid-instance.js"),C=require("../wrapper/index.vue2.js"),P=require("../../../ag-grid/index.vue.js");function w(r){let i=null,s=null;const[n,f]=y.useAgGridInstance(),l=q.genRequest(r.api,r.getRowKey,n.setDataSourceLength),d=t=>{const{title:e,width:u,modalProps:p,...c}=a.isFunction(t)?t(r):t;a.isEmpty(c)||s?.(c);const g=a.omitBy({title:e,width:u,modalProps:p},a.isUndefined);a.isEmpty(g)||i?.update(g)},m=o.defineComponent({name:"AgGridModalPreviewContent",props:{modalConfig:{type:Object,required:!0}},setup(t){const e=o.ref(t.modalConfig);return s=u=>{e.value={...e.value,...u}},()=>o.createVNode(f,null,{default:()=>[o.createVNode(C.default,{height:e.value.height,rowHeight:e.value.rowHeight},{default:()=>[e.value.renderHeader?.(a.omit(n,"setInstance"),{updateProps:d}),o.createVNode(P.default,o.mergeProps({ref:n.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:e.value.getRowKey,request:l.request,style:{padding:"0px"},rowHeight:e.value.rowHeight,columns:e.value.columns,autoHeight:!!e.value.height},r.gridProps),e.value.gridSlots)]})]})}});function h(){i=_.ApModal.createModal({title:r.title,width:r.width,destroyOnClose:!0,maskClosable:!1,footer:null,afterOpenChange(t){t===!1&&(n.setInstance(void 0),n.setDataSourceLength(0),i=null)},content:o.createVNode(m,{modalConfig:r},null),...r.modalProps||{}})}function v(t){l.setExtraParams(t?.extraParams),h()}return{open:v,refresh:n.refresh,getAgGridInstance:n.getInstance,updateProps:d}}exports.useAgGridModal=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),i=require("lodash-unified");require("../../../ag-grid/index.js");const _=require("../../../ap-modal/index.js"),q=require("../utils.js");require("../wrapper/index.vue.js");const y=require("./use-ag-grid-instance.js"),C=require("../wrapper/index.vue2.js"),P=require("../../../ag-grid/index.vue.js");function H(r){let o=null,s=null;const[n,f]=y.useAgGridInstance(),l=q.genRequest(r.api,r.getRowKey,n.setDataSourceLength),d=t=>{const{title:e,width:u,modalProps:p,...c}=i.isFunction(t)?t(r):t;i.isEmpty(c)||s?.(c);const g=i.omitBy({title:e,width:u,modalProps:p},i.isUndefined);i.isEmpty(g)||o?.update(g)},m=a.defineComponent({name:"AgGridModalPreviewContent",props:{modalConfig:{type:Object,required:!0}},setup(t){const e=a.ref(t.modalConfig);return s=u=>{e.value={...e.value,...u}},()=>a.createVNode(f,null,{default:()=>[a.createVNode(C.default,{height:e.value.height,rowHeight:e.value.rowHeight,minHeight:e.value.minHeight,maxHeight:e.value.maxHeight},{default:()=>[e.value.renderHeader?.(i.omit(n,"setInstance"),{updateProps:d}),a.createVNode(P.default,a.mergeProps({ref:n.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:e.value.getRowKey,request:l.request,style:{padding:"0px"},rowHeight:e.value.rowHeight,columns:e.value.columns,autoHeight:!!e.value.height},r.gridProps),e.value.gridSlots)]})]})}});function h(){o=_.ApModal.createModal({title:r.title,width:r.width,destroyOnClose:!0,maskClosable:!1,footer:null,afterOpenChange(t){t===!1&&(n.setInstance(void 0),n.setDataSourceLength(0),o=null)},content:a.createVNode(m,{modalConfig:r},null),...r.modalProps||{}})}function v(t){l.setExtraParams(t?.extraParams),h()}return{open:v,refresh:n.refresh,getAgGridInstance:n.getInstance,updateProps:d}}exports.useAgGridModal=H;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),I=require("@aplus-frontend/antdv"),r=require("lodash-unified");require("../../../ag-grid/index.js");const O=require("../../../ap-modal/index.js");require("../../../config-provider/index.js");const p=require("../constants.js");require("../modal-layout/index.vue.js");const c=require("../utils.js");require("../wrapper/index.vue.js");const F=require("./use-ag-grid-instance.js"),G=require("./use-modal-title.js"),L=require("../../../config-provider/hooks/use-locale.js"),T=require("../wrapper/index.vue2.js"),j=require("../modal-layout/index.vue2.js"),H=require("../../../ag-grid/index.vue.js");function N(t){let d,m=null,y=null;const g=new c.AsyncCallback,[q,S]=G.useModalTitle(),{t:b}=L.useLocale(),[u,x]=F.useAgGridInstance({onSelectedRows(e){S.setCount(e?.length||0)}}),w=c.genRequest(t.api,t.getRowKey,u.setDataSourceLength),h=e=>{const{title:n,width:l,modalProps:o,...a}=r.isFunction(e)?e(r.cloneDeep(t)):e;r.isEmpty(a)||y?.(a);const s=r.omitBy({title:n,width:l,modalProps:o},r.isUndefined);r.isEmpty(s)||m?.update(s)},f=r.isFunction(t.getRowKey)?t.getRowKey:e=>e[t.getRowKey],v=()=>{const e=t.mergeRule||"old",n=u.getSelectedRows()||[];return{keys:P(n),rows:n.map(a=>{const s=f(a);return e==="old"&&d?.[s]?d[s]:c.delRowKeyField(a)})}},C=async()=>{const e=v(),n=t.maxCount||1/0;return e.keys.length>n?(I.message.warning(b("ap.apTableModal.messageMaxCount",{maxCount:n})),Promise.reject()):(await t.beforeOk?.(e),t.finishCallback?.(e),g.resolve(e),e)},K=()=>{g.reject("modal is closed!")},k=i.defineComponent({name:"AgGridModalSelectContent",props:{modalConfig:{type:Object,required:!0},selectedRows:{type:Array,default:()=>[]}},setup(e){const n=i.ref(e.modalConfig);return y=l=>{n.value={...n.value,...l}},()=>{const l=e.selectedRows?.map(s=>c.addRowKeyField(s,n.value.getRowKey)),o=n.value,a=c.getModalLayoutConfig(o.modalLayout);return i.createVNode(x,null,{default:()=>[i.createVNode(T.default,{height:o.height,rowHeight:o.rowHeight},{default:()=>[t.renderHeader?.(r.omit(u,"setInstance"),{updateProps:h}),i.createVNode(j.default,a.props,{default:()=>[i.createVNode(H.default,i.mergeProps({ref:u.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:r.isFunction(o.getRowKey)?p.ROW_KEY:o.getRowKey,request:w.request,style:{padding:"0px"},rowHeight:o.rowHeight,columns:o.columns,rowSelection:{defaultSelectedRows:l,preserveSelectedRowKeys:!0,type:o.mode||"checkbox",fixed:"left",columnWidth:38,disabled(s){return r.isFunction(o.disabledCheckbox)?o.disabledCheckbox(s,r.omit(u,"setInstance")):o.disabledCheckbox??!1},...t.rowSelection},autoHeight:!!n.value.height},t.gridProps),o.gridSlots)],...a.slots})]})]})}}});function R(e){return i.createVNode(k,{modalConfig:t,selectedRows:e},null)}function M(){const e=Object.values(d||{}),n=R(e);m=O.ApModal.createModal({title:i.createVNode(q,{title:t.title,maxCount:t.maxCount||1/0,isShowDefaultSuffix:t.mode!=="radio"},t.modalTitleSlots),width:t.width,destroyOnClose:!0,maskClosable:!1,onOk:C,onCancel:K,afterOpenChange(l){l===!1&&(u.setInstance(void 0),u.setDataSourceLength(0))},content:n,...t.modalProps||{}})}function P(e){return e?.map(f)||[]}function _(e,n,l=!1){if(d=e?.reduce((o,a)=>{const s=f(a);return o[s]=a,o},{}),w.setExtraParams(n?.extraParams),M(),l)return g.buildPromise()}function A(e,n){return _(e,n,!0)}return i.onUnmounted(()=>{g.reject("component is Unmounted!")}),{open:_,asyncOpen:A,refresh:u.refresh,getAgGridInstance:u.getInstance,genContent:R,validate:C,updateProps:h}}exports.useAgGridSelectModal=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),I=require("@aplus-frontend/antdv"),r=require("lodash-unified");require("../../../ag-grid/index.js");const H=require("../../../ap-modal/index.js");require("../../../config-provider/index.js");const O=require("../constants.js");require("../modal-layout/index.vue.js");const c=require("../utils.js");require("../wrapper/index.vue.js");const p=require("./use-ag-grid-instance.js"),F=require("./use-modal-title.js"),G=require("../../../config-provider/hooks/use-locale.js"),L=require("../wrapper/index.vue2.js"),T=require("../modal-layout/index.vue2.js"),j=require("../../../ag-grid/index.vue.js");function N(n){let d,m=null,y=null;const g=new c.AsyncCallback,[q,x]=F.useModalTitle(),{t:S}=G.useLocale(),[u,b]=p.useAgGridInstance({onSelectedRows(e){x.setCount(e?.length||0)}}),w=c.genRequest(n.api,n.getRowKey,u.setDataSourceLength),h=e=>{const{title:t,width:l,modalProps:o,...a}=r.isFunction(e)?e(r.cloneDeep(n)):e;r.isEmpty(a)||y?.(a);const s=r.omitBy({title:t,width:l,modalProps:o},r.isUndefined);r.isEmpty(s)||m?.update(s)},f=r.isFunction(n.getRowKey)?n.getRowKey:e=>e[n.getRowKey],v=()=>{const e=n.mergeRule||"old",t=u.getSelectedRows()||[];return{keys:P(t),rows:t.map(a=>{const s=f(a);return e==="old"&&d?.[s]?d[s]:c.delRowKeyField(a)})}},C=async()=>{const e=v(),t=n.maxCount||1/0;return e.keys.length>t?(I.message.warning(S("ap.apTableModal.messageMaxCount",{maxCount:t})),Promise.reject()):(await n.beforeOk?.(e),n.finishCallback?.(e),g.resolve(e),e)},K=()=>{g.reject("modal is closed!")},k=i.defineComponent({name:"AgGridModalSelectContent",props:{modalConfig:{type:Object,required:!0},selectedRows:{type:Array,default:()=>[]}},setup(e){const t=i.ref(e.modalConfig);return y=l=>{t.value={...t.value,...l}},()=>{const l=e.selectedRows?.map(s=>c.addRowKeyField(s,t.value.getRowKey)),o=t.value,a=c.getModalLayoutConfig(o.modalLayout);return i.createVNode(b,null,{default:()=>[i.createVNode(L.default,{height:o.height,rowHeight:o.rowHeight,minHeight:t.value.minHeight,maxHeight:t.value.maxHeight},{default:()=>[n.renderHeader?.(r.omit(u,"setInstance"),{updateProps:h}),i.createVNode(T.default,a.props,{default:()=>[i.createVNode(j.default,i.mergeProps({ref:u.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:r.isFunction(o.getRowKey)?O.ROW_KEY:o.getRowKey,request:w.request,style:{padding:"0px"},rowHeight:o.rowHeight,columns:o.columns,rowSelection:{defaultSelectedRows:l,preserveSelectedRowKeys:!0,type:o.mode||"checkbox",fixed:"left",columnWidth:38,disabled(s){return r.isFunction(o.disabledCheckbox)?o.disabledCheckbox(s,r.omit(u,"setInstance")):o.disabledCheckbox??!1},...n.rowSelection},autoHeight:!!t.value.height},n.gridProps),o.gridSlots)],...a.slots})]})]})}}});function R(e){return i.createVNode(k,{modalConfig:n,selectedRows:e},null)}function M(){const e=Object.values(d||{}),t=R(e);m=H.ApModal.createModal({title:i.createVNode(q,{title:n.title,maxCount:n.maxCount||1/0,isShowDefaultSuffix:n.mode!=="radio"},n.modalTitleSlots),width:n.width,destroyOnClose:!0,maskClosable:!1,onOk:C,onCancel:K,afterOpenChange(l){l===!1&&(u.setInstance(void 0),u.setDataSourceLength(0))},content:t,...n.modalProps||{}})}function P(e){return e?.map(f)||[]}function _(e,t,l=!1){if(d=e?.reduce((o,a)=>{const s=f(a);return o[s]=a,o},{}),w.setExtraParams(t?.extraParams),M(),l)return g.buildPromise()}function A(e,t){return _(e,t,!0)}return i.onUnmounted(()=>{g.reject("component is Unmounted!")}),{open:_,asyncOpen:A,refresh:u.refresh,getAgGridInstance:u.getInstance,genContent:R,validate:C,updateProps:h}}exports.useAgGridSelectModal=N;
@@ -20,6 +20,8 @@ export interface AgGridModalBasicProps<TableRowType = any> {
20
20
  }) => VNodeChild;
21
21
  rowHeight?: number;
22
22
  height?: CSSProperties['height'];
23
+ minHeight?: CSSProperties['height'];
24
+ maxHeight?: CSSProperties['height'];
23
25
  }
24
26
  /** 刷新方式 */
25
27
  export type RefreshType = 'reset' | 'submit' | 'submitWith';
@@ -2,6 +2,8 @@ import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, Com
2
2
  type __VLS_Props = {
3
3
  rowHeight?: number;
4
4
  height?: CSSProperties['height'];
5
+ minHeight?: CSSProperties['height'];
6
+ maxHeight?: CSSProperties['height'];
5
7
  };
6
8
  declare function __VLS_template(): {
7
9
  attrs: Partial<{}>;
@@ -16,6 +18,8 @@ declare function __VLS_template(): {
16
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
19
  declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
20
  height: import("csstype").Property.Height<string | number>;
21
+ maxHeight: import("csstype").Property.Height<string | number>;
22
+ minHeight: import("csstype").Property.Height<string | number>;
19
23
  rowHeight: number;
20
24
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
21
25
  wrapperContainer: HTMLDivElement;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../constants.js"),h=require("../hooks/use-ag-grid-instance.js"),d=e.defineComponent({__name:"index",props:{rowHeight:{default:32},height:{default:void 0}},setup(s){const c=s,n=e.useTemplateRef("wrapperContainer"),g=h.useAgGridModalInject(),a=e.computed(()=>g?.dataSourceLength?.value||0),l=e.ref(i.SMALL_HEIGHT),u=()=>{const t=n.value?.clientHeight,o=n.value?.querySelector(".ag-body.ag-layout-normal")?.clientHeight;let r=0;!t||!o?r=0:r=t-o,a.value*c.rowHeight>480-r&&(l.value=i.LARGER_HEIGHT)};return e.watch(()=>a.value,()=>{u()}),e.onMounted(()=>{u()}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperContainer",ref:n,style:e.normalizeStyle({minHeight:t.height?"unset":e.unref(i.SMALL_HEIGHT),height:t.height??l.value,display:"flex",flexDirection:"column"})},[e.renderSlot(t.$slots,"default")],4))}});exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../constants.js"),h=require("../hooks/use-ag-grid-instance.js"),d=e.defineComponent({__name:"index",props:{rowHeight:{default:32},height:{default:void 0},minHeight:{default:s.SMALL_HEIGHT},maxHeight:{default:s.LARGER_HEIGHT}},setup(c){const n=c,i=e.useTemplateRef("wrapperContainer"),g=h.useAgGridModalInject(),a=e.computed(()=>g?.dataSourceLength?.value||0),l=e.ref(n.minHeight),u=()=>{const t=i.value?.clientHeight,o=i.value?.querySelector(".ag-body.ag-layout-normal")?.clientHeight;let r=0;!t||!o?r=0:r=t-o,a.value*n.rowHeight>480-r&&(l.value=n.maxHeight)};return e.watch(()=>a.value,()=>{u()}),e.onMounted(()=>{u()}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperContainer",ref:i,style:e.normalizeStyle({minHeight:t.height?"unset":n.minHeight,height:t.height??l.value,display:"flex",flexDirection:"column"})},[e.renderSlot(t.$slots,"default")],4))}});exports.default=d;
@@ -76,7 +76,7 @@ declare const ApBatchActionGroup: {
76
76
  borderLinkColor?: string;
77
77
  minWidth?: boolean | number | string;
78
78
  lazy?: boolean | number;
79
- onClick?: () => any | Promise<any>;
79
+ onClick?: (e: MouseEvent) => any | Promise<any>;
80
80
  } & {
81
81
  content?: VNodeChild;
82
82
  }) | ({
@@ -398,7 +398,7 @@ declare const ApBatchActionGroup: {
398
398
  borderLinkColor?: string;
399
399
  minWidth?: boolean | number | string;
400
400
  lazy?: boolean | number;
401
- onClick?: () => any | Promise<any>;
401
+ onClick?: (e: MouseEvent) => any | Promise<any>;
402
402
  } & {
403
403
  content?: VNodeChild;
404
404
  }) | ({
@@ -717,7 +717,7 @@ declare const ApBatchActionGroup: {
717
717
  borderLinkColor?: string;
718
718
  minWidth?: boolean | number | string;
719
719
  lazy?: boolean | number;
720
- onClick?: () => any | Promise<any>;
720
+ onClick?: (e: MouseEvent) => any | Promise<any>;
721
721
  } & {
722
722
  content?: VNodeChild;
723
723
  }) | ({
@@ -1,2 +1,2 @@
1
- declare const _default: "7.19.7";
1
+ declare const _default: "7.19.8";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.7";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.8";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "7.19.7",
3
+ "version": "7.19.8",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "typings": "./lib/index.d.ts",
@@ -41,8 +41,8 @@
41
41
  "scroll-into-view-if-needed": "^3.1.0",
42
42
  "vue-virtual-scroller": "2.0.0-beta.8",
43
43
  "vuedraggable": "^4.1.0",
44
- "@aplus-frontend/utils": "1.0.66",
45
- "@aplus-frontend/hooks": "1.0.7"
44
+ "@aplus-frontend/hooks": "1.0.7",
45
+ "@aplus-frontend/utils": "1.0.66"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@aplus-frontend/antdv": "^2.1.4",