@dazhicheng/ui 1.6.20 → 1.6.21
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/index.js +132 -127
- package/package.json +1 -1
|
@@ -1,28 +1,39 @@
|
|
|
1
|
+
import { getModalScopeKey as i } from "./modal-scope.js";
|
|
1
2
|
const n = [];
|
|
3
|
+
function a() {
|
|
4
|
+
const e = i();
|
|
5
|
+
return n.filter((t) => t.scope === e).map((t) => t.uid);
|
|
6
|
+
}
|
|
2
7
|
let r = !1;
|
|
3
|
-
function
|
|
8
|
+
function s(e) {
|
|
4
9
|
if (!e || !(e instanceof HTMLElement)) return !1;
|
|
5
10
|
const t = e.tagName;
|
|
6
11
|
return !!(t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable || e.closest(
|
|
7
12
|
".el-select, .el-select-v2, .el-cascader, .el-date-editor, .el-time-picker, .el-color-picker, .el-input, .el-textarea, .el-autocomplete, .el-input-number, .el-mention"
|
|
8
13
|
));
|
|
9
14
|
}
|
|
10
|
-
function
|
|
15
|
+
function c(e) {
|
|
11
16
|
if (e.key !== "Escape" && e.key !== "Esc" || n.length === 0) return;
|
|
12
17
|
const t = e.target ?? document.activeElement;
|
|
13
|
-
if (
|
|
18
|
+
if (s(t))
|
|
14
19
|
return;
|
|
15
20
|
const o = n[n.length - 1];
|
|
16
21
|
o && (e.stopPropagation(), o.close());
|
|
17
22
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
23
|
+
function d(e) {
|
|
24
|
+
l(e.uid), n.push({ ...e, scope: i() }), !r && typeof document < "u" && (document.addEventListener("keydown", c), r = !0);
|
|
20
25
|
}
|
|
21
|
-
function
|
|
26
|
+
function f() {
|
|
27
|
+
const e = i();
|
|
28
|
+
n.filter((t) => t.scope === e).reverse().forEach((t) => t.close());
|
|
29
|
+
}
|
|
30
|
+
function l(e) {
|
|
22
31
|
const t = n.findIndex((o) => o.uid === e);
|
|
23
|
-
t !== -1 && n.splice(t, 1), n.length === 0 && r && typeof document < "u" && (document.removeEventListener("keydown",
|
|
32
|
+
t !== -1 && n.splice(t, 1), n.length === 0 && r && typeof document < "u" && (document.removeEventListener("keydown", c), r = !1);
|
|
24
33
|
}
|
|
25
34
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
f as closeAllModals,
|
|
36
|
+
a as getOpenModalUids,
|
|
37
|
+
d as pushModal,
|
|
38
|
+
l as removeModal
|
|
28
39
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useZIndex } from 'element-plus';
|
|
2
|
+
/** element-plus 层级计数器句柄,必须由组件在 setup 里取才能继承 ElConfigProvider 的基准 */
|
|
3
|
+
export type ElementPlusZIndex = ReturnType<typeof useZIndex>;
|
|
4
|
+
/** 当前已打开弹窗里的最高层级 */
|
|
5
|
+
export declare function getOpenModalMaxZIndex(): number;
|
|
6
|
+
/**
|
|
7
|
+
* 申请一个高于当前所有已打开弹窗的层级。
|
|
8
|
+
*
|
|
9
|
+
* 起点取 element-plus 的 nextZIndex,保证 ElConfigProvider 配的基准仍生效;
|
|
10
|
+
* 但它是模块级计数器,微前端下多份 element-plus 各自起算会让后开的拿到更小的值,
|
|
11
|
+
* 所以再用页面上已打开遮罩的实际层级兜一层。
|
|
12
|
+
* @param elementPlusZIndex 计数器句柄
|
|
13
|
+
* @returns 本次弹窗应使用的 z-index
|
|
14
|
+
*/
|
|
15
|
+
export declare function allocateModalZIndex(elementPlusZIndex: ElementPlusZIndex): number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getOpenModalOverlays as r, readOverlayZIndex as x } from "./resolve-modal-target.js";
|
|
2
|
+
const a = 1, c = 2e3;
|
|
3
|
+
let o = 0;
|
|
4
|
+
function s() {
|
|
5
|
+
return r().reduce((n, e) => Math.max(n, x(e)), 0);
|
|
6
|
+
}
|
|
7
|
+
function I(n, e) {
|
|
8
|
+
const { currentZIndex: d, nextZIndex: l } = n;
|
|
9
|
+
let t = 0;
|
|
10
|
+
for (; d.value <= e && t < c; )
|
|
11
|
+
l(), t += 1;
|
|
12
|
+
}
|
|
13
|
+
function u(n) {
|
|
14
|
+
const e = Math.max(
|
|
15
|
+
n.nextZIndex(),
|
|
16
|
+
s() + a,
|
|
17
|
+
o + a
|
|
18
|
+
);
|
|
19
|
+
return o = e, I(n, e), e;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
u as allocateModalZIndex,
|
|
23
|
+
s as getOpenModalMaxZIndex
|
|
24
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const MODAL_OVERLAY_CONTAINED_CLASS = "tt-modal-overlay--contained";
|
|
2
|
+
/** 遮罩的稳定标记类。modal 为 false 时 element-plus 不输出 el-overlay,故不能用它定位 */
|
|
3
|
+
export declare const MODAL_OVERLAY_CLASS = "tt-modal-overlay";
|
|
2
4
|
/** 注入全局样式,避免仅依赖 Vue SFC / scopecss 导致 absolute 未生效 */
|
|
3
5
|
export declare function ensureContainedOverlayStyle(doc?: Document): void;
|
|
4
6
|
/** 用内联样式强制区域遮罩,压过 EP 的 position:fixed(含内部 overlay-dialog) */
|
|
@@ -12,6 +14,18 @@ export declare function suspendOverlayByUid(uid: string | number, doc?: Document
|
|
|
12
14
|
export declare function watchOverlayThenSuspend(uid: string | number, doc?: Document, timeoutMs?: number): () => void;
|
|
13
15
|
/** KeepAlive / 切回:恢复未关闭的弹窗遮罩 */
|
|
14
16
|
export declare function resumeOverlayByUid(uid: string | number, doc?: Document): void;
|
|
17
|
+
/** 读取遮罩的层级数值,auto / 空值按 0 计 */
|
|
18
|
+
export declare function readOverlayZIndex(el: HTMLElement): number;
|
|
19
|
+
/** 页面上仍显示着的弹窗遮罩,切页挂起的不算;扫真实 document 以覆盖其它子应用 */
|
|
20
|
+
export declare function getOpenModalOverlays(doc?: Document): HTMLElement[];
|
|
21
|
+
/**
|
|
22
|
+
* 已打开弹窗中层级最高的那个遮罩所在的容器。
|
|
23
|
+
* 后开的弹窗挂到同一容器层级才可比——不同容器可能分属不同 stacking context。
|
|
24
|
+
* @param excludeUid 排除自身的组件 uid
|
|
25
|
+
* @param ownTarget 自身挂载目标,用于限制在同一子应用内
|
|
26
|
+
* @param doc 起点 document
|
|
27
|
+
*/
|
|
28
|
+
export declare function findTopOpenModalOverlayHost(excludeUid?: number, ownTarget?: HTMLElement | null, doc?: Document): HTMLElement | null;
|
|
15
29
|
/**
|
|
16
30
|
* 解析弹窗 Teleport 目标。无可用节点时返回 null,由调用方回退 body。
|
|
17
31
|
* 子应用只要处在 micro 环境,尽量返回内容区节点(含 micro-app-body),以便加 contained class。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { getClientDocument as S, isSameMicroAppScope as _, resolveScanDocument as C } from "./modal-scope.js";
|
|
2
|
+
import { getOpenModalUids as O } from "./modal-stack.js";
|
|
3
|
+
const A = 48, m = 8, a = "tt-modal-overlay--contained", E = "tt-modal-overlay", y = "tt-modal-overlay-contained-style-v2";
|
|
4
|
+
function M(t = document) {
|
|
3
5
|
var r;
|
|
4
6
|
if (typeof t > "u") return;
|
|
5
7
|
const o = `
|
|
@@ -40,112 +42,146 @@ function y(t = document) {
|
|
|
40
42
|
overflow: auto !important;
|
|
41
43
|
}
|
|
42
44
|
`.trim();
|
|
43
|
-
let e = t.getElementById(
|
|
45
|
+
let e = t.getElementById(y);
|
|
44
46
|
if (e) {
|
|
45
47
|
e.textContent = o;
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
48
|
-
(r = t.getElementById("tt-modal-overlay-contained-style")) == null || r.remove(), e = t.createElement("style"), e.id =
|
|
50
|
+
(r = t.getElementById("tt-modal-overlay-contained-style")) == null || r.remove(), e = t.createElement("style"), e.id = y, e.textContent = o;
|
|
49
51
|
const n = t.head || t.documentElement;
|
|
50
52
|
n == null || n.appendChild(e);
|
|
51
53
|
}
|
|
52
|
-
function
|
|
54
|
+
function f(t) {
|
|
53
55
|
t.style.setProperty("position", "absolute", "important"), t.style.setProperty("top", "0", "important"), t.style.setProperty("right", "0", "important"), t.style.setProperty("bottom", "0", "important"), t.style.setProperty("left", "0", "important"), t.style.setProperty("height", "100%", "important");
|
|
54
56
|
}
|
|
55
|
-
function
|
|
57
|
+
function v(t) {
|
|
58
|
+
["position", "top", "right", "bottom", "left", "height"].forEach((o) => t.style.removeProperty(o));
|
|
59
|
+
}
|
|
60
|
+
function w(t, o = document) {
|
|
56
61
|
const e = o.querySelector(`.el-overlay.tt-id-${t}`);
|
|
57
62
|
if (!e) return;
|
|
58
|
-
const n = !!e.closest("micro-app-body");
|
|
59
|
-
if (!e.classList.contains(a) && !
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
const n = e.querySelector(".el-overlay-dialog"), r = !!e.closest("micro-app-body");
|
|
64
|
+
if (!e.classList.contains(a) && !r) {
|
|
65
|
+
v(e), n && v(n);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
f(e), n && f(n);
|
|
63
69
|
}
|
|
64
|
-
function
|
|
70
|
+
function g(t, o = document) {
|
|
65
71
|
const e = o.querySelector(`.el-overlay.tt-id-${t}`);
|
|
66
72
|
return e ? (e.dataset.ttModalSuspended = "1", e.style.setProperty("display", "none", "important"), !0) : !1;
|
|
67
73
|
}
|
|
68
|
-
function
|
|
69
|
-
if (
|
|
74
|
+
function B(t, o = document, e = 3e3) {
|
|
75
|
+
if (g(t, o)) return () => {
|
|
70
76
|
};
|
|
71
77
|
const n = o.body || o.documentElement;
|
|
72
78
|
if (!n) return () => {
|
|
73
79
|
};
|
|
74
80
|
let r = !1;
|
|
75
81
|
const i = () => {
|
|
76
|
-
r || (r = !0, s.disconnect(), clearTimeout(
|
|
82
|
+
r || (r = !0, s.disconnect(), clearTimeout(c));
|
|
77
83
|
}, s = new MutationObserver(() => {
|
|
78
|
-
|
|
84
|
+
g(t, o) && i();
|
|
79
85
|
});
|
|
80
86
|
s.observe(n, { childList: !0, subtree: !0 });
|
|
81
|
-
const
|
|
87
|
+
const c = window.setTimeout(i, e);
|
|
82
88
|
return i;
|
|
83
89
|
}
|
|
84
|
-
function
|
|
90
|
+
function D(t, o = document) {
|
|
85
91
|
const e = o.querySelector(`.el-overlay.tt-id-${t}`);
|
|
86
|
-
!e || e.dataset.ttModalSuspended !== "1" || (delete e.dataset.ttModalSuspended, e.style.removeProperty("display"),
|
|
92
|
+
!e || e.dataset.ttModalSuspended !== "1" || (delete e.dataset.ttModalSuspended, e.style.removeProperty("display"), w(t, o));
|
|
87
93
|
}
|
|
88
|
-
function
|
|
94
|
+
function h(t) {
|
|
95
|
+
const o = t.style.zIndex || getComputedStyle(t).zIndex, e = Number.parseInt(o, 10);
|
|
96
|
+
return Number.isNaN(e) ? 0 : e;
|
|
97
|
+
}
|
|
98
|
+
function I(t) {
|
|
99
|
+
const o = t ?? S();
|
|
100
|
+
return o ? Array.from(C(o).querySelectorAll(`.${E}`)).filter(
|
|
101
|
+
(e) => e.isConnected && e.dataset.ttModalSuspended !== "1" && e.style.display !== "none"
|
|
102
|
+
) : [];
|
|
103
|
+
}
|
|
104
|
+
function H(t, o, e) {
|
|
105
|
+
const n = S(), r = o ?? (n == null ? void 0 : n.body);
|
|
106
|
+
if (!n || !r) return null;
|
|
107
|
+
const i = O().map((l) => `tt-id-${l}`), s = I(n).filter((l) => {
|
|
108
|
+
if (t != null && l.classList.contains(`tt-id-${t}`) || !i.some((b) => l.classList.contains(b))) return !1;
|
|
109
|
+
const u = l.parentElement;
|
|
110
|
+
return !!u && _(u, r);
|
|
111
|
+
});
|
|
112
|
+
return s.length === 0 ? null : s.reduce((l, u) => h(u) >= h(l) ? u : l).parentElement;
|
|
113
|
+
}
|
|
114
|
+
function P(t) {
|
|
89
115
|
return t.isConnected ? t.getClientRects().length > 0 : !1;
|
|
90
116
|
}
|
|
91
|
-
function
|
|
92
|
-
return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >=
|
|
117
|
+
function T(t) {
|
|
118
|
+
return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >= A : !1;
|
|
93
119
|
}
|
|
94
|
-
function
|
|
120
|
+
function x(t) {
|
|
121
|
+
const o = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
122
|
+
if (o === 0) return !0;
|
|
123
|
+
const e = t.getBoundingClientRect();
|
|
124
|
+
return e.height > o + m ? !1 : e.top >= -m;
|
|
125
|
+
}
|
|
126
|
+
function p(t) {
|
|
95
127
|
return !!t.closest("micro-app-body");
|
|
96
128
|
}
|
|
97
|
-
function
|
|
98
|
-
return !t || !t.isConnected || o && !
|
|
129
|
+
function d(t, o = !0) {
|
|
130
|
+
return !t || !t.isConnected || o && !T(t) || o && !P(t) ? null : t;
|
|
99
131
|
}
|
|
100
|
-
function
|
|
132
|
+
function N(t) {
|
|
101
133
|
getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
102
134
|
}
|
|
103
|
-
function
|
|
135
|
+
function R() {
|
|
104
136
|
const t = window.__MICRO_APP_NAME__;
|
|
105
137
|
if (t) {
|
|
106
|
-
const i = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t, s = document.querySelector(`micro-app[name="${i}"] micro-app-body #app`),
|
|
107
|
-
if (
|
|
138
|
+
const i = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t, s = document.querySelector(`micro-app[name="${i}"] micro-app-body #app`), c = d(s, !1);
|
|
139
|
+
if (c) return c;
|
|
108
140
|
}
|
|
109
141
|
const o = document.querySelector("#app");
|
|
110
142
|
if (o) {
|
|
111
|
-
const i =
|
|
143
|
+
const i = d(o, !1);
|
|
112
144
|
return i || o;
|
|
113
145
|
}
|
|
114
146
|
const e = document.querySelector("micro-app-body #app");
|
|
115
147
|
if (e) {
|
|
116
|
-
const i =
|
|
148
|
+
const i = d(e, !1);
|
|
117
149
|
if (i) return i;
|
|
118
150
|
}
|
|
119
151
|
const n = document.body;
|
|
120
|
-
return n && (n.tagName === "MICRO-APP-BODY" ||
|
|
152
|
+
return n && (n.tagName === "MICRO-APP-BODY" || p(n)) ? n : document.querySelector("micro-app-body");
|
|
121
153
|
}
|
|
122
|
-
function
|
|
154
|
+
function $() {
|
|
123
155
|
const t = document.querySelector("#app-content");
|
|
124
|
-
if (t && !
|
|
125
|
-
const e =
|
|
156
|
+
if (t && !p(t)) {
|
|
157
|
+
const e = d(t, !0);
|
|
126
158
|
if (e) return e;
|
|
127
159
|
}
|
|
128
160
|
const o = document.querySelectorAll("#app");
|
|
129
161
|
for (const e of Array.from(o)) {
|
|
130
162
|
const n = e;
|
|
131
|
-
if (
|
|
132
|
-
const r =
|
|
163
|
+
if (p(n)) continue;
|
|
164
|
+
const r = d(n, !0);
|
|
133
165
|
if (r) return r;
|
|
134
166
|
}
|
|
135
167
|
return null;
|
|
136
168
|
}
|
|
137
|
-
function
|
|
169
|
+
function V() {
|
|
138
170
|
if (typeof document > "u") return null;
|
|
139
|
-
|
|
140
|
-
const t = window.__MICRO_APP_ENVIRONMENT__ ?
|
|
141
|
-
return t
|
|
171
|
+
M();
|
|
172
|
+
const t = window.__MICRO_APP_ENVIRONMENT__ ? R() : $();
|
|
173
|
+
return !t || !x(t) ? null : (N(t), t);
|
|
142
174
|
}
|
|
143
175
|
export {
|
|
176
|
+
E as MODAL_OVERLAY_CLASS,
|
|
144
177
|
a as MODAL_OVERLAY_CONTAINED_CLASS,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
178
|
+
w as applyContainedOverlayInline,
|
|
179
|
+
M as ensureContainedOverlayStyle,
|
|
180
|
+
H as findTopOpenModalOverlayHost,
|
|
181
|
+
I as getOpenModalOverlays,
|
|
182
|
+
h as readOverlayZIndex,
|
|
183
|
+
V as resolveModalTarget,
|
|
184
|
+
D as resumeOverlayByUid,
|
|
185
|
+
g as suspendOverlayByUid,
|
|
186
|
+
B as watchOverlayThenSuspend
|
|
151
187
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,92 +1,93 @@
|
|
|
1
1
|
import { TtButton as p } from "./components/tt-button/index.js";
|
|
2
|
-
import { TtAddButton as
|
|
2
|
+
import { TtAddButton as ao } from "./components/tt-button/index.js";
|
|
3
3
|
import { TtCheckbox as a } from "./components/tt-checkbox/index.js";
|
|
4
4
|
import { TtEmpty as f } from "./components/tt-empty/index.js";
|
|
5
|
-
import { addComponent as s, setConfig as
|
|
6
|
-
import { TtFormItemErrorTooltip as
|
|
7
|
-
import { TtIcon as
|
|
8
|
-
import { TtImage as
|
|
9
|
-
import { RenderDrawer as
|
|
5
|
+
import { addComponent as s, setConfig as d } from "./components/tt-form/index.js";
|
|
6
|
+
import { TtFormItemErrorTooltip as i } from "./components/tt-form-item-error-tooltip/index.js";
|
|
7
|
+
import { TtIcon as l, TtAddIcon as u, TtSubIcon as x } from "./components/tt-icon/index.js";
|
|
8
|
+
import { TtImage as T } from "./components/tt-image/index.js";
|
|
9
|
+
import { RenderDrawer as n } from "./components/tt-drawer/index.js";
|
|
10
10
|
import { RenderModal as c } from "./components/tt-modal/index.js";
|
|
11
|
-
import { TtModal as
|
|
12
|
-
import { TtSelect as
|
|
13
|
-
import { TtText as
|
|
14
|
-
import { TtUpload as
|
|
15
|
-
import { TtNavAnchor as
|
|
16
|
-
import { TtApiComponent as
|
|
11
|
+
import { TtModal as so } from "./components/tt-modal/index.js";
|
|
12
|
+
import { TtSelect as M } from "./components/tt-select/index.js";
|
|
13
|
+
import { TtText as b } from "./components/tt-text/index.js";
|
|
14
|
+
import { TtUpload as w } from "./components/tt-upload/index.js";
|
|
15
|
+
import { TtNavAnchor as R } from "./components/tt-nav-anchor/index.js";
|
|
16
|
+
import { TtApiComponent as h } from "./components/tt-api-component/index.js";
|
|
17
17
|
import * as e from "./directives/index.js";
|
|
18
|
-
import { setup as
|
|
19
|
-
import { TtLog as
|
|
20
|
-
import { TtPanelSelect as
|
|
21
|
-
import { TtRadioGroup as
|
|
22
|
-
import { setXHR as
|
|
18
|
+
import { setup as g } from "./hooks/useSetup.js";
|
|
19
|
+
import { TtLog as A } from "./components/tt-log/index.js";
|
|
20
|
+
import { TtPanelSelect as P } from "./components/tt-panel-select/index.js";
|
|
21
|
+
import { TtRadioGroup as S } from "./components/tt-radio-group/index.js";
|
|
22
|
+
import { setXHR as lo } from "./utils/xhr.js";
|
|
23
23
|
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
|
-
import { default as
|
|
29
|
-
import { useModalForm as
|
|
30
|
-
import { TtLoading as
|
|
31
|
-
import { TtTable as
|
|
32
|
-
import { useFormSchemasLink as
|
|
33
|
-
import { useDataPermissionOptions as
|
|
34
|
-
import { useBasicDataOptions as
|
|
35
|
-
import { usePanelSelectSchemas as
|
|
36
|
-
import { CODES as
|
|
37
|
-
import { useFormat as
|
|
38
|
-
import { useLoading as
|
|
39
|
-
import { useScreenshotOss as
|
|
40
|
-
import { createUppercaseInputProps as
|
|
28
|
+
import { default as xo } from "./components/tt-area/TtArea.vue.js";
|
|
29
|
+
import { useModalForm as no } from "./components/tt-modal-form/useModalForm.js";
|
|
30
|
+
import { TtLoading as Mo } from "./components/tt-loading/index.js";
|
|
31
|
+
import { TtTable as wo, TtTableAction as Ro, TtTableButton as ho } from "./components/tt-table/index.js";
|
|
32
|
+
import { useFormSchemasLink as Ao } from "./hooks/useFormSchemasLink.js";
|
|
33
|
+
import { useDataPermissionOptions as So } from "./hooks/useDataPermissionOptions.js";
|
|
34
|
+
import { useBasicDataOptions as Do } from "./hooks/useBasicDataOptions.js";
|
|
35
|
+
import { usePanelSelectSchemas as Fo } from "./hooks/usePanelSelectSchemas.js";
|
|
36
|
+
import { CODES as Lo, GROUP_BY as Eo } from "./hooks/basicDataCodes.js";
|
|
37
|
+
import { useFormat as Uo } from "./hooks/useFormat.js";
|
|
38
|
+
import { useLoading as zo } from "./hooks/useLoading.js";
|
|
39
|
+
import { useScreenshotOss as Go } from "./hooks/useScreenshotOss.js";
|
|
40
|
+
import { createUppercaseInputProps as Vo, toUppercaseInputValue as _o, uppercaseInputProps as $o } from "./utils/uppercaseInput.js";
|
|
41
41
|
import { setupDrawer as C } from "./components/tt-drawer/src/index.js";
|
|
42
|
-
import { useShowDrawer as
|
|
42
|
+
import { useShowDrawer as yo } from "./components/tt-drawer/src/index.js";
|
|
43
43
|
import { setupModal as D } from "./components/tt-modal/src/index.js";
|
|
44
|
-
import { useShowModal as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { showTtDrawer as
|
|
48
|
-
import { useDrawerResizable as
|
|
49
|
-
import { showTtModal as
|
|
50
|
-
import {
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
44
|
+
import { useShowModal as Xo } from "./components/tt-modal/src/index.js";
|
|
45
|
+
import { default as Zo } from "./directives/disabled-tip/index.js";
|
|
46
|
+
import { default as Jo } from "./directives/auto-tip/index.js";
|
|
47
|
+
import { showTtDrawer as Qo, useDrawerRender as Wo } from "./components/tt-drawer/src/hooks/useDrawerRender.js";
|
|
48
|
+
import { useDrawerResizable as rr } from "./components/tt-drawer/src/hooks/useResizable.js";
|
|
49
|
+
import { showTtModal as tr, useModalRender as mr } from "./components/tt-modal/src/hooks/useModalRender.js";
|
|
50
|
+
import { closeAllTtModal as ar, closeTtModal as fr, openTtModal as sr, ttModal as dr } from "./components/tt-modal/src/utils/modal-service.js";
|
|
51
|
+
import { default as lr } from "./directives/dialog-resize/index.js";
|
|
52
|
+
import * as ro from "zod";
|
|
53
|
+
import { useGroupForm as xr } from "./components/tt-form/src/group-form/useGroupForm.js";
|
|
54
|
+
import { COMPONENT_MAP as nr } from "./components/tt-form/src/config.js";
|
|
55
|
+
import { useForm as Mr } from "./components/tt-form/src/useForm.js";
|
|
56
|
+
import { TtImageViewer as wr } from "./components/tt-image/src/components/ImageViewer.js";
|
|
57
|
+
import { vTtLoading as hr } from "./components/tt-loading/src/directive.js";
|
|
58
|
+
import { Loading as Ar } from "./components/tt-loading/src/service.js";
|
|
59
|
+
import { useTableContext as Sr, useTableFormContext as Cr } from "./components/tt-table/src/hooks/useTableContext.js";
|
|
60
|
+
import { useTableFormRender as Ir, useTableRender as Fr } from "./components/tt-table/src/hooks/useTableRender.js";
|
|
61
|
+
import { ttUploadProps as Lr } from "./components/tt-upload/src/typing.js";
|
|
61
62
|
const I = [
|
|
62
63
|
p,
|
|
63
|
-
|
|
64
|
+
n,
|
|
64
65
|
c,
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
l,
|
|
67
|
+
M,
|
|
67
68
|
f,
|
|
68
|
-
|
|
69
|
+
b,
|
|
69
70
|
a,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
i,
|
|
72
|
+
T,
|
|
73
|
+
w,
|
|
72
74
|
R,
|
|
73
|
-
|
|
75
|
+
u,
|
|
74
76
|
x,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
h,
|
|
78
|
+
A,
|
|
77
79
|
P,
|
|
78
|
-
S
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}), C(r), D(r);
|
|
80
|
+
S
|
|
81
|
+
], F = (o) => {
|
|
82
|
+
I.forEach((r) => o.use(r)), Object.keys(e).forEach((r) => {
|
|
83
|
+
const t = e[r], m = r.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
84
|
+
o.directive(m, t);
|
|
85
|
+
}), C(o), D(o);
|
|
85
86
|
};
|
|
86
|
-
function
|
|
87
|
-
s(
|
|
87
|
+
function eo(o) {
|
|
88
|
+
s(o == null ? void 0 : o.components), d(o == null ? void 0 : o.defineRules, o == null ? void 0 : o.modelPropNameMap);
|
|
88
89
|
}
|
|
89
|
-
const
|
|
90
|
+
const to = {
|
|
90
91
|
/**
|
|
91
92
|
* 安装组件
|
|
92
93
|
* @param app Vue 应用实例
|
|
@@ -97,73 +98,77 @@ const tr = {
|
|
|
97
98
|
* @param options 全局参数
|
|
98
99
|
* @returns 合并后的全局参数
|
|
99
100
|
*/
|
|
100
|
-
setup:
|
|
101
|
+
setup: g
|
|
101
102
|
};
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
Lo as CODES,
|
|
105
|
+
nr as COMPONENT_MAP,
|
|
106
|
+
Eo as GROUP_BY,
|
|
107
|
+
Ar as Loading,
|
|
108
|
+
n as RenderDrawer,
|
|
108
109
|
c as RenderModal,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
ao as TtAddButton,
|
|
111
|
+
u as TtAddIcon,
|
|
112
|
+
h as TtApiComponent,
|
|
113
|
+
xo as TtArea,
|
|
113
114
|
p as TtButton,
|
|
114
115
|
a as TtCheckbox,
|
|
115
116
|
f as TtEmpty,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
117
|
+
l as TtIcon,
|
|
118
|
+
T as TtImage,
|
|
119
|
+
wr as TtImageViewer,
|
|
120
|
+
Mo as TtLoading,
|
|
121
|
+
A as TtLog,
|
|
122
|
+
so as TtModal,
|
|
123
|
+
R as TtNavAnchor,
|
|
124
|
+
P as TtPanelSelect,
|
|
125
|
+
S as TtRadioGroup,
|
|
126
|
+
M as TtSelect,
|
|
127
|
+
x as TtSubIcon,
|
|
128
|
+
wo as TtTable,
|
|
129
|
+
Ro as TtTableAction,
|
|
130
|
+
ho as TtTableButton,
|
|
131
|
+
b as TtText,
|
|
132
|
+
w as TtUpload,
|
|
132
133
|
s as addComponent,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
Jo as autoTip,
|
|
135
|
+
ar as closeAllTtModal,
|
|
136
|
+
fr as closeTtModal,
|
|
137
|
+
Vo as createUppercaseInputProps,
|
|
138
|
+
to as default,
|
|
139
|
+
lr as dialogResize,
|
|
140
|
+
Zo as disabledTip,
|
|
141
|
+
eo as formAdapter,
|
|
142
|
+
sr as openTtModal,
|
|
143
|
+
d as setConfig,
|
|
144
|
+
lo as setXHR,
|
|
141
145
|
C as setupDrawer,
|
|
142
146
|
D as setupModal,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Mr as
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
147
|
+
Qo as showTtDrawer,
|
|
148
|
+
tr as showTtModal,
|
|
149
|
+
_o as toUppercaseInputValue,
|
|
150
|
+
dr as ttModal,
|
|
151
|
+
Lr as ttUploadProps,
|
|
152
|
+
$o as uppercaseInputProps,
|
|
153
|
+
Do as useBasicDataOptions,
|
|
154
|
+
So as useDataPermissionOptions,
|
|
155
|
+
Wo as useDrawerRender,
|
|
156
|
+
rr as useDrawerResizable,
|
|
157
|
+
Mr as useForm,
|
|
158
|
+
Ao as useFormSchemasLink,
|
|
159
|
+
Uo as useFormat,
|
|
160
|
+
xr as useGroupForm,
|
|
161
|
+
zo as useLoading,
|
|
162
|
+
no as useModalForm,
|
|
163
|
+
mr as useModalRender,
|
|
164
|
+
Fo as usePanelSelectSchemas,
|
|
165
|
+
Go as useScreenshotOss,
|
|
166
|
+
yo as useShowDrawer,
|
|
167
|
+
Xo as useShowModal,
|
|
168
|
+
Sr as useTableContext,
|
|
169
|
+
Cr as useTableFormContext,
|
|
170
|
+
Ir as useTableFormRender,
|
|
171
|
+
Fr as useTableRender,
|
|
172
|
+
hr as vTtLoading,
|
|
173
|
+
ro as z
|
|
169
174
|
};
|