@aplus-frontend/ui 7.4.0 → 7.4.2
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/index.mjs +183 -181
- package/es/src/ag-grid/index.vue.mjs +207 -187
- package/es/src/ap-field/date/index.vue.mjs +68 -63
- package/es/src/ap-field/text/index.vue2.mjs +27 -23
- package/es/src/ap-field/text/password.vue.mjs +31 -27
- package/es/src/ap-form/item/index.vue.mjs +95 -86
- package/es/src/ap-modal/style/index.d.ts +3 -0
- package/es/src/ap-modal/style/index.mjs +20 -0
- package/es/src/ap-modal/utils/createModal.mjs +38 -39
- package/es/src/ap-pro-card/style/title.mjs +10 -10
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +24 -22
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +26 -24
- package/es/src/business/ag-grid-modal/interface.d.ts +2 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +3 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +16 -15
- package/es/src/business/ap-value-select-card/style/index.mjs +2 -2
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +302 -299
- package/es/src/render/index.d.ts +2 -0
- package/es/src/render/index.mjs +4 -0
- package/es/src/render/render.d.ts +15 -0
- package/es/src/render/render.mjs +17 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-modal/style/index.d.ts +3 -0
- package/lib/src/ap-modal/style/index.js +1 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-pro-card/style/title.js +1 -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.js +1 -1
- package/lib/src/business/ag-grid-modal/interface.d.ts +2 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +3 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/render/index.d.ts +2 -0
- package/lib/src/render/index.js +1 -0
- package/lib/src/render/render.d.ts +15 -0
- package/lib/src/render/render.js +1 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/es/src/portal/style/css.d.ts +0 -1
- package/es/src/portal/style/index.d.ts +0 -1
- package/lib/src/portal/style/css.d.ts +0 -1
- package/lib/src/portal/style/index.d.ts +0 -1
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
import { render as
|
|
1
|
+
import { render as h, defineComponent as k, createVNode as u, mergeProps as N, h as $ } from "vue";
|
|
2
2
|
import { Modal as E } from "@aplus-frontend/antdv";
|
|
3
|
-
import {
|
|
3
|
+
import { globalConfigCached as p, ConfigProvider as F } from "../../config-provider/config-provider.mjs";
|
|
4
4
|
import { omit as L } from "lodash-unified";
|
|
5
|
-
import { isNumeric as
|
|
6
|
-
import "
|
|
7
|
-
import { getContainerDom as C, getModalGlobalAppContext as M } from "./util.mjs";
|
|
5
|
+
import { isNumeric as C } from "@aplus-frontend/utils";
|
|
6
|
+
import { getContainerDom as g, getModalGlobalAppContext as M } from "./util.mjs";
|
|
8
7
|
import { getTopWindow as A } from "../../utils/index.mjs";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
let n, r;
|
|
12
|
-
const {
|
|
13
|
-
destroyOnClose:
|
|
8
|
+
import H from "../style/index.mjs";
|
|
9
|
+
const j = (t) => {
|
|
10
|
+
let n, r, i;
|
|
11
|
+
const s = (e) => e ? `${p.value.namespace}-ap-modal-${e}` : `${p.value.namespace}-ap-modal`, {
|
|
12
|
+
destroyOnClose: d = !0,
|
|
14
13
|
wrapperOffset: o = !1,
|
|
15
|
-
wrapperFullHeight:
|
|
16
|
-
} = t
|
|
17
|
-
|
|
18
|
-
} = H("ap-modal");
|
|
19
|
-
function s() {
|
|
14
|
+
wrapperFullHeight: m = !1
|
|
15
|
+
} = t;
|
|
16
|
+
function l() {
|
|
20
17
|
n && n(!1), setTimeout(() => {
|
|
21
|
-
|
|
18
|
+
h(null, a), a.parentElement?.removeChild(a);
|
|
22
19
|
}, 500);
|
|
23
20
|
}
|
|
24
|
-
function
|
|
21
|
+
function v() {
|
|
25
22
|
n && n(!0);
|
|
26
23
|
}
|
|
27
|
-
function
|
|
24
|
+
function c() {
|
|
28
25
|
n && n(!1);
|
|
29
26
|
}
|
|
30
27
|
function x(e) {
|
|
31
28
|
r && r(e);
|
|
32
29
|
}
|
|
33
|
-
const
|
|
30
|
+
const y = /* @__PURE__ */ k({
|
|
34
31
|
data() {
|
|
35
32
|
return {
|
|
36
|
-
open:
|
|
33
|
+
open: d,
|
|
37
34
|
props: t
|
|
38
35
|
};
|
|
39
36
|
},
|
|
@@ -45,7 +42,7 @@ const q = (t) => {
|
|
|
45
42
|
...this.props,
|
|
46
43
|
...e
|
|
47
44
|
};
|
|
48
|
-
};
|
|
45
|
+
}, i = H("ap-modal");
|
|
49
46
|
},
|
|
50
47
|
methods: {
|
|
51
48
|
async handleCancel() {
|
|
@@ -53,7 +50,7 @@ const q = (t) => {
|
|
|
53
50
|
const e = this.props?.content?.component?.exposed ?? void 0;
|
|
54
51
|
await this.props?.onCancel(e);
|
|
55
52
|
}
|
|
56
|
-
|
|
53
|
+
d ? l() : c();
|
|
57
54
|
},
|
|
58
55
|
async handleOk() {
|
|
59
56
|
try {
|
|
@@ -65,7 +62,7 @@ const q = (t) => {
|
|
|
65
62
|
}
|
|
66
63
|
r({
|
|
67
64
|
confirmLoading: !1
|
|
68
|
-
}),
|
|
65
|
+
}), d ? l() : c();
|
|
69
66
|
} catch {
|
|
70
67
|
r({
|
|
71
68
|
confirmLoading: !1
|
|
@@ -81,11 +78,12 @@ const q = (t) => {
|
|
|
81
78
|
},
|
|
82
79
|
render() {
|
|
83
80
|
const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon", "footer"]);
|
|
84
|
-
return
|
|
85
|
-
default: () => [
|
|
81
|
+
return u(F, p.value, {
|
|
82
|
+
default: () => [u(E, N({
|
|
86
83
|
class: {
|
|
87
|
-
[
|
|
88
|
-
[
|
|
84
|
+
[s()]: !0,
|
|
85
|
+
[s("wrapper")]: o,
|
|
86
|
+
[i.value]: !0
|
|
89
87
|
},
|
|
90
88
|
centered: !0
|
|
91
89
|
}, e, {
|
|
@@ -94,29 +92,30 @@ const q = (t) => {
|
|
|
94
92
|
onOk: this.handleOk,
|
|
95
93
|
footer: this?.handleFooter
|
|
96
94
|
}), {
|
|
97
|
-
default: () => [
|
|
95
|
+
default: () => [u("div", {
|
|
98
96
|
class: {
|
|
99
|
-
[
|
|
97
|
+
[s("body-wrapper")]: o,
|
|
98
|
+
[i.value]: !0
|
|
100
99
|
},
|
|
101
100
|
style: {
|
|
102
|
-
maxHeight: o !== !1 ? `calc(100vh - ${(o === !0 ? 100 :
|
|
103
|
-
height:
|
|
104
|
-
overflowY: o !== !1 ||
|
|
101
|
+
maxHeight: o !== !1 ? `calc(100vh - ${(o === !0 ? 100 : C(o) ? Number(o) : 100) * 2}px)` : void 0,
|
|
102
|
+
height: m === !0 ? `calc(100vh - ${(o === !0 ? 100 : C(o) ? Number(o) : 100) * 2}px)` : void 0,
|
|
103
|
+
overflowY: o !== !1 || m === !0 ? "auto" : void 0
|
|
105
104
|
}
|
|
106
105
|
}, [this.props?.content])]
|
|
107
106
|
})]
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
|
-
}),
|
|
109
|
+
}), O = g(p?.value?.getPopupContainer), w = g(t.getContainer), b = O || w || A().document.body, a = document.createElement("div");
|
|
111
110
|
b.appendChild(a);
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
destroy:
|
|
111
|
+
const f = $(y), P = M();
|
|
112
|
+
return f.appContext = t.appContext || P || f.appContext, h(f, a), {
|
|
113
|
+
destroy: l,
|
|
115
114
|
update: x,
|
|
116
|
-
open:
|
|
117
|
-
close:
|
|
115
|
+
open: v,
|
|
116
|
+
close: c
|
|
118
117
|
};
|
|
119
118
|
};
|
|
120
119
|
export {
|
|
121
|
-
|
|
120
|
+
j as createModal
|
|
122
121
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as e } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const r = (t) => {
|
|
3
|
+
const { componentCls: o } = t;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[o]: {
|
|
6
6
|
"&-default": {
|
|
7
7
|
position: "relative",
|
|
8
8
|
fontWeight: "bold",
|
|
@@ -19,7 +19,7 @@ const n = (t) => {
|
|
|
19
19
|
transform: "translateY(-50%)",
|
|
20
20
|
width: "3px",
|
|
21
21
|
height: "14px",
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: t.colorPrimary,
|
|
23
23
|
borderRadius: "0px 4px 4px 0px"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -34,17 +34,17 @@ const n = (t) => {
|
|
|
34
34
|
width: "8px",
|
|
35
35
|
height: "8px",
|
|
36
36
|
borderRadius: "50%",
|
|
37
|
-
border:
|
|
37
|
+
border: `2px solid ${t.colorPrimary}`,
|
|
38
38
|
background: "#fff"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
},
|
|
45
|
-
|
|
44
|
+
}, a = e("ProCard.Title", (t) => [
|
|
45
|
+
r(t)
|
|
46
46
|
]);
|
|
47
47
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
a as default,
|
|
49
|
+
r as genProCardTitleStyle
|
|
50
50
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as P, createVNode as n, mergeProps as w } from "vue";
|
|
2
2
|
import { ApModal as y } from "../../../ap-modal/index.mjs";
|
|
3
3
|
import "../../../ag-grid/index.mjs";
|
|
4
4
|
import { genRequest as I } from "../utils.mjs";
|
|
5
5
|
import { useAgGridInstance as A } from "./use-ag-grid-instance.mjs";
|
|
6
|
-
import { isFunction as
|
|
6
|
+
import { isFunction as H, isEmpty as f, omitBy as M, isUndefined as _, omit as q } from "lodash-unified";
|
|
7
7
|
import "../wrapper/index.vue.mjs";
|
|
8
|
-
import
|
|
8
|
+
import G from "../wrapper/index.vue2.mjs";
|
|
9
9
|
import x from "../../../ag-grid/index.vue.mjs";
|
|
10
10
|
function j(r) {
|
|
11
|
-
let a = null,
|
|
12
|
-
const [o, c] = A(),
|
|
11
|
+
let a = null, l = null;
|
|
12
|
+
const [o, c] = A(), s = I(r.api, r.getRowKey, o.setDataSourceLength), u = (t) => {
|
|
13
13
|
const {
|
|
14
14
|
title: e,
|
|
15
15
|
width: i,
|
|
16
|
-
modalProps:
|
|
16
|
+
modalProps: v,
|
|
17
17
|
...d
|
|
18
|
-
} =
|
|
19
|
-
f(d) ||
|
|
20
|
-
const m =
|
|
18
|
+
} = H(t) ? t(r) : t;
|
|
19
|
+
f(d) || l?.(d);
|
|
20
|
+
const m = M({
|
|
21
21
|
title: e,
|
|
22
22
|
width: i,
|
|
23
|
-
modalProps:
|
|
24
|
-
},
|
|
23
|
+
modalProps: v
|
|
24
|
+
}, _);
|
|
25
25
|
f(m) || a?.update(m);
|
|
26
|
-
}, g = /* @__PURE__ */
|
|
26
|
+
}, g = /* @__PURE__ */ C({
|
|
27
27
|
name: "AgGridModalPreviewContent",
|
|
28
28
|
props: {
|
|
29
29
|
modalConfig: {
|
|
@@ -32,17 +32,18 @@ function j(r) {
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
setup(t) {
|
|
35
|
-
const e =
|
|
36
|
-
return
|
|
35
|
+
const e = P(t.modalConfig);
|
|
36
|
+
return l = (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(G, {
|
|
43
|
+
height: e.value.height,
|
|
43
44
|
rowHeight: e.value.rowHeight
|
|
44
45
|
}, {
|
|
45
|
-
default: () => [e.value.renderHeader?.(
|
|
46
|
+
default: () => [e.value.renderHeader?.(q(o, "setInstance"), {
|
|
46
47
|
updateProps: u
|
|
47
48
|
}), n(x, w({
|
|
48
49
|
ref: o.setInstance,
|
|
@@ -53,18 +54,19 @@ function j(r) {
|
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
rowKey: e.value.getRowKey,
|
|
56
|
-
request:
|
|
57
|
+
request: s.request,
|
|
57
58
|
style: {
|
|
58
59
|
padding: "0px"
|
|
59
60
|
},
|
|
60
61
|
rowHeight: e.value.rowHeight,
|
|
61
|
-
columns: e.value.columns
|
|
62
|
+
columns: e.value.columns,
|
|
63
|
+
autoHeight: !!e.value.height
|
|
62
64
|
}, r.gridProps), e.value.gridSlots)]
|
|
63
65
|
})]
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
|
-
function
|
|
69
|
+
function h() {
|
|
68
70
|
a = y.createModal({
|
|
69
71
|
title: r.title,
|
|
70
72
|
width: r.width,
|
|
@@ -80,11 +82,11 @@ function j(r) {
|
|
|
80
82
|
...r.modalProps || {}
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function p(t) {
|
|
86
|
+
s.setExtraParams(t?.extraParams), h();
|
|
85
87
|
}
|
|
86
88
|
return {
|
|
87
|
-
open:
|
|
89
|
+
open: p,
|
|
88
90
|
refresh: o.refresh,
|
|
89
91
|
getAgGridInstance: o.getInstance,
|
|
90
92
|
updateProps: u
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as _, ref as
|
|
2
|
-
import { ApModal as
|
|
1
|
+
import { defineComponent as _, ref as H, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
|
|
2
|
+
import { ApModal as q } from "../../../ap-modal/index.mjs";
|
|
3
3
|
import "../../../ag-grid/index.mjs";
|
|
4
|
-
import { AsyncCallback as
|
|
4
|
+
import { AsyncCallback as G, genRequest as T, delRowKeyField as D, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
|
|
5
5
|
import { useAgGridInstance as U } from "./use-ag-grid-instance.mjs";
|
|
6
6
|
import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as p } from "lodash-unified";
|
|
7
7
|
import { ROW_KEY as B } from "../constants.mjs";
|
|
@@ -16,7 +16,7 @@ import Q from "../modal-layout/index.vue2.mjs";
|
|
|
16
16
|
import X from "../../../ag-grid/index.vue.mjs";
|
|
17
17
|
function we(t) {
|
|
18
18
|
let c, f = null, g = null;
|
|
19
|
-
const d = new
|
|
19
|
+
const d = new G(), [K, S] = N(), {
|
|
20
20
|
t: k
|
|
21
21
|
} = Y(), [s, x] = U({
|
|
22
22
|
onSelectedRows(e) {
|
|
@@ -39,13 +39,13 @@ function we(t) {
|
|
|
39
39
|
}, m = u(t.getRowKey) ? t.getRowKey : (e) => e[t.getRowKey], P = () => {
|
|
40
40
|
const e = t.mergeRule || "old", o = s.getSelectedRows() || [];
|
|
41
41
|
return {
|
|
42
|
-
keys:
|
|
42
|
+
keys: A(o),
|
|
43
43
|
rows: o.map((a) => {
|
|
44
44
|
const r = m(a);
|
|
45
45
|
return e === "old" && c?.[r] ? c[r] : D(a);
|
|
46
46
|
})
|
|
47
47
|
};
|
|
48
|
-
},
|
|
48
|
+
}, h = async () => {
|
|
49
49
|
const e = P(), o = t.maxCount || 1 / 0;
|
|
50
50
|
return e.keys.length > o ? (V.warning(k("ap.apTableModal.messageMaxCount", {
|
|
51
51
|
maxCount: o
|
|
@@ -65,7 +65,7 @@ function we(t) {
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
setup(e) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = H(e.modalConfig);
|
|
69
69
|
return g = (l) => {
|
|
70
70
|
o.value = {
|
|
71
71
|
...o.value,
|
|
@@ -75,12 +75,13 @@ function we(t) {
|
|
|
75
75
|
const l = e.selectedRows?.map((r) => F(r, o.value.getRowKey)), n = o.value, a = E(n.modalLayout);
|
|
76
76
|
return i(x, null, {
|
|
77
77
|
default: () => [i(J, {
|
|
78
|
+
height: n.height,
|
|
78
79
|
rowHeight: n.rowHeight
|
|
79
80
|
}, {
|
|
80
81
|
default: () => [t.renderHeader?.(p(s, "setInstance"), {
|
|
81
82
|
updateProps: y
|
|
82
83
|
}), i(Q, a.props, {
|
|
83
|
-
default: () => [i(X,
|
|
84
|
+
default: () => [i(X, L({
|
|
84
85
|
ref: s.setInstance,
|
|
85
86
|
searchForm: {
|
|
86
87
|
sortable: !1,
|
|
@@ -105,7 +106,8 @@ function we(t) {
|
|
|
105
106
|
return u(n.disabledCheckbox) ? n.disabledCheckbox(r, p(s, "setInstance")) : n.disabledCheckbox ?? !1;
|
|
106
107
|
},
|
|
107
108
|
...t.rowSelection
|
|
108
|
-
}
|
|
109
|
+
},
|
|
110
|
+
autoHeight: !!o.value.height
|
|
109
111
|
}, t.gridProps), n.gridSlots)],
|
|
110
112
|
...a.slots
|
|
111
113
|
})]
|
|
@@ -114,15 +116,15 @@ function we(t) {
|
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
118
|
});
|
|
117
|
-
function
|
|
119
|
+
function C(e) {
|
|
118
120
|
return i(I, {
|
|
119
121
|
modalConfig: t,
|
|
120
122
|
selectedRows: e
|
|
121
123
|
}, null);
|
|
122
124
|
}
|
|
123
|
-
function
|
|
124
|
-
const e = Object.values(c || {}), o =
|
|
125
|
-
f =
|
|
125
|
+
function v() {
|
|
126
|
+
const e = Object.values(c || {}), o = C(e);
|
|
127
|
+
f = q.createModal({
|
|
126
128
|
title: i(K, {
|
|
127
129
|
title: t.title,
|
|
128
130
|
maxCount: t.maxCount || 1 / 0
|
|
@@ -130,7 +132,7 @@ function we(t) {
|
|
|
130
132
|
width: t.width,
|
|
131
133
|
destroyOnClose: !0,
|
|
132
134
|
maskClosable: !1,
|
|
133
|
-
onOk:
|
|
135
|
+
onOk: h,
|
|
134
136
|
onCancel: M,
|
|
135
137
|
afterOpenChange(l) {
|
|
136
138
|
l === !1 && (s.setInstance(void 0), s.setDataSourceLength(0));
|
|
@@ -139,28 +141,28 @@ function we(t) {
|
|
|
139
141
|
...t.modalProps || {}
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
|
-
function
|
|
144
|
+
function A(e) {
|
|
143
145
|
return e?.map(m) || [];
|
|
144
146
|
}
|
|
145
|
-
function
|
|
147
|
+
function R(e, o, l = !1) {
|
|
146
148
|
if (c = e?.reduce((n, a) => {
|
|
147
149
|
const r = m(a);
|
|
148
150
|
return n[r] = a, n;
|
|
149
|
-
}, {}), w.setExtraParams(o?.extraParams),
|
|
151
|
+
}, {}), w.setExtraParams(o?.extraParams), v(), l)
|
|
150
152
|
return d.buildPromise();
|
|
151
153
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
154
|
+
function O(e, o) {
|
|
155
|
+
return R(e, o, !0);
|
|
154
156
|
}
|
|
155
|
-
return
|
|
157
|
+
return j(() => {
|
|
156
158
|
d.reject("component is Unmounted!");
|
|
157
159
|
}), {
|
|
158
|
-
open:
|
|
159
|
-
asyncOpen:
|
|
160
|
+
open: R,
|
|
161
|
+
asyncOpen: O,
|
|
160
162
|
refresh: s.refresh,
|
|
161
163
|
getAgGridInstance: s.getInstance,
|
|
162
|
-
genContent:
|
|
163
|
-
validate:
|
|
164
|
+
genContent: C,
|
|
165
|
+
validate: h,
|
|
164
166
|
updateProps: y
|
|
165
167
|
};
|
|
166
168
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleValue, VNodeChild } from 'vue';
|
|
1
|
+
import { CSSProperties, StyleValue, VNodeChild } from 'vue';
|
|
2
2
|
import { AgGridColumnType, AgGridExpose, AgGridProps, AgGridRowSelection, AgGridSlots } from '../../ag-grid';
|
|
3
3
|
import { CreateModalFuncProps } from '../../ap-modal';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
@@ -19,6 +19,7 @@ export interface AgGridModalBasicProps<TableRowType = any> {
|
|
|
19
19
|
updateProps: UpdatePropsFn<TableRowType>;
|
|
20
20
|
}) => VNodeChild;
|
|
21
21
|
rowHeight?: number;
|
|
22
|
+
height?: CSSProperties['height'];
|
|
22
23
|
}
|
|
23
24
|
/** 刷新方式 */
|
|
24
25
|
export type RefreshType = 'reset' | 'submit' | 'submitWith';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
rowHeight?: number;
|
|
4
|
+
height?: CSSProperties['height'];
|
|
4
5
|
};
|
|
5
6
|
declare function __VLS_template(): {
|
|
6
7
|
attrs: Partial<{}>;
|
|
@@ -14,6 +15,7 @@ declare function __VLS_template(): {
|
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
height: import("csstype").Property.Height<string | number>;
|
|
17
19
|
rowHeight: number;
|
|
18
20
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
19
21
|
wrapperContainer: HTMLDivElement;
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { SMALL_HEIGHT as l, LARGER_HEIGHT as
|
|
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
3
|
import { useAgGridModalInject as L } from "../hooks/use-ag-grid-instance.mjs";
|
|
4
|
-
const
|
|
4
|
+
const k = /* @__PURE__ */ h({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
|
-
rowHeight: { default: 32 }
|
|
7
|
+
rowHeight: { default: 32 },
|
|
8
|
+
height: { default: void 0 }
|
|
8
9
|
},
|
|
9
10
|
setup(c) {
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
),
|
|
11
|
+
const u = c, t = g("wrapperContainer"), s = L(), r = p(
|
|
12
|
+
() => s?.dataSourceLength?.value || 0
|
|
13
|
+
), i = f(l), a = () => {
|
|
13
14
|
const e = t.value?.clientHeight, o = t.value?.querySelector(
|
|
14
15
|
".ag-body.ag-layout-normal"
|
|
15
16
|
)?.clientHeight;
|
|
16
17
|
let n = 0;
|
|
17
|
-
!e || !o ? n = 0 : n = e - o, r.value *
|
|
18
|
+
!e || !o ? n = 0 : n = e - o, r.value * u.rowHeight > 480 - n && (i.value = _);
|
|
18
19
|
};
|
|
19
20
|
return d(
|
|
20
21
|
() => r.value,
|
|
21
22
|
() => {
|
|
22
|
-
|
|
23
|
+
a();
|
|
23
24
|
}
|
|
24
25
|
), m(() => {
|
|
25
|
-
|
|
26
|
+
a();
|
|
26
27
|
}), (e, o) => (v(), H("div", {
|
|
27
28
|
ref_key: "wrapperContainer",
|
|
28
29
|
ref: t,
|
|
29
|
-
style:
|
|
30
|
-
minHeight:
|
|
31
|
-
height:
|
|
30
|
+
style: y({
|
|
31
|
+
minHeight: e.height ? "unset" : w(l),
|
|
32
|
+
height: e.height ?? i.value,
|
|
32
33
|
display: "flex",
|
|
33
34
|
flexDirection: "column"
|
|
34
35
|
})
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
+
S(e.$slots, "default")
|
|
37
38
|
], 4));
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
k as default
|
|
42
43
|
};
|
|
@@ -18,7 +18,7 @@ const l = (o) => {
|
|
|
18
18
|
boxSizing: "border-box",
|
|
19
19
|
padding: "8px 16px",
|
|
20
20
|
color: o.textColor2,
|
|
21
|
-
border: `1px solid ${o.
|
|
21
|
+
border: `1px solid ${o.borderColorBase}`,
|
|
22
22
|
borderRadius: o.borderRadius,
|
|
23
23
|
cursor: "pointer",
|
|
24
24
|
"&-close": {
|
|
@@ -69,7 +69,7 @@ const l = (o) => {
|
|
|
69
69
|
color: o.textColor3,
|
|
70
70
|
background: "#f9f9fa",
|
|
71
71
|
cursor: "not-allowed",
|
|
72
|
-
border: `1px solid ${o.
|
|
72
|
+
border: `1px solid ${o.borderColorBase}`
|
|
73
73
|
},
|
|
74
74
|
"&.select": {
|
|
75
75
|
backgroundColor: o.colorBgControl,
|
package/es/src/index.d.ts
CHANGED