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