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