@aplus-frontend/ui 0.5.10 → 0.5.12
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/ap-field/select/index.vue.d.ts +12 -12
- 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/ap-table/constants.d.ts +6 -6
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-group-search/index.d.ts +18 -18
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
- 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/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +27 -27
- package/lib/src/ap-field/select/index.vue.d.ts +12 -12
- 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/ap-table/constants.d.ts +6 -6
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-group-search/index.d.ts +18 -18
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
- 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/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
- package/theme/ap-tag/ap-tag.css +6 -6
- package/theme/ap-tag/ap-tag.less +1 -2
- package/theme/index.css +6 -6
|
@@ -1,39 +1,43 @@
|
|
|
1
|
-
import { isUndefined as
|
|
1
|
+
import { isUndefined as f } from "lodash-unified";
|
|
2
|
+
import { getTopWindow as s } from "./index.mjs";
|
|
2
3
|
function u(e, n) {
|
|
3
4
|
var t, r;
|
|
4
5
|
return e != null && e.parentElement ? e.parentElement.classList.contains(n) ? (t = e.parentElement) != null && t.parentElement ? (r = e.parentElement.parentElement.className) == null ? void 0 : r.includes("basic-table") : !1 : u(e.parentElement, n) : !1;
|
|
5
6
|
}
|
|
6
|
-
const
|
|
7
|
+
const i = (e) => {
|
|
8
|
+
var n, t;
|
|
9
|
+
return u(e, "ant-form") ? (e == null ? void 0 : e.parentNode) || ((n = s().document) == null ? void 0 : n.body) : (t = s().document) == null ? void 0 : t.body;
|
|
10
|
+
}, m = ({ text: e }) => {
|
|
7
11
|
const n = (t) => t == null || t === "";
|
|
8
12
|
return Array.isArray(e) ? n(e[0]) ? "--" : e[0] : n(e) ? "--" : e;
|
|
9
|
-
},
|
|
10
|
-
getPopupContainer:
|
|
11
|
-
transformCellText:
|
|
12
|
-
autoInsertSpaceInButton:
|
|
13
|
+
}, c = !1, a = {
|
|
14
|
+
getPopupContainer: i,
|
|
15
|
+
transformCellText: m,
|
|
16
|
+
autoInsertSpaceInButton: c
|
|
13
17
|
};
|
|
14
|
-
function
|
|
18
|
+
function y(e) {
|
|
15
19
|
const n = {
|
|
16
20
|
...e
|
|
17
21
|
}, t = Object.keys(
|
|
18
|
-
|
|
22
|
+
a
|
|
19
23
|
);
|
|
20
24
|
for (const r of t)
|
|
21
|
-
|
|
25
|
+
f(n[r]) && (n[r] = a[r]);
|
|
22
26
|
return n;
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function d(e, n) {
|
|
25
29
|
const t = {
|
|
26
30
|
...n
|
|
27
31
|
}, r = Object.keys(e);
|
|
28
32
|
for (const o of r)
|
|
29
|
-
|
|
33
|
+
f(e[o]) || (t[o] = e[o]);
|
|
30
34
|
return t;
|
|
31
35
|
}
|
|
32
36
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
a as antdConfigProviderPresets,
|
|
38
|
+
c as autoInsertSpaceInButton,
|
|
39
|
+
i as getPopupContainer,
|
|
40
|
+
y as mergeAntdProvideConfig,
|
|
41
|
+
d as mergeAntdProviderConfigWithCache,
|
|
42
|
+
m as transformCellText
|
|
39
43
|
};
|
package/es/src/utils/index.d.ts
CHANGED
package/es/src/utils/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { unref as s, markRaw as f } from "vue";
|
|
2
2
|
import { isUndefined as l } from "lodash-unified";
|
|
3
|
-
import { isClient as
|
|
3
|
+
import { isClient as d } from "@vueuse/core";
|
|
4
4
|
function m(t) {
|
|
5
5
|
return (t == null ? void 0 : t.parentNode) ?? document.body;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function w(t) {
|
|
8
8
|
return typeof t < "u";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function g(t) {
|
|
11
11
|
const e = {};
|
|
12
12
|
return Object.keys(t).map((n) => {
|
|
13
13
|
e[n] = s(t[n]);
|
|
14
14
|
}), e;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function h(t, e = [], n) {
|
|
17
17
|
const o = Object.assign({}, t), c = Object.keys(o);
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
(e.includes(
|
|
18
|
+
for (let r = 0; r < c.length; r += 1) {
|
|
19
|
+
const i = c[r];
|
|
20
|
+
(e.includes(i) || n != null && n(i, o[i])) && delete o[i];
|
|
21
21
|
}
|
|
22
22
|
return o;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function v(t) {
|
|
25
25
|
return /^[A-Z][A-Za-z]*$/.test(t);
|
|
26
26
|
}
|
|
27
27
|
function u(t) {
|
|
@@ -35,36 +35,40 @@ function u(t) {
|
|
|
35
35
|
}
|
|
36
36
|
return t;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function b(t) {
|
|
39
39
|
const e = { ...t };
|
|
40
40
|
for (const n of Object.keys(e))
|
|
41
41
|
l(e[n]) && delete e[n];
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function k(t, ...e) {
|
|
45
45
|
return typeof t == "function" ? t(...e) : t;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function x() {
|
|
48
48
|
const t = "history";
|
|
49
49
|
return typeof window > "u" ? t : window.location.href.includes("#/") ? "hash" : t;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (!
|
|
51
|
+
function C() {
|
|
52
|
+
if (!d)
|
|
53
53
|
return 15;
|
|
54
54
|
const t = document.createElement("div");
|
|
55
55
|
t.style.width = "100px", t.style.height = "100px", t.style.overflow = "scroll", t.style.position = "absolute", t.style.top = "-9999px", document.body.appendChild(t);
|
|
56
56
|
const e = t.offsetHeight - t.clientHeight;
|
|
57
57
|
return document.body.removeChild(t), e;
|
|
58
58
|
}
|
|
59
|
+
function R() {
|
|
60
|
+
return (window.top !== window ? window.top : window) ?? window;
|
|
61
|
+
}
|
|
59
62
|
export {
|
|
60
63
|
u as convertReactiveToRaw,
|
|
61
|
-
|
|
64
|
+
g as getDynamicProps,
|
|
62
65
|
m as getPopupContainer,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
x as getRouteType,
|
|
67
|
+
C as getScrollbarSize,
|
|
68
|
+
R as getTopWindow,
|
|
69
|
+
w as isDef,
|
|
70
|
+
v as isPascalCase,
|
|
71
|
+
b as omitUndefined,
|
|
72
|
+
h as omitWhen,
|
|
73
|
+
k as runFunction
|
|
70
74
|
};
|
|
@@ -106,7 +106,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
|
|
|
106
106
|
readonly hideRequiredMark?: boolean | undefined;
|
|
107
107
|
readonly validateOnRuleChange?: boolean | undefined;
|
|
108
108
|
readonly scrollToFirstError?: boolean | Options<any> | undefined;
|
|
109
|
-
readonly onFieldsChange?: ((changedFields: FieldData[], allFields:
|
|
109
|
+
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
|
|
110
110
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
111
111
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
112
112
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { message as
|
|
3
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as F, ref as g, computed as M, createElementBlock as N, openBlock as L, createVNode as t, unref as e, mergeProps as P, withCtx as n, h as q } from "vue";
|
|
2
|
+
import { message as E, Modal as I, Input as A, Textarea as V } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ApForm as c } from "../ap-form/index.mjs";
|
|
4
4
|
import "./help-message.vue.mjs";
|
|
5
5
|
import "../ap-upload/index.mjs";
|
|
6
|
-
import { langMap as R, DictCode as
|
|
6
|
+
import { langMap as R, DictCode as b } from "./interfaces.mjs";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
8
|
import "../hooks/index.mjs";
|
|
9
|
-
import { useLocale as
|
|
9
|
+
import { useLocale as w } from "../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.mjs";
|
|
12
12
|
import { useControllableValue as D } from "../hooks/useControllableValue.mjs";
|
|
@@ -14,7 +14,7 @@ import S from "../ap-form/items/select/index.vue.mjs";
|
|
|
14
14
|
import j from "../ap-form/items/radio/index.vue.mjs";
|
|
15
15
|
import K from "../ap-upload/apUpload.vue.mjs";
|
|
16
16
|
import U from "./help-message.vue2.mjs";
|
|
17
|
-
const pe = /* @__PURE__ */
|
|
17
|
+
const pe = /* @__PURE__ */ F({
|
|
18
18
|
__name: "work-order-modal",
|
|
19
19
|
props: {
|
|
20
20
|
api: { type: Function },
|
|
@@ -60,14 +60,14 @@ const pe = /* @__PURE__ */ T({
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:open", "modalClose"],
|
|
62
62
|
setup(v, { emit: x }) {
|
|
63
|
-
const { t: o } =
|
|
63
|
+
const { t: o } = w(), { b: C } = $("work-order-modal"), m = x, u = g(), l = g(!1), s = v, h = z("api"), { lang: _ } = w(), O = M(() => R[_.value] ?? "zh_CN"), { value: i, updateValue: T } = D(s, m, {
|
|
64
64
|
valuePropName: "open",
|
|
65
65
|
defaultValue: !0
|
|
66
|
-
}),
|
|
66
|
+
}), d = async (r) => {
|
|
67
67
|
var p, k;
|
|
68
|
-
const a = await ((k = (p =
|
|
68
|
+
const a = await ((k = (p = h.value) == null ? void 0 : p.select) == null ? void 0 : k.call(p, {
|
|
69
69
|
dictCode: r,
|
|
70
|
-
locale:
|
|
70
|
+
locale: O.value
|
|
71
71
|
}));
|
|
72
72
|
return a == null ? void 0 : a.map((y) => ({ label: y.itemText, value: y.itemValue }));
|
|
73
73
|
}, B = async () => {
|
|
@@ -75,22 +75,22 @@ const pe = /* @__PURE__ */ T({
|
|
|
75
75
|
if (!l.value)
|
|
76
76
|
try {
|
|
77
77
|
l.value = !0;
|
|
78
|
-
const a = await ((r =
|
|
79
|
-
await s.api(a), l.value = !1,
|
|
78
|
+
const a = await ((r = u.value) == null ? void 0 : r.validateFields());
|
|
79
|
+
await s.api(a), l.value = !1, E.success("操作成功"), f();
|
|
80
80
|
} catch {
|
|
81
81
|
l.value = !1;
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
}, f = () => {
|
|
85
|
-
|
|
86
|
-
console.log(
|
|
85
|
+
T(!1), i.value = !1, setTimeout(() => {
|
|
86
|
+
console.log(i.value);
|
|
87
87
|
}, 500), m("modalClose");
|
|
88
88
|
};
|
|
89
|
-
return (r, a) => (
|
|
90
|
-
t(e(I),
|
|
89
|
+
return (r, a) => (L(), N("div", null, [
|
|
90
|
+
t(e(I), P(s, {
|
|
91
91
|
width: 600,
|
|
92
92
|
centered: !0,
|
|
93
|
-
open: e(
|
|
93
|
+
open: e(i),
|
|
94
94
|
title: e(o)("ap.workOrderModal.createTickets"),
|
|
95
95
|
"ok-text": e(o)("ap.workOrderModal.submit"),
|
|
96
96
|
"cancel-text": e(o)("ap.workOrderModal.cancel"),
|
|
@@ -103,20 +103,20 @@ const pe = /* @__PURE__ */ T({
|
|
|
103
103
|
onCancel: f
|
|
104
104
|
}), {
|
|
105
105
|
default: n(() => [
|
|
106
|
-
t(e(
|
|
106
|
+
t(e(c), {
|
|
107
107
|
ref_key: "formRef",
|
|
108
|
-
ref:
|
|
108
|
+
ref: u,
|
|
109
109
|
colon: ""
|
|
110
110
|
}, {
|
|
111
111
|
default: n(() => [
|
|
112
|
-
t(e(
|
|
112
|
+
t(e(c).FormItem, {
|
|
113
113
|
label: e(o)("ap.workOrderModal.ticketsTitle"),
|
|
114
114
|
name: "ticketsTitle",
|
|
115
115
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }]
|
|
116
116
|
}, {
|
|
117
117
|
default: n(() => [
|
|
118
118
|
t(e(A), {
|
|
119
|
-
placeholder: e(o)("ap.
|
|
119
|
+
placeholder: e(o)("ap.common.inputText"),
|
|
120
120
|
maxlength: 50,
|
|
121
121
|
"show-count": !0
|
|
122
122
|
}, null, 8, ["placeholder"])
|
|
@@ -128,11 +128,11 @@ const pe = /* @__PURE__ */ T({
|
|
|
128
128
|
name: "ticketsType",
|
|
129
129
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
|
|
130
130
|
field: {
|
|
131
|
-
placeholder: e(o)("ap.
|
|
132
|
-
request: () =>
|
|
131
|
+
placeholder: e(o)("ap.common.chooseText"),
|
|
132
|
+
request: () => d(e(b).TicketsType)
|
|
133
133
|
}
|
|
134
134
|
}, null, 8, ["label", "rules", "field"]),
|
|
135
|
-
t(e(
|
|
135
|
+
t(e(c).FormItem, {
|
|
136
136
|
label: e(o)("ap.workOrderModal.ticketsDetail"),
|
|
137
137
|
name: "ticketsContent",
|
|
138
138
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }]
|
|
@@ -151,10 +151,10 @@ const pe = /* @__PURE__ */ T({
|
|
|
151
151
|
name: "ticketsLevel",
|
|
152
152
|
rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
|
|
153
153
|
field: {
|
|
154
|
-
request: () =>
|
|
154
|
+
request: () => d(e(b).TicketsLevel)
|
|
155
155
|
}
|
|
156
156
|
}, null, 8, ["label", "rules", "field"]),
|
|
157
|
-
t(e(
|
|
157
|
+
t(e(c).FormItem, {
|
|
158
158
|
name: "files",
|
|
159
159
|
label: e(o)("ap.workOrderModal.fileLabel")
|
|
160
160
|
}, {
|
|
@@ -170,7 +170,7 @@ const pe = /* @__PURE__ */ T({
|
|
|
170
170
|
accept: ".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx",
|
|
171
171
|
"max-count": 10,
|
|
172
172
|
"max-size": 50,
|
|
173
|
-
"sub-title":
|
|
173
|
+
"sub-title": q(U)
|
|
174
174
|
}, null, 8, ["get-oss-access", "sub-title"])
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
@@ -61,8 +61,8 @@ declare function __VLS_template(): {
|
|
|
61
61
|
popupClassName: StringConstructor;
|
|
62
62
|
dropdownClassName: StringConstructor;
|
|
63
63
|
placement: {
|
|
64
|
-
type: PropType<"
|
|
65
|
-
default: "
|
|
64
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
65
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
66
66
|
};
|
|
67
67
|
status: {
|
|
68
68
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -208,7 +208,7 @@ declare function __VLS_template(): {
|
|
|
208
208
|
status: "" | "error" | "warning";
|
|
209
209
|
defaultValue: SelectValue;
|
|
210
210
|
'onUpdate:value': (val: SelectValue) => void;
|
|
211
|
-
placement: "
|
|
211
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
212
212
|
loading: boolean;
|
|
213
213
|
bordered: boolean;
|
|
214
214
|
allowClear: boolean;
|
|
@@ -272,8 +272,8 @@ declare function __VLS_template(): {
|
|
|
272
272
|
popupClassName: StringConstructor;
|
|
273
273
|
dropdownClassName: StringConstructor;
|
|
274
274
|
placement: {
|
|
275
|
-
type: PropType<"
|
|
276
|
-
default: "
|
|
275
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
276
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
277
277
|
};
|
|
278
278
|
status: {
|
|
279
279
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -419,7 +419,7 @@ declare function __VLS_template(): {
|
|
|
419
419
|
status: "" | "error" | "warning";
|
|
420
420
|
defaultValue: SelectValue;
|
|
421
421
|
'onUpdate:value': (val: SelectValue) => void;
|
|
422
|
-
placement: "
|
|
422
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
423
423
|
loading: boolean;
|
|
424
424
|
bordered: boolean;
|
|
425
425
|
allowClear: boolean;
|
|
@@ -497,8 +497,8 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
497
497
|
popupClassName: StringConstructor;
|
|
498
498
|
dropdownClassName: StringConstructor;
|
|
499
499
|
placement: {
|
|
500
|
-
type: PropType<"
|
|
501
|
-
default: "
|
|
500
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
501
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
502
502
|
};
|
|
503
503
|
status: {
|
|
504
504
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -644,7 +644,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
644
644
|
status: "" | "error" | "warning";
|
|
645
645
|
defaultValue: SelectValue;
|
|
646
646
|
'onUpdate:value': (val: SelectValue) => void;
|
|
647
|
-
placement: "
|
|
647
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
648
648
|
loading: boolean;
|
|
649
649
|
bordered: boolean;
|
|
650
650
|
allowClear: boolean;
|
|
@@ -708,8 +708,8 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
708
708
|
popupClassName: StringConstructor;
|
|
709
709
|
dropdownClassName: StringConstructor;
|
|
710
710
|
placement: {
|
|
711
|
-
type: PropType<"
|
|
712
|
-
default: "
|
|
711
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
712
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
713
713
|
};
|
|
714
714
|
status: {
|
|
715
715
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -855,7 +855,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
855
855
|
status: "" | "error" | "warning";
|
|
856
856
|
defaultValue: SelectValue;
|
|
857
857
|
'onUpdate:value': (val: SelectValue) => void;
|
|
858
|
-
placement: "
|
|
858
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
859
859
|
loading: boolean;
|
|
860
860
|
bordered: boolean;
|
|
861
861
|
allowClear: boolean;
|
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@aplus-frontend/antdv");require("./utils/index.js");const n=require("lodash-unified");require("./interface.js");const a=require("./utils/createModal.js"),t=require("./utils/createModalStream.js"),r=require("./utils/methods.js"),e=n.omit(o.Modal,["confirm","warning","warn","error","success","info"]);e.createModal=a.createModal;e.createModalStream=t.createModalStream;e.confirm=r.methodsFn("confirm");e.warning=r.methodsFn("warning");e.warn=r.methodsFn("warning");e.error=r.methodsFn("error");e.success=r.methodsFn("success");e.info=r.methodsFn("info");e.name="ApModal";exports.ApModal=e;
|
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),N=require("@aplus-frontend/antdv"),m=require("../../config-provider/config-provider.js"),k=require("lodash-unified"),M=require("@aplus-frontend/utils");require("../../config-provider/index.js");const v=require("./util.js"),L=require("../../utils/index.js"),T=require("../../config-provider/hooks/use-namespace.js"),V=p=>{var C,g;let t,r;const{destroyOnClose:l=!0,wrapperOffset:s=!1}=p,{b:u}=T.useNamespace("ap-modal");function f(){t&&t(!1),setTimeout(()=>{var e;o.render(null,a),(e=a.parentElement)==null||e.removeChild(a)},500)}function y(){t&&t(!0)}function h(){t&&t(!1)}function O(e){r&&r(e)}const q=o.defineComponent({data(){return{open:l,props:p}},created(){t=e=>{this.open=e},r=e=>{this.props={...this.props,...e}}},methods:{async handleCancel(){var e,n,i,c,d;if((e=this.props)!=null&&e.onCancel){const x=((c=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:c.exposed)??void 0;await((d=this.props)==null?void 0:d.onCancel(x))}l?f():h()},async handleOk(){var e,n,i,c;try{if(r({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const d=((c=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:c.exposed)??void 0;await this.props.onOk(d)}r({confirmLoading:!1}),l?f():h()}catch{r({confirmLoading:!1})}}},render(){const e=k.omit(this.props,["onCancel","onOk","open","onUpdate:open","getContainer","icon"]);return o.createVNode(m.ConfigProvider,m.globalConfigCached.value,{default:()=>[o.createVNode(N.Modal,o.mergeProps({class:{[u()]:!0,[u("wrapper")]:s},open:this.open,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[o.createVNode("div",{class:{[u("body-wrapper")]:s},style:s===!1?{}:{maxHeight:`${window.innerHeight-(s===!0?100:M.isNumeric(s)?Number(s):100)*2}px`}},[(n=this.props)==null?void 0:n.content])]}})]})}}),b=v.getContainerDom((g=(C=m.globalConfigCached)==null?void 0:C.value)==null?void 0:g.getPopupContainer),w=v.getContainerDom(p.getContainer),P=b||w||L.getTopWindow().document.body,a=document.createElement("div");return P.appendChild(a),o.render(o.h(q),a),{destroy:f,update:O,open:y,close:h}};exports.createModal=V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./createModal.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./createModal.js"),t=require("./createModalStream.js"),r=require("./methods.js");exports.createModal=e.createModal;exports.createModalStream=t.createModalStream;exports.methodsFn=r.methodsFn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),C=require("@aplus-frontend/antdv"),n=require("../../config-provider/config-provider.js"),c=require("./util.js"),h=require("../../utils/index.js"),f=l=>r=>{var a,i;let d;const s=t.defineComponent({data(){const[e,o]=C.Modal.useModal();return{modal:e,contextHolder:o}},mounted(){var e,o;d=(o=(e=this.modal)==null?void 0:e[l])==null?void 0:o.call(e,r)},render(){return t.createVNode(n.ConfigProvider,n.globalConfigCached.value,{default:()=>{var e;return[(e=this.contextHolder)==null?void 0:e.call(this)]}})}}),u=c.getContainerDom((i=(a=n.globalConfigCached)==null?void 0:a.value)==null?void 0:i.getPopupContainer),m=c.getContainerDom(r.getContainer),g=u||m||h.getTopWindow().document.body;return t.render(t.h(s),g),d};exports.methodsFn=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getContainerDom: (params?: HTMLElement | Element | (() => HTMLElement | Element)) => Element | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>typeof t=="function"?t==null?void 0:t():t;exports.getContainerDom=e;
|
|
@@ -2649,8 +2649,8 @@ export declare const apTableRenderItemMap: {
|
|
|
2649
2649
|
popupClassName: StringConstructor;
|
|
2650
2650
|
dropdownClassName: StringConstructor;
|
|
2651
2651
|
placement: {
|
|
2652
|
-
type: PropType<"
|
|
2653
|
-
default: "
|
|
2652
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
2653
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
2654
2654
|
};
|
|
2655
2655
|
status: {
|
|
2656
2656
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -2796,7 +2796,7 @@ export declare const apTableRenderItemMap: {
|
|
|
2796
2796
|
status: "" | "error" | "warning";
|
|
2797
2797
|
defaultValue: SelectValue;
|
|
2798
2798
|
'onUpdate:value': (val: SelectValue) => void;
|
|
2799
|
-
placement: "
|
|
2799
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
2800
2800
|
loading: boolean;
|
|
2801
2801
|
bordered: boolean;
|
|
2802
2802
|
allowClear: boolean;
|
|
@@ -2860,8 +2860,8 @@ export declare const apTableRenderItemMap: {
|
|
|
2860
2860
|
popupClassName: StringConstructor;
|
|
2861
2861
|
dropdownClassName: StringConstructor;
|
|
2862
2862
|
placement: {
|
|
2863
|
-
type: PropType<"
|
|
2864
|
-
default: "
|
|
2863
|
+
type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
|
|
2864
|
+
default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
2865
2865
|
};
|
|
2866
2866
|
status: {
|
|
2867
2867
|
type: PropType<"" | "error" | "warning">;
|
|
@@ -3007,7 +3007,7 @@ export declare const apTableRenderItemMap: {
|
|
|
3007
3007
|
status: "" | "error" | "warning";
|
|
3008
3008
|
defaultValue: SelectValue;
|
|
3009
3009
|
'onUpdate:value': (val: SelectValue) => void;
|
|
3010
|
-
placement: "
|
|
3010
|
+
placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
3011
3011
|
loading: boolean;
|
|
3012
3012
|
bordered: boolean;
|
|
3013
3013
|
allowClear: boolean;
|
|
@@ -264,7 +264,7 @@ declare const ApBatchActionGroup: {
|
|
|
264
264
|
};
|
|
265
265
|
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
266
266
|
transitionName: StringConstructor;
|
|
267
|
-
placement: PropType<"top" | "bottom" | "
|
|
267
|
+
placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
|
|
268
268
|
overlayClassName: StringConstructor;
|
|
269
269
|
overlayStyle: {
|
|
270
270
|
type: PropType<CSSProperties>;
|
|
@@ -565,7 +565,7 @@ declare const ApBatchActionGroup: {
|
|
|
565
565
|
};
|
|
566
566
|
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
567
567
|
transitionName: StringConstructor;
|
|
568
|
-
placement: PropType<"top" | "bottom" | "
|
|
568
|
+
placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
|
|
569
569
|
overlayClassName: StringConstructor;
|
|
570
570
|
overlayStyle: {
|
|
571
571
|
type: PropType<CSSProperties>;
|
|
@@ -863,7 +863,7 @@ declare const ApBatchActionGroup: {
|
|
|
863
863
|
};
|
|
864
864
|
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
865
865
|
transitionName: StringConstructor;
|
|
866
|
-
placement: PropType<"top" | "bottom" | "
|
|
866
|
+
placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
|
|
867
867
|
overlayClassName: StringConstructor;
|
|
868
868
|
overlayStyle: {
|
|
869
869
|
type: PropType<CSSProperties>;
|