@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,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, ref as c, computed as b, watch as p, unref as r, nextTick as m, onMounted as B, onBeforeUnmount as C, withDirectives as L, createElementBlock as O, openBlock as k, normalizeClass as A, normalizeStyle as D, renderSlot as E } from "vue";
|
|
2
|
-
import "../../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.
|
|
2
|
+
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";
|
|
3
3
|
import { useDesign as T } from "../../../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
5
|
import { vLoading as z } from "element-plus";
|
|
@@ -7,21 +7,21 @@ export declare function setDefaultModalProps(props: Partial<ModalProps>): void;
|
|
|
7
7
|
export declare function useModalRender<TParentModalProps extends ModalProps = ModalProps>(options?: ModalApiOptions, MODAL_KEY?: symbol): readonly [import('vue').DefineSetupFnComponent<TParentModalProps, {}, {}, TParentModalProps & {}, import('vue').PublicProps>, TtModalExtendedModalApi] | readonly [import('vue').DefineSetupFnComponent<ModalProps, {}, {}, Partial<{
|
|
8
8
|
title: any;
|
|
9
9
|
visible: boolean;
|
|
10
|
-
appendTo: import('element-plus/es/utils/
|
|
11
|
-
transition: import('element-plus/es/utils/
|
|
10
|
+
appendTo: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | null)[], unknown, unknown>;
|
|
11
|
+
transition: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | import('vue').TransitionProps) | (() => import('element-plus').DialogTransition) | ((new (...args: any[]) => string | import('vue').TransitionProps) | (() => import('element-plus').DialogTransition) | null)[], unknown, unknown>;
|
|
12
12
|
size: "small" | "medium" | "mini";
|
|
13
13
|
center: boolean;
|
|
14
14
|
height: any;
|
|
15
15
|
draggable: boolean;
|
|
16
|
-
showClose: import('element-plus/es/utils/
|
|
16
|
+
showClose: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
17
17
|
loading: boolean;
|
|
18
18
|
modelValue: boolean;
|
|
19
|
-
closeOnPressEscape: import('element-plus/es/utils/
|
|
19
|
+
closeOnPressEscape: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
20
20
|
scrollTop: boolean;
|
|
21
21
|
minHeight: any;
|
|
22
22
|
showFooter: boolean;
|
|
23
23
|
fullscreen: boolean;
|
|
24
|
-
overflow: import('element-plus/es/utils/
|
|
24
|
+
overflow: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
25
25
|
testId: any;
|
|
26
26
|
modal: boolean;
|
|
27
27
|
cancelText: string;
|
|
@@ -38,28 +38,32 @@ export declare function useModalRender<TParentModalProps extends ModalProps = Mo
|
|
|
38
38
|
isBottom: boolean;
|
|
39
39
|
appendToBody: boolean;
|
|
40
40
|
destroyOnClose: boolean;
|
|
41
|
-
closeOnClickModal: import('element-plus/es/utils/
|
|
42
|
-
lockScroll: import('element-plus/es/utils/
|
|
41
|
+
closeOnClickModal: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
42
|
+
lockScroll: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
43
43
|
modalPenetrable: boolean;
|
|
44
44
|
openDelay: number;
|
|
45
45
|
closeDelay: number;
|
|
46
|
+
modalClass: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
46
47
|
trapFocus: boolean;
|
|
47
48
|
headerAriaLevel: string;
|
|
48
|
-
alignCenter: import('element-plus/es/utils/
|
|
49
|
+
alignCenter: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
50
|
+
headerClass: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
51
|
+
bodyClass: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
52
|
+
footerClass: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
49
53
|
ariaLevel: string;
|
|
50
54
|
modalApi: TtModalExtendedModalApi;
|
|
51
55
|
}> & Omit<{
|
|
52
56
|
readonly title: any;
|
|
53
57
|
readonly visible: boolean;
|
|
54
|
-
readonly appendTo: import('element-plus/es/utils/
|
|
58
|
+
readonly appendTo: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | ((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | null)[], unknown, unknown>;
|
|
55
59
|
readonly size: "small" | "medium" | "mini";
|
|
56
60
|
readonly center: boolean;
|
|
57
61
|
readonly height: any;
|
|
58
62
|
readonly draggable: boolean;
|
|
59
|
-
readonly showClose: import('element-plus/es/utils/
|
|
63
|
+
readonly showClose: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
60
64
|
readonly loading: boolean;
|
|
61
65
|
readonly modelValue: boolean;
|
|
62
|
-
readonly closeOnPressEscape: import('element-plus/es/utils/
|
|
66
|
+
readonly closeOnPressEscape: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
63
67
|
readonly scrollTop: boolean;
|
|
64
68
|
readonly minHeight: any;
|
|
65
69
|
readonly showFooter: boolean;
|
|
@@ -80,8 +84,8 @@ export declare function useModalRender<TParentModalProps extends ModalProps = Mo
|
|
|
80
84
|
readonly isBottom: boolean;
|
|
81
85
|
readonly appendToBody: boolean;
|
|
82
86
|
readonly destroyOnClose: boolean;
|
|
83
|
-
readonly closeOnClickModal: import('element-plus/es/utils/
|
|
84
|
-
readonly lockScroll: import('element-plus/es/utils/
|
|
87
|
+
readonly closeOnClickModal: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
88
|
+
readonly lockScroll: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
85
89
|
readonly modalPenetrable: boolean;
|
|
86
90
|
readonly openDelay: number;
|
|
87
91
|
readonly closeDelay: number;
|
|
@@ -90,21 +94,21 @@ export declare function useModalRender<TParentModalProps extends ModalProps = Mo
|
|
|
90
94
|
readonly ariaLevel: string;
|
|
91
95
|
readonly top?: string | undefined;
|
|
92
96
|
readonly zIndex?: number | undefined;
|
|
93
|
-
readonly transition?: import('element-plus/es/utils/
|
|
97
|
+
readonly transition?: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | import('vue').TransitionProps) | (() => import('element-plus').DialogTransition) | ((new (...args: any[]) => string | import('vue').TransitionProps) | (() => import('element-plus').DialogTransition) | null)[], unknown, unknown> | undefined;
|
|
94
98
|
readonly width?: string | number | undefined;
|
|
95
|
-
readonly closeIcon?: import('element-plus/es/utils/
|
|
99
|
+
readonly closeIcon?: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | null)[], unknown, unknown> | undefined;
|
|
96
100
|
readonly beforeClose?: import('element-plus').DialogBeforeCloseFn | undefined;
|
|
97
|
-
readonly overflow?: import('element-plus/es/utils/
|
|
101
|
+
readonly overflow?: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
98
102
|
readonly closeFunc?: (() => Promise<boolean>) | undefined;
|
|
99
103
|
readonly loadingTip?: string | undefined;
|
|
100
|
-
readonly modalClass?:
|
|
101
|
-
readonly alignCenter?: import('element-plus/es/utils/
|
|
102
|
-
readonly headerClass?:
|
|
103
|
-
readonly bodyClass?:
|
|
104
|
-
readonly footerClass?:
|
|
104
|
+
readonly modalClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
105
|
+
readonly alignCenter?: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
106
|
+
readonly headerClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
107
|
+
readonly bodyClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
108
|
+
readonly footerClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
105
109
|
readonly modalApi?: TtModalExtendedModalApi | undefined;
|
|
106
110
|
readonly "onUpdate:visible"?: ((args_0: boolean) => any) | undefined;
|
|
107
111
|
readonly "onVisible-change"?: ((args_0: boolean) => any) | undefined;
|
|
108
112
|
readonly onRegister?: ((args_0: import('../typing').ModalMethods, args_1: string) => any) | undefined;
|
|
109
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title" | "visible" | "appendTo" | "transition" | "size" | "center" | "height" | "draggable" | "showClose" | "loading" | "modelValue" | "closeOnPressEscape" | "scrollTop" | "minHeight" | "showFooter" | "fullscreen" | "overflow" | "testId" | "modal" | "cancelText" | "okText" | "resizer" | "showCancelBtn" | "showOkBtn" | "confirmLoading" | "cancelLoading" | "okButtonProps" | "cancelButtonProps" | "isBottom" | "appendToBody" | "destroyOnClose" | "closeOnClickModal" | "lockScroll" | "modalPenetrable" | "openDelay" | "closeDelay" | "trapFocus" | "headerAriaLevel" | "alignCenter" | "ariaLevel" | "modalApi"> & Partial<import('element-plus').DialogProps> & {}, import('vue').PublicProps>, TtModalExtendedModalApi];
|
|
113
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title" | "visible" | "appendTo" | "transition" | "size" | "center" | "height" | "draggable" | "showClose" | "loading" | "modelValue" | "closeOnPressEscape" | "scrollTop" | "minHeight" | "showFooter" | "fullscreen" | "overflow" | "testId" | "modal" | "cancelText" | "okText" | "resizer" | "showCancelBtn" | "showOkBtn" | "confirmLoading" | "cancelLoading" | "okButtonProps" | "cancelButtonProps" | "isBottom" | "appendToBody" | "destroyOnClose" | "closeOnClickModal" | "lockScroll" | "modalPenetrable" | "openDelay" | "closeDelay" | "modalClass" | "trapFocus" | "headerAriaLevel" | "alignCenter" | "headerClass" | "bodyClass" | "footerClass" | "ariaLevel" | "modalApi"> & Partial<import('element-plus').DialogProps> & {}, import('vue').PublicProps>, TtModalExtendedModalApi];
|
|
110
114
|
export declare function showTtModal<T extends Component>(app: App, component: T, options: ModalApiOptions): TtModalExtendedModalApi;
|
|
@@ -3,13 +3,6 @@ import { useZIndex } from 'element-plus';
|
|
|
3
3
|
export type ElementPlusZIndex = ReturnType<typeof useZIndex>;
|
|
4
4
|
/** 当前已打开弹窗里的最高层级 */
|
|
5
5
|
export declare function getOpenModalMaxZIndex(): number;
|
|
6
|
-
/**
|
|
7
|
-
* 把 element-plus 计数器抬到 target 之上。弹窗内的下拉、气泡仍由它发号,
|
|
8
|
-
* 且默认 Teleport 到 body 与遮罩同级,不同步就会落到弹窗下面。
|
|
9
|
-
* @param elementPlusZIndex 计数器句柄
|
|
10
|
-
* @param target 需要被压住的层级
|
|
11
|
-
*/
|
|
12
|
-
export declare function syncElementPlusZIndexAbove(elementPlusZIndex: ElementPlusZIndex, target: number): void;
|
|
13
6
|
/**
|
|
14
7
|
* 申请一个高于当前所有已打开弹窗的层级。
|
|
15
8
|
*
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { getOpenModalOverlays as
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
function
|
|
5
|
-
return
|
|
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
6
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
d(), a += 1;
|
|
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;
|
|
13
12
|
}
|
|
14
13
|
function u(n) {
|
|
15
14
|
const e = Math.max(
|
|
16
15
|
n.nextZIndex(),
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
s() + a,
|
|
17
|
+
o + a
|
|
19
18
|
);
|
|
20
|
-
return
|
|
19
|
+
return o = e, I(n, e), e;
|
|
21
20
|
}
|
|
22
21
|
export {
|
|
23
22
|
u as allocateModalZIndex,
|
|
24
|
-
|
|
25
|
-
s as syncElementPlusZIndexAbove
|
|
23
|
+
s as getOpenModalMaxZIndex
|
|
26
24
|
};
|
|
@@ -5,19 +5,6 @@ export declare const MODAL_OVERLAY_CLASS = "tt-modal-overlay";
|
|
|
5
5
|
export declare function ensureContainedOverlayStyle(doc?: Document): void;
|
|
6
6
|
/** 用内联样式强制区域遮罩,压过 EP 的 position:fixed(含内部 overlay-dialog) */
|
|
7
7
|
export declare function applyContainedOverlayInline(uid: string | number, doc?: Document): void;
|
|
8
|
-
/**
|
|
9
|
-
* 打开/resume:保证区域遮罩能吃到点击。
|
|
10
|
-
* 同容器内页面兄弟 z-index 更高时会点穿;仅调 DOM 顺序不够,需抬遮罩层级。
|
|
11
|
-
*
|
|
12
|
-
* 不把 axios / v-loading 的 `.el-loading-mask` 算进兄弟层级:
|
|
13
|
-
* 编辑弹窗拉详情时 loading 会挂到同一 `#app`,若据此抬遮罩却未同步 EP,
|
|
14
|
-
* 弹窗内 PanelSelect / Select 下拉会掉到遮罩下面。
|
|
15
|
-
*/
|
|
16
|
-
export declare function ensureOverlayHitTarget(uid: string | number, doc?: Document): void;
|
|
17
|
-
/** 区域弹窗锁挂载容器滚动(不锁 body,侧栏/顶栏仍可操作) */
|
|
18
|
-
export declare function lockModalMountScroll(target: HTMLElement | null): void;
|
|
19
|
-
/** 关闭/切走时恢复挂载容器滚动 */
|
|
20
|
-
export declare function unlockModalMountScroll(target: HTMLElement | null): void;
|
|
21
8
|
/** KeepAlive / 切页:隐藏已 Teleport 出去的遮罩,避免挡其它页。找到并隐藏则 true */
|
|
22
9
|
export declare function suspendOverlayByUid(uid: string | number, doc?: Document): boolean;
|
|
23
10
|
/**
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { getClientDocument as b, isSameMicroAppScope as
|
|
1
|
+
import { getClientDocument as b, isSameMicroAppScope as C, resolveScanDocument as A } from "./modal-scope.js";
|
|
2
2
|
import { getOpenModalUids as E } from "./modal-stack.js";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
3
|
+
const M = 48, y = 8, a = "tt-modal-overlay--contained", O = "tt-modal-overlay";
|
|
4
|
+
function m(t) {
|
|
5
|
+
return `.${O}.tt-id-${t}`;
|
|
6
|
+
}
|
|
7
|
+
const f = "tt-modal-overlay-contained-style-v2";
|
|
8
|
+
function w(t = document) {
|
|
5
9
|
var r;
|
|
6
10
|
if (typeof t > "u") return;
|
|
7
11
|
const o = `
|
|
8
|
-
.el-overlay.${
|
|
9
|
-
.el-overlay.${
|
|
12
|
+
.el-overlay.${a},
|
|
13
|
+
.el-overlay.${a} .el-overlay-dialog {
|
|
10
14
|
position: absolute !important;
|
|
11
15
|
inset: 0 !important;
|
|
12
16
|
height: 100% !important;
|
|
13
17
|
}
|
|
14
|
-
.el-overlay.${
|
|
18
|
+
.el-overlay.${a} .el-overlay-dialog {
|
|
15
19
|
overflow: auto !important;
|
|
16
20
|
}
|
|
17
|
-
.el-overlay.${
|
|
21
|
+
.el-overlay.${a} .tt-ui-modal.el-dialog {
|
|
18
22
|
--tt-modal-contained-top: 40px;
|
|
19
23
|
--tt-modal-contained-bottom: 24px;
|
|
20
24
|
margin-top: var(--tt-modal-contained-top) !important;
|
|
@@ -24,140 +28,110 @@ function I(t = document) {
|
|
|
24
28
|
flex-direction: column !important;
|
|
25
29
|
overflow: hidden !important;
|
|
26
30
|
}
|
|
27
|
-
.el-overlay.${
|
|
28
|
-
.el-overlay.${
|
|
31
|
+
.el-overlay.${a} .tt-ui-modal.el-dialog .el-dialog__header,
|
|
32
|
+
.el-overlay.${a} .tt-ui-modal.el-dialog .el-dialog__footer {
|
|
29
33
|
flex-shrink: 0;
|
|
30
34
|
}
|
|
31
|
-
.el-overlay.${
|
|
35
|
+
.el-overlay.${a} .tt-ui-modal.el-dialog .el-dialog__body {
|
|
32
36
|
display: flex !important;
|
|
33
37
|
flex: 1 1 auto !important;
|
|
34
38
|
flex-direction: column !important;
|
|
35
39
|
min-height: 0 !important;
|
|
36
40
|
overflow: hidden !important;
|
|
37
41
|
}
|
|
38
|
-
.el-overlay.${
|
|
42
|
+
.el-overlay.${a} .tt-ui-modal.el-dialog .tt-modal-wrapper {
|
|
39
43
|
flex: 1 1 auto !important;
|
|
40
44
|
min-height: 0 !important;
|
|
41
45
|
max-height: none !important;
|
|
42
46
|
overflow: auto !important;
|
|
43
47
|
}
|
|
44
48
|
`.trim();
|
|
45
|
-
let e = t.getElementById(
|
|
49
|
+
let e = t.getElementById(f);
|
|
46
50
|
if (e) {
|
|
47
51
|
e.textContent = o;
|
|
48
52
|
return;
|
|
49
53
|
}
|
|
50
|
-
(r = t.getElementById("tt-modal-overlay-contained-style")) == null || r.remove(), e = t.createElement("style"), e.id =
|
|
54
|
+
(r = t.getElementById("tt-modal-overlay-contained-style")) == null || r.remove(), e = t.createElement("style"), e.id = f, e.textContent = o;
|
|
51
55
|
const n = t.head || t.documentElement;
|
|
52
56
|
n == null || n.appendChild(e);
|
|
53
57
|
}
|
|
54
|
-
function
|
|
58
|
+
function v(t) {
|
|
55
59
|
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");
|
|
56
60
|
}
|
|
57
|
-
function
|
|
61
|
+
function g(t) {
|
|
58
62
|
["position", "top", "right", "bottom", "left", "height"].forEach((o) => t.style.removeProperty(o));
|
|
59
63
|
}
|
|
60
|
-
function
|
|
61
|
-
const e = o.querySelector(
|
|
64
|
+
function I(t, o = document) {
|
|
65
|
+
const e = o.querySelector(m(t));
|
|
62
66
|
if (!e) return;
|
|
63
67
|
const n = e.querySelector(".el-overlay-dialog"), r = !!e.closest("micro-app-body");
|
|
64
|
-
if (!e.classList.contains(
|
|
65
|
-
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
g(e), n && g(n), O(t, o);
|
|
69
|
-
}
|
|
70
|
-
const d = "data-tt-modal-scroll-lock";
|
|
71
|
-
function O(t, o = document) {
|
|
72
|
-
var s;
|
|
73
|
-
const e = o.querySelector(`.el-overlay.tt-id-${t}`);
|
|
74
|
-
if (!(e != null && e.parentElement)) return;
|
|
75
|
-
e.style.setProperty("pointer-events", "auto"), (s = e.querySelector(".el-overlay-dialog")) == null || s.style.setProperty("pointer-events", "auto");
|
|
76
|
-
const n = e.parentElement;
|
|
77
|
-
let r = 0;
|
|
78
|
-
for (const l of Array.from(n.children)) {
|
|
79
|
-
if (l === e || !(l instanceof HTMLElement) || l.classList.contains(A) || l.classList.contains("el-loading-mask")) continue;
|
|
80
|
-
const a = Number.parseInt(l.style.zIndex || getComputedStyle(l).zIndex || "0", 10);
|
|
81
|
-
Number.isNaN(a) || (r = Math.max(r, a));
|
|
82
|
-
}
|
|
83
|
-
const i = m(e);
|
|
84
|
-
r >= i && (e.style.zIndex = String(r + 1)), n.lastElementChild !== e && n.appendChild(e);
|
|
85
|
-
}
|
|
86
|
-
function D(t) {
|
|
87
|
-
if (!t) return;
|
|
88
|
-
const o = Number(t.getAttribute(d) || "0");
|
|
89
|
-
o === 0 && (t.dataset.ttModalPrevOverflow = t.style.overflow || "", t.style.overflow = "hidden"), t.setAttribute(d, String(o + 1));
|
|
90
|
-
}
|
|
91
|
-
function k(t) {
|
|
92
|
-
if (!t) return;
|
|
93
|
-
const o = Number(t.getAttribute(d) || "0");
|
|
94
|
-
if (o <= 1) {
|
|
95
|
-
t.style.overflow = t.dataset.ttModalPrevOverflow || "", delete t.dataset.ttModalPrevOverflow, t.removeAttribute(d);
|
|
68
|
+
if (!e.classList.contains(a) && !r) {
|
|
69
|
+
g(e), n && g(n);
|
|
96
70
|
return;
|
|
97
71
|
}
|
|
98
|
-
|
|
72
|
+
v(e), n && v(n);
|
|
99
73
|
}
|
|
100
|
-
function
|
|
101
|
-
const e = o.querySelector(
|
|
74
|
+
function h(t, o = document) {
|
|
75
|
+
const e = o.querySelector(m(t));
|
|
102
76
|
return e ? (e.dataset.ttModalSuspended = "1", e.style.setProperty("display", "none", "important"), !0) : !1;
|
|
103
77
|
}
|
|
104
|
-
function
|
|
105
|
-
if (
|
|
78
|
+
function D(t, o = document, e = 3e3) {
|
|
79
|
+
if (h(t, o)) return () => {
|
|
106
80
|
};
|
|
107
81
|
const n = o.body || o.documentElement;
|
|
108
82
|
if (!n) return () => {
|
|
109
83
|
};
|
|
110
84
|
let r = !1;
|
|
111
85
|
const i = () => {
|
|
112
|
-
r || (r = !0, s.disconnect(), clearTimeout(
|
|
86
|
+
r || (r = !0, s.disconnect(), clearTimeout(c));
|
|
113
87
|
}, s = new MutationObserver(() => {
|
|
114
|
-
|
|
88
|
+
h(t, o) && i();
|
|
115
89
|
});
|
|
116
90
|
s.observe(n, { childList: !0, subtree: !0 });
|
|
117
|
-
const
|
|
91
|
+
const c = window.setTimeout(i, e);
|
|
118
92
|
return i;
|
|
119
93
|
}
|
|
120
|
-
function
|
|
121
|
-
const e = o.querySelector(
|
|
122
|
-
!e || e.dataset.ttModalSuspended !== "1" || (delete e.dataset.ttModalSuspended, e.style.removeProperty("display"),
|
|
94
|
+
function H(t, o = document) {
|
|
95
|
+
const e = o.querySelector(m(t));
|
|
96
|
+
!e || e.dataset.ttModalSuspended !== "1" || (delete e.dataset.ttModalSuspended, e.style.removeProperty("display"), I(t, o));
|
|
123
97
|
}
|
|
124
|
-
function
|
|
98
|
+
function S(t) {
|
|
125
99
|
const o = t.style.zIndex || getComputedStyle(t).zIndex, e = Number.parseInt(o, 10);
|
|
126
100
|
return Number.isNaN(e) ? 0 : e;
|
|
127
101
|
}
|
|
128
|
-
function
|
|
102
|
+
function P(t) {
|
|
129
103
|
const o = t ?? b();
|
|
130
|
-
return o ? Array.from(
|
|
104
|
+
return o ? Array.from(A(o).querySelectorAll(`.${O}`)).filter(
|
|
131
105
|
(e) => e.isConnected && e.dataset.ttModalSuspended !== "1" && e.style.display !== "none"
|
|
132
106
|
) : [];
|
|
133
107
|
}
|
|
134
|
-
function
|
|
108
|
+
function V(t, o, e) {
|
|
135
109
|
const n = b(), r = o ?? (n == null ? void 0 : n.body);
|
|
136
110
|
if (!n || !r) return null;
|
|
137
|
-
const i = E().map((
|
|
138
|
-
if (t != null &&
|
|
139
|
-
const u =
|
|
140
|
-
return !!u &&
|
|
111
|
+
const i = E().map((l) => `tt-id-${l}`), s = P(n).filter((l) => {
|
|
112
|
+
if (t != null && l.classList.contains(`tt-id-${t}`) || !i.some((_) => l.classList.contains(_))) return !1;
|
|
113
|
+
const u = l.parentElement;
|
|
114
|
+
return !!u && C(u, r);
|
|
141
115
|
});
|
|
142
|
-
return s.length === 0 ? null : s.reduce((
|
|
116
|
+
return s.length === 0 ? null : s.reduce((l, u) => S(u) >= S(l) ? u : l).parentElement;
|
|
143
117
|
}
|
|
144
|
-
function
|
|
118
|
+
function T(t) {
|
|
145
119
|
return t.isConnected ? t.getClientRects().length > 0 : !1;
|
|
146
120
|
}
|
|
147
|
-
function
|
|
148
|
-
return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >=
|
|
121
|
+
function x(t) {
|
|
122
|
+
return t.isConnected ? (t.clientHeight || t.getBoundingClientRect().height) >= M : !1;
|
|
149
123
|
}
|
|
150
|
-
function
|
|
124
|
+
function N(t) {
|
|
151
125
|
const o = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
152
126
|
if (o === 0) return !0;
|
|
153
127
|
const e = t.getBoundingClientRect();
|
|
154
128
|
return e.height > o + y ? !1 : e.top >= -y;
|
|
155
129
|
}
|
|
156
|
-
function
|
|
130
|
+
function p(t) {
|
|
157
131
|
return !!t.closest("micro-app-body");
|
|
158
132
|
}
|
|
159
|
-
function
|
|
160
|
-
return !t || !t.isConnected || o && !
|
|
133
|
+
function d(t, o = !0) {
|
|
134
|
+
return !t || !t.isConnected || o && !x(t) || o && !T(t) ? null : t;
|
|
161
135
|
}
|
|
162
136
|
function R(t) {
|
|
163
137
|
getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
@@ -165,56 +139,53 @@ function R(t) {
|
|
|
165
139
|
function $() {
|
|
166
140
|
const t = window.__MICRO_APP_NAME__;
|
|
167
141
|
if (t) {
|
|
168
|
-
const i = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t, s = document.querySelector(`micro-app[name="${i}"] micro-app-body #app`),
|
|
169
|
-
if (
|
|
142
|
+
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);
|
|
143
|
+
if (c) return c;
|
|
170
144
|
}
|
|
171
145
|
const o = document.querySelector("#app");
|
|
172
146
|
if (o) {
|
|
173
|
-
const i =
|
|
147
|
+
const i = d(o, !1);
|
|
174
148
|
return i || o;
|
|
175
149
|
}
|
|
176
150
|
const e = document.querySelector("micro-app-body #app");
|
|
177
151
|
if (e) {
|
|
178
|
-
const i =
|
|
152
|
+
const i = d(e, !1);
|
|
179
153
|
if (i) return i;
|
|
180
154
|
}
|
|
181
155
|
const n = document.body;
|
|
182
|
-
return n && (n.tagName === "MICRO-APP-BODY" ||
|
|
156
|
+
return n && (n.tagName === "MICRO-APP-BODY" || p(n)) ? n : document.querySelector("micro-app-body");
|
|
183
157
|
}
|
|
184
|
-
function
|
|
158
|
+
function L() {
|
|
185
159
|
const t = document.querySelector("#app-content");
|
|
186
|
-
if (t && !
|
|
187
|
-
const e =
|
|
160
|
+
if (t && !p(t)) {
|
|
161
|
+
const e = d(t, !0);
|
|
188
162
|
if (e) return e;
|
|
189
163
|
}
|
|
190
164
|
const o = document.querySelectorAll("#app");
|
|
191
165
|
for (const e of Array.from(o)) {
|
|
192
166
|
const n = e;
|
|
193
|
-
if (
|
|
194
|
-
const r =
|
|
167
|
+
if (p(n)) continue;
|
|
168
|
+
const r = d(n, !0);
|
|
195
169
|
if (r) return r;
|
|
196
170
|
}
|
|
197
171
|
return null;
|
|
198
172
|
}
|
|
199
|
-
function
|
|
173
|
+
function Y() {
|
|
200
174
|
if (typeof document > "u") return null;
|
|
201
|
-
|
|
202
|
-
const t = window.__MICRO_APP_ENVIRONMENT__ ? $() :
|
|
203
|
-
return !t || !
|
|
175
|
+
w();
|
|
176
|
+
const t = window.__MICRO_APP_ENVIRONMENT__ ? $() : L();
|
|
177
|
+
return !t || !N(t) ? null : (R(t), t);
|
|
204
178
|
}
|
|
205
179
|
export {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
S as suspendOverlayByUid,
|
|
218
|
-
k as unlockModalMountScroll,
|
|
219
|
-
z as watchOverlayThenSuspend
|
|
180
|
+
O as MODAL_OVERLAY_CLASS,
|
|
181
|
+
a as MODAL_OVERLAY_CONTAINED_CLASS,
|
|
182
|
+
I as applyContainedOverlayInline,
|
|
183
|
+
w as ensureContainedOverlayStyle,
|
|
184
|
+
V as findTopOpenModalOverlayHost,
|
|
185
|
+
P as getOpenModalOverlays,
|
|
186
|
+
S as readOverlayZIndex,
|
|
187
|
+
Y as resolveModalTarget,
|
|
188
|
+
H as resumeOverlayByUid,
|
|
189
|
+
h as suspendOverlayByUid,
|
|
190
|
+
D as watchOverlayThenSuspend
|
|
220
191
|
};
|