@dazhicheng/ui 1.6.40 → 1.6.42

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