@aplus-frontend/ui 0.5.11 → 0.5.13
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 +16 -12
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +35 -32
- package/es/src/ap-descriptions/formatter/index.mjs +31 -31
- package/es/src/ap-modal/index.d.ts +9 -2
- package/es/src/ap-modal/index.mjs +23 -8
- package/es/src/ap-modal/interface.d.ts +2 -1
- package/es/src/ap-modal/utils/createModal.mjs +43 -40
- package/es/src/ap-modal/utils/index.d.ts +1 -0
- package/es/src/ap-modal/utils/index.mjs +6 -4
- package/es/src/ap-modal/utils/methods.d.ts +3 -0
- package/es/src/ap-modal/utils/methods.mjs +34 -0
- package/es/src/ap-modal/utils/util.d.ts +1 -0
- package/es/src/ap-modal/utils/util.mjs +4 -0
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +2 -2
- package/es/src/business/ap-ladder/index.d.ts +6 -6
- package/es/src/config-provider/config-provider.d.ts +11 -0
- package/es/src/config-provider/css-var.d.ts +11 -0
- package/es/src/config-provider/css-var.mjs +35 -13
- package/es/src/config-provider/index.d.ts +55 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +258 -253
- package/es/src/text/context.d.ts +10 -0
- package/es/src/text/context.mjs +17 -0
- package/es/src/text/group.vue.d.ts +28 -0
- package/es/src/text/group.vue.mjs +37 -0
- package/es/src/text/group.vue2.mjs +4 -0
- package/es/src/text/index.d.ts +4 -0
- package/es/src/text/index.mjs +3 -0
- package/es/src/text/index.vue.d.ts +34 -0
- package/es/src/text/index.vue.mjs +118 -0
- package/es/src/text/index.vue2.mjs +4 -0
- package/es/src/text/interface.d.ts +47 -0
- package/es/src/text/interface.mjs +1 -0
- package/es/src/utils/config-provider-preset.mjs +21 -17
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +25 -21
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/formatter/index.js +1 -1
- package/lib/src/ap-modal/index.d.ts +9 -2
- package/lib/src/ap-modal/index.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +2 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-modal/utils/index.d.ts +1 -0
- package/lib/src/ap-modal/utils/index.js +1 -1
- package/lib/src/ap-modal/utils/methods.d.ts +3 -0
- package/lib/src/ap-modal/utils/methods.js +1 -0
- package/lib/src/ap-modal/utils/util.d.ts +1 -0
- package/lib/src/ap-modal/utils/util.js +1 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +2 -2
- package/lib/src/business/ap-ladder/index.d.ts +6 -6
- package/lib/src/config-provider/config-provider.d.ts +11 -0
- package/lib/src/config-provider/css-var.d.ts +11 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +55 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/text/context.d.ts +10 -0
- package/lib/src/text/context.js +1 -0
- package/lib/src/text/group.vue.d.ts +28 -0
- package/lib/src/text/group.vue.js +1 -0
- package/lib/src/text/group.vue2.js +1 -0
- package/lib/src/text/index.d.ts +4 -0
- package/lib/src/text/index.js +1 -0
- package/lib/src/text/index.vue.d.ts +34 -0
- package/lib/src/text/index.vue.js +1 -0
- package/lib/src/text/index.vue2.js +1 -0
- package/lib/src/text/interface.d.ts +47 -0
- package/lib/src/text/interface.js +1 -0
- package/lib/src/utils/config-provider-preset.js +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/package.json +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +3 -0
- package/theme/ap-descriptions/ap-descriptions.less +4 -0
- package/theme/index.css +61 -0
- package/theme/index.less +2 -0
- package/theme/text/group.css +14 -0
- package/theme/text/group.less +19 -0
- package/theme/text/index.css +44 -0
- package/theme/text/index.less +49 -0
package/es/index.mjs
CHANGED
|
@@ -117,12 +117,14 @@ import { default as Ut } from "./src/resize-observer/index.vue.mjs";
|
|
|
117
117
|
import { default as Vt } from "./src/ap-grid/index.vue.mjs";
|
|
118
118
|
import { default as _t } from "./src/ap-grid/editable/index.vue.mjs";
|
|
119
119
|
import { default as $t } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
120
|
+
import { default as qt } from "./src/text/index.vue.mjs";
|
|
121
|
+
import { default as Qt } from "./src/text/group.vue.mjs";
|
|
122
|
+
import { useMessage as Yt } from "./src/hooks/useMessage.mjs";
|
|
123
|
+
import { useControllableValue as ep } from "./src/hooks/useControllableValue.mjs";
|
|
124
|
+
import { useManualRef as rp } from "./src/hooks/useManualRef.mjs";
|
|
125
|
+
import { useThrottleRef as pp } from "./src/hooks/useThrottleRef.mjs";
|
|
126
|
+
import { useFullScreen as fp } from "./src/hooks/useFullScreen.mjs";
|
|
127
|
+
import { useResize as lp } from "./src/hooks/useResize.mjs";
|
|
126
128
|
const a = {
|
|
127
129
|
install: (r) => {
|
|
128
130
|
for (const t in o) {
|
|
@@ -213,6 +215,8 @@ export {
|
|
|
213
215
|
Zo as ApTableModal,
|
|
214
216
|
So as ApTag,
|
|
215
217
|
go as ApTagGroup,
|
|
218
|
+
qt as ApText,
|
|
219
|
+
Qt as ApTextGroup,
|
|
216
220
|
zr as ApTitle,
|
|
217
221
|
Xo as ApTransformDataHelper,
|
|
218
222
|
Ro as ApUpload,
|
|
@@ -261,20 +265,20 @@ export {
|
|
|
261
265
|
l as pathMap,
|
|
262
266
|
F as provideGlobalConfig,
|
|
263
267
|
g as translate,
|
|
264
|
-
|
|
265
|
-
|
|
268
|
+
ep as useControllableValue,
|
|
269
|
+
fp as useFullScreen,
|
|
266
270
|
E as useGetDerivedNamespace,
|
|
267
271
|
I as useGlobalConfig,
|
|
268
272
|
D as useLocale,
|
|
269
|
-
|
|
270
|
-
|
|
273
|
+
rp as useManualRef,
|
|
274
|
+
Yt as useMessage,
|
|
271
275
|
R as useNamespace,
|
|
272
276
|
jr as usePageListApGrid,
|
|
273
277
|
Wr as usePageListApTable,
|
|
274
|
-
|
|
278
|
+
lp as useResize,
|
|
275
279
|
or as useTableModal,
|
|
276
280
|
It as useTablePaging,
|
|
277
281
|
Hr as useTableRefresh,
|
|
278
282
|
tr as useTableSelectModal,
|
|
279
|
-
|
|
283
|
+
pp as useThrottleRef
|
|
280
284
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Descriptions as
|
|
3
|
-
import { mixinsAttachmentExtraProps as
|
|
1
|
+
import { defineComponent as B, createElementBlock as i, openBlock as r, normalizeStyle as E, normalizeClass as d, unref as l, createVNode as _, mergeProps as w, withCtx as b, Fragment as p, renderList as M, createBlock as c, createCommentVNode as j, h as u, renderSlot as z, resolveDynamicComponent as A } from "vue";
|
|
2
|
+
import { Descriptions as F, DescriptionsItem as m } from "@aplus-frontend/antdv";
|
|
3
|
+
import { mixinsAttachmentExtraProps as G, transformValue as L, isEmptyWithType as R } from "./helper.mjs";
|
|
4
4
|
import { get as S } from "lodash-unified";
|
|
5
5
|
import "./help-message/index.vue.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useGlobalConfig as f } from "../config-provider/hooks/use-global-config.mjs";
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
8
|
+
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import I from "./help-message/index.vue2.mjs";
|
|
10
|
+
const O = { key: 0 }, Z = /* @__PURE__ */ B({
|
|
11
11
|
__name: "ap-descriptions",
|
|
12
12
|
props: {
|
|
13
13
|
descriptionsProps: {},
|
|
@@ -17,25 +17,28 @@ const I = { key: 0 }, Y = /* @__PURE__ */ T({
|
|
|
17
17
|
className: {}
|
|
18
18
|
},
|
|
19
19
|
setup(g) {
|
|
20
|
-
const n = g, v = f("uiMode", "admin"), C = f("apDescriptions"), k = f("downloadCenterTriggerConfig"), { m: P, b: N, be: D } =
|
|
21
|
-
var
|
|
22
|
-
let
|
|
23
|
-
return ((
|
|
24
|
-
justifyContent:
|
|
20
|
+
const n = g, v = f("uiMode", "admin"), C = f("apDescriptions"), k = f("downloadCenterTriggerConfig"), { m: P, b: N, be: D } = $("ap-descriptions"), T = (e = {}) => {
|
|
21
|
+
var s;
|
|
22
|
+
let o = "";
|
|
23
|
+
return ((s = n.descriptionsProps) == null ? void 0 : s.layout) === "vertical" && (o = "start"), {
|
|
24
|
+
justifyContent: o,
|
|
25
25
|
...e
|
|
26
26
|
};
|
|
27
27
|
}, y = (e) => {
|
|
28
28
|
var t, a;
|
|
29
|
-
const
|
|
29
|
+
const o = S(n.dataSource, e.field);
|
|
30
30
|
if (e.customRender)
|
|
31
31
|
return e.customRender(n.dataSource);
|
|
32
|
-
e.valueType === "attachment" && (e.extraProps =
|
|
32
|
+
e.valueType === "attachment" && (e.extraProps = G(e.extraProps, {
|
|
33
33
|
fromConfig: (t = C.value) == null ? void 0 : t.downloadFile,
|
|
34
34
|
fromGlobal: (a = k.value) == null ? void 0 : a.trigger
|
|
35
35
|
}));
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
},
|
|
36
|
+
const s = e.format ? e.format(o, n.dataSource || {}) : o;
|
|
37
|
+
return L({ value: s, record: n.dataSource }, e);
|
|
38
|
+
}, V = (e) => {
|
|
39
|
+
var o;
|
|
40
|
+
return e.valueType === "text" && !!((o = e.extraProps) != null && o.ellipsis);
|
|
41
|
+
}, x = (e) => {
|
|
39
42
|
if (e.visible != null) {
|
|
40
43
|
if (typeof e.visible == "boolean")
|
|
41
44
|
return e.visible;
|
|
@@ -47,29 +50,29 @@ const I = { key: 0 }, Y = /* @__PURE__ */ T({
|
|
|
47
50
|
}
|
|
48
51
|
return !0;
|
|
49
52
|
};
|
|
50
|
-
return (e,
|
|
51
|
-
var
|
|
52
|
-
return
|
|
53
|
-
class: d([e.className,
|
|
54
|
-
style:
|
|
53
|
+
return (e, o) => {
|
|
54
|
+
var s;
|
|
55
|
+
return r(), i("div", {
|
|
56
|
+
class: d([e.className, l(N)(), l(P)(l(v))]),
|
|
57
|
+
style: E(e.style)
|
|
55
58
|
}, [
|
|
56
|
-
|
|
57
|
-
"label-style":
|
|
59
|
+
_(l(F), w(e.descriptionsProps, {
|
|
60
|
+
"label-style": T({ ...((s = e.descriptionsProps) == null ? void 0 : s.labelStyle) || {} })
|
|
58
61
|
}), {
|
|
59
62
|
default: b(() => [
|
|
60
|
-
(
|
|
63
|
+
(r(!0), i(p, null, M(e.schemas, (t, a) => (r(), i(p, {
|
|
61
64
|
key: t.field || "empty" + a
|
|
62
65
|
}, [
|
|
63
|
-
t.valueType === "empty" ? (
|
|
66
|
+
t.valueType === "empty" ? (r(), c(l(m), {
|
|
64
67
|
key: 0,
|
|
65
68
|
"content-style": t.contentStyle,
|
|
66
69
|
"label-style": t.labelStyle,
|
|
67
70
|
span: t.span
|
|
68
|
-
}, null, 8, ["content-style", "label-style", "span"])) :
|
|
71
|
+
}, null, 8, ["content-style", "label-style", "span"])) : x(t) ? (r(), c(l(m), {
|
|
69
72
|
key: 1,
|
|
70
|
-
class: d(
|
|
73
|
+
class: d(V(t) ? l(D)("item", "ellipsis") : ""),
|
|
71
74
|
label: t.label ? u(p, [
|
|
72
|
-
u(
|
|
75
|
+
u(I, {
|
|
73
76
|
helpMessage: t.helpMessage,
|
|
74
77
|
label: t.label
|
|
75
78
|
})
|
|
@@ -79,13 +82,13 @@ const I = { key: 0 }, Y = /* @__PURE__ */ T({
|
|
|
79
82
|
"label-style": t.labelStyle
|
|
80
83
|
}, {
|
|
81
84
|
default: b(() => [
|
|
82
|
-
|
|
83
|
-
t.contentSlotName ?
|
|
85
|
+
l(R)(l(S)(e.dataSource, t.field), t) ? (r(), i("span", O, "--")) : (r(), i(p, { key: 1 }, [
|
|
86
|
+
t.contentSlotName ? z(e.$slots, t.contentSlotName, {
|
|
84
87
|
key: 0,
|
|
85
88
|
index: a,
|
|
86
89
|
item: y(t),
|
|
87
90
|
record: e.dataSource
|
|
88
|
-
}) : (
|
|
91
|
+
}) : (r(), c(A(
|
|
89
92
|
u(p, [
|
|
90
93
|
t.prefix,
|
|
91
94
|
y(t),
|
|
@@ -105,5 +108,5 @@ const I = { key: 0 }, Y = /* @__PURE__ */ T({
|
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
export {
|
|
108
|
-
|
|
111
|
+
Z as default
|
|
109
112
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { createVNode as
|
|
1
|
+
import { createVNode as f } from "vue";
|
|
2
2
|
import { getTimeFormatToZone as g } from "@aplus-frontend/utils";
|
|
3
|
-
import { isBoolean as h, merge as
|
|
3
|
+
import { isBoolean as h, merge as p, get as l, debounce as Y } from "lodash-unified";
|
|
4
4
|
import { formatString as A } from "./utils.mjs";
|
|
5
5
|
import { toDecimalMark as b } from "@fruits-chain/utils";
|
|
6
6
|
import { TypographyParagraph as M } from "@aplus-frontend/antdv";
|
|
7
7
|
function S({
|
|
8
8
|
value: t
|
|
9
9
|
}, n) {
|
|
10
|
-
if (!n)
|
|
10
|
+
if (!(n != null && n.ellipsis))
|
|
11
11
|
return t;
|
|
12
12
|
const r = {
|
|
13
13
|
...n,
|
|
@@ -20,7 +20,7 @@ function S({
|
|
|
20
20
|
tooltip: t
|
|
21
21
|
} : !1
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return f(M, r, null);
|
|
24
24
|
}
|
|
25
25
|
function D({
|
|
26
26
|
value: t
|
|
@@ -28,7 +28,7 @@ function D({
|
|
|
28
28
|
var o;
|
|
29
29
|
const {
|
|
30
30
|
joinSymbol: r
|
|
31
|
-
} =
|
|
31
|
+
} = p({
|
|
32
32
|
joinSymbol: " "
|
|
33
33
|
}, n);
|
|
34
34
|
return (o = t == null ? void 0 : t.join) == null ? void 0 : o.call(t, r);
|
|
@@ -39,7 +39,7 @@ function u({
|
|
|
39
39
|
const {
|
|
40
40
|
zoneAlias: r,
|
|
41
41
|
format: o
|
|
42
|
-
} =
|
|
42
|
+
} = p({
|
|
43
43
|
zoneAlias: "LA",
|
|
44
44
|
format: "YYYY-MM-DD HH:mm:ss"
|
|
45
45
|
}, n);
|
|
@@ -51,13 +51,13 @@ function y({
|
|
|
51
51
|
}, r) {
|
|
52
52
|
const {
|
|
53
53
|
fieldList: o,
|
|
54
|
-
templateString:
|
|
55
|
-
formatter:
|
|
56
|
-
} = r, s = (o == null ? void 0 : o.map((m,
|
|
57
|
-
const
|
|
58
|
-
return
|
|
54
|
+
templateString: i = "{0}",
|
|
55
|
+
formatter: e
|
|
56
|
+
} = r, s = (o == null ? void 0 : o.map((m, a) => {
|
|
57
|
+
const c = l(n, m);
|
|
58
|
+
return e ? e(c, a) : c;
|
|
59
59
|
})) || [];
|
|
60
|
-
return s.length === 0 && s.push(t), A(
|
|
60
|
+
return s.length === 0 && s.push(t), A(i, s);
|
|
61
61
|
}
|
|
62
62
|
function j({
|
|
63
63
|
value: t,
|
|
@@ -65,22 +65,22 @@ function j({
|
|
|
65
65
|
}, r) {
|
|
66
66
|
const {
|
|
67
67
|
fieldList: o,
|
|
68
|
-
format:
|
|
69
|
-
joinSymbol:
|
|
68
|
+
format: i = "YYYY-MM-DD HH:mm:ss",
|
|
69
|
+
joinSymbol: e = "~",
|
|
70
70
|
zoneAlias: s = "LA"
|
|
71
|
-
} = r, m = Array.isArray(
|
|
71
|
+
} = r, m = Array.isArray(i) ? i : [i, i];
|
|
72
72
|
return y({
|
|
73
73
|
value: t,
|
|
74
74
|
record: n
|
|
75
75
|
}, {
|
|
76
76
|
fieldList: o,
|
|
77
|
-
templateString: `{0} ${
|
|
78
|
-
formatter(
|
|
77
|
+
templateString: `{0} ${e} {1}`,
|
|
78
|
+
formatter(a, c) {
|
|
79
79
|
return u({
|
|
80
|
-
value:
|
|
80
|
+
value: a,
|
|
81
81
|
record: n
|
|
82
82
|
}, {
|
|
83
|
-
format: m[
|
|
83
|
+
format: m[c],
|
|
84
84
|
zoneAlias: s
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -92,16 +92,16 @@ function k({
|
|
|
92
92
|
const {
|
|
93
93
|
urlPath: r = "url",
|
|
94
94
|
namePath: o = "name",
|
|
95
|
-
style:
|
|
96
|
-
downloadFile:
|
|
95
|
+
style: i,
|
|
96
|
+
downloadFile: e,
|
|
97
97
|
className: s
|
|
98
|
-
} = n, m = l(t, o),
|
|
99
|
-
|
|
98
|
+
} = n, m = l(t, o), a = l(t, r), c = Y(() => {
|
|
99
|
+
e == null || e(a, m);
|
|
100
100
|
}, 500);
|
|
101
|
-
return
|
|
102
|
-
style:
|
|
101
|
+
return f("span", {
|
|
102
|
+
style: i,
|
|
103
103
|
class: [s, "ap-descriptions-item-content__link "],
|
|
104
|
-
onClick:
|
|
104
|
+
onClick: c
|
|
105
105
|
}, [m]);
|
|
106
106
|
}
|
|
107
107
|
function H({
|
|
@@ -111,16 +111,16 @@ function H({
|
|
|
111
111
|
style: r = {},
|
|
112
112
|
precision: o
|
|
113
113
|
} = n;
|
|
114
|
-
let
|
|
114
|
+
let i = "";
|
|
115
115
|
try {
|
|
116
|
-
|
|
116
|
+
i = b(t, o);
|
|
117
117
|
} catch {
|
|
118
|
-
|
|
118
|
+
i = t;
|
|
119
119
|
}
|
|
120
|
-
return
|
|
120
|
+
return f("span", {
|
|
121
121
|
style: r,
|
|
122
122
|
class: "ap-descriptions-item-content__number"
|
|
123
|
-
}, [
|
|
123
|
+
}, [i]);
|
|
124
124
|
}
|
|
125
125
|
const N = {
|
|
126
126
|
text: S,
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Modal as _Modal } from '@aplus-frontend/antdv';
|
|
2
|
-
import {
|
|
2
|
+
import { ModalFunc } from '@aplus-frontend/antdv/es/modal/confirm';
|
|
3
|
+
import { ApModalType, CreateModalFunc, CreateModalStreamFunc } from './interface';
|
|
3
4
|
export * from './interface';
|
|
4
|
-
type ApModalMixedProps = typeof _Modal & {
|
|
5
|
+
type ApModalMixedProps = Omit<typeof _Modal, ApModalType | 'warn'> & {
|
|
5
6
|
createModal: CreateModalFunc;
|
|
6
7
|
createModalStream: CreateModalStreamFunc;
|
|
8
|
+
confirm: ModalFunc;
|
|
9
|
+
warning: ModalFunc;
|
|
10
|
+
warn: ModalFunc;
|
|
11
|
+
error: ModalFunc;
|
|
12
|
+
success: ModalFunc;
|
|
13
|
+
info: ModalFunc;
|
|
7
14
|
};
|
|
8
15
|
declare const ApModal: ApModalMixedProps;
|
|
9
16
|
export { ApModal };
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { Modal as
|
|
1
|
+
import { Modal as a } from "@aplus-frontend/antdv";
|
|
2
2
|
import "./utils/index.mjs";
|
|
3
|
+
import { omit as m } from "lodash-unified";
|
|
3
4
|
import "./interface.mjs";
|
|
4
|
-
import { createModal as
|
|
5
|
-
import { createModalStream as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { createModal as e } from "./utils/createModal.mjs";
|
|
6
|
+
import { createModalStream as n } from "./utils/createModalStream.mjs";
|
|
7
|
+
import { methodsFn as o } from "./utils/methods.mjs";
|
|
8
|
+
const r = m(a, [
|
|
9
|
+
"confirm",
|
|
10
|
+
"warning",
|
|
11
|
+
"warn",
|
|
12
|
+
"error",
|
|
13
|
+
"success",
|
|
14
|
+
"info"
|
|
15
|
+
]);
|
|
16
|
+
r.createModal = e;
|
|
17
|
+
r.createModalStream = n;
|
|
18
|
+
r.confirm = o("confirm");
|
|
19
|
+
r.warning = o("warning");
|
|
20
|
+
r.warn = o("warning");
|
|
21
|
+
r.error = o("error");
|
|
22
|
+
r.success = o("success");
|
|
23
|
+
r.info = o("info");
|
|
24
|
+
r.name = "ApModal";
|
|
10
25
|
export {
|
|
11
|
-
|
|
26
|
+
r as ApModal
|
|
12
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModalProps, ModalFuncProps } from '@aplus-frontend/antdv';
|
|
2
|
-
import { ModalFunc } from '@aplus-frontend/antdv/lib/modal/confirm';
|
|
2
|
+
import { ModalFunc, ModalStaticFunctions } from '@aplus-frontend/antdv/lib/modal/confirm';
|
|
3
3
|
export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer' | 'icon'> & Partial<{
|
|
4
4
|
/**
|
|
5
5
|
* 点击取消回调
|
|
@@ -139,3 +139,4 @@ export type CreateModalStreamProps<ModalType extends ModalStreamTypeKey = ModalS
|
|
|
139
139
|
props: (params: any) => Promise<ModalStreamType[ModalType]>;
|
|
140
140
|
} : never;
|
|
141
141
|
export type CreateModalStreamFunc<ModalType extends ModalStreamTypeKey = ModalStreamTypeKey> = (streamList: CreateModalStreamProps<ModalType>[], firstModalId?: string) => void;
|
|
142
|
+
export type ApModalType = keyof Omit<ModalStaticFunctions, 'warn'>;
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import { render as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { ConfigProvider as
|
|
4
|
-
import { omit as
|
|
5
|
-
import { isNumeric as
|
|
1
|
+
import { render as g, defineComponent as L, createVNode as u, mergeProps as E, h as H } from "vue";
|
|
2
|
+
import { Modal as M } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as T, globalConfigCached as O } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
import { omit as D } from "lodash-unified";
|
|
5
|
+
import { isNumeric as U } from "@aplus-frontend/utils";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { getContainerDom as w } from "./util.mjs";
|
|
8
|
+
import { getTopWindow as V } from "../../utils/index.mjs";
|
|
9
|
+
import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const J = (c) => {
|
|
11
|
+
var h, C;
|
|
9
12
|
let n, t;
|
|
10
13
|
const {
|
|
11
|
-
destroyOnClose:
|
|
14
|
+
destroyOnClose: d = !0,
|
|
12
15
|
wrapperOffset: r = !1
|
|
13
|
-
} =
|
|
14
|
-
b:
|
|
15
|
-
} =
|
|
16
|
-
function
|
|
16
|
+
} = c, {
|
|
17
|
+
b: m
|
|
18
|
+
} = W("ap-modal");
|
|
19
|
+
function l() {
|
|
17
20
|
n && n(!1), setTimeout(() => {
|
|
18
21
|
var e;
|
|
19
|
-
|
|
22
|
+
g(null, s), (e = s.parentElement) == null || e.removeChild(s);
|
|
20
23
|
}, 500);
|
|
21
24
|
}
|
|
22
|
-
function
|
|
25
|
+
function y() {
|
|
23
26
|
n && n(!0);
|
|
24
27
|
}
|
|
25
28
|
function f() {
|
|
26
29
|
n && n(!1);
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function v(e) {
|
|
29
32
|
t && t(e);
|
|
30
33
|
}
|
|
31
|
-
const
|
|
34
|
+
const x = /* @__PURE__ */ L({
|
|
32
35
|
data() {
|
|
33
36
|
return {
|
|
34
|
-
open:
|
|
35
|
-
props:
|
|
37
|
+
open: d,
|
|
38
|
+
props: c
|
|
36
39
|
};
|
|
37
40
|
},
|
|
38
41
|
created() {
|
|
@@ -47,25 +50,25 @@ const z = (d) => {
|
|
|
47
50
|
},
|
|
48
51
|
methods: {
|
|
49
52
|
async handleCancel() {
|
|
50
|
-
var e, o, a,
|
|
53
|
+
var e, o, a, i, p;
|
|
51
54
|
if ((e = this.props) != null && e.onCancel) {
|
|
52
|
-
const
|
|
53
|
-
await ((
|
|
55
|
+
const N = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
|
|
56
|
+
await ((p = this.props) == null ? void 0 : p.onCancel(N));
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
d ? l() : f();
|
|
56
59
|
},
|
|
57
60
|
async handleOk() {
|
|
58
|
-
var e, o, a,
|
|
61
|
+
var e, o, a, i;
|
|
59
62
|
try {
|
|
60
63
|
if (t({
|
|
61
64
|
confirmLoading: !0
|
|
62
65
|
}), (e = this.props) != null && e.onOk) {
|
|
63
|
-
const
|
|
64
|
-
await this.props.onOk(
|
|
66
|
+
const p = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
|
|
67
|
+
await this.props.onOk(p);
|
|
65
68
|
}
|
|
66
69
|
t({
|
|
67
70
|
confirmLoading: !1
|
|
68
|
-
}),
|
|
71
|
+
}), d ? l() : f();
|
|
69
72
|
} catch {
|
|
70
73
|
t({
|
|
71
74
|
confirmLoading: !1
|
|
@@ -74,12 +77,12 @@ const z = (d) => {
|
|
|
74
77
|
}
|
|
75
78
|
},
|
|
76
79
|
render() {
|
|
77
|
-
const e =
|
|
78
|
-
return
|
|
79
|
-
default: () => [
|
|
80
|
+
const e = D(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
|
|
81
|
+
return u(T, O.value, {
|
|
82
|
+
default: () => [u(M, E({
|
|
80
83
|
class: {
|
|
81
|
-
[
|
|
82
|
-
[
|
|
84
|
+
[m()]: !0,
|
|
85
|
+
[m("wrapper")]: r
|
|
83
86
|
},
|
|
84
87
|
open: this.open,
|
|
85
88
|
onCancel: this.handleCancel,
|
|
@@ -87,26 +90,26 @@ const z = (d) => {
|
|
|
87
90
|
}, e), {
|
|
88
91
|
default: () => {
|
|
89
92
|
var o;
|
|
90
|
-
return [
|
|
93
|
+
return [u("div", {
|
|
91
94
|
class: {
|
|
92
|
-
[
|
|
95
|
+
[m("body-wrapper")]: r
|
|
93
96
|
},
|
|
94
97
|
style: r === !1 ? {} : {
|
|
95
|
-
maxHeight: `${window.innerHeight - (r === !0 ? 100 :
|
|
98
|
+
maxHeight: `${window.innerHeight - (r === !0 ? 100 : U(r) ? Number(r) : 100) * 2}px`
|
|
96
99
|
}
|
|
97
100
|
}, [(o = this.props) == null ? void 0 : o.content])];
|
|
98
101
|
}
|
|
99
102
|
})]
|
|
100
103
|
});
|
|
101
104
|
}
|
|
102
|
-
}),
|
|
103
|
-
return
|
|
104
|
-
destroy:
|
|
105
|
-
update:
|
|
106
|
-
open:
|
|
105
|
+
}), k = w((C = (h = O) == null ? void 0 : h.value) == null ? void 0 : C.getPopupContainer), P = w(c.getContainer), b = k || P || V().document.body, s = document.createElement("div");
|
|
106
|
+
return b.appendChild(s), g(H(x), s), {
|
|
107
|
+
destroy: l,
|
|
108
|
+
update: v,
|
|
109
|
+
open: y,
|
|
107
110
|
close: f
|
|
108
111
|
};
|
|
109
112
|
};
|
|
110
113
|
export {
|
|
111
|
-
|
|
114
|
+
J as createModal
|
|
112
115
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { createModal as
|
|
2
|
-
import { createModalStream as
|
|
1
|
+
import { createModal as r } from "./createModal.mjs";
|
|
2
|
+
import { createModalStream as a } from "./createModalStream.mjs";
|
|
3
|
+
import { methodsFn as d } from "./methods.mjs";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
r as createModal,
|
|
6
|
+
a as createModalStream,
|
|
7
|
+
d as methodsFn
|
|
6
8
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as u, createVNode as C, render as f, h as g } from "vue";
|
|
2
|
+
import { Modal as h } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as x, globalConfigCached as m } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
import { getContainerDom as a } from "./util.mjs";
|
|
5
|
+
import { getTopWindow as v } from "../../utils/index.mjs";
|
|
6
|
+
const D = (i) => (e) => {
|
|
7
|
+
var r, d;
|
|
8
|
+
let n;
|
|
9
|
+
const l = /* @__PURE__ */ u({
|
|
10
|
+
data() {
|
|
11
|
+
const [o, t] = h.useModal();
|
|
12
|
+
return {
|
|
13
|
+
modal: o,
|
|
14
|
+
contextHolder: t
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
mounted() {
|
|
18
|
+
var o, t;
|
|
19
|
+
n = (t = (o = this.modal) == null ? void 0 : o[i]) == null ? void 0 : t.call(o, e);
|
|
20
|
+
},
|
|
21
|
+
render() {
|
|
22
|
+
return C(x, m.value, {
|
|
23
|
+
default: () => {
|
|
24
|
+
var o;
|
|
25
|
+
return [(o = this.contextHolder) == null ? void 0 : o.call(this)];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}), c = a((d = (r = m) == null ? void 0 : r.value) == null ? void 0 : d.getPopupContainer), s = a(e.getContainer), p = c || s || v().document.body;
|
|
30
|
+
return f(g(l), p), n;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
D as methodsFn
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getContainerDom: (params?: HTMLElement | Element | (() => HTMLElement | Element)) => Element | undefined;
|
|
@@ -19,6 +19,8 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
19
19
|
declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
|
|
20
20
|
layout: "vertical" | "horizontal";
|
|
21
21
|
tooltip: boolean;
|
|
22
|
+
major: string;
|
|
23
|
+
minor: string;
|
|
22
24
|
labelAlign: "left" | "right";
|
|
23
25
|
tooltipProps: Partial<Pick<Partial< ExtractPropTypes<{
|
|
24
26
|
title: VueTypeValidableDef<any>;
|
|
@@ -95,8 +97,6 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
|
|
|
95
97
|
default: boolean;
|
|
96
98
|
};
|
|
97
99
|
}>>, "title" | "placement" | "color" | "mouseEnterDelay" | "trigger" | "getPopupContainer" | "align" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide">>;
|
|
98
|
-
major: string;
|
|
99
|
-
minor: string;
|
|
100
100
|
majorColor: string;
|
|
101
101
|
majorStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
102
102
|
minorColor: string;
|