@dazhicheng/ui 1.6.81 → 1.6.83
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/dist/components/tt-modal/src/RenderModal.vue.js +179 -171
- package/dist/components/tt-modal/src/utils/modal-z-index.d.ts +20 -0
- package/dist/components/tt-modal/src/utils/modal-z-index.js +26 -16
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +3 -3
- package/dist/components/tt-panel-select/src/index.vue.js +251 -242
- package/dist/components/tt-table/src/hooks/useTableFooter.js +34 -24
- package/dist/packages/utils/src/calc.js +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as Ye, inject as Ge, ref as k, useAttrs as Je, useSlots as Qe, getCurrentInstance as Xe, computed as m, unref as o, watch as
|
|
1
|
+
import { defineComponent as Ye, inject as Ge, ref as k, useAttrs as Je, useSlots as Qe, getCurrentInstance as Xe, computed as m, unref as o, watch as H, reactive as We, nextTick as x, provide as eo, onMounted as oo, onDeactivated as to, onActivated as io, onUnmounted as lo, withDirectives as no, createElementBlock as so, openBlock as ro, createVNode as $, mergeProps as pe, h as ao, createSlots as Z, withCtx as f, normalizeClass as uo, renderSlot as T, renderList as N, normalizeProps as q, guardReactiveProps as K, createElementVNode as po } from "vue";
|
|
2
2
|
import { TtIcon as co } from "../../tt-icon/index.js";
|
|
3
3
|
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
4
4
|
import { useDesign as fo } from "../../../packages/hooks/src/useDesign.js";
|
|
5
5
|
import { usePriorityValues as mo, getPriorityValues as vo } from "../../../packages/hooks/src/usePriorityValue.js";
|
|
6
6
|
import "axios";
|
|
7
|
-
import { dialogProps as
|
|
7
|
+
import { dialogProps as ce, useZIndex as go, ElDialog as bo } from "element-plus";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "numeral";
|
|
10
|
-
import { generateTestId as
|
|
10
|
+
import { generateTestId as U, toKebabCase as To } from "../../../packages/utils/src/testid-helper.js";
|
|
11
11
|
import "xe-utils";
|
|
12
12
|
import "dayjs/plugin/utc";
|
|
13
13
|
import "dayjs/plugin/timezone";
|
|
@@ -17,27 +17,27 @@ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.j
|
|
|
17
17
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
18
18
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
19
19
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
20
|
-
import { omit as
|
|
20
|
+
import { omit as fe, pick as Y } from "lodash-es";
|
|
21
21
|
import "vue-router";
|
|
22
|
-
import
|
|
22
|
+
import Co from "../../../directives/dialog-resize/index.js";
|
|
23
23
|
import { useStore as ho } from "@tanstack/vue-store";
|
|
24
24
|
import ko from "./components/ModalFooter.vue.js";
|
|
25
25
|
import yo from "./components/ModalHeader.vue.js";
|
|
26
26
|
import Oo from "./components/ModalWrapper.vue.js";
|
|
27
|
-
import { basicProps as
|
|
28
|
-
import { ModalApi as
|
|
29
|
-
import { resolveModalTarget as
|
|
30
|
-
import { allocateModalZIndex as Fo } from "./utils/modal-z-index.js";
|
|
27
|
+
import { basicProps as Po } from "./props.js";
|
|
28
|
+
import { ModalApi as Bo } from "./utils/modal-api.js";
|
|
29
|
+
import { resolveModalTarget as me, MODAL_OVERLAY_CLASS as Io, MODAL_OVERLAY_CONTAINED_CLASS as G, findTopOpenModalOverlayHost as So, ensureContainedOverlayStyle as Ao, applyContainedOverlayInline as J, watchOverlayThenSuspend as ve, suspendOverlayByUid as Mo, resumeOverlayByUid as wo } from "./utils/resolve-modal-target.js";
|
|
30
|
+
import { allocateModalZIndex as Fo, syncElementPlusZIndexToOverlay as xo } from "./utils/modal-z-index.js";
|
|
31
31
|
import { MODAL_OWNER_ACTIVE_KEY as $o, getClientDocument as Do } from "./utils/modal-scope.js";
|
|
32
|
-
import { pushModal as
|
|
33
|
-
import { emitModalCloseTransitionEnd as
|
|
34
|
-
import
|
|
35
|
-
const
|
|
32
|
+
import { pushModal as ge, removeModal as Q } from "./utils/modal-stack.js";
|
|
33
|
+
import { emitModalCloseTransitionEnd as Eo } from "./utils/modal-close-transition.js";
|
|
34
|
+
import Lo from "../../../assets/svg/close.svg.js";
|
|
35
|
+
const _o = ["aria-tt-id", "data-testid"], Ro = ["data-testid"], ht = /* @__PURE__ */ Ye({
|
|
36
36
|
name: "TtModal",
|
|
37
37
|
__name: "RenderModal",
|
|
38
38
|
props: {
|
|
39
|
-
...
|
|
40
|
-
...
|
|
39
|
+
...ce,
|
|
40
|
+
...Po,
|
|
41
41
|
/** modalApi */
|
|
42
42
|
modalApi: {
|
|
43
43
|
type: Object,
|
|
@@ -45,33 +45,33 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
emits: ["visible-change", "register", "update:visible"],
|
|
48
|
-
setup(
|
|
49
|
-
var
|
|
50
|
-
const d =
|
|
48
|
+
setup(be, { expose: Te, emit: Ce }) {
|
|
49
|
+
var de;
|
|
50
|
+
const d = be, v = Ge($o, void 0), D = Ce, y = k(), { prefixCls: he } = fo("modal"), p = Je(), ke = Qe(), t = Xe(), X = k(!1), E = k(), L = k(), W = go();
|
|
51
51
|
let r = d.modalApi;
|
|
52
52
|
if (!r) {
|
|
53
53
|
const e = d.okButtonProps ? {
|
|
54
54
|
...d.okButtonProps,
|
|
55
55
|
disabledTip: Array.isArray(d.okButtonProps.disabledTip) ? d.okButtonProps.disabledTip : d.okButtonProps.disabledTip ? [d.okButtonProps.disabledTip] : void 0
|
|
56
|
-
} : void 0,
|
|
56
|
+
} : void 0, l = {
|
|
57
57
|
...d,
|
|
58
58
|
okButtonProps: e
|
|
59
59
|
};
|
|
60
|
-
r = new
|
|
61
|
-
const
|
|
62
|
-
return ho(r.store,
|
|
60
|
+
r = new Bo(l), r.useStore = (n) => {
|
|
61
|
+
const i = n ?? ((s) => s);
|
|
62
|
+
return ho(r.store, i);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
const g = (
|
|
66
|
-
visible:
|
|
67
|
-
title:
|
|
68
|
-
width:
|
|
69
|
-
size:
|
|
65
|
+
const g = (de = r.useStore) == null ? void 0 : de.call(r), {
|
|
66
|
+
visible: C,
|
|
67
|
+
title: ee,
|
|
68
|
+
width: oe,
|
|
69
|
+
size: te,
|
|
70
70
|
fullscreen: ye,
|
|
71
71
|
resizer: Oe,
|
|
72
|
-
top:
|
|
73
|
-
isBottom:
|
|
74
|
-
draggable:
|
|
72
|
+
top: Pe,
|
|
73
|
+
isBottom: ie,
|
|
74
|
+
draggable: Be,
|
|
75
75
|
showCancelBtn: Ie,
|
|
76
76
|
okText: Se,
|
|
77
77
|
cancelText: Ae,
|
|
@@ -79,57 +79,57 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
79
79
|
cancelButtonProps: Me,
|
|
80
80
|
confirmLoading: we,
|
|
81
81
|
cancelLoading: Fe,
|
|
82
|
-
showOkBtn:
|
|
83
|
-
loading:
|
|
84
|
-
height:
|
|
85
|
-
showFooter:
|
|
86
|
-
loadingTip:
|
|
87
|
-
...
|
|
88
|
-
} = mo(d, g),
|
|
82
|
+
showOkBtn: xe,
|
|
83
|
+
loading: le,
|
|
84
|
+
height: $e,
|
|
85
|
+
showFooter: ne,
|
|
86
|
+
loadingTip: De,
|
|
87
|
+
...Ee
|
|
88
|
+
} = mo(d, g), Le = m(() => {
|
|
89
89
|
const e = {
|
|
90
90
|
mini: "448px",
|
|
91
91
|
small: "592px",
|
|
92
92
|
medium: "876px"
|
|
93
93
|
};
|
|
94
|
-
return o(
|
|
95
|
-
}),
|
|
96
|
-
var
|
|
97
|
-
const e = vo(
|
|
98
|
-
...
|
|
99
|
-
...
|
|
100
|
-
},
|
|
94
|
+
return o(oe) ? o(oe) : e[o(te)] ? e[o(te)] : "500px";
|
|
95
|
+
}), M = m(() => {
|
|
96
|
+
var ue;
|
|
97
|
+
const e = vo(Ee), l = fe(p, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]), i = {
|
|
98
|
+
...Y(e, Object.keys(ce)),
|
|
99
|
+
...l
|
|
100
|
+
}, s = i.appendToBody === !0 || i["append-to-body"] === !0 || i["append-to-body"] === "", u = i.appendTo && i.appendTo !== "body" ? i.appendTo : void 0, S = !s && !u, z = S ? L.value : void 0;
|
|
101
101
|
let h = null;
|
|
102
|
-
|
|
103
|
-
const
|
|
102
|
+
z ? h = z === ((ue = Do()) == null ? void 0 : ue.body) ? null : z : S && (h = me());
|
|
103
|
+
const j = !!h, Ke = s || !u && !h, Ue = j || o(ie) ? "40px" : "15vh";
|
|
104
104
|
return {
|
|
105
|
-
...
|
|
106
|
-
modelValue: o(
|
|
107
|
-
width: o(
|
|
105
|
+
...i,
|
|
106
|
+
modelValue: o(C),
|
|
107
|
+
width: o(Le),
|
|
108
108
|
destroyOnClose: !0,
|
|
109
109
|
// 默认 false;可通过 modalProps.closeOnClickModal 开启点击遮罩关闭
|
|
110
110
|
closeOnClickModal: e.closeOnClickModal ?? !1,
|
|
111
111
|
// 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
|
|
112
112
|
// 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
|
|
113
113
|
closeOnPressEscape: !1,
|
|
114
|
-
top: o(
|
|
114
|
+
top: o(Pe) ?? Ue,
|
|
115
115
|
fullscreen: !1,
|
|
116
116
|
draggable: !1,
|
|
117
117
|
// 外部显式指定优先;否则用打开时申请到的层级,element-plus 自己的 nextZIndex 不参与决策
|
|
118
|
-
zIndex:
|
|
118
|
+
zIndex: i.zIndex ?? E.value,
|
|
119
119
|
appendToBody: Ke,
|
|
120
120
|
...u ? { appendTo: u } : h ? { appendTo: h } : { appendTo: "body" },
|
|
121
121
|
// 区域遮罩不锁整页滚动,避免侧栏能点却滚不动
|
|
122
|
-
lockScroll:
|
|
122
|
+
lockScroll: j ? i.lockScroll ?? !1 : i.lockScroll ?? !0,
|
|
123
123
|
modalClass: [
|
|
124
|
-
|
|
124
|
+
i.modalClass || e.modalClass || "",
|
|
125
125
|
Io,
|
|
126
126
|
`tt-id-${t == null ? void 0 : t.uid}`,
|
|
127
|
-
|
|
127
|
+
j ? G : ""
|
|
128
128
|
].filter(Boolean).join(" ")
|
|
129
129
|
};
|
|
130
130
|
}), _e = m(() => {
|
|
131
|
-
var
|
|
132
|
-
return String(((
|
|
131
|
+
var l;
|
|
132
|
+
return String(((l = M.value) == null ? void 0 : l.modalClass) || "").includes(G);
|
|
133
133
|
}), Re = m(() => ({
|
|
134
134
|
showCancelBtn: o(Ie),
|
|
135
135
|
okText: o(Se),
|
|
@@ -138,76 +138,84 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
138
138
|
cancelButtonProps: o(Me),
|
|
139
139
|
confirmLoading: o(we),
|
|
140
140
|
cancelLoading: o(Fe),
|
|
141
|
-
showOkBtn: o(
|
|
141
|
+
showOkBtn: o(xe)
|
|
142
142
|
})), se = m(() => {
|
|
143
|
-
var
|
|
144
|
-
const e = (
|
|
145
|
-
return e ||
|
|
143
|
+
var s, u;
|
|
144
|
+
const e = (s = o(A)) == null ? void 0 : s.disabled, l = o(le), n = (u = o(A)) == null ? void 0 : u.disabledTip, i = Array.isArray(n) ? n : n ? [n] : [];
|
|
145
|
+
return e || l ? [!0, i] : [!1, []];
|
|
146
146
|
});
|
|
147
|
-
|
|
147
|
+
H(
|
|
148
148
|
() => {
|
|
149
149
|
var e;
|
|
150
150
|
return (e = g.value) == null ? void 0 : e.visible;
|
|
151
151
|
},
|
|
152
152
|
(e) => {
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
(t == null ? void 0 : t.uid)
|
|
156
|
-
|
|
153
|
+
var l, n;
|
|
154
|
+
if (e) {
|
|
155
|
+
L.value = So(t == null ? void 0 : t.uid, me()) ?? void 0, E.value = Fo(W);
|
|
156
|
+
const i = (l = M.value) == null ? void 0 : l.zIndex;
|
|
157
|
+
xo(
|
|
158
|
+
W,
|
|
159
|
+
typeof i == "number" ? i : E.value
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
e !== C.value && (D("visible-change", !!e), D("update:visible", !!e)), t && ((n = O.emitVisible) == null || n.call(O, !!e, t == null ? void 0 : t.uid)), t != null && t.uid && (e ? (qe(), (v == null ? void 0 : v.value) === !1 && F(), b.value || ge({ uid: t.uid, close: () => r.onClosed() }), Ao(), x(() => {
|
|
163
|
+
(t == null ? void 0 : t.uid) != null && (J(t.uid), b.value && (a == null || a(), a = ve(t.uid)), requestAnimationFrame(() => {
|
|
164
|
+
(t == null ? void 0 : t.uid) != null && (J(t.uid), b.value && Mo(t.uid));
|
|
157
165
|
}));
|
|
158
|
-
})) : (
|
|
166
|
+
})) : (ae(), Q(t.uid))), e || r.changeOkLoading(!1);
|
|
159
167
|
},
|
|
160
168
|
{
|
|
161
169
|
immediate: !1
|
|
162
170
|
}
|
|
163
|
-
),
|
|
164
|
-
() => o(
|
|
171
|
+
), H(
|
|
172
|
+
() => o(C),
|
|
165
173
|
(e) => {
|
|
166
|
-
var
|
|
167
|
-
e !== ((
|
|
174
|
+
var l;
|
|
175
|
+
e !== ((l = g.value) == null ? void 0 : l.visible) && r.setState({ visible: e }), e || r.changeOkLoading(!1);
|
|
168
176
|
},
|
|
169
177
|
{
|
|
170
178
|
immediate: !1
|
|
171
179
|
}
|
|
172
180
|
);
|
|
173
181
|
function Ve(e) {
|
|
174
|
-
|
|
182
|
+
X.value = e;
|
|
175
183
|
}
|
|
176
184
|
function ze() {
|
|
177
|
-
|
|
185
|
+
Eo(r);
|
|
178
186
|
}
|
|
179
187
|
function je() {
|
|
180
|
-
document.querySelectorAll(".el-select__popper").forEach((
|
|
181
|
-
|
|
188
|
+
document.querySelectorAll(".el-select__popper").forEach((l) => {
|
|
189
|
+
l.style.display !== "none" && (l.style.display = "none");
|
|
182
190
|
});
|
|
183
191
|
}
|
|
184
|
-
function
|
|
192
|
+
function _(e) {
|
|
185
193
|
return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
|
|
186
194
|
}
|
|
187
195
|
function He() {
|
|
188
196
|
const e = p["data-testid"] || p.dataTestid || p.testId || p["test-id"];
|
|
189
197
|
return e && typeof e == "string" ? e : void 0;
|
|
190
198
|
}
|
|
191
|
-
const
|
|
192
|
-
var
|
|
193
|
-
const e = (
|
|
199
|
+
const w = m(() => {
|
|
200
|
+
var s;
|
|
201
|
+
const e = (s = g.value) == null ? void 0 : s.testId;
|
|
194
202
|
if (e)
|
|
195
|
-
return
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
return
|
|
202
|
-
const
|
|
203
|
-
return
|
|
204
|
-
}),
|
|
205
|
-
eo("modalIdContext",
|
|
203
|
+
return _(e);
|
|
204
|
+
const l = d.testId;
|
|
205
|
+
if (l)
|
|
206
|
+
return _(l);
|
|
207
|
+
const n = He();
|
|
208
|
+
if (n)
|
|
209
|
+
return _(n);
|
|
210
|
+
const i = o(ee);
|
|
211
|
+
return i && typeof i == "string" && i.trim() ? U("modal", To(i)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
|
|
212
|
+
}), Ze = m(() => U(w.value, "footer")), Ne = m(() => U(w.value, "body"));
|
|
213
|
+
eo("modalIdContext", w);
|
|
206
214
|
const O = We({
|
|
207
215
|
setModalProps: r.setState,
|
|
208
216
|
emitVisible: void 0,
|
|
209
217
|
redoModalHeight: () => {
|
|
210
|
-
|
|
218
|
+
x(() => {
|
|
211
219
|
o(y) && o(y).setModalHeight();
|
|
212
220
|
});
|
|
213
221
|
},
|
|
@@ -217,47 +225,47 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
217
225
|
}
|
|
218
226
|
});
|
|
219
227
|
t && D("register", O, `${t == null ? void 0 : t.uid}`);
|
|
220
|
-
const b = k(!1),
|
|
221
|
-
let a,
|
|
222
|
-
function
|
|
223
|
-
var
|
|
224
|
-
return String(((
|
|
228
|
+
const b = k(!1), P = k(null);
|
|
229
|
+
let a, B, c, I = 0;
|
|
230
|
+
function R() {
|
|
231
|
+
var l;
|
|
232
|
+
return String(((l = M.value) == null ? void 0 : l.modalClass) || "").includes(G);
|
|
225
233
|
}
|
|
226
|
-
function
|
|
227
|
-
var
|
|
234
|
+
function re() {
|
|
235
|
+
var l, n;
|
|
228
236
|
const e = t == null ? void 0 : t.appContext.config.globalProperties.$router;
|
|
229
|
-
return ((
|
|
237
|
+
return ((n = (l = e == null ? void 0 : e.currentRoute) == null ? void 0 : l.value) == null ? void 0 : n.path) ?? null;
|
|
230
238
|
}
|
|
231
239
|
function qe() {
|
|
232
|
-
if (!
|
|
233
|
-
|
|
240
|
+
if (!R()) {
|
|
241
|
+
P.value = null;
|
|
234
242
|
return;
|
|
235
243
|
}
|
|
236
|
-
|
|
244
|
+
P.value = re();
|
|
237
245
|
}
|
|
238
|
-
function
|
|
239
|
-
c !== void 0 && (window.cancelAnimationFrame(c), c = void 0), I += 1, a == null || a(), a = void 0, b.value = !1,
|
|
246
|
+
function ae() {
|
|
247
|
+
c !== void 0 && (window.cancelAnimationFrame(c), c = void 0), I += 1, a == null || a(), a = void 0, b.value = !1, P.value = null;
|
|
240
248
|
}
|
|
241
|
-
function
|
|
242
|
-
var
|
|
249
|
+
function F() {
|
|
250
|
+
var n;
|
|
243
251
|
const e = t == null ? void 0 : t.uid;
|
|
244
|
-
e == null || !(o(
|
|
252
|
+
e == null || !(o(C) || (n = g.value) != null && n.visible) || !R() || (c !== void 0 && (window.cancelAnimationFrame(c), c = void 0), I += 1, b.value = !0, a == null || a(), a = ve(e), Q(e));
|
|
245
253
|
}
|
|
246
|
-
function
|
|
254
|
+
function V() {
|
|
247
255
|
const e = t == null ? void 0 : t.uid;
|
|
248
256
|
if (e == null || !b.value || c !== void 0) return;
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var
|
|
253
|
-
if (c = void 0,
|
|
254
|
-
const
|
|
255
|
-
|
|
257
|
+
const l = ++I;
|
|
258
|
+
x(() => {
|
|
259
|
+
l === I && (c = window.requestAnimationFrame(() => {
|
|
260
|
+
var s;
|
|
261
|
+
if (c = void 0, l !== I) return;
|
|
262
|
+
const n = !!(o(C) || (s = g.value) != null && s.visible), i = P.value;
|
|
263
|
+
n && ((v ? !v.value : !i || re() !== i) || (a == null || a(), a = void 0, b.value = !1, wo(e), ge({ uid: e, close: () => r.onClosed() }), x(() => J(e))));
|
|
256
264
|
}));
|
|
257
265
|
});
|
|
258
266
|
}
|
|
259
267
|
return oo(() => {
|
|
260
|
-
const e =
|
|
268
|
+
const e = Y(p, ["onVisibleChange", "onClosed", "onOk"]);
|
|
261
269
|
r.mount(
|
|
262
270
|
{
|
|
263
271
|
...e,
|
|
@@ -265,59 +273,59 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
265
273
|
},
|
|
266
274
|
O
|
|
267
275
|
);
|
|
268
|
-
const
|
|
269
|
-
v || !(
|
|
276
|
+
const l = t == null ? void 0 : t.appContext.config.globalProperties.$router;
|
|
277
|
+
v || !(l != null && l.afterEach) || (B = l.afterEach((n, i) => {
|
|
270
278
|
var S;
|
|
271
|
-
if (!(
|
|
272
|
-
const u =
|
|
273
|
-
u && (
|
|
279
|
+
if (!(n != null && n.path) || n.path === (i == null ? void 0 : i.path) || !R() || !!!(o(C) || (S = g.value) != null && S.visible)) return;
|
|
280
|
+
const u = P.value;
|
|
281
|
+
u && (n.path !== u ? F() : V());
|
|
274
282
|
}));
|
|
275
283
|
}), to(() => {
|
|
276
|
-
|
|
284
|
+
F();
|
|
277
285
|
}), io(() => {
|
|
278
|
-
|
|
279
|
-
}),
|
|
286
|
+
V();
|
|
287
|
+
}), H(
|
|
280
288
|
v ?? (() => {
|
|
281
289
|
}),
|
|
282
290
|
(e) => {
|
|
283
|
-
e === !1 ?
|
|
291
|
+
e === !1 ? F() : e && V();
|
|
284
292
|
},
|
|
285
293
|
{ flush: "post" }
|
|
286
294
|
), lo(() => {
|
|
287
|
-
|
|
288
|
-
}),
|
|
295
|
+
ae(), B == null || B(), B = void 0, L.value = void 0, t != null && t.uid && Q(t.uid);
|
|
296
|
+
}), Te({
|
|
289
297
|
modalApi: r
|
|
290
|
-
}), (e,
|
|
291
|
-
var
|
|
292
|
-
return
|
|
293
|
-
"aria-tt-id": `tt-id-${(
|
|
294
|
-
"data-testid":
|
|
298
|
+
}), (e, l) => {
|
|
299
|
+
var n;
|
|
300
|
+
return no((ro(), so("div", {
|
|
301
|
+
"aria-tt-id": `tt-id-${(n = o(t)) == null ? void 0 : n.uid}`,
|
|
302
|
+
"data-testid": w.value
|
|
295
303
|
}, [
|
|
296
|
-
$(o(bo),
|
|
297
|
-
class: ["tt-ui-modal", o(
|
|
304
|
+
$(o(bo), pe(M.value, {
|
|
305
|
+
class: ["tt-ui-modal", o(he)],
|
|
298
306
|
"before-close": o(r).onClosed,
|
|
299
307
|
onClosed: ze,
|
|
300
308
|
"close-icon": () => ao(o(co), {
|
|
301
309
|
size: 16,
|
|
302
|
-
icon: o(
|
|
310
|
+
icon: o(Lo),
|
|
303
311
|
isCustomSvg: !0
|
|
304
312
|
})
|
|
305
|
-
}),
|
|
313
|
+
}), Z({
|
|
306
314
|
default: f(() => [
|
|
307
315
|
$(Oo, {
|
|
308
316
|
ref_key: "modalWrapperRef",
|
|
309
317
|
ref: y,
|
|
310
|
-
"is-bottom": o(
|
|
311
|
-
height: o(
|
|
312
|
-
loading: o(
|
|
313
|
-
"loading-tip": o(
|
|
318
|
+
"is-bottom": o(ie),
|
|
319
|
+
height: o($e),
|
|
320
|
+
loading: o(le),
|
|
321
|
+
"loading-tip": o(De),
|
|
314
322
|
contained: _e.value,
|
|
315
|
-
class: uo({ "pb-2!": !o(
|
|
316
|
-
"data-testid":
|
|
323
|
+
class: uo({ "pb-2!": !o(ne) }),
|
|
324
|
+
"data-testid": Ne.value,
|
|
317
325
|
onIsScroll: Ve
|
|
318
326
|
}, {
|
|
319
327
|
default: f(() => [
|
|
320
|
-
|
|
328
|
+
T(e.$slots, "default")
|
|
321
329
|
]),
|
|
322
330
|
_: 3
|
|
323
331
|
}, 8, ["is-bottom", "height", "loading", "loading-tip", "contained", "class", "data-testid"])
|
|
@@ -327,39 +335,39 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
327
335
|
e.$slots.header ? {
|
|
328
336
|
name: "header",
|
|
329
337
|
fn: f(() => [
|
|
330
|
-
|
|
338
|
+
T(e.$slots, "header")
|
|
331
339
|
]),
|
|
332
340
|
key: "1"
|
|
333
341
|
} : {
|
|
334
342
|
name: "header",
|
|
335
343
|
fn: f(() => [
|
|
336
344
|
$(yo, {
|
|
337
|
-
title: o(
|
|
345
|
+
title: o(ee),
|
|
338
346
|
onMousedown: je
|
|
339
|
-
},
|
|
347
|
+
}, Z({
|
|
340
348
|
titleToolbar: f(() => [
|
|
341
|
-
|
|
349
|
+
T(e.$slots, "titleToolbar")
|
|
342
350
|
]),
|
|
343
351
|
_: 2
|
|
344
352
|
}, [
|
|
345
|
-
N(Object.keys(e.$slots), (
|
|
346
|
-
name:
|
|
347
|
-
fn: f((
|
|
348
|
-
|
|
353
|
+
N(Object.keys(e.$slots), (i) => ({
|
|
354
|
+
name: i,
|
|
355
|
+
fn: f((s) => [
|
|
356
|
+
T(e.$slots, i, q(K(s || {})))
|
|
349
357
|
])
|
|
350
358
|
}))
|
|
351
359
|
]), 1032, ["title"])
|
|
352
360
|
]),
|
|
353
361
|
key: "0"
|
|
354
362
|
},
|
|
355
|
-
o(
|
|
363
|
+
o(ke).footer || o(ne) ? {
|
|
356
364
|
name: "footer",
|
|
357
365
|
fn: f(() => [
|
|
358
|
-
|
|
359
|
-
po("div", { "data-testid":
|
|
360
|
-
$(ko,
|
|
366
|
+
T(e.$slots, "footer", {}, () => [
|
|
367
|
+
po("div", { "data-testid": Ze.value }, [
|
|
368
|
+
$(ko, pe(Re.value, {
|
|
361
369
|
class: "footer",
|
|
362
|
-
style: { borderTop:
|
|
370
|
+
style: { borderTop: X.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
|
|
363
371
|
"ok-button-props": {
|
|
364
372
|
...o(A),
|
|
365
373
|
disabledTip: se.value[1],
|
|
@@ -367,23 +375,23 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
367
375
|
},
|
|
368
376
|
onFooterok: o(r).onOk,
|
|
369
377
|
onCancel: o(r).onClosed
|
|
370
|
-
}),
|
|
378
|
+
}), Z({ _: 2 }, [
|
|
371
379
|
N(Object.keys(
|
|
372
|
-
o(
|
|
373
|
-
), (
|
|
374
|
-
name:
|
|
375
|
-
fn: f((
|
|
376
|
-
|
|
380
|
+
o(Y)(e.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
|
|
381
|
+
), (i) => ({
|
|
382
|
+
name: i,
|
|
383
|
+
fn: f((s) => [
|
|
384
|
+
T(e.$slots, i, q(K({ ...s || {} })))
|
|
377
385
|
])
|
|
378
386
|
}))
|
|
379
387
|
]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
|
|
380
|
-
], 8,
|
|
388
|
+
], 8, Ro)
|
|
381
389
|
])
|
|
382
390
|
]),
|
|
383
391
|
key: "2"
|
|
384
392
|
} : void 0,
|
|
385
393
|
N(Object.keys(
|
|
386
|
-
o(
|
|
394
|
+
o(fe)(e.$slots, [
|
|
387
395
|
"default",
|
|
388
396
|
"titleToolbar",
|
|
389
397
|
"header",
|
|
@@ -393,16 +401,16 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
393
401
|
"centerFooter",
|
|
394
402
|
"appendFooter"
|
|
395
403
|
])
|
|
396
|
-
), (
|
|
397
|
-
name:
|
|
398
|
-
fn: f((
|
|
399
|
-
|
|
404
|
+
), (i) => ({
|
|
405
|
+
name: i,
|
|
406
|
+
fn: f((s) => [
|
|
407
|
+
T(e.$slots, i, q(K(s || {})))
|
|
400
408
|
])
|
|
401
409
|
}))
|
|
402
410
|
]), 1040, ["class", "before-close", "close-icon"])
|
|
403
|
-
], 8,
|
|
404
|
-
[o(
|
|
405
|
-
draggable: o(
|
|
411
|
+
], 8, _o)), [
|
|
412
|
+
[o(Co), {
|
|
413
|
+
draggable: o(Be),
|
|
406
414
|
fullscreen: o(ye),
|
|
407
415
|
resizer: o(Oe),
|
|
408
416
|
resizeChange: o(p).resizeChange
|
|
@@ -412,5 +420,5 @@ const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE_
|
|
|
412
420
|
}
|
|
413
421
|
});
|
|
414
422
|
export {
|
|
415
|
-
|
|
423
|
+
ht as default
|
|
416
424
|
};
|
|
@@ -3,6 +3,13 @@ import { useZIndex } from 'element-plus';
|
|
|
3
3
|
export type ElementPlusZIndex = ReturnType<typeof useZIndex>;
|
|
4
4
|
/** 当前已打开弹窗里的最高层级 */
|
|
5
5
|
export declare function getOpenModalMaxZIndex(): number;
|
|
6
|
+
/**
|
|
7
|
+
* 把 element-plus 计数器抬到 target 之上。弹窗内的下拉、气泡仍由它发号,
|
|
8
|
+
* 且默认 Teleport 到 body 与遮罩同级,不同步就会落到弹窗下面。
|
|
9
|
+
* @param elementPlusZIndex 计数器句柄
|
|
10
|
+
* @param target 需要被压住的层级
|
|
11
|
+
*/
|
|
12
|
+
export declare function raiseElementPlusZIndexAbove(elementPlusZIndex: ElementPlusZIndex, target: number): void;
|
|
6
13
|
/**
|
|
7
14
|
* 申请一个高于当前所有已打开弹窗的层级。
|
|
8
15
|
*
|
|
@@ -13,3 +20,16 @@ export declare function getOpenModalMaxZIndex(): number;
|
|
|
13
20
|
* @returns 本次弹窗应使用的 z-index
|
|
14
21
|
*/
|
|
15
22
|
export declare function allocateModalZIndex(elementPlusZIndex: ElementPlusZIndex): number;
|
|
23
|
+
/**
|
|
24
|
+
* 弹窗实际落到 DOM 的层级(含外部显式 zIndex)确定后,再把 EP 计数抬到它之上,
|
|
25
|
+
* 保证随后打开的 Select / PanelSelect / Tooltip 不会沉到遮罩下面。
|
|
26
|
+
* @param elementPlusZIndex 计数器句柄
|
|
27
|
+
* @param appliedOverlayZIndex 本次遮罩实际使用的 z-index
|
|
28
|
+
*/
|
|
29
|
+
export declare function syncElementPlusZIndexToOverlay(elementPlusZIndex: ElementPlusZIndex, appliedOverlayZIndex: number | undefined): void;
|
|
30
|
+
/**
|
|
31
|
+
* 打开 TtPanelSelect 等 body 浮层前调用:按当前已打开 TtModal 遮罩抬高 EP,
|
|
32
|
+
* 随后 ElSelect/Popper 的 nextZIndex() 自然落在遮罩之上(禁止写死 z-index)。
|
|
33
|
+
* @param elementPlusZIndex 计数器句柄
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureElementPlusAboveOpenModals(elementPlusZIndex: ElementPlusZIndex): void;
|