@dazhicheng/ui 1.6.20 → 1.6.22

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