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