@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.
@@ -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 j, reactive as We, nextTick as F, provide as eo, onMounted as oo, onDeactivated as to, onActivated as io, onUnmounted as lo, withDirectives as so, createElementBlock as no, openBlock as ro, createVNode as $, mergeProps as ue, h as ao, createSlots as H, withCtx as f, normalizeClass as uo, renderSlot as C, renderList as N, normalizeProps as Z, guardReactiveProps as q, createElementVNode as po } from "vue";
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 pe, useZIndex as go, ElDialog as bo } from "element-plus";
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 K, toKebabCase as Co } from "../../../packages/utils/src/testid-helper.js";
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 ce, pick as U } from "lodash-es";
20
+ import { omit as fe, pick as Y } from "lodash-es";
21
21
  import "vue-router";
22
- import To from "../../../directives/dialog-resize/index.js";
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 Bo } from "./props.js";
28
- import { ModalApi as Po } from "./utils/modal-api.js";
29
- import { resolveModalTarget as fe, MODAL_OVERLAY_CLASS as Io, MODAL_OVERLAY_CONTAINED_CLASS as Y, findTopOpenModalOverlayHost as So, ensureContainedOverlayStyle as Ao, applyContainedOverlayInline as G, watchOverlayThenSuspend as me, suspendOverlayByUid as Mo, resumeOverlayByUid as wo } from "./utils/resolve-modal-target.js";
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 ve, removeModal as J } from "./utils/modal-stack.js";
33
- import { emitModalCloseTransitionEnd as Lo } from "./utils/modal-close-transition.js";
34
- import xo from "../../../assets/svg/close.svg.js";
35
- const Eo = ["aria-tt-id", "data-testid"], _o = ["data-testid"], Tt = /* @__PURE__ */ Ye({
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
- ...pe,
40
- ...Bo,
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(ge, { expose: be, emit: Ce }) {
49
- var ae;
50
- const d = ge, v = Ge($o, void 0), D = Ce, y = k(), { prefixCls: Te } = fo("modal"), p = Je(), he = Qe(), t = Xe(), Q = k(!1), X = k(), L = k(), ke = go();
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, i = {
56
+ } : void 0, l = {
57
57
  ...d,
58
58
  okButtonProps: e
59
59
  };
60
- r = new Po(i), r.useStore = (s) => {
61
- const l = s ?? ((n) => n);
62
- return ho(r.store, l);
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 = (ae = r.useStore) == null ? void 0 : ae.call(r), {
66
- visible: T,
67
- title: W,
68
- width: ee,
69
- size: oe,
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: Be,
73
- isBottom: te,
74
- draggable: Pe,
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: $e,
83
- loading: ie,
84
- height: De,
85
- showFooter: le,
86
- loadingTip: Le,
87
- ...xe
88
- } = mo(d, g), Ee = m(() => {
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(ee) ? o(ee) : e[o(oe)] ? e[o(oe)] : "500px";
95
- }), x = m(() => {
96
- var de;
97
- const e = vo(xe), i = ce(p, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]), l = {
98
- ...U(e, Object.keys(pe)),
99
- ...i
100
- }, n = l.appendToBody === !0 || l["append-to-body"] === !0 || l["append-to-body"] === "", u = l.appendTo && l.appendTo !== "body" ? l.appendTo : void 0, S = !n && !u, V = S ? L.value : void 0;
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
- V ? h = V === ((de = Do()) == null ? void 0 : de.body) ? null : V : S && (h = fe());
103
- const z = !!h, Ke = n || !u && !h, Ue = z || o(te) ? "40px" : "15vh";
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
- ...l,
106
- modelValue: o(T),
107
- width: o(Ee),
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(Be) ?? Ue,
114
+ top: o(Pe) ?? Ue,
115
115
  fullscreen: !1,
116
116
  draggable: !1,
117
117
  // 外部显式指定优先;否则用打开时申请到的层级,element-plus 自己的 nextZIndex 不参与决策
118
- zIndex: l.zIndex ?? X.value,
118
+ zIndex: i.zIndex ?? E.value,
119
119
  appendToBody: Ke,
120
120
  ...u ? { appendTo: u } : h ? { appendTo: h } : { appendTo: "body" },
121
121
  // 区域遮罩不锁整页滚动,避免侧栏能点却滚不动
122
- lockScroll: z ? l.lockScroll ?? !1 : l.lockScroll ?? !0,
122
+ lockScroll: j ? i.lockScroll ?? !1 : i.lockScroll ?? !0,
123
123
  modalClass: [
124
- l.modalClass || e.modalClass || "",
124
+ i.modalClass || e.modalClass || "",
125
125
  Io,
126
126
  `tt-id-${t == null ? void 0 : t.uid}`,
127
- z ? Y : ""
127
+ j ? G : ""
128
128
  ].filter(Boolean).join(" ")
129
129
  };
130
130
  }), _e = m(() => {
131
- var i;
132
- return String(((i = x.value) == null ? void 0 : i.modalClass) || "").includes(Y);
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($e)
141
+ showOkBtn: o(xe)
142
142
  })), se = m(() => {
143
- var n, u;
144
- const e = (n = o(A)) == null ? void 0 : n.disabled, i = o(ie), s = (u = o(A)) == null ? void 0 : u.disabledTip, l = Array.isArray(s) ? s : s ? [s] : [];
145
- return e || i ? [!0, l] : [!1, []];
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
- j(
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 i;
154
- e && (L.value = So(t == null ? void 0 : t.uid, fe()) ?? void 0, X.value = Fo(ke)), e !== T.value && (D("visible-change", !!e), D("update:visible", !!e)), t && ((i = O.emitVisible) == null || i.call(O, !!e, t == null ? void 0 : t.uid)), t != null && t.uid && (e ? (qe(), (v == null ? void 0 : v.value) === !1 && w(), b.value || ve({ uid: t.uid, close: () => r.onClosed() }), Ao(), F(() => {
155
- (t == null ? void 0 : t.uid) != null && (G(t.uid), b.value && (a == null || a(), a = me(t.uid)), requestAnimationFrame(() => {
156
- (t == null ? void 0 : t.uid) != null && (G(t.uid), b.value && Mo(t.uid));
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
- })) : (re(), J(t.uid))), e || r.changeOkLoading(!1);
166
+ })) : (ae(), Q(t.uid))), e || r.changeOkLoading(!1);
159
167
  },
160
168
  {
161
169
  immediate: !1
162
170
  }
163
- ), j(
164
- () => o(T),
171
+ ), H(
172
+ () => o(C),
165
173
  (e) => {
166
- var i;
167
- e !== ((i = g.value) == null ? void 0 : i.visible) && r.setState({ visible: e }), e || r.changeOkLoading(!1);
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
- Q.value = e;
182
+ X.value = e;
175
183
  }
176
184
  function ze() {
177
- Lo(r);
185
+ Eo(r);
178
186
  }
179
187
  function je() {
180
- document.querySelectorAll(".el-select__popper").forEach((i) => {
181
- i.style.display !== "none" && (i.style.display = "none");
188
+ document.querySelectorAll(".el-select__popper").forEach((l) => {
189
+ l.style.display !== "none" && (l.style.display = "none");
182
190
  });
183
191
  }
184
- function E(e) {
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 M = m(() => {
192
- var n;
193
- const e = (n = g.value) == null ? void 0 : n.testId;
199
+ const w = m(() => {
200
+ var s;
201
+ const e = (s = g.value) == null ? void 0 : s.testId;
194
202
  if (e)
195
- return E(e);
196
- const i = d.testId;
197
- if (i)
198
- return E(i);
199
- const s = He();
200
- if (s)
201
- return E(s);
202
- const l = o(W);
203
- return l && typeof l == "string" && l.trim() ? K("modal", Co(l)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
204
- }), Ne = m(() => K(M.value, "footer")), Ze = m(() => K(M.value, "body"));
205
- eo("modalIdContext", M);
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
- F(() => {
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), B = k(null);
221
- let a, P, c, I = 0;
222
- function _() {
223
- var i;
224
- return String(((i = x.value) == null ? void 0 : i.modalClass) || "").includes(Y);
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 ne() {
227
- var i, s;
234
+ function re() {
235
+ var l, n;
228
236
  const e = t == null ? void 0 : t.appContext.config.globalProperties.$router;
229
- return ((s = (i = e == null ? void 0 : e.currentRoute) == null ? void 0 : i.value) == null ? void 0 : s.path) ?? null;
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
- B.value = null;
240
+ if (!R()) {
241
+ P.value = null;
234
242
  return;
235
243
  }
236
- B.value = ne();
244
+ P.value = re();
237
245
  }
238
- function re() {
239
- c !== void 0 && (window.cancelAnimationFrame(c), c = void 0), I += 1, a == null || a(), a = void 0, b.value = !1, B.value = null;
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 w() {
242
- var s;
249
+ function F() {
250
+ var n;
243
251
  const e = t == null ? void 0 : t.uid;
244
- e == null || !(o(T) || (s = g.value) != null && s.visible) || !_() || (c !== void 0 && (window.cancelAnimationFrame(c), c = void 0), I += 1, b.value = !0, a == null || a(), a = me(e), J(e));
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 R() {
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 i = ++I;
250
- F(() => {
251
- i === I && (c = window.requestAnimationFrame(() => {
252
- var n;
253
- if (c = void 0, i !== I) return;
254
- const s = !!(o(T) || (n = g.value) != null && n.visible), l = B.value;
255
- s && ((v ? !v.value : !l || ne() !== l) || (a == null || a(), a = void 0, b.value = !1, wo(e), ve({ uid: e, close: () => r.onClosed() }), F(() => G(e))));
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 = U(p, ["onVisibleChange", "onClosed", "onOk"]);
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 i = t == null ? void 0 : t.appContext.config.globalProperties.$router;
269
- v || !(i != null && i.afterEach) || (P = i.afterEach((s, l) => {
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 (!(s != null && s.path) || s.path === (l == null ? void 0 : l.path) || !_() || !!!(o(T) || (S = g.value) != null && S.visible)) return;
272
- const u = B.value;
273
- u && (s.path !== u ? w() : R());
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
- w();
284
+ F();
277
285
  }), io(() => {
278
- R();
279
- }), j(
286
+ V();
287
+ }), H(
280
288
  v ?? (() => {
281
289
  }),
282
290
  (e) => {
283
- e === !1 ? w() : e && R();
291
+ e === !1 ? F() : e && V();
284
292
  },
285
293
  { flush: "post" }
286
294
  ), lo(() => {
287
- re(), P == null || P(), P = void 0, L.value = void 0, t != null && t.uid && J(t.uid);
288
- }), be({
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, i) => {
291
- var s;
292
- return so((ro(), no("div", {
293
- "aria-tt-id": `tt-id-${(s = o(t)) == null ? void 0 : s.uid}`,
294
- "data-testid": M.value
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), ue(x.value, {
297
- class: ["tt-ui-modal", o(Te)],
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(xo),
310
+ icon: o(Lo),
303
311
  isCustomSvg: !0
304
312
  })
305
- }), H({
313
+ }), Z({
306
314
  default: f(() => [
307
315
  $(Oo, {
308
316
  ref_key: "modalWrapperRef",
309
317
  ref: y,
310
- "is-bottom": o(te),
311
- height: o(De),
312
- loading: o(ie),
313
- "loading-tip": o(Le),
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(le) }),
316
- "data-testid": Ze.value,
323
+ class: uo({ "pb-2!": !o(ne) }),
324
+ "data-testid": Ne.value,
317
325
  onIsScroll: Ve
318
326
  }, {
319
327
  default: f(() => [
320
- C(e.$slots, "default")
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
- C(e.$slots, "header")
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(W),
345
+ title: o(ee),
338
346
  onMousedown: je
339
- }, H({
347
+ }, Z({
340
348
  titleToolbar: f(() => [
341
- C(e.$slots, "titleToolbar")
349
+ T(e.$slots, "titleToolbar")
342
350
  ]),
343
351
  _: 2
344
352
  }, [
345
- N(Object.keys(e.$slots), (l) => ({
346
- name: l,
347
- fn: f((n) => [
348
- C(e.$slots, l, Z(q(n || {})))
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(he).footer || o(le) ? {
363
+ o(ke).footer || o(ne) ? {
356
364
  name: "footer",
357
365
  fn: f(() => [
358
- C(e.$slots, "footer", {}, () => [
359
- po("div", { "data-testid": Ne.value }, [
360
- $(ko, ue(Re.value, {
366
+ T(e.$slots, "footer", {}, () => [
367
+ po("div", { "data-testid": Ze.value }, [
368
+ $(ko, pe(Re.value, {
361
369
  class: "footer",
362
- style: { borderTop: Q.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
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
- }), H({ _: 2 }, [
378
+ }), Z({ _: 2 }, [
371
379
  N(Object.keys(
372
- o(U)(e.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
373
- ), (l) => ({
374
- name: l,
375
- fn: f((n) => [
376
- C(e.$slots, l, Z(q({ ...n || {} })))
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, _o)
388
+ ], 8, Ro)
381
389
  ])
382
390
  ]),
383
391
  key: "2"
384
392
  } : void 0,
385
393
  N(Object.keys(
386
- o(ce)(e.$slots, [
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
- ), (l) => ({
397
- name: l,
398
- fn: f((n) => [
399
- C(e.$slots, l, Z(q(n || {})))
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, Eo)), [
404
- [o(To), {
405
- draggable: o(Pe),
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
- Tt as default
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;