@aplus-frontend/ui 6.39.2 → 6.41.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.
- package/es/src/ag-grid/editable/form-item.vue.mjs +1 -0
- package/es/src/ag-grid/editable/index.vue.mjs +1 -0
- package/es/src/ag-grid/editable/interface.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-columns-def.mjs +27 -26
- package/es/src/ag-grid/hooks/use-editable-columns.mjs +65 -59
- package/es/src/ag-grid/index.vue.mjs +162 -153
- package/es/src/ag-grid/interface.d.ts +19 -1
- package/es/src/ag-grid/theme.d.ts +2 -1
- package/es/src/ag-grid/theme.mjs +12 -11
- package/es/src/ap-action/interface.d.ts +5 -1
- package/es/src/ap-action/item/index.vue2.mjs +17 -16
- package/es/src/ap-action/item-dropdown/index.vue.mjs +2 -1
- package/es/src/ap-action/item-modal/index.vue.mjs +8 -7
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +1 -0
- package/es/src/ap-grid/utils/col.mjs +91 -82
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +2 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +28 -28
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +99 -95
- package/es/src/business/ag-grid-modal/interface.d.ts +6 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +19 -1
- package/lib/src/ag-grid/theme.d.ts +2 -1
- package/lib/src/ag-grid/theme.js +1 -1
- package/lib/src/ap-action/interface.d.ts +5 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/item-modal/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +2 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
- package/lib/src/business/ag-grid-modal/interface.d.ts +6 -2
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
package/es/src/ag-grid/theme.mjs
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { useToken as
|
|
2
|
-
import { themeQuartz as
|
|
3
|
-
import { computed as
|
|
4
|
-
const h = (o, r) => {
|
|
5
|
-
const [,
|
|
6
|
-
return
|
|
7
|
-
const
|
|
8
|
-
return
|
|
1
|
+
import { useToken as n } from "@aplus-frontend/antdv/es/theme/internal";
|
|
2
|
+
import { themeQuartz as c } from "ag-grid-community";
|
|
3
|
+
import { computed as l } from "vue";
|
|
4
|
+
const h = (o, r, a) => {
|
|
5
|
+
const [, t] = n();
|
|
6
|
+
return l(() => {
|
|
7
|
+
const d = o.value === "mini", e = t.value;
|
|
8
|
+
return c.withParams({
|
|
9
9
|
headerHeight: "36px",
|
|
10
10
|
headerFontSize: "12px",
|
|
11
11
|
dataFontSize: "12px",
|
|
12
|
-
rowHeight: r.value,
|
|
13
|
-
spacing: t ? "5px" : "6.5px",
|
|
14
12
|
foregroundColor: e.colorTextBase,
|
|
15
13
|
wrapperBorder: !1,
|
|
16
14
|
rowBorder: { color: e.colorBorderSecondary },
|
|
@@ -21,7 +19,10 @@ const h = (o, r) => {
|
|
|
21
19
|
headerBackgroundColor: "var(--ap-table-header-bg)",
|
|
22
20
|
headerColumnResizeHandleHeight: "50%",
|
|
23
21
|
headerColumnResizeHandleWidth: "1px",
|
|
24
|
-
wrapperBorderRadius: "4px"
|
|
22
|
+
wrapperBorderRadius: "4px",
|
|
23
|
+
...a.value || {},
|
|
24
|
+
rowHeight: r.value,
|
|
25
|
+
spacing: d ? "5px" : "6.5px"
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DropdownProps, ModalFuncProps, PopconfirmProps } from '@aplus-frontend/antdv';
|
|
1
|
+
import { DropdownProps, ModalFuncProps, PopconfirmProps, TooltipProps } from '@aplus-frontend/antdv';
|
|
2
2
|
import { VNode } from 'vue';
|
|
3
3
|
export type ActionColor = 'primary' | 'success' | 'error' | 'warn';
|
|
4
4
|
export type ApActionItemProps = {
|
|
@@ -43,6 +43,10 @@ export type ApActionItemProps = {
|
|
|
43
43
|
* 是否优先显示图标
|
|
44
44
|
*/
|
|
45
45
|
iconFirst?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 优先显示图标时,对弹出的tooltip进行设置
|
|
48
|
+
*/
|
|
49
|
+
tooltip?: Partial<Omit<TooltipProps, 'title'>>;
|
|
46
50
|
};
|
|
47
51
|
export type MixedActionTypes = ApActionItemProps | ApActionItemModalProps | ApActionItemPopconfirmProps;
|
|
48
52
|
export type GroupActionTypes = MixedActionTypes | ApActionItemDropdownProps;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as h, createPropsRestProxy as A, ref as F, computed as u, unref as n, renderSlot as y, createElementBlock as f, createCommentVNode as a, openBlock as t, mergeProps as g, createBlock as m, normalizeClass as N, createVNode as L, withCtx as P, resolveDynamicComponent as k, isVNode as S, toDisplayString as V } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import $ from "@aplus-frontend/antdv/es/button/LoadingIcon";
|
|
4
4
|
import { Tooltip as w } from "@aplus-frontend/antdv";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
const
|
|
5
|
+
import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const I = { key: 1 }, q = /* @__PURE__ */ B({
|
|
7
7
|
name: "ApActionItem",
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
@@ -15,27 +15,28 @@ const D = { key: 1 }, q = /* @__PURE__ */ C({
|
|
|
15
15
|
onClick: { type: Function },
|
|
16
16
|
loading: { type: Boolean, default: !1 },
|
|
17
17
|
icon: {},
|
|
18
|
-
iconFirst: { type: Boolean, default: !1 }
|
|
18
|
+
iconFirst: { type: Boolean, default: !1 },
|
|
19
|
+
tooltip: { default: () => ({}) }
|
|
19
20
|
},
|
|
20
21
|
setup(o) {
|
|
21
|
-
const s =
|
|
22
|
+
const s = h(), r = A(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon", "tooltip"]), { b: v, m: l, e: b } = D("action-item"), c = F(!1), d = u(() => o.iconFirst && (o.icon || s.icon));
|
|
22
23
|
function p(e) {
|
|
23
24
|
n(i) || o.disabled || (r.onClick?.(e), r.onAction && (c.value = !0, r.onAction(e).finally(() => c.value = !1)));
|
|
24
25
|
}
|
|
25
|
-
const i = u(() => o.loading || n(c)),
|
|
26
|
-
|
|
26
|
+
const i = u(() => o.loading || n(c)), C = u(() => [
|
|
27
|
+
v(),
|
|
27
28
|
l(o.color),
|
|
28
29
|
d.value ? l("icon-first") : null,
|
|
29
30
|
o.disabled ? l("disabled") : null,
|
|
30
31
|
i.value ? l("loading") : null
|
|
31
32
|
].filter(Boolean));
|
|
32
|
-
return (e,
|
|
33
|
+
return (e, T) => y(e.$slots, "trigger", {
|
|
33
34
|
loading: i.value,
|
|
34
35
|
disabled: e.disabled,
|
|
35
36
|
onClick: p
|
|
36
37
|
}, () => [
|
|
37
|
-
e.visible ? (t(), f("span",
|
|
38
|
-
class:
|
|
38
|
+
e.visible ? (t(), f("span", g({ key: 0 }, e.$attrs, {
|
|
39
|
+
class: C.value,
|
|
39
40
|
onClick: p
|
|
40
41
|
}), [
|
|
41
42
|
i.value ? (t(), m(n($), {
|
|
@@ -46,19 +47,19 @@ const D = { key: 1 }, q = /* @__PURE__ */ C({
|
|
|
46
47
|
})) : a("", !0),
|
|
47
48
|
e.icon || s.icon ? (t(), f("span", {
|
|
48
49
|
key: 1,
|
|
49
|
-
class: N(n(
|
|
50
|
+
class: N(n(b)("icon-wrapper"))
|
|
50
51
|
}, [
|
|
51
|
-
L(n(w), {
|
|
52
|
+
L(n(w), g({
|
|
52
53
|
title: d.value ? e.text : null
|
|
53
|
-
}, {
|
|
54
|
+
}, e.tooltip), {
|
|
54
55
|
default: P(() => [
|
|
55
|
-
(t(), m(
|
|
56
|
+
(t(), m(k(e.icon || s.icon)))
|
|
56
57
|
]),
|
|
57
58
|
_: 1
|
|
58
|
-
},
|
|
59
|
+
}, 16, ["title"])
|
|
59
60
|
], 2)) : a("", !0),
|
|
60
61
|
d.value ? a("", !0) : y(e.$slots, "default", { key: 2 }, () => [
|
|
61
|
-
S(e.text) ? (t(), m(
|
|
62
|
+
S(e.text) ? (t(), m(k(e.text), { key: 0 })) : (t(), f("span", I, V(e.text || ""), 1))
|
|
62
63
|
])
|
|
63
64
|
], 16)) : a("", !0)
|
|
64
65
|
]);
|
|
@@ -25,7 +25,8 @@ const T = /* @__PURE__ */ _({
|
|
|
25
25
|
onClick: {},
|
|
26
26
|
loading: { type: Boolean, default: !1 },
|
|
27
27
|
icon: {},
|
|
28
|
-
iconFirst: { type: Boolean }
|
|
28
|
+
iconFirst: { type: Boolean },
|
|
29
|
+
tooltip: {}
|
|
29
30
|
},
|
|
30
31
|
setup(d) {
|
|
31
32
|
const f = d, i = v(!1), { e: p } = E("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || V(e.visible)).map((e) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as i, useSlots as s, createBlock as
|
|
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(
|
|
22
|
-
const r = s(), o =
|
|
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) => (
|
|
33
|
-
u(r, (h,
|
|
34
|
-
name:
|
|
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,
|
|
37
|
+
y(e.$slots, t, A(P(l || {})))
|
|
37
38
|
])
|
|
38
39
|
}))
|
|
39
40
|
]), 1040));
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import { isArray as
|
|
3
|
-
import { valueEnumToArray as
|
|
4
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { createVNode as u, Fragment as h } from "vue";
|
|
2
|
+
import { isArray as b, isUndefined as E, isString as o, isBoolean as x, isNumber as O, pick as F } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as S, objectToString as $, getTableTitle as R, getTableRenderType as V, getTableRenderProps as B, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
|
|
4
|
+
import { noRenderAsFormItemValueList as _ } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
6
|
+
import j from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
+
function T(e, t) {
|
|
8
|
+
if (t)
|
|
9
|
+
return b(t) ? t.reduce((r, n) => r?.[n], e) : e?.[t];
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
if (!
|
|
13
|
-
return
|
|
11
|
+
function v(e) {
|
|
12
|
+
if (!E(e))
|
|
13
|
+
return b(e) ? e.reduce((t, r) => o(r) ? `${t}${t ? "." : ""}${r}` : `${t}[${r}]`, "") : String(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function A(e) {
|
|
16
16
|
if (e)
|
|
17
17
|
return e === !0 ? "left" : e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function q(e) {
|
|
20
|
+
return x(e) ? {
|
|
21
21
|
sortable: e
|
|
22
22
|
} : e ? {
|
|
23
23
|
sortable: !0,
|
|
@@ -27,117 +27,126 @@ function j(e) {
|
|
|
27
27
|
sortable: !1
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
label:
|
|
34
|
-
value:
|
|
30
|
+
function I(e) {
|
|
31
|
+
let t;
|
|
32
|
+
return x(e.filters) && e.valueEnum ? t = S(e.valueEnum) : t = e.filters, t?.map((r) => ({
|
|
33
|
+
label: o(r.text) ? r.text : "",
|
|
34
|
+
value: r.value
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
37
37
|
function W(e) {
|
|
38
38
|
if (e)
|
|
39
|
-
return (
|
|
39
|
+
return (t) => e(t.value, t.row);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return e ?
|
|
43
|
-
tooltip:
|
|
41
|
+
function k(e, t) {
|
|
42
|
+
return e ? O(e) ? {
|
|
43
|
+
tooltip: t,
|
|
44
44
|
rows: e
|
|
45
45
|
} : e === !0 || e === "tooltip" ? {
|
|
46
|
-
tooltip:
|
|
46
|
+
tooltip: t,
|
|
47
47
|
rows: 1
|
|
48
48
|
} : {
|
|
49
49
|
tooltip: null,
|
|
50
50
|
rows: 1,
|
|
51
|
-
htmlTitle: e === "title" ?
|
|
51
|
+
htmlTitle: e === "title" ? t : ""
|
|
52
52
|
} : !1;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
if (
|
|
56
|
-
return
|
|
54
|
+
function z(e, t, r) {
|
|
55
|
+
if (_.includes(e.valueType))
|
|
56
|
+
return r;
|
|
57
57
|
if (e.copyable || e.ellipsis) {
|
|
58
|
-
const
|
|
59
|
-
return
|
|
58
|
+
const n = k(e.ellipsis, t), i = $(t);
|
|
59
|
+
return u(j, {
|
|
60
60
|
rawValue: i,
|
|
61
61
|
copyable: e.copyable,
|
|
62
|
-
ellipsis:
|
|
63
|
-
content:
|
|
62
|
+
ellipsis: n,
|
|
63
|
+
content: r
|
|
64
64
|
}, null);
|
|
65
65
|
}
|
|
66
|
-
return
|
|
66
|
+
return r;
|
|
67
|
+
}
|
|
68
|
+
function c(e, t, r) {
|
|
69
|
+
const n = F(e, ["width", "minWidth", "align"]);
|
|
70
|
+
return n.field = v(e.dataIndex), n.fixed = A(e.fixed), n.slots = {
|
|
71
|
+
header: () => R(e, r, void 0, t)
|
|
72
|
+
}, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
|
|
67
73
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
header: () => v(e, t, void 0, r)
|
|
72
|
-
}, l.headerAlign = e.align, l.showOverflow = !1, l.showFooterOverflow = !1, l;
|
|
74
|
+
function D(e, t, r) {
|
|
75
|
+
if (r)
|
|
76
|
+
return o(r) ? e[r] : r(e, t);
|
|
73
77
|
}
|
|
74
|
-
const
|
|
78
|
+
const G = ({
|
|
75
79
|
value: e,
|
|
76
|
-
...
|
|
77
|
-
},
|
|
78
|
-
const s =
|
|
79
|
-
...
|
|
80
|
+
...t
|
|
81
|
+
}, r, n, i = !0) => {
|
|
82
|
+
const s = V(r), d = B({
|
|
83
|
+
...r,
|
|
80
84
|
valueType: s
|
|
81
85
|
}, {
|
|
82
86
|
value: e,
|
|
83
|
-
...
|
|
84
|
-
}),
|
|
85
|
-
value: e,
|
|
86
|
-
...r
|
|
87
|
-
}) || e, u = t.renderText ? o(p, null, [t.renderText?.({
|
|
87
|
+
...t
|
|
88
|
+
}), l = M(s, d, t.record, n), a = r.renderText?.({
|
|
88
89
|
value: e,
|
|
89
|
-
...
|
|
90
|
-
})
|
|
91
|
-
let f = i ? k(t, a, u) : u;
|
|
92
|
-
return t.customRender && (f = t.customRender({
|
|
90
|
+
...t
|
|
91
|
+
}) || e, p = r.renderText ? u(h, null, [r.renderText?.({
|
|
93
92
|
value: e,
|
|
94
|
-
...
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
...t
|
|
94
|
+
})]) : l;
|
|
95
|
+
let f = i ? z(r, a, p) : p;
|
|
96
|
+
if (r.customRender) {
|
|
97
|
+
const N = r._path || [], w = D(t.record, t.rowIndex, t.params.rowKey);
|
|
98
|
+
f = r.customRender({
|
|
99
|
+
value: e,
|
|
100
|
+
...t,
|
|
101
|
+
column: r,
|
|
102
|
+
originalNode: f,
|
|
103
|
+
originalText: a,
|
|
104
|
+
path: [...N, String(w)]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return u(h, null, [f]);
|
|
99
108
|
};
|
|
100
|
-
function y(e,
|
|
101
|
-
const i =
|
|
102
|
-
i.field =
|
|
109
|
+
function y(e, t, r, n) {
|
|
110
|
+
const i = F(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
|
|
111
|
+
i.field = v(e.dataIndex), i.fixed = A(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
|
|
103
112
|
const s = ({
|
|
104
113
|
row: d,
|
|
105
|
-
rowIndex:
|
|
106
|
-
}) =>
|
|
107
|
-
value:
|
|
108
|
-
text:
|
|
114
|
+
rowIndex: l
|
|
115
|
+
}) => G({
|
|
116
|
+
value: T(d, e.dataIndex),
|
|
117
|
+
text: T(d, e.dataIndex),
|
|
109
118
|
record: d,
|
|
110
|
-
index:
|
|
111
|
-
renderIndex:
|
|
119
|
+
index: l,
|
|
120
|
+
renderIndex: l,
|
|
112
121
|
column: e
|
|
113
|
-
}, e,
|
|
122
|
+
}, e, n);
|
|
114
123
|
return i.slots = {
|
|
115
|
-
header: () =>
|
|
124
|
+
header: () => R(e, r, void 0, t),
|
|
116
125
|
default: s,
|
|
117
126
|
footer: s
|
|
118
127
|
}, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
|
|
119
128
|
}
|
|
120
|
-
function
|
|
129
|
+
function X(e, t, r, n) {
|
|
121
130
|
if (!e.children?.length)
|
|
122
|
-
return y(e,
|
|
131
|
+
return y(e, t, r, n);
|
|
123
132
|
function i(d) {
|
|
124
|
-
return d.map((
|
|
125
|
-
if (
|
|
126
|
-
const a =
|
|
127
|
-
return a.children = i(
|
|
133
|
+
return d.map((l) => {
|
|
134
|
+
if (l.children?.length) {
|
|
135
|
+
const a = c(l, t, r);
|
|
136
|
+
return a.children = i(l.children), a;
|
|
128
137
|
}
|
|
129
|
-
return y(
|
|
138
|
+
return y(l, t, r, n);
|
|
130
139
|
});
|
|
131
140
|
}
|
|
132
|
-
const s =
|
|
141
|
+
const s = c(e, t, r);
|
|
133
142
|
return s.children = i(e.children), s;
|
|
134
143
|
}
|
|
135
144
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
G as contentCustom,
|
|
146
|
+
v as dataIndexToField,
|
|
147
|
+
T as getValueByDataIndex,
|
|
148
|
+
X as transformCol,
|
|
149
|
+
A as transformFixed,
|
|
150
|
+
c as transformToColGroup,
|
|
142
151
|
y as transformToColumn
|
|
143
152
|
};
|
|
@@ -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
|
|
2
|
-
import { ApModal as
|
|
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
|
|
5
|
-
import { useAgGridInstance as
|
|
6
|
-
import { isFunction as
|
|
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
|
|
9
|
-
import
|
|
10
|
-
function
|
|
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 [
|
|
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
|
-
} =
|
|
18
|
+
} = M(t) ? t(r) : t;
|
|
19
19
|
f(d) || s?.(d);
|
|
20
|
-
const 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__ */
|
|
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 =
|
|
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(
|
|
42
|
+
default: () => [n(H, {
|
|
43
43
|
rowHeight: e.value.rowHeight
|
|
44
44
|
}, {
|
|
45
|
-
default: () => [e.value.renderHeader?.(
|
|
45
|
+
default: () => [e.value.renderHeader?.(G(o, "setInstance"), {
|
|
46
46
|
updateProps: u
|
|
47
|
-
}), n(
|
|
48
|
-
ref:
|
|
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 =
|
|
69
|
-
title:
|
|
70
|
-
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 && (
|
|
75
|
+
t === !1 && (o.setInstance(void 0), o.setDataSourceLength(0), a = null);
|
|
76
76
|
},
|
|
77
77
|
content: n(g, {
|
|
78
|
-
modalConfig:
|
|
78
|
+
modalConfig: r
|
|
79
79
|
}, null),
|
|
80
|
-
...
|
|
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:
|
|
89
|
-
getAgGridInstance:
|
|
88
|
+
refresh: o.refresh,
|
|
89
|
+
getAgGridInstance: o.getInstance,
|
|
90
90
|
updateProps: u
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
j as useAgGridModal
|
|
95
95
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { AgGridSelectModalProps, SelectModalReturnType } from '../interface';
|
|
2
|
-
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
export declare function useAgGridSelectModal<T extends Recordable = any>(props: AgGridSelectModalProps<T>): SelectModalReturnType<T>;
|