@dazhicheng/ui 1.6.4 → 1.6.6

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 ko, ref as x, useAttrs as vo, useSlots as To, getCurrentInstance as Co, computed as c, unref as e, watch as R, reactive as yo, provide as Bo, nextTick as Po, onMounted as $o, onUnmounted as Io, withDirectives as Oo, createElementBlock as Mo, openBlock as wo, createVNode as k, mergeProps as j, h as So, createSlots as y, withCtx as p, normalizeClass as Fo, renderSlot as u, renderList as B, normalizeProps as P, guardReactiveProps as $, createElementVNode as Do } from "vue";
2
- import { TtIcon as Vo } from "../../tt-icon/index.js";
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";
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 zo } from "../../../packages/hooks/src/useDesign.js";
5
- import { usePriorityValues as Ao, getPriorityValues as Lo } from "../../../packages/hooks/src/usePriorityValue.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";
6
6
  import "axios";
7
- import { dialogProps as E, ElDialog as _o } from "element-plus";
7
+ import { dialogProps as te, ElDialog as so } from "element-plus";
8
8
  import "dayjs";
9
9
  import "numeral";
10
- import { generateTestId as I, toKebabCase as xo } from "../../../packages/utils/src/testid-helper.js";
10
+ import { generateTestId as R, toKebabCase as ro } 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,23 +16,24 @@ 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 H, pick as O } from "lodash-es";
19
+ import { omit as se, pick as _ } from "lodash-es";
20
20
  import "vue-router";
