@dazhicheng/ui 1.6.5 → 1.6.7

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 (25) hide show
  1. package/dist/components/tt-area/TtArea.vue.js +1 -1
  2. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  3. package/dist/components/tt-icon/index.vue.js +2 -2
  4. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  5. package/dist/components/tt-modal/index.d.ts +32 -8
  6. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +32 -8
  7. package/dist/components/tt-modal/src/RenderModal.vue.js +254 -193
  8. package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +14 -2
  9. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +61 -30
  10. package/dist/components/tt-modal/src/hooks/useModalRender.js +72 -71
  11. package/dist/components/tt-modal/src/utils/resolve-modal-target.d.ts +19 -0
  12. package/dist/components/tt-modal/src/utils/resolve-modal-target.js +151 -0
  13. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +199 -167
  14. package/dist/components/tt-nav-anchor/src/types.d.ts +13 -4
  15. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
  16. package/dist/components/tt-table/src/TableForm.vue.d.ts +0 -9
  17. package/dist/components/tt-table/src/TableForm.vue.js +37 -38
  18. package/dist/components/tt-table/src/hooks/useTableForm.js +22 -23
  19. package/dist/components/tt-table/src/props.d.ts +0 -5
  20. package/dist/components/tt-table/src/props.js +22 -31
  21. package/dist/components/tt-table/src/types/tableForm.d.ts +0 -2
  22. package/dist/components/tt-table/src/utils/table-form-api.js +14 -15
  23. package/dist/directives/dialog-resize/use-draggable.js +47 -25
  24. package/dist/style.css +1 -1
  25. package/package.json +1 -1
@@ -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 Oo, onUnmounted as $o, withDirectives as Io, 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 O, 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 $, 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 I } 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"], Oe = /* @__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,259 +41,319 @@ const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], Oe = /* @__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
- ...I(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
101
  // 默认 false;可通过 modalProps.closeOnClickModal 开启点击遮罩关闭
100
- closeOnClickModal: o.closeOnClickModal ?? !1,
102
+ closeOnClickModal: e.closeOnClickModal ?? !1,
101
103
  // 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
102
104
  // 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
103
105
  closeOnPressEscape: !1,
104
- top: e(X) ?? e(D) ? "40px" : "15vh",
106
+ top: o(fe) ?? Ee,
105
107
  fullscreen: !1,
106
108
  draggable: !1,
107
- 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(" ")
108
118
  };
109
- }), uo = c(() => ({
110
- showCancelBtn: e(Z),
111
- okText: e(oo),
112
- cancelText: e(eo),
113
- okButtonProps: e(b),
114
- cancelButtonProps: e(to),
115
- confirmLoading: e(so),
116
- cancelLoading: e(ro),
117
- showOkBtn: e(io)
118
- })), A = c(() => {
119
- var l, _;
120
- 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] : [];
121
- 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, []];
122
135
  });
