@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.
@@ -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 u(e) {
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 i(e) {
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 (u(t))
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 l(e) {
19
- c(e.uid), n.push(e), !r && typeof document < "u" && (document.addEventListener("keydown", i), r = !0);
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 c(e) {
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", i), r = !1);
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
- l as pushModal,
27
- c as removeModal
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
- const a = "tt-modal-overlay--contained", u = "tt-modal-overlay-contained-style-v2";
2
- function y(t = document) {
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(u);
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 = u, e.textContent = o;
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 p(t) {
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 f(t, o = document) {
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) && !n) return;
60
- p(e);
61
- const r = e.querySelector(".el-overlay-dialog");
62
- r && p(r);
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 m(t, o = document) {
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 b(t, o = document, e = 3e3) {
69
- if (m(t, o)) return () => {
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(d));
82
+ r || (r = !0, s.disconnect(), clearTimeout(c));
77
83
  }, s = new MutationObserver(() => {
78
- m(t, o) && i();
84
+ g(t, o) && i();
79
85
  });
80
86
  s.observe(n, { childList: !0, subtree: !0 });
81
- const d = window.setTimeout(i, e);
87
+ const c = window.setTimeout(i, e);
82
88
  return i;
83
89
  }
84
- function C(t, o = document) {
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"), f(t, o));
92
+ !e || e.dataset.ttModalSuspended !== "1" || (delete e.dataset.ttModalSuspended, e.style.removeProperty("display"), w(t, o));
87
93
  }
88
- function v(t) {
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 g(t) {
92
- return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >= 48 : !1;
117
+ function T(t) {
118
+ return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >= A : !1;
93
119
  }
94
- function c(t) {
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 l(t, o = !0) {
98
- return !t || !t.isConnected || o && !g(t) || o && !v(t) ? null : t;
129
+ function d(t, o = !0) {
130
+ return !t || !t.isConnected || o && !T(t) || o && !P(t) ? null : t;
99
131
  }
100
- function h(t) {
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`), d = l(s, !1);
107
- if (d) return d;
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 = l(o, !1);
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 = l(e, !1);
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" || c(n)) ? n : document.querySelector("micro-app-body");
152
+ return n && (n.tagName === "MICRO-APP-BODY" || p(n)) ? n : document.querySelector("micro-app-body");
121
153
  }
122
- function S() {
154
+ function $() {
123
155
  const t = document.querySelector("#app-content");
124
- if (t && !c(t)) {
125
- const e = l(t, !0);
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 (c(n)) continue;
132
- const r = l(n, !0);
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 A() {
169
+ function V() {
138
170
  if (typeof document > "u") return null;
139
- y();
140
- const t = window.__MICRO_APP_ENVIRONMENT__ ? _() : S();
141
- return t && h(t), 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
- f as applyContainedOverlayInline,
146
- y as ensureContainedOverlayStyle,
147
- A as resolveModalTarget,
148
- C as resumeOverlayByUid,
149
- m as suspendOverlayByUid,
150
- b as watchOverlayThenSuspend
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 ar } from "./components/tt-button/index.js";
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 i } from "./components/tt-form/index.js";
6
- import { TtFormItemErrorTooltip as d } from "./components/tt-form-item-error-tooltip/index.js";
7
- import { TtIcon as u, TtAddIcon as x, TtSubIcon as T } from "./components/tt-icon/index.js";
8
- import { TtImage as n } from "./components/tt-image/index.js";
9
- import { RenderDrawer as l } from "./components/tt-drawer/index.js";
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 sr } from "./components/tt-modal/index.js";
12
- import { TtSelect as b } from "./components/tt-select/index.js";
13
- import { TtText as w } from "./components/tt-text/index.js";
14
- import { TtUpload as R } from "./components/tt-upload/index.js";
15
- import { TtNavAnchor as h } from "./components/tt-nav-anchor/index.js";
16
- import { TtApiComponent as g } from "./components/tt-api-component/index.js";
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 M } from "./hooks/useSetup.js";
19
- import { TtLog as P } from "./components/tt-log/index.js";
20
- import { TtPanelSelect as S } from "./components/tt-panel-select/index.js";
21
- import { TtRadioGroup as A } from "./components/tt-radio-group/index.js";
22
- import { setXHR as dr } from "./utils/xhr.js";
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 xr } from "./components/tt-area/TtArea.vue.js";
29
- import { useModalForm as nr } from "./components/tt-modal-form/useModalForm.js";
30
- import { TtLoading as cr } from "./components/tt-loading/index.js";
31
- import { TtTable as wr, TtTableAction as Rr, TtTableButton as hr } from "./components/tt-table/index.js";
32
- import { useFormSchemasLink as Mr } from "./hooks/useFormSchemasLink.js";
33
- import { useDataPermissionOptions as Sr } from "./hooks/useDataPermissionOptions.js";
34
- import { useBasicDataOptions as Cr } from "./hooks/useBasicDataOptions.js";
35
- import { usePanelSelectSchemas as Ir } from "./hooks/usePanelSelectSchemas.js";
36
- import { CODES as Or, GROUP_BY as Lr } from "./hooks/basicDataCodes.js";
37
- import { useFormat as Br } from "./hooks/useFormat.js";
38
- import { useLoading as vr } from "./hooks/useLoading.js";
39
- import { useScreenshotOss as Nr } from "./hooks/useScreenshotOss.js";
40
- import { createUppercaseInputProps as kr, toUppercaseInputValue as Vr, uppercaseInputProps as _r } from "./utils/uppercaseInput.js";
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 jr } from "./components/tt-drawer/src/index.js";
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 Hr } from "./components/tt-modal/src/index.js";
45
- import { default as Yr } from "./directives/disabled-tip/index.js";
46
- import { default as qr } from "./directives/auto-tip/index.js";
47
- import { showTtDrawer as Kr, useDrawerRender as Qr } from "./components/tt-drawer/src/hooks/useDrawerRender.js";
48
- import { useDrawerResizable as ro } from "./components/tt-drawer/src/hooks/useResizable.js";
49
- import { showTtModal as eo, useModalRender as to } from "./components/tt-modal/src/hooks/useModalRender.js";
50
- import { default as po } from "./directives/dialog-resize/index.js";
51
- import * as or from "zod";
52
- import { useGroupForm as fo } from "./components/tt-form/src/group-form/useGroupForm.js";
53
- import { COMPONENT_MAP as io } from "./components/tt-form/src/config.js";
54
- import { useForm as xo } from "./components/tt-form/src/useForm.js";
55
- import { TtImageViewer as no } from "./components/tt-image/src/components/ImageViewer.js";
56
- import { vTtLoading as co } from "./components/tt-loading/src/directive.js";
57
- import { Loading as wo } from "./components/tt-loading/src/service.js";
58
- import { useTableContext as ho, useTableFormContext as go } from "./components/tt-table/src/hooks/useTableContext.js";
59
- import { useTableFormRender as Po, useTableRender as So } from "./components/tt-table/src/hooks/useTableRender.js";
60
- import { ttUploadProps as Co } from "./components/tt-upload/src/typing.js";
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
- l,
64
+ n,
64
65
  c,
65
- u,
66
- b,
66
+ l,
67
+ M,
67
68
  f,
68
- w,
69
+ b,
69
70
  a,
70
- d,
71
- n,
71
+ i,
72
+ T,
73
+ w,
72
74
  R,
73
- h,
75
+ u,
74
76
  x,
75
- T,
76
- g,
77
+ h,
78
+ A,
77
79
  P,
78
- S,
79
- A
80
- ], F = (r) => {
81
- I.forEach((o) => r.use(o)), Object.keys(e).forEach((o) => {
82
- const t = e[o], m = o.replace(/([A-Z])/g, "-$1").toLowerCase();
83
- r.directive(m, t);
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 er(r) {
87
- s(r == null ? void 0 : r.components), i(r == null ? void 0 : r.defineRules, r == null ? void 0 : r.modelPropNameMap);
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 tr = {
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: M
101
+ setup: g
101
102
  };
102
103
  export {
103
- Or as CODES,
104
- io as COMPONENT_MAP,
105
- Lr as GROUP_BY,
106
- wo as Loading,
107
- l as RenderDrawer,
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
- ar as TtAddButton,
110
- x as TtAddIcon,
111
- g as TtApiComponent,
112
- xr as TtArea,
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
- u as TtIcon,
117
- n as TtImage,
118
- no as TtImageViewer,
119
- cr as TtLoading,
120
- P as TtLog,
121
- sr as TtModal,
122
- h as TtNavAnchor,
123
- S as TtPanelSelect,
124
- A as TtRadioGroup,
125
- b as TtSelect,
126
- T as TtSubIcon,
127
- wr as TtTable,
128
- Rr as TtTableAction,
129
- hr as TtTableButton,
130
- w as TtText,
131
- R as TtUpload,
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
- qr as autoTip,
134
- kr as createUppercaseInputProps,
135
- tr as default,
136
- po as dialogResize,
137
- Yr as disabledTip,
138
- er as formAdapter,
139
- i as setConfig,
140
- dr as setXHR,
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
- Kr as showTtDrawer,
144
- eo as showTtModal,
145
- Vr as toUppercaseInputValue,
146
- Co as ttUploadProps,
147
- _r as uppercaseInputProps,
148
- Cr as useBasicDataOptions,
149
- Sr as useDataPermissionOptions,
150
- Qr as useDrawerRender,
151
- ro as useDrawerResizable,
152
- xo as useForm,
153
- Mr as useFormSchemasLink,
154
- Br as useFormat,
155
- fo as useGroupForm,
156
- vr as useLoading,
157
- nr as useModalForm,
158
- to as useModalRender,
159
- Ir as usePanelSelectSchemas,
160
- Nr as useScreenshotOss,
161
- jr as useShowDrawer,
162
- Hr as useShowModal,
163
- ho as useTableContext,
164
- go as useTableFormContext,
165
- Po as useTableFormRender,
166
- So as useTableRender,
167
- co as vTtLoading,
168
- or as z
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.6.20",
3
+ "version": "1.6.21",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",