21
- import Ro from "../../../directives/dialog-resize/index.js";
22
- import { useStore as jo } from "@tanstack/vue-store";
23
- import Eo from "./components/ModalFooter.vue.js";
24
- import Ho from "./components/ModalHeader.vue.js";
25
- import Wo from "./components/ModalWrapper.vue.js";
26
- import { basicProps as No } from "./props.js";
27
- import { ModalApi as qo } from "./utils/modal-api.js";
28
- import { pushModal as Ko, removeModal as W } from "./utils/modal-stack.js";
29
- import Uo from "../../../assets/svg/close.svg.js";
30
- const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], $e = /* @__PURE__ */ ko({
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({
31
32
  name: "TtModal",
32
33
  __name: "RenderModal",
33
34
  props: {
34
- ...E,
35
- ...No,
35
+ ...te,
36
+ ...po,
36
37
  /** modalApi */
37
38
  modalApi: {
38
39
  type: Object,
@@ -40,258 +41,319 @@ const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], $e = /* @__PURE_
40
41
  }
41
42
  },
42
43
  emits: ["visible-change", "register", "update:visible"],
43
- setup(N, { expose: q, emit: K }) {
44
- var L;
45
- const n = N, v = K, m = x(), { prefixCls: U } = zo("modal"), d = vo(), G = To(), t = Co(), M = x(!1);
46
- let i = n.modalApi;
47
- if (!i) {
48
- const o = n.okButtonProps ? {
49
- ...n.okButtonProps,
50
- disabledTip: Array.isArray(n.okButtonProps.disabledTip) ? n.okButtonProps.disabledTip : n.okButtonProps.disabledTip ? [n.okButtonProps.disabledTip] : void 0
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) {
49
+ const e = d.okButtonProps ? {
50
+ ...d.okButtonProps,
51
+ disabledTip: Array.isArray(d.okButtonProps.disabledTip) ? d.okButtonProps.disabledTip : d.okButtonProps.disabledTip ? [d.okButtonProps.disabledTip] : void 0
51
52
  } : void 0, s = {
52
- ...n,
53
- okButtonProps: o
53
+ ...d,
54
+ okButtonProps: e
54
55
  };
55
- i = new qo(s), i.useStore = (a) => {
56
- const r = a ?? ((l) => l);
57
- return jo(i.store, r);
56
+ l = new co(s), l.useStore = (i) => {
57
+ const r = i ?? ((n) => n);
58
+ return lo(l.store, r);
58
59
  };
59
60
  }
60
- const g = (L = i.useStore) == null ? void 0 : L.call(i), {
61
- visible: T,
62
- title: w,
63
- width: S,
64
- size: F,
65
- fullscreen: J,
66
- resizer: Q,
67
- top: X,
68
- isBottom: D,
69
- draggable: Y,
70
- showCancelBtn: Z,
71
- okText: oo,
72
- cancelText: eo,
73
- okButtonProps: b,
74
- cancelButtonProps: to,
75
- confirmLoading: so,
76
- cancelLoading: ro,
77
- showOkBtn: io,
78
- loading: V,
79
- height: ao,
80
- showFooter: z,
81
- loadingTip: lo,
82
- ...no
83
- } = Ao(n, g), po = c(() => {
84
- const o = {
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(() => {
85
+ const e = {
85
86
  mini: "448px",
86
87
  small: "592px",
87
88
  medium: "876px"
88
89
  };
89
- return e(S) ? e(S) : o[e(F)] ? o[e(F)] : "500px";
90
- }), co = c(() => {
91
- const o = Lo(no), s = H(d, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]);
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";
92
96
  return {
93
- appendToBody: !0,
94
- ...O(o, Object.keys(E)),
95
- ...s,
96
- modelValue: e(T),
97
- width: e(po),
97
+ ...r,
98
+ modelValue: o(h),
99
+ width: o(Oe),
98
100
  destroyOnClose: !0,
99
- closeOnClickModal: !1,
101
+ // 默认 false;可通过 modalProps.closeOnClickModal 开启点击遮罩关闭
102
+ closeOnClickModal: e.closeOnClickModal ?? !1,
100
103
  // 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
101
104
  // 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
102
105
  closeOnPressEscape: !1,
103
- top: e(X) ?? e(D) ? "40px" : "15vh",
106
+ top: o(fe) ?? Ee,
104
107
  fullscreen: !1,
105
108
  draggable: !1,
106
- modalClass: `${o.modalClass || ""} tt-id-${t == null ? void 0 : t.uid}`
109
+ appendToBody: Ve,
110
+ ...u ? { appendTo: u } : v ? { appendTo: v } : { appendTo: "body" },
111
+ // 区域遮罩不锁整页滚动,避免侧栏能点却滚不动
112
+ lockScroll: F ? r.lockScroll ?? !1 : r.lockScroll ?? !0,
113
+ modalClass: [
114
+ r.modalClass || e.modalClass || "",
115
+ `tt-id-${t == null ? void 0 : t.uid}`,
116
+ F ? x : ""
117
+ ].filter(Boolean).join(" ")
107
118
  };
108
- }), uo = c(() => ({
109
- showCancelBtn: e(Z),
110
- okText: e(oo),
111
- cancelText: e(eo),
112
- okButtonProps: e(b),
113
- cancelButtonProps: e(to),
114
- confirmLoading: e(so),
115
- cancelLoading: e(ro),
116
- showOkBtn: e(io)
117
- })), A = c(() => {
118
- var l, _;
119
- const o = (l = e(b)) == null ? void 0 : l.disabled, s = e(V), a = (_ = e(b)) == null ? void 0 : _.disabledTip, r = Array.isArray(a) ? a : a ? [a] : [];
120
- return o || s ? [!0, r] : [!1, []];
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(() => {
132
+ 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, []];
121
135
  });
122
- R(
136
+ ee(
123
137
  () => {
124
- var o;
125
- return (o = g.value) == null ? void 0 : o.visible;
138
+ var e;
139
+ return (e = m.value) == null ? void 0 : e.visible;
126
140
  },
127
- (o) => {
141
+ (e) => {
128
142
  var s;
129
- o !== T.value && (v("visible-change", !!o), v("update:visible", !!o)), t && ((s = f.emitVisible) == null || s.call(f, !!o, t == null ? void 0 : t.uid)), t != null && t.uid && (o ? Ko({ uid: t.uid, close: () => i.onClosed() }) : W(t.uid)), o || i.changeOkLoading(!1);
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));
146
+ }));
147
+ })) : (X(), j(t.uid))), e || l.changeOkLoading(!1);
130
148
  },
131
149
  {
132
150
  immediate: !1
133
151
  }
134
- ), R(
135
- () => e(T),
136
- (o) => {
152
+ ), ee(
153
+ () => o(h),
154
+ (e) => {
137
155
  var s;
138
- o !== ((s = g.value) == null ? void 0 : s.visible) && i.setState({ visible: o }), o || i.changeOkLoading(!1);
156
+ e !== ((s = m.value) == null ? void 0 : s.visible) && l.setState({ visible: e }), e || l.changeOkLoading(!1);
139
157
  },
140
158
  {
141
159
  immediate: !1
142
160
  }
143
161
  );
144
- function mo(o) {
145
- M.value = o;
162
+ function Ie(e) {
163
+ N.value = e;
146
164
  }
147
- function fo() {
165
+ function $e() {
148
166
  document.querySelectorAll(".el-select__popper").forEach((s) => {
149
167
  s.style.display !== "none" && (s.style.display = "none");
150
168
  });
151
169
  }
152
- function C(o) {
153
- return o.toLowerCase().includes("modal") ? o : `modal-${o}`;
170
+ function $(e) {
171
+ return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
154
172
  }
155
- function go() {
156
- const o = d["data-testid"] || d.dataTestid || d.testId || d["test-id"];
157
- return o && typeof o == "string" ? o : void 0;
173
+ function Ae() {
174
+ const e = p["data-testid"] || p.dataTestid || p.testId || p["test-id"];
175
+ return e && typeof e == "string" ? e : void 0;
158
176
  }
159
- const h = c(() => {
160
- var l;
161
- const o = (l = g.value) == null ? void 0 : l.testId;
162
- if (o)
163
- return C(o);
164
- const s = n.testId;
177
+ const B = f(() => {
178
+ var n;
179
+ const e = (n = m.value) == null ? void 0 : n.testId;
180
+ if (e)
181
+ return $(e);
182
+ const s = d.testId;
165
183
  if (s)
166
- return C(s);
167
- const a = go();
168
- if (a)
169
- return C(a);
170
- const r = e(w);
171
- return r && typeof r == "string" && r.trim() ? I("modal", xo(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
172
- }), bo = c(() => I(h.value, "footer")), ho = c(() => I(h.value, "body"));
173
- Bo("modalIdContext", h);
174
- const f = yo({
175
- setModalProps: i.setState,
184
+ return $(s);
185
+ const i = Ae();
186
+ 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,
176
194
  emitVisible: void 0,
177
195
  redoModalHeight: () => {
178
- Po(() => {
179
- e(m) && e(m).setModalHeight();
196
+ w(() => {
197
+ o(T) && o(T).setModalHeight();
180
198
  });
181
199
  },
182
200
  scrollToBottom: () => {
183
- var o;
184
- e(m) && ((o = e(m)) == null || o.onScrollBottom());
201
+ var e;
202
+ o(T) && ((e = o(T)) == null || e.onScrollBottom());
185
203
  }
186
204
  });
187
- return t && v("register", f, `${t == null ? void 0 : t.uid}`), $o(() => {
188
- const o = O(d, ["onVisibleChange", "onClosed", "onOk"]);
189
- i.mount(
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);
211
+ }
212
+ function De() {
213
+ var s, i;
214
+ 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;
216
+ }
217
+ function Le() {
218
+ if (!A()) {
219
+ P.value = null;
220
+ return;
221
+ }
222
+ P.value = De();
223
+ }
224
+ function X() {
225
+ a == null || a(), a = void 0, g.value = !1, P.value = null;
226
+ }
227
+ function Z() {
228
+ var i;
229
+ 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));
231
+ }
232
+ function G() {
233
+ var i;
234
+ 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)));
236
+ }
237
+ return He(() => {
238
+ const e = _(p, ["onVisibleChange", "onClosed", "onOk"]);
239
+ l.mount(
190
240
  {
191
- ...o,
192
- onClosed: o.onClosed || d.onCancel || d.onClose
241
+ ...e,
242
+ onClosed: e.onClosed || p.onCancel || p.onClose
193
243
  },
194
- f
244
+ C
195
245
  );
196
- }), Io(() => {
197
- t != null && t.uid && W(t.uid);
198
- }), q({
199
- modalApi: i
200
- }), (o, s) => {
201
- var a;
202
- return Oo((wo(), Mo("div", {
203
- "aria-tt-id": `tt-id-${(a = e(t)) == null ? void 0 : a.uid}`,
204
- "data-testid": h.value
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());
252
+ }));
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) => {
262
+ var i;
263
+ return Ye((Qe(), Je("div", {
264
+ "aria-tt-id": `tt-id-${(i = o(t)) == null ? void 0 : i.uid}`,
265
+ "data-testid": B.value
205
266
  }, [
206
- k(e(_o), j(co.value, {
207
- class: ["tt-ui-modal", e(U)],
208
- "before-close": e(i).onClosed,
209
- "close-icon": () => So(e(Vo), {
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), {
210
271
  size: 16,
211
- icon: e(Uo),
272
+ icon: o(bo),
212
273
  isCustomSvg: !0
213
274
  })
214
- }), y({
215
- default: p(() => [
216
- k(Wo, {
275
+ }), D({
276
+ default: c(() => [
277
+ S(uo, {
217
278
  ref_key: "modalWrapperRef",
218
- ref: m,
219
- "is-bottom": e(D),
220
- height: e(ao),
221
- loading: e(V),
222
- "loading-tip": e(lo),
223
- class: Fo({ "pb-2!": !e(z) }),
224
- "data-testid": ho.value,
225
- onIsScroll: mo
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
226
288
  }, {
227
- default: p(() => [
228
- u(o.$slots, "default")
289
+ default: c(() => [
290
+ b(e.$slots, "default")
229
291
  ]),
230
292
  _: 3
231
- }, 8, ["is-bottom", "height", "loading", "loading-tip", "class", "data-testid"])
293
+ }, 8, ["is-bottom", "height", "loading", "loading-tip", "contained", "class", "data-testid"])
232
294
  ]),
233
295
  _: 2
234
296
  }, [
235
- o.$slots.header ? {
297
+ e.$slots.header ? {
236
298
  name: "header",
237
- fn: p(() => [
238
- u(o.$slots, "header")
299
+ fn: c(() => [
300
+ b(e.$slots, "header")
239
301
  ]),
240
302
  key: "1"
241
303
  } : {
242
304
  name: "header",
243
- fn: p(() => [
244
- k(Ho, {
245
- title: e(w),
246
- onMousedown: fo
247
- }, y({
248
- titleToolbar: p(() => [
249
- u(o.$slots, "titleToolbar")
305
+ fn: c(() => [
306
+ S(ao, {
307
+ title: o(H),
308
+ onMousedown: $e
309
+ }, D({
310
+ titleToolbar: c(() => [
311
+ b(e.$slots, "titleToolbar")
250
312
  ]),
251
313
  _: 2
252
314
  }, [
253
- B(Object.keys(o.$slots), (r) => ({
315
+ L(Object.keys(e.$slots), (r) => ({
254
316
  name: r,
255
- fn: p((l) => [
256
- u(o.$slots, r, P($(l || {})))
317
+ fn: c((n) => [
318
+ b(e.$slots, r, V(E(n || {})))
257
319
  ])
258
320
  }))
259
321
  ]), 1032, ["title"])
260
322
  ]),
261
323
  key: "0"
262
324
  },
263
- e(G).footer || e(z) ? {
325
+ o(ue).footer || o(J) ? {
264
326
  name: "footer",
265
- fn: p(() => [
266
- u(o.$slots, "footer", {}, () => [
267
- Do("div", { "data-testid": bo.value }, [
268
- k(Eo, j(uo.value, {
327
+ fn: c(() => [
328
+ b(e.$slots, "footer", {}, () => [
329
+ Ge("div", { "data-testid": Fe.value }, [
330
+ S(no, oe(Me.value, {
269
331
  class: "footer",
270
- style: { borderTop: M.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
332
+ style: { borderTop: N.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
271
333
  "ok-button-props": {
272
- ...e(b),
273
- disabledTip: A.value[1],
274
- disabled: A.value[0]
334
+ ...o(y),
335
+ disabledTip: Q.value[1],
336
+ disabled: Q.value[0]
275
337
  },
276
- onFooterok: e(i).onOk,
277
- onCancel: e(i).onClosed
278
- }), y({ _: 2 }, [
279
- B(Object.keys(
280
- e(O)(o.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
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"])
281
343
  ), (r) => ({
282
344
  name: r,
283
- fn: p((l) => [
284
- u(o.$slots, r, P($({ ...l || {} })))
345
+ fn: c((n) => [
346
+ b(e.$slots, r, V(E({ ...n || {} })))
285
347
  ])
286
348
  }))
287
349
  ]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
288
- ], 8, Jo)
350
+ ], 8, To)
289
351
  ])
290
352
  ]),
291
353
  key: "2"
292
354
  } : void 0,
293
- B(Object.keys(
294
- e(H)(o.$slots, [
355
+ L(Object.keys(
356
+ o(se)(e.$slots, [
295
357
  "default",
296
358
  "titleToolbar",
297
359
  "header",
@@ -303,22 +365,22 @@ const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], $e = /* @__PURE_
303
365
  ])
304
366
  ), (r) => ({
305
367
  name: r,
306
- fn: p((l) => [
307
- u(o.$slots, r, P($(l || {})))
368
+ fn: c((n) => [
369
+ b(e.$slots, r, V(E(n || {})))
308
370
  ])
309
371
  }))
310
372
  ]), 1040, ["class", "before-close", "close-icon"])
311
- ], 8, Go)), [
312
- [e(Ro), {
313
- draggable: e(Y),
314
- fullscreen: e(J),
315
- resizer: e(Q),
316
- resizeChange: e(d).resizeChange
373
+ ], 8, ho)), [
374
+ [o(io), {
375
+ draggable: o(me),
376
+ fullscreen: o(pe),
377
+ resizer: o(ce),
378
+ resizeChange: o(p).resizeChange
317
379
  }]
318
380
  ]);
319
381
  };
320
382
  }
321
383
  });
322
384
  export {
323
- $e as default
385
+ Zo as default
324
386
  };
@@ -1,3 +1,5 @@
1
+ /** 可用内容高度 = 容器高 - 顶距 - 头 - 底栏 - 底边距 */
2
+ declare function updateRealHeight(): void;
1
3
  declare function onScrollBottom(): void;
2
4
  declare function __VLS_template(): {
3
5
  attrs: Partial<{}>;
@@ -11,6 +13,11 @@ declare function __VLS_template(): {
11
13
  };
12
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
15
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
16
+ /** 区域遮罩:高度相对挂载容器,不再按整屏 vh */
17
+ contained: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
14
21
  testId: any;
15
22
  visible: {
16
23
  type: BooleanConstructor;
@@ -43,7 +50,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
43
50
  type: BooleanConstructor;
44
51
  default: boolean;
45
52
  };
46
- } & {
47
53
  loading: {
48
54
  type: BooleanConstructor;
49
55
  default: boolean;
@@ -97,10 +103,16 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
97
103
  };
98
104
  }>, {
99
105
  onScrollBottom: typeof onScrollBottom;
106
+ setModalHeight: typeof updateRealHeight;
100
107
  elm: import('vue').Ref<any, any>;
101
108
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
102
109
  "is-scroll": (...args: any[]) => void;
103
110
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
111
+ /** 区域遮罩:高度相对挂载容器,不再按整屏 vh */
112
+ contained: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
104
116
  testId: any;
105
117
  visible: {
106
118
  type: BooleanConstructor;
@@ -133,7 +145,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
133
145
  type: BooleanConstructor;
134
146
  default: boolean;
135
147
  };
136
- } & {
137
148
  loading: {
138
149
  type: BooleanConstructor;
139
150
  default: boolean;
@@ -200,6 +211,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
200
211
  fullscreen: boolean;
201
212
  testId: any;
202
213
  modal: boolean;
214
+ contained: boolean;
203
215
  cancelText: string;
204
216
  okText: string;
205
217
  resizer: boolean;