123
- R(
136
+ ee(
124
137
  () => {
125
- var o;
126
- return (o = g.value) == null ? void 0 : o.visible;
138
+ var e;
139
+ return (e = m.value) == null ? void 0 : e.visible;
127
140
  },
128
- (o) => {
141
+ (e) => {
129
142
  var s;
130
- 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);
131
148
  },
132
149
  {
133
150
  immediate: !1
134
151
  }
135
- ), R(
136
- () => e(T),
137
- (o) => {
152
+ ), ee(
153
+ () => o(h),
154
+ (e) => {
138
155
  var s;
139
- 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);
140
157
  },
141
158
  {
142
159
  immediate: !1
143
160
  }
144
161
  );
145
- function mo(o) {
146
- M.value = o;
162
+ function Ie(e) {
163
+ N.value = e;
147
164
  }
148
- function fo() {
165
+ function $e() {
149
166
  document.querySelectorAll(".el-select__popper").forEach((s) => {
150
167
  s.style.display !== "none" && (s.style.display = "none");
151
168
  });
152
169
  }
153
- function C(o) {
154
- return o.toLowerCase().includes("modal") ? o : `modal-${o}`;
170
+ function $(e) {
171
+ return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
155
172
  }
156
- function go() {
157
- const o = d["data-testid"] || d.dataTestid || d.testId || d["test-id"];
158
- 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;
159
176
  }
160
- const h = c(() => {
161
- var l;
162
- const o = (l = g.value) == null ? void 0 : l.testId;
163
- if (o)
164
- return C(o);
165
- 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;
166
183
  if (s)
167
- return C(s);
168
- const a = go();
169
- if (a)
170
- return C(a);
171
- const r = e(w);
172
- return r && typeof r == "string" && r.trim() ? $("modal", xo(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
173
- }), bo = c(() => $(h.value, "footer")), ho = c(() => $(h.value, "body"));
174
- Bo("modalIdContext", h);
175
- const f = yo({
176
- 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,
177
194
  emitVisible: void 0,
178
195
  redoModalHeight: () => {
179
- Po(() => {
180
- e(m) && e(m).setModalHeight();
196
+ w(() => {
197
+ o(T) && o(T).setModalHeight();
181
198
  });
182
199
  },
183
200
  scrollToBottom: () => {
184
- var o;
185
- e(m) && ((o = e(m)) == null || o.onScrollBottom());
201
+ var e;
202
+ o(T) && ((e = o(T)) == null || e.onScrollBottom());
186
203
  }
187
204
  });
188
- return t && v("register", f, `${t == null ? void 0 : t.uid}`), Oo(() => {
189
- const o = I(d, ["onVisibleChange", "onClosed", "onOk"]);
190
- 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(
191
240
  {
192
- ...o,
193
- onClosed: o.onClosed || d.onCancel || d.onClose
241
+ ...e,
242
+ onClosed: e.onClosed || p.onCancel || p.onClose
194
243
  },
195
- f
244
+ C
196
245
  );
197
- }), $o(() => {
198
- t != null && t.uid && W(t.uid);
199
- }), q({
200
- modalApi: i
201
- }), (o, s) => {
202
- var a;
203
- return Io((wo(), Mo("div", {
204
- "aria-tt-id": `tt-id-${(a = e(t)) == null ? void 0 : a.uid}`,
205
- "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
206
266
  }, [
207
- k(e(_o), j(co.value, {
208
- class: ["tt-ui-modal", e(U)],
209
- "before-close": e(i).onClosed,
210
- "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), {
211
271
  size: 16,
212
- icon: e(Uo),
272
+ icon: o(bo),
213
273
  isCustomSvg: !0
214
274
  })
215
- }), y({
216
- default: p(() => [
217
- k(Wo, {
275
+ }), D({
276
+ default: c(() => [
277
+ S(uo, {
218
278
  ref_key: "modalWrapperRef",
219
- ref: m,
220
- "is-bottom": e(D),
221
- height: e(ao),
222
- loading: e(V),
223
- "loading-tip": e(lo),
224
- class: Fo({ "pb-2!": !e(z) }),
225
- "data-testid": ho.value,
226
- 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
227
288
  }, {
228
- default: p(() => [
229
- u(o.$slots, "default")
289
+ default: c(() => [
290
+ b(e.$slots, "default")
230
291
  ]),
231
292
  _: 3
232
- }, 8, ["is-bottom", "height", "loading", "loading-tip", "class", "data-testid"])
293
+ }, 8, ["is-bottom", "height", "loading", "loading-tip", "contained", "class", "data-testid"])
233
294
  ]),
234
295
  _: 2
235
296
  }, [
236
- o.$slots.header ? {
297
+ e.$slots.header ? {
237
298
  name: "header",
238
- fn: p(() => [
239
- u(o.$slots, "header")
299
+ fn: c(() => [
300
+ b(e.$slots, "header")
240
301
  ]),
241
302
  key: "1"
242
303
  } : {
243
304
  name: "header",
244
- fn: p(() => [
245
- k(Ho, {
246
- title: e(w),
247
- onMousedown: fo
248
- }, y({
249
- titleToolbar: p(() => [
250
- 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")
251
312
  ]),
252
313
  _: 2
253
314
  }, [
254
- B(Object.keys(o.$slots), (r) => ({
315
+ L(Object.keys(e.$slots), (r) => ({
255
316
  name: r,
256
- fn: p((l) => [
257
- u(o.$slots, r, P(O(l || {})))
317
+ fn: c((n) => [
318
+ b(e.$slots, r, V(E(n || {})))
258
319
  ])
259
320
  }))
260
321
  ]), 1032, ["title"])
261
322
  ]),
262
323
  key: "0"
263
324
  },
264
- e(G).footer || e(z) ? {
325
+ o(ue).footer || o(J) ? {
265
326
  name: "footer",
266
- fn: p(() => [
267
- u(o.$slots, "footer", {}, () => [
268
- Do("div", { "data-testid": bo.value }, [
269
- 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, {
270
331
  class: "footer",
271
- 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" },
272
333
  "ok-button-props": {
273
- ...e(b),
274
- disabledTip: A.value[1],
275
- disabled: A.value[0]
334
+ ...o(y),
335
+ disabledTip: Q.value[1],
336
+ disabled: Q.value[0]
276
337
  },
277
- onFooterok: e(i).onOk,
278
- onCancel: e(i).onClosed
279
- }), y({ _: 2 }, [
280
- B(Object.keys(
281
- e(I)(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"])
282
343
  ), (r) => ({
283
344
  name: r,
284
- fn: p((l) => [
285
- u(o.$slots, r, P(O({ ...l || {} })))
345
+ fn: c((n) => [
346
+ b(e.$slots, r, V(E({ ...n || {} })))
286
347
  ])
287
348
  }))
288
349
  ]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
289
- ], 8, Jo)
350
+ ], 8, To)
290
351
  ])
291
352
  ]),
292
353
  key: "2"
293
354
  } : void 0,
294
- B(Object.keys(
295
- e(H)(o.$slots, [
355
+ L(Object.keys(
356
+ o(se)(e.$slots, [
296
357
  "default",
297
358
  "titleToolbar",
298
359
  "header",
@@ -304,22 +365,22 @@ const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], Oe = /* @__PURE_
304
365
  ])
305
366
  ), (r) => ({
306
367
  name: r,
307
- fn: p((l) => [
308
- u(o.$slots, r, P(O(l || {})))
368
+ fn: c((n) => [
369
+ b(e.$slots, r, V(E(n || {})))
309
370
  ])
310
371
  }))
311
372
  ]), 1040, ["class", "before-close", "close-icon"])
312
- ], 8, Go)), [
313
- [e(Ro), {
314
- draggable: e(Y),
315
- fullscreen: e(J),
316
- resizer: e(Q),
317
- 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
318
379
  }]
319
380
  ]);
320
381
  };
321
382
  }
322
383
  });
323
384
  export {
324
- Oe as default
385
+ Zo as default
325
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;