@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.
- package/dist/components/tt-modal/index.d.ts +32 -8
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +32 -8
- package/dist/components/tt-modal/src/RenderModal.vue.js +255 -193
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +14 -2
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +61 -30
- package/dist/components/tt-modal/src/hooks/useModalRender.js +72 -71
- package/dist/components/tt-modal/src/typing.d.ts +5 -0
- package/dist/components/tt-modal/src/utils/modal-api.js +7 -5
- package/dist/components/tt-modal/src/utils/resolve-modal-target.d.ts +19 -0
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +153 -0
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +199 -167
- package/dist/components/tt-nav-anchor/src/types.d.ts +13 -4
- package/dist/components/tt-table/index.js +5 -4
- package/dist/components/tt-table/src/TableForm.vue.js +3 -2
- package/dist/directives/dialog-resize/use-draggable.js +47 -25
- package/dist/index.js +82 -81
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TtIcon as
|
|
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
|
|
5
|
-
import { usePriorityValues as
|
|
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
|
|
7
|
+
import { dialogProps as te, ElDialog as so } from "element-plus";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "numeral";
|
|
10
|
-
import { generateTestId as
|
|
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
|
|
19
|
+
import { omit as se, pick as _ } from "lodash-es";
|
|
20
20
|
import "vue-router";
|
|
21
|
-
import
|
|
22
|
-
import { useStore as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { basicProps as
|
|
27
|
-
import { ModalApi as
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
|
|
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
|
-
...
|
|
35
|
-
...
|
|
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(
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
let
|
|
47
|
-
if (!
|
|
48
|
-
const
|
|
49
|
-
...
|
|
50
|
-
disabledTip: Array.isArray(
|
|
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
|
-
...
|
|
53
|
-
okButtonProps:
|
|
53
|
+
...d,
|
|
54
|
+
okButtonProps: e
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
-
const r =
|
|
57
|
-
return
|
|
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
|
|
61
|
-
visible:
|
|
62
|
-
title:
|
|
63
|
-
width:
|
|
64
|
-
size:
|
|
65
|
-
fullscreen:
|
|
66
|
-
resizer:
|
|
67
|
-
top:
|
|
68
|
-
isBottom:
|
|
69
|
-
draggable:
|
|
70
|
-
showCancelBtn:
|
|
71
|
-
okText:
|
|
72
|
-
cancelText:
|
|
73
|
-
okButtonProps:
|
|
74
|
-
cancelButtonProps:
|
|
75
|
-
confirmLoading:
|
|
76
|
-
cancelLoading:
|
|
77
|
-
showOkBtn:
|
|
78
|
-
loading:
|
|
79
|
-
height:
|
|
80
|
-
showFooter:
|
|
81
|
-
loadingTip:
|
|
82
|
-
...
|
|
83
|
-
} =
|
|
84
|
-
const
|
|
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
|
|
90
|
-
}),
|
|
91
|
-
const
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
modelValue: e(T),
|
|
97
|
-
width: e(po),
|
|
97
|
+
...r,
|
|
98
|
+
modelValue: o(h),
|
|
99
|
+
width: o(Oe),
|
|
98
100
|
destroyOnClose: !0,
|
|
99
|
-
closeOnClickModal
|
|
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:
|
|
106
|
+
top: o(fe) ?? Ee,
|
|
104
107
|
fullscreen: !1,
|
|
105
108
|
draggable: !1,
|
|
106
|
-
|
|
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
|
-
}),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
|
|
136
|
+
ee(
|
|
123
137
|
() => {
|
|
124
|
-
var
|
|
125
|
-
return (
|
|
138
|
+
var e;
|
|
139
|
+
return (e = m.value) == null ? void 0 : e.visible;
|
|
126
140
|
},
|
|
127
|
-
(
|
|
141
|
+
(e) => {
|
|
128
142
|
var s;
|
|
129
|
-
|
|
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
|
-
),
|
|
135
|
-
() =>
|
|
136
|
-
(
|
|
152
|
+
), ee(
|
|
153
|
+
() => o(h),
|
|
154
|
+
(e) => {
|
|
137
155
|
var s;
|
|
138
|
-
|
|
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
|
|
145
|
-
|
|
162
|
+
function Ie(e) {
|
|
163
|
+
N.value = e;
|
|
146
164
|
}
|
|
147
|
-
function
|
|
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
|
|
153
|
-
return
|
|
170
|
+
function $(e) {
|
|
171
|
+
return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
|
|
154
172
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
return
|
|
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
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
return
|
|
164
|
-
const s =
|
|
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
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
169
|
-
return
|
|
170
|
-
const r =
|
|
171
|
-
return r && typeof r == "string" && r.trim() ?
|
|
172
|
-
}),
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
setModalProps:
|
|
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
|
-
|
|
179
|
-
|
|
196
|
+
w(() => {
|
|
197
|
+
o(T) && o(T).setModalHeight();
|
|
180
198
|
});
|
|
181
199
|
},
|
|
182
200
|
scrollToBottom: () => {
|
|
183
|
-
var
|
|
184
|
-
|
|
201
|
+
var e;
|
|
202
|
+
o(T) && ((e = o(T)) == null || e.onScrollBottom());
|
|
185
203
|
}
|
|
186
204
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
...
|
|
192
|
-
onClosed:
|
|
241
|
+
...e,
|
|
242
|
+
onClosed: e.onClosed || p.onCancel || p.onClose
|
|
193
243
|
},
|
|
194
|
-
|
|
244
|
+
C
|
|
195
245
|
);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
207
|
-
class: ["tt-ui-modal",
|
|
208
|
-
"before-close":
|
|
209
|
-
"close-icon": () =>
|
|
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:
|
|
272
|
+
icon: o(bo),
|
|
212
273
|
isCustomSvg: !0
|
|
213
274
|
})
|
|
214
|
-
}),
|
|
215
|
-
default:
|
|
216
|
-
|
|
275
|
+
}), D({
|
|
276
|
+
default: c(() => [
|
|
277
|
+
S(uo, {
|
|
217
278
|
ref_key: "modalWrapperRef",
|
|
218
|
-
ref:
|
|
219
|
-
"is-bottom":
|
|
220
|
-
height:
|
|
221
|
-
loading:
|
|
222
|
-
"loading-tip":
|
|
223
|
-
|
|
224
|
-
"
|
|
225
|
-
|
|
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:
|
|
228
|
-
|
|
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
|
-
|
|
297
|
+
e.$slots.header ? {
|
|
236
298
|
name: "header",
|
|
237
|
-
fn:
|
|
238
|
-
|
|
299
|
+
fn: c(() => [
|
|
300
|
+
b(e.$slots, "header")
|
|
239
301
|
]),
|
|
240
302
|
key: "1"
|
|
241
303
|
} : {
|
|
242
304
|
name: "header",
|
|
243
|
-
fn:
|
|
244
|
-
|
|
245
|
-
title:
|
|
246
|
-
onMousedown:
|
|
247
|
-
},
|
|
248
|
-
titleToolbar:
|
|
249
|
-
|
|
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
|
-
|
|
315
|
+
L(Object.keys(e.$slots), (r) => ({
|
|
254
316
|
name: r,
|
|
255
|
-
fn:
|
|
256
|
-
|
|
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
|
-
|
|
325
|
+
o(ue).footer || o(J) ? {
|
|
264
326
|
name: "footer",
|
|
265
|
-
fn:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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:
|
|
332
|
+
style: { borderTop: N.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
|
|
271
333
|
"ok-button-props": {
|
|
272
|
-
...
|
|
273
|
-
disabledTip:
|
|
274
|
-
disabled:
|
|
334
|
+
...o(y),
|
|
335
|
+
disabledTip: Q.value[1],
|
|
336
|
+
disabled: Q.value[0]
|
|
275
337
|
},
|
|
276
|
-
onFooterok:
|
|
277
|
-
onCancel:
|
|
278
|
-
}),
|
|
279
|
-
|
|
280
|
-
|
|
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:
|
|
284
|
-
|
|
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,
|
|
350
|
+
], 8, To)
|
|
289
351
|
])
|
|
290
352
|
]),
|
|
291
353
|
key: "2"
|
|
292
354
|
} : void 0,
|
|
293
|
-
|
|
294
|
-
|
|
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:
|
|
307
|
-
|
|
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,
|
|
312
|
-
[
|
|
313
|
-
draggable:
|
|
314
|
-
fullscreen:
|
|
315
|
-
resizer:
|
|
316
|
-
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
|
-
|
|
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;
|