@dazhicheng/ui 1.6.41 → 1.6.43
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 +20 -25
- 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-keep-alive/core/Suspense.d.ts +3 -0
- package/dist/components/tt-keep-alive/core/Suspense.js +10 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.js +6 -0
- package/dist/components/tt-keep-alive/core/component.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/component.js +7 -0
- package/dist/components/tt-keep-alive/core/componentPublicInstance.d.ts +5 -0
- package/dist/components/tt-keep-alive/core/devtools.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/errorHandling.d.ts +17 -0
- package/dist/components/tt-keep-alive/core/errorHandling.js +4 -0
- package/dist/components/tt-keep-alive/core/renderer.d.ts +32 -0
- package/dist/components/tt-keep-alive/core/renderer.js +8 -0
- package/dist/components/tt-keep-alive/core/shapeFlags.d.ts +13 -0
- package/dist/components/tt-keep-alive/core/vnode.d.ts +6 -0
- package/dist/components/tt-keep-alive/core/vnode.js +8 -0
- package/dist/components/tt-keep-alive/index.d.ts +26 -0
- package/dist/components/tt-keep-alive/index.js +139 -0
- 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 +236 -228
- 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/resolve-modal-target.js +57 -53
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +123 -123
- 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/index.d.ts +1 -0
- package/dist/index.js +80 -78
- package/dist/node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js +17 -0
- 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 +3 -2
- /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
|
|
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
|
|
19
|
+
import { omit as pe, pick as N } from "lodash-es";
|
|
20
20
|
import "vue-router";
|
|
21
|
-
import
|
|
22
|
-
import { useStore as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { basicProps as
|
|
27
|
-
import { ModalApi as
|
|
28
|
-
import { resolveModalTarget as
|
|
29
|
-
import { allocateModalZIndex as
|
|
30
|
-
import { getClientDocument as
|
|
31
|
-
import { pushModal as
|
|
32
|
-
import { emitModalCloseTransitionEnd as
|
|
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
|
+
import ho from "./components/ModalHeader.vue.js";
|
|
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
33
|
import $o from "../../../assets/svg/close.svg.js";
|
|
34
|
-
const Do = ["aria-tt-id", "data-testid"],
|
|
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
|
-
...
|
|
39
|
-
...
|
|
38
|
+
...ue,
|
|
39
|
+
...yo,
|
|
40
40
|
/** modalApi */
|
|
41
41
|
modalApi: {
|
|
42
42
|
type: Object,
|
|
@@ -44,264 +44,272 @@ const Do = ["aria-tt-id", "data-testid"], Fo = ["data-testid"], ft = /* @__PURE_
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
emits: ["visible-change", "register", "update:visible"],
|
|
47
|
-
setup(
|
|
48
|
-
var
|
|
49
|
-
const d =
|
|
47
|
+
setup(ve, { expose: ge, emit: be }) {
|
|
48
|
+
var se;
|
|
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
50
|
let r = d.modalApi;
|
|
51
51
|
if (!r) {
|
|
52
52
|
const e = d.okButtonProps ? {
|
|
53
53
|
...d.okButtonProps,
|
|
54
54
|
disabledTip: Array.isArray(d.okButtonProps.disabledTip) ? d.okButtonProps.disabledTip : d.okButtonProps.disabledTip ? [d.okButtonProps.disabledTip] : void 0
|
|
55
|
-
} : void 0,
|
|
55
|
+
} : void 0, i = {
|
|
56
56
|
...d,
|
|
57
57
|
okButtonProps: e
|
|
58
58
|
};
|
|
59
|
-
r = new
|
|
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:
|
|
66
|
-
title:
|
|
67
|
-
width:
|
|
68
|
-
size:
|
|
69
|
-
fullscreen:
|
|
70
|
-
resizer:
|
|
71
|
-
top:
|
|
72
|
-
isBottom:
|
|
73
|
-
draggable:
|
|
74
|
-
showCancelBtn:
|
|
75
|
-
okText:
|
|
76
|
-
cancelText:
|
|
77
|
-
okButtonProps:
|
|
78
|
-
cancelButtonProps:
|
|
79
|
-
confirmLoading:
|
|
80
|
-
cancelLoading:
|
|
81
|
-
showOkBtn:
|
|
82
|
-
loading:
|
|
83
|
-
height:
|
|
84
|
-
showFooter:
|
|
85
|
-
loadingTip:
|
|
86
|
-
...
|
|
87
|
-
} =
|
|
64
|
+
const v = (se = r.useStore) == null ? void 0 : se.call(r), {
|
|
65
|
+
visible: C,
|
|
66
|
+
title: G,
|
|
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
|
+
cancelText: Ie,
|
|
77
|
+
okButtonProps: I,
|
|
78
|
+
cancelButtonProps: Ae,
|
|
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 o(
|
|
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: o(
|
|
106
|
-
width: o(
|
|
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: o(
|
|
113
|
+
top: o(Oe) ?? Ue,
|
|
114
114
|
fullscreen: !1,
|
|
115
115
|
draggable: !1,
|
|
116
116
|
// 外部显式指定优先;否则用打开时申请到的层级,element-plus 自己的 nextZIndex 不参与决策
|
|
117
|
-
zIndex:
|
|
118
|
-
appendToBody:
|
|
119
|
-
...u ? { appendTo: u } :
|
|
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
|
-
|
|
124
|
-
|
|
123
|
+
l.modalClass || e.modalClass || "",
|
|
124
|
+
Bo,
|
|
125
125
|
`tt-id-${t == null ? void 0 : t.uid}`,
|
|
126
|
-
|
|
126
|
+
R ? Z : ""
|
|
127
127
|
].filter(Boolean).join(" ")
|
|
128
128
|
};
|
|
129
|
-
}),
|
|
130
|
-
var
|
|
131
|
-
return String(((
|
|
132
|
-
}),
|
|
133
|
-
showCancelBtn: o(
|
|
134
|
-
okText: o(
|
|
135
|
-
cancelText: o(
|
|
136
|
-
okButtonProps: o(
|
|
137
|
-
cancelButtonProps: o(
|
|
138
|
-
confirmLoading: o(
|
|
139
|
-
cancelLoading: o(
|
|
140
|
-
showOkBtn: o(
|
|
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
|
-
(t == null ? void 0 : t.uid) != null && (
|
|
155
|
-
(t == null ? void 0 : t.uid) != null && (
|
|
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
|
-
() => o(
|
|
162
|
+
), ae(
|
|
163
|
+
() => o(C),
|
|
164
164
|
(e) => {
|
|
165
|
-
var
|
|
166
|
-
e !== ((
|
|
165
|
+
var i;
|
|
166
|
+
e !== ((i = v.value) == null ? void 0 : i.visible) && r.setState({ visible: e }), e || r.changeOkLoading(!1);
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
immediate: !1
|
|
170
170
|
}
|
|
171
171
|
);
|
|
172
|
-
function
|
|
173
|
-
|
|
172
|
+
function Ve(e) {
|
|
173
|
+
K.value = e;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
175
|
+
function _e() {
|
|
176
|
+
Fo(r);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
document.querySelectorAll(".el-select__popper").forEach((
|
|
180
|
-
|
|
178
|
+
function ze() {
|
|
179
|
+
document.querySelectorAll(".el-select__popper").forEach((i) => {
|
|
180
|
+
i.style.display !== "none" && (i.style.display = "none");
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function x(e) {
|
|
184
184
|
return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function je() {
|
|
187
187
|
const e = p["data-testid"] || p.dataTestid || p.testId || p["test-id"];
|
|
188
188
|
return e && typeof e == "string" ? e : void 0;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
var
|
|
192
|
-
const e = (
|
|
190
|
+
const A = m(() => {
|
|
191
|
+
var s;
|
|
192
|
+
const e = (s = v.value) == null ? void 0 : s.testId;
|
|
193
193
|
if (e)
|
|
194
|
-
return
|
|
195
|
-
const
|
|
196
|
-
if (l)
|
|
197
|
-
return D(l);
|
|
198
|
-
const i = _e();
|
|
194
|
+
return x(e);
|
|
195
|
+
const i = d.testId;
|
|
199
196
|
if (i)
|
|
200
|
-
return
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
197
|
+
return x(i);
|
|
198
|
+
const n = je();
|
|
199
|
+
if (n)
|
|
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
206
|
setModalProps: r.setState,
|
|
207
207
|
emitVisible: void 0,
|
|
208
208
|
redoModalHeight: () => {
|
|
209
|
-
|
|
210
|
-
o(
|
|
209
|
+
M(() => {
|
|
210
|
+
o(k) && o(k).setModalHeight();
|
|
211
211
|
});
|
|
212
212
|
},
|
|
213
213
|
scrollToBottom: () => {
|
|
214
214
|
var e;
|
|
215
|
-
o(
|
|
215
|
+
o(k) && ((e = o(k)) == null || e.onScrollBottom());
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
|
-
t &&
|
|
219
|
-
const
|
|
220
|
-
let a,
|
|
221
|
-
function
|
|
222
|
-
var
|
|
223
|
-
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);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
var
|
|
225
|
+
function te() {
|
|
226
|
+
var i, n;
|
|
227
227
|
const e = t == null ? void 0 : t.appContext.config.globalProperties.$router;
|
|
228
|
-
return ((
|
|
228
|
+
return ((n = (i = e == null ? void 0 : e.currentRoute) == null ? void 0 : i.value) == null ? void 0 : n.path) ?? null;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
if (!
|
|
232
|
-
|
|
230
|
+
function Ze() {
|
|
231
|
+
if (!L()) {
|
|
232
|
+
O.value = null;
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
O.value = te();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
a == null || a(), a = void 0,
|
|
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;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
var
|
|
240
|
+
function le() {
|
|
241
|
+
var n;
|
|
242
242
|
const e = t == null ? void 0 : t.uid;
|
|
243
|
-
e == null || !(o(
|
|
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));
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
var i;
|
|
245
|
+
function ne() {
|
|
247
246
|
const e = t == null ? void 0 : t.uid;
|
|
248
|
-
e == null || !
|
|
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
|
+
});
|
|
249
257
|
}
|
|
250
|
-
return
|
|
251
|
-
const e =
|
|
258
|
+
return We(() => {
|
|
259
|
+
const e = N(p, ["onVisibleChange", "onClosed", "onOk"]);
|
|
252
260
|
r.mount(
|
|
253
261
|
{
|
|
254
262
|
...e,
|
|
255
263
|
onClosed: e.onClosed || p.onCancel || p.onClose
|
|
256
264
|
},
|
|
257
|
-
|
|
265
|
+
y
|
|
258
266
|
);
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
var
|
|
262
|
-
if (!(
|
|
263
|
-
const u =
|
|
264
|
-
u && (
|
|
267
|
+
const i = t == null ? void 0 : t.appContext.config.globalProperties.$router;
|
|
268
|
+
i != null && i.afterEach && (B = i.afterEach((n, l) => {
|
|
269
|
+
var S;
|
|
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());
|
|
265
273
|
}));
|
|
266
|
-
}), Ge(() => {
|
|
267
|
-
oe();
|
|
268
|
-
}), We(() => {
|
|
269
|
-
te();
|
|
270
274
|
}), eo(() => {
|
|
271
|
-
|
|
272
|
-
}),
|
|
275
|
+
le();
|
|
276
|
+
}), oo(() => {
|
|
277
|
+
ne();
|
|
278
|
+
}), to(() => {
|
|
279
|
+
ie(), B == null || B(), B = void 0, $.value = void 0, t != null && t.uid && U(t.uid);
|
|
280
|
+
}), ge({
|
|
273
281
|
modalApi: r
|
|
274
|
-
}), (e,
|
|
275
|
-
var
|
|
276
|
-
return
|
|
277
|
-
"aria-tt-id": `tt-id-${(
|
|
278
|
-
"data-testid":
|
|
282
|
+
}), (e, i) => {
|
|
283
|
+
var n;
|
|
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
|
|
279
287
|
}, [
|
|
280
|
-
|
|
281
|
-
class: ["tt-ui-modal", o(
|
|
288
|
+
w(o(vo), de(D.value, {
|
|
289
|
+
class: ["tt-ui-modal", o(Ce)],
|
|
282
290
|
"before-close": o(r).onClosed,
|
|
283
|
-
onClosed:
|
|
284
|
-
"close-icon": () => so(o(
|
|
291
|
+
onClosed: _e,
|
|
292
|
+
"close-icon": () => so(o(uo), {
|
|
285
293
|
size: 16,
|
|
286
294
|
icon: o($o),
|
|
287
295
|
isCustomSvg: !0
|
|
288
296
|
})
|
|
289
|
-
}),
|
|
290
|
-
default:
|
|
291
|
-
|
|
297
|
+
}), V({
|
|
298
|
+
default: f(() => [
|
|
299
|
+
w(ko, {
|
|
292
300
|
ref_key: "modalWrapperRef",
|
|
293
|
-
ref:
|
|
294
|
-
"is-bottom": o(
|
|
295
|
-
height: o(
|
|
296
|
-
loading: o(
|
|
297
|
-
"loading-tip": o(
|
|
298
|
-
contained:
|
|
299
|
-
class:
|
|
300
|
-
"data-testid":
|
|
301
|
-
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
|
|
302
310
|
}, {
|
|
303
|
-
default:
|
|
304
|
-
|
|
311
|
+
default: f(() => [
|
|
312
|
+
b(e.$slots, "default")
|
|
305
313
|
]),
|
|
306
314
|
_: 3
|
|
307
315
|
}, 8, ["is-bottom", "height", "loading", "loading-tip", "contained", "class", "data-testid"])
|
|
@@ -310,64 +318,64 @@ const Do = ["aria-tt-id", "data-testid"], Fo = ["data-testid"], ft = /* @__PURE_
|
|
|
310
318
|
}, [
|
|
311
319
|
e.$slots.header ? {
|
|
312
320
|
name: "header",
|
|
313
|
-
fn:
|
|
314
|
-
|
|
321
|
+
fn: f(() => [
|
|
322
|
+
b(e.$slots, "header")
|
|
315
323
|
]),
|
|
316
324
|
key: "1"
|
|
317
325
|
} : {
|
|
318
326
|
name: "header",
|
|
319
|
-
fn:
|
|
320
|
-
|
|
321
|
-
title: o(
|
|
322
|
-
onMousedown:
|
|
323
|
-
},
|
|
324
|
-
titleToolbar:
|
|
325
|
-
|
|
327
|
+
fn: f(() => [
|
|
328
|
+
w(ho, {
|
|
329
|
+
title: o(G),
|
|
330
|
+
onMousedown: ze
|
|
331
|
+
}, V({
|
|
332
|
+
titleToolbar: f(() => [
|
|
333
|
+
b(e.$slots, "titleToolbar")
|
|
326
334
|
]),
|
|
327
335
|
_: 2
|
|
328
336
|
}, [
|
|
329
|
-
|
|
330
|
-
name:
|
|
331
|
-
fn:
|
|
332
|
-
|
|
337
|
+
_(Object.keys(e.$slots), (l) => ({
|
|
338
|
+
name: l,
|
|
339
|
+
fn: f((s) => [
|
|
340
|
+
b(e.$slots, l, z(j(s || {})))
|
|
333
341
|
])
|
|
334
342
|
}))
|
|
335
343
|
]), 1032, ["title"])
|
|
336
344
|
]),
|
|
337
345
|
key: "0"
|
|
338
346
|
},
|
|
339
|
-
o(
|
|
347
|
+
o(Te).footer || o(ee) ? {
|
|
340
348
|
name: "footer",
|
|
341
|
-
fn:
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
349
|
+
fn: f(() => [
|
|
350
|
+
b(e.$slots, "footer", {}, () => [
|
|
351
|
+
ao("div", { "data-testid": He.value }, [
|
|
352
|
+
w(To, de(Re.value, {
|
|
345
353
|
class: "footer",
|
|
346
|
-
style: { borderTop:
|
|
354
|
+
style: { borderTop: K.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
|
|
347
355
|
"ok-button-props": {
|
|
348
|
-
...o(
|
|
349
|
-
disabledTip:
|
|
350
|
-
disabled:
|
|
356
|
+
...o(I),
|
|
357
|
+
disabledTip: oe.value[1],
|
|
358
|
+
disabled: oe.value[0]
|
|
351
359
|
},
|
|
352
360
|
onFooterok: o(r).onOk,
|
|
353
361
|
onCancel: o(r).onClosed
|
|
354
|
-
}),
|
|
355
|
-
|
|
356
|
-
o(
|
|
357
|
-
), (
|
|
358
|
-
name:
|
|
359
|
-
fn:
|
|
360
|
-
|
|
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 || {} })))
|
|
361
369
|
])
|
|
362
370
|
}))
|
|
363
371
|
]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
|
|
364
|
-
], 8,
|
|
372
|
+
], 8, xo)
|
|
365
373
|
])
|
|
366
374
|
]),
|
|
367
375
|
key: "2"
|
|
368
376
|
} : void 0,
|
|
369
|
-
|
|
370
|
-
o(
|
|
377
|
+
_(Object.keys(
|
|
378
|
+
o(pe)(e.$slots, [
|
|
371
379
|
"default",
|
|
372
380
|
"titleToolbar",
|
|
373
381
|
"header",
|
|
@@ -377,18 +385,18 @@ const Do = ["aria-tt-id", "data-testid"], Fo = ["data-testid"], ft = /* @__PURE_
|
|
|
377
385
|
"centerFooter",
|
|
378
386
|
"appendFooter"
|
|
379
387
|
])
|
|
380
|
-
), (
|
|
381
|
-
name:
|
|
382
|
-
fn:
|
|
383
|
-
|
|
388
|
+
), (l) => ({
|
|
389
|
+
name: l,
|
|
390
|
+
fn: f((s) => [
|
|
391
|
+
b(e.$slots, l, z(j(s || {})))
|
|
384
392
|
])
|
|
385
393
|
}))
|
|
386
394
|
]), 1040, ["class", "before-close", "close-icon"])
|
|
387
395
|
], 8, Do)), [
|
|
388
|
-
[o(
|
|
389
|
-
draggable: o(
|
|
390
|
-
fullscreen: o(
|
|
391
|
-
resizer: o(
|
|
396
|
+
[o(bo), {
|
|
397
|
+
draggable: o(Be),
|
|
398
|
+
fullscreen: o(ke),
|
|
399
|
+
resizer: o(ye),
|
|
392
400
|
resizeChange: o(p).resizeChange
|
|
393
401
|
}]
|
|
394
402
|
]);
|
|
@@ -396,5 +404,5 @@ const Do = ["aria-tt-id", "data-testid"], Fo = ["data-testid"], ft = /* @__PURE_
|
|
|
396
404
|
}
|
|
397
405
|
});
|
|
398
406
|
export {
|
|
399
|
-
|
|
407
|
+
vt as default
|
|
400
408
|
};
|
|
@@ -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";
|