@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.
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- 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 +254 -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/utils/resolve-modal-target.d.ts +19 -0
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +151 -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-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
- package/dist/components/tt-table/src/TableForm.vue.d.ts +0 -9
- package/dist/components/tt-table/src/TableForm.vue.js +37 -38
- package/dist/components/tt-table/src/hooks/useTableForm.js +22 -23
- package/dist/components/tt-table/src/props.d.ts +0 -5
- package/dist/components/tt-table/src/props.js +22 -31
- package/dist/components/tt-table/src/types/tableForm.d.ts +0 -2
- package/dist/components/tt-table/src/utils/table-form-api.js +14 -15
- package/dist/directives/dialog-resize/use-draggable.js +47 -25
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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,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(
|
|
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
101
|
// 默认 false;可通过 modalProps.closeOnClickModal 开启点击遮罩关闭
|
|
100
|
-
closeOnClickModal:
|
|
102
|
+
closeOnClickModal: e.closeOnClickModal ?? !1,
|
|
101
103
|
// 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
|
|
102
104
|
// 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
|
|
103
105
|
closeOnPressEscape: !1,
|
|
104
|
-
top:
|
|
106
|
+
top: o(fe) ?? Ee,
|
|
105
107
|
fullscreen: !1,
|
|
106
108
|
draggable: !1,
|
|
107
|
-
|
|
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
|
-
}),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
136
|
+
ee(
|
|
124
137
|
() => {
|
|
125
|
-
var
|
|
126
|
-
return (
|
|
138
|
+
var e;
|
|
139
|
+
return (e = m.value) == null ? void 0 : e.visible;
|
|
127
140
|
},
|
|
128
|
-
(
|
|
141
|
+
(e) => {
|
|
129
142
|
var s;
|
|
130
|
-
|
|
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
|
-
),
|
|
136
|
-
() =>
|
|
137
|
-
(
|
|
152
|
+
), ee(
|
|
153
|
+
() => o(h),
|
|
154
|
+
(e) => {
|
|
138
155
|
var s;
|
|
139
|
-
|
|
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
|
|
146
|
-
|
|
162
|
+
function Ie(e) {
|
|
163
|
+
N.value = e;
|
|
147
164
|
}
|
|
148
|
-
function
|
|
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
|
|
154
|
-
return
|
|
170
|
+
function $(e) {
|
|
171
|
+
return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
|
|
155
172
|
}
|
|
156
|
-
function
|
|
157
|
-
const
|
|
158
|
-
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;
|
|
159
176
|
}
|
|
160
|
-
const
|
|
161
|
-
var
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
return
|
|
165
|
-
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;
|
|
166
183
|
if (s)
|
|
167
|
-
return
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
return
|
|
171
|
-
const r =
|
|
172
|
-
return r && typeof r == "string" && r.trim() ?
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
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,
|
|
177
194
|
emitVisible: void 0,
|
|
178
195
|
redoModalHeight: () => {
|
|
179
|
-
|
|
180
|
-
|
|
196
|
+
w(() => {
|
|
197
|
+
o(T) && o(T).setModalHeight();
|
|
181
198
|
});
|
|
182
199
|
},
|
|
183
200
|
scrollToBottom: () => {
|
|
184
|
-
var
|
|
185
|
-
|
|
201
|
+
var e;
|
|
202
|
+
o(T) && ((e = o(T)) == null || e.onScrollBottom());
|
|
186
203
|
}
|
|
187
204
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
...
|
|
193
|
-
onClosed:
|
|
241
|
+
...e,
|
|
242
|
+
onClosed: e.onClosed || p.onCancel || p.onClose
|
|
194
243
|
},
|
|
195
|
-
|
|
244
|
+
C
|
|
196
245
|
);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
208
|
-
class: ["tt-ui-modal",
|
|
209
|
-
"before-close":
|
|
210
|
-
"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), {
|
|
211
271
|
size: 16,
|
|
212
|
-
icon:
|
|
272
|
+
icon: o(bo),
|
|
213
273
|
isCustomSvg: !0
|
|
214
274
|
})
|
|
215
|
-
}),
|
|
216
|
-
default:
|
|
217
|
-
|
|
275
|
+
}), D({
|
|
276
|
+
default: c(() => [
|
|
277
|
+
S(uo, {
|
|
218
278
|
ref_key: "modalWrapperRef",
|
|
219
|
-
ref:
|
|
220
|
-
"is-bottom":
|
|
221
|
-
height:
|
|
222
|
-
loading:
|
|
223
|
-
"loading-tip":
|
|
224
|
-
|
|
225
|
-
"
|
|
226
|
-
|
|
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:
|
|
229
|
-
|
|
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
|
-
|
|
297
|
+
e.$slots.header ? {
|
|
237
298
|
name: "header",
|
|
238
|
-
fn:
|
|
239
|
-
|
|
299
|
+
fn: c(() => [
|
|
300
|
+
b(e.$slots, "header")
|
|
240
301
|
]),
|
|
241
302
|
key: "1"
|
|
242
303
|
} : {
|
|
243
304
|
name: "header",
|
|
244
|
-
fn:
|
|
245
|
-
|
|
246
|
-
title:
|
|
247
|
-
onMousedown:
|
|
248
|
-
},
|
|
249
|
-
titleToolbar:
|
|
250
|
-
|
|
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
|
-
|
|
315
|
+
L(Object.keys(e.$slots), (r) => ({
|
|
255
316
|
name: r,
|
|
256
|
-
fn:
|
|
257
|
-
|
|
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
|
-
|
|
325
|
+
o(ue).footer || o(J) ? {
|
|
265
326
|
name: "footer",
|
|
266
|
-
fn:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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:
|
|
332
|
+
style: { borderTop: N.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
|
|
272
333
|
"ok-button-props": {
|
|
273
|
-
...
|
|
274
|
-
disabledTip:
|
|
275
|
-
disabled:
|
|
334
|
+
...o(y),
|
|
335
|
+
disabledTip: Q.value[1],
|
|
336
|
+
disabled: Q.value[0]
|
|
276
337
|
},
|
|
277
|
-
onFooterok:
|
|
278
|
-
onCancel:
|
|
279
|
-
}),
|
|
280
|
-
|
|
281
|
-
|
|
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:
|
|
285
|
-
|
|
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,
|
|
350
|
+
], 8, To)
|
|
290
351
|
])
|
|
291
352
|
]),
|
|
292
353
|
key: "2"
|
|
293
354
|
} : void 0,
|
|
294
|
-
|
|
295
|
-
|
|
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:
|
|
308
|
-
|
|
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,
|
|
313
|
-
[
|
|
314
|
-
draggable:
|
|
315
|
-
fullscreen:
|
|
316
|
-
resizer:
|
|
317
|
-
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
|
-
|
|
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;
|