st-comp 0.0.148 → 0.0.150
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/components.d.ts +3 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +5 -4
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +28 -24
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +577 -631
- package/es/Kline.cjs +1 -0
- package/es/Kline.js +1903 -0
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +677 -1428
- package/es/KlineNew.cjs +1 -3
- package/es/KlineNew.js +316 -2740
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +60 -58
- package/es/PasswordPrompt.cjs +1 -0
- package/es/PasswordPrompt.js +13 -0
- package/es/Table.cjs +1 -1
- package/es/Table.js +102 -98
- package/es/User.cjs +1 -1
- package/es/User.js +397 -373
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +2395 -1
- package/es/VirtualTable.cjs +5 -5
- package/es/VirtualTable.js +154 -151
- package/es/_initCloneObject-47814efa.cjs +1 -0
- package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
- package/es/base-0ca7c43a.cjs +5 -0
- package/es/base-19787dfb.js +303 -0
- package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
- package/es/castArray-a78ae889.cjs +1 -0
- package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
- package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
- package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
- package/es/debounce-cf26af24.cjs +1 -0
- package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
- package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
- package/es/el-button-0bf1d532.js +236 -0
- package/es/el-button-62966947.cjs +1 -0
- package/es/el-checkbox-group-45247bbf.cjs +1 -0
- package/es/el-checkbox-group-d53bc316.js +67 -0
- package/es/el-empty-2ece1134.cjs +1 -0
- package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
- package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
- package/es/el-form-item-47e255d4.cjs +12 -0
- package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
- package/es/el-input-6a3805c5.cjs +1 -0
- package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
- package/es/el-input-number-96ff2e47.cjs +1 -0
- package/es/el-menu-item-4c9eb7ad.cjs +1 -0
- package/es/el-menu-item-6c6236a1.js +772 -0
- package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
- package/es/el-message-d5ed7a4f.cjs +1 -0
- package/es/el-overlay-26bf0945.js +521 -0
- package/es/el-overlay-41994f67.cjs +1 -0
- package/es/el-popover-17e2e66c.js +140 -0
- package/es/el-popover-7bd8a7c3.cjs +1 -0
- package/es/el-popper-7adbf1c6.cjs +1 -0
- package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
- package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
- package/es/el-scrollbar-ac525239.cjs +1 -0
- package/es/el-select-31f8ac8a.cjs +1 -0
- package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
- package/es/el-table-column-47d80736.js +3804 -0
- package/es/el-table-column-bdc46568.cjs +14 -0
- package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
- package/es/el-tag-9732314f.cjs +1 -0
- package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
- package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
- package/es/index-2f958e56.cjs +3 -0
- package/es/index-375e8de4.cjs +5 -0
- package/es/{index-121e2861.js → index-621b092b.js} +3 -3
- package/es/index-657047bb.js +513 -0
- package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
- package/es/index-70372cdb.js +519 -0
- package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
- package/es/index-9e6e8d03.cjs +1 -0
- package/es/index-ab96bbf4.js +156 -0
- package/es/index-afc88a4b.cjs +1 -0
- package/es/index-c066fe0d.js +82 -0
- package/es/index-ce3223db.cjs +1 -0
- package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
- package/es/index-eea0bcb3.cjs +1 -0
- package/es/index.esm-8d9a2abe.js +2432 -0
- package/es/index.esm-94a95a2a.cjs +3 -0
- package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
- package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
- package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
- package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-5ff2f51b.js +171 -0
- package/es/use-form-common-props-74a96df2.cjs +2 -0
- package/es/vnode-6a0c7411.js +14 -0
- package/es/vnode-b15eb11b.cjs +1 -0
- package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
- package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
- package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/Kline/components/Contextmenu/index.vue +110 -0
- package/packages/Kline/components/Tips/index.vue +40 -0
- package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
- package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
- package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
- package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
- package/packages/Kline/componentsNew/Tips/index.vue +33 -0
- package/packages/Kline/formatKlineData.ts +109 -0
- package/packages/Kline/images/buy.svg +1 -0
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +1 -0
- package/packages/Kline/images/t.svg +1 -0
- package/packages/Kline/index.ts +16 -0
- package/packages/Kline/index.vue +891 -0
- package/packages/Kline/option.ts +539 -0
- package/packages/Kline/type.d.ts +219 -0
- package/packages/Kline/utils.ts +682 -0
- package/packages/PasswordPrompt/index.ts +8 -0
- package/packages/PasswordPrompt/index.vue +266 -0
- package/packages/User/index.vue +97 -58
- package/packages/index.ts +4 -0
- package/src/pages/Kline/index.vue +12 -0
- package/src/pages/PasswordPrompt/index.vue +12 -0
- package/src/router/routes.ts +10 -0
- package/es/_initCloneObject-476b02ce.cjs +0 -1
- package/es/base-6ccc8fc2.cjs +0 -9
- package/es/base-950bac7e.js +0 -816
- package/es/castArray-374558a5.cjs +0 -1
- package/es/debounce-a6b4f91b.cjs +0 -1
- package/es/el-button-b8f71c7d.cjs +0 -1
- package/es/el-button-d7b6eebd.js +0 -745
- package/es/el-empty-12eece57.cjs +0 -1
- package/es/el-form-item-ebbf096d.cjs +0 -12
- package/es/el-input-2c7e70a3.cjs +0 -1
- package/es/el-input-number-8e168e83.cjs +0 -1
- package/es/el-message-612c2346.cjs +0 -1
- package/es/el-overlay-07414277.js +0 -526
- package/es/el-overlay-fb255b83.cjs +0 -1
- package/es/el-popper-8360bd91.cjs +0 -1
- package/es/el-scrollbar-271142ad.cjs +0 -1
- package/es/el-select-2e71d4af.cjs +0 -1
- package/es/el-table-column-9fe79f05.cjs +0 -14
- package/es/el-table-column-dc562f14.js +0 -3933
- package/es/el-tag-930e7b32.cjs +0 -1
- package/es/index-0ed86daf.cjs +0 -3
- package/es/index-674d2fd7.cjs +0 -1
- package/es/index-aece600c.js +0 -81
- package/es/use-form-common-props-c1960844.cjs +0 -2
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
import { isVNode as ee, defineComponent as P, createVNode as H, renderSlot as E, h as me, onMounted as le, watchEffect as ye, onBeforeUnmount as pe, inject as oe, computed as h, openBlock as R, createElementBlock as K, unref as o, normalizeClass as T, normalizeStyle as ae, createElementVNode as U, toDisplayString as Ce, withCtx as S, createBlock as j, resolveDynamicComponent as be, createCommentVNode as q, isRef as Ee, watch as J, onScopeDispose as ge, getCurrentInstance as Te, ref as O, nextTick as Se, useSlots as he, provide as we, Transition as Le, withDirectives as Ae, mergeProps as Me, createSlots as De, vShow as ke } from "vue";
|
|
2
|
-
import { S as F, N as G, b as Q, d as X, u as x, y as Z, e as Ie, o as Be, _ as re, J as Oe, s as Ne, i as ie, T as te, P as Ye, O as $e, M as Re, x as ne, F as _e, I as se, w as ze } from "./base-950bac7e.js";
|
|
3
|
-
import { F as He, U as ue, i as Pe, a as Ue, b as Ve } from "./index-121e2861.js";
|
|
4
|
-
import { i as Xe, E as Ke, C as Fe, l as Ge } from "./use-form-common-props-4d37077d.js";
|
|
5
|
-
import { g as We } from "./scroll-ca84f80a.js";
|
|
6
|
-
import { b as je, a as qe } from "./index-aece600c.js";
|
|
7
|
-
var V = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(V || {});
|
|
8
|
-
const W = (e) => {
|
|
9
|
-
const s = F(e) ? e : [e], t = [];
|
|
10
|
-
return s.forEach((a) => {
|
|
11
|
-
var l;
|
|
12
|
-
F(a) ? t.push(...W(a)) : ee(a) && ((l = a.component) != null && l.subTree) ? t.push(a, ...W(a.component.subTree)) : ee(a) && F(a.children) ? t.push(...W(a.children)) : t.push(a);
|
|
13
|
-
}), t;
|
|
14
|
-
}, de = (e) => {
|
|
15
|
-
if (!e)
|
|
16
|
-
return { onClick: G, onMousedown: G, onMouseup: G };
|
|
17
|
-
let s = !1, t = !1;
|
|
18
|
-
return { onClick: (i) => {
|
|
19
|
-
s && t && e(i), s = t = !1;
|
|
20
|
-
}, onMousedown: (i) => {
|
|
21
|
-
s = i.target === i.currentTarget;
|
|
22
|
-
}, onMouseup: (i) => {
|
|
23
|
-
t = i.target === i.currentTarget;
|
|
24
|
-
} };
|
|
25
|
-
}, Je = Q({
|
|
26
|
-
mask: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !0
|
|
29
|
-
},
|
|
30
|
-
customMaskEvent: Boolean,
|
|
31
|
-
overlayClass: {
|
|
32
|
-
type: X([
|
|
33
|
-
String,
|
|
34
|
-
Array,
|
|
35
|
-
Object
|
|
36
|
-
])
|
|
37
|
-
},
|
|
38
|
-
zIndex: {
|
|
39
|
-
type: X([String, Number])
|
|
40
|
-
}
|
|
41
|
-
}), Ze = {
|
|
42
|
-
click: (e) => e instanceof MouseEvent
|
|
43
|
-
}, Qe = "overlay";
|
|
44
|
-
var xe = P({
|
|
45
|
-
name: "ElOverlay",
|
|
46
|
-
props: Je,
|
|
47
|
-
emits: Ze,
|
|
48
|
-
setup(e, { slots: s, emit: t }) {
|
|
49
|
-
const a = x(Qe), l = (r) => {
|
|
50
|
-
t("click", r);
|
|
51
|
-
}, { onClick: d, onMousedown: i, onMouseup: f } = de(e.customMaskEvent ? void 0 : l);
|
|
52
|
-
return () => e.mask ? H("div", {
|
|
53
|
-
class: [a.b(), e.overlayClass],
|
|
54
|
-
style: {
|
|
55
|
-
zIndex: e.zIndex
|
|
56
|
-
},
|
|
57
|
-
onClick: d,
|
|
58
|
-
onMousedown: i,
|
|
59
|
-
onMouseup: f
|
|
60
|
-
}, [E(s, "default")], V.STYLE | V.CLASS | V.PROPS, ["onClick", "onMouseup", "onMousedown"]) : me("div", {
|
|
61
|
-
class: e.overlayClass,
|
|
62
|
-
style: {
|
|
63
|
-
zIndex: e.zIndex,
|
|
64
|
-
position: "fixed",
|
|
65
|
-
top: "0px",
|
|
66
|
-
right: "0px",
|
|
67
|
-
bottom: "0px",
|
|
68
|
-
left: "0px"
|
|
69
|
-
}
|
|
70
|
-
}, [E(s, "default")]);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
const eo = xe, ce = Symbol("dialogInjectionKey"), fe = Q({
|
|
74
|
-
center: Boolean,
|
|
75
|
-
alignCenter: Boolean,
|
|
76
|
-
closeIcon: {
|
|
77
|
-
type: Xe
|
|
78
|
-
},
|
|
79
|
-
draggable: Boolean,
|
|
80
|
-
overflow: Boolean,
|
|
81
|
-
fullscreen: Boolean,
|
|
82
|
-
headerClass: String,
|
|
83
|
-
bodyClass: String,
|
|
84
|
-
footerClass: String,
|
|
85
|
-
showClose: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: !0
|
|
88
|
-
},
|
|
89
|
-
title: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: ""
|
|
92
|
-
},
|
|
93
|
-
ariaLevel: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: "2"
|
|
96
|
-
}
|
|
97
|
-
}), oo = {
|
|
98
|
-
close: () => !0
|
|
99
|
-
}, to = (e, s, t, a) => {
|
|
100
|
-
let l = {
|
|
101
|
-
offsetX: 0,
|
|
102
|
-
offsetY: 0
|
|
103
|
-
};
|
|
104
|
-
const d = (c) => {
|
|
105
|
-
const y = c.clientX, b = c.clientY, { offsetX: C, offsetY: v } = l, m = e.value.getBoundingClientRect(), g = m.left, u = m.top, N = m.width, w = m.height, _ = document.documentElement.clientWidth, z = document.documentElement.clientHeight, Y = -g + C, L = -u + v, A = _ - g - N + C, M = z - u - w + v, D = (n) => {
|
|
106
|
-
let I = C + n.clientX - y, $ = v + n.clientY - b;
|
|
107
|
-
a != null && a.value || (I = Math.min(Math.max(I, Y), A), $ = Math.min(Math.max($, L), M)), l = {
|
|
108
|
-
offsetX: I,
|
|
109
|
-
offsetY: $
|
|
110
|
-
}, e.value && (e.value.style.transform = `translate(${Z(I)}, ${Z($)})`);
|
|
111
|
-
}, k = () => {
|
|
112
|
-
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", k);
|
|
113
|
-
};
|
|
114
|
-
document.addEventListener("mousemove", D), document.addEventListener("mouseup", k);
|
|
115
|
-
}, i = () => {
|
|
116
|
-
s.value && e.value && s.value.addEventListener("mousedown", d);
|
|
117
|
-
}, f = () => {
|
|
118
|
-
s.value && e.value && s.value.removeEventListener("mousedown", d);
|
|
119
|
-
}, r = () => {
|
|
120
|
-
l = {
|
|
121
|
-
offsetX: 0,
|
|
122
|
-
offsetY: 0
|
|
123
|
-
}, e.value && (e.value.style.transform = "none");
|
|
124
|
-
};
|
|
125
|
-
return le(() => {
|
|
126
|
-
ye(() => {
|
|
127
|
-
t.value ? i() : f();
|
|
128
|
-
});
|
|
129
|
-
}), pe(() => {
|
|
130
|
-
f();
|
|
131
|
-
}), {
|
|
132
|
-
resetPosition: r
|
|
133
|
-
};
|
|
134
|
-
}, no = (...e) => (s) => {
|
|
135
|
-
e.forEach((t) => {
|
|
136
|
-
Ie(t) ? t(s) : t.value = s;
|
|
137
|
-
});
|
|
138
|
-
}, so = P({ name: "ElDialogContent" }), lo = /* @__PURE__ */ P({
|
|
139
|
-
...so,
|
|
140
|
-
props: fe,
|
|
141
|
-
emits: oo,
|
|
142
|
-
setup(e, { expose: s }) {
|
|
143
|
-
const t = e, { t: a } = Be(), { Close: l } = Fe, { dialogRef: d, headerRef: i, bodyId: f, ns: r, style: c } = oe(ce), { focusTrapRef: y } = oe(He), b = h(() => [
|
|
144
|
-
r.b(),
|
|
145
|
-
r.is("fullscreen", t.fullscreen),
|
|
146
|
-
r.is("draggable", t.draggable),
|
|
147
|
-
r.is("align-center", t.alignCenter),
|
|
148
|
-
{ [r.m("center")]: t.center }
|
|
149
|
-
]), C = no(y, d), v = h(() => t.draggable), m = h(() => t.overflow), { resetPosition: g } = to(d, i, v, m);
|
|
150
|
-
return s({
|
|
151
|
-
resetPosition: g
|
|
152
|
-
}), (u, N) => (R(), K("div", {
|
|
153
|
-
ref: o(C),
|
|
154
|
-
class: T(o(b)),
|
|
155
|
-
style: ae(o(c)),
|
|
156
|
-
tabindex: "-1"
|
|
157
|
-
}, [
|
|
158
|
-
U("header", {
|
|
159
|
-
ref_key: "headerRef",
|
|
160
|
-
ref: i,
|
|
161
|
-
class: T([o(r).e("header"), u.headerClass, { "show-close": u.showClose }])
|
|
162
|
-
}, [
|
|
163
|
-
E(u.$slots, "header", {}, () => [
|
|
164
|
-
U("span", {
|
|
165
|
-
role: "heading",
|
|
166
|
-
"aria-level": u.ariaLevel,
|
|
167
|
-
class: T(o(r).e("title"))
|
|
168
|
-
}, Ce(u.title), 11, ["aria-level"])
|
|
169
|
-
]),
|
|
170
|
-
u.showClose ? (R(), K("button", {
|
|
171
|
-
key: 0,
|
|
172
|
-
"aria-label": o(a)("el.dialog.close"),
|
|
173
|
-
class: T(o(r).e("headerbtn")),
|
|
174
|
-
type: "button",
|
|
175
|
-
onClick: (w) => u.$emit("close")
|
|
176
|
-
}, [
|
|
177
|
-
H(o(Ke), {
|
|
178
|
-
class: T(o(r).e("close"))
|
|
179
|
-
}, {
|
|
180
|
-
default: S(() => [
|
|
181
|
-
(R(), j(be(u.closeIcon || o(l))))
|
|
182
|
-
]),
|
|
183
|
-
_: 1
|
|
184
|
-
}, 8, ["class"])
|
|
185
|
-
], 10, ["aria-label", "onClick"])) : q("v-if", !0)
|
|
186
|
-
], 2),
|
|
187
|
-
U("div", {
|
|
188
|
-
id: o(f),
|
|
189
|
-
class: T([o(r).e("body"), u.bodyClass])
|
|
190
|
-
}, [
|
|
191
|
-
E(u.$slots, "default")
|
|
192
|
-
], 10, ["id"]),
|
|
193
|
-
u.$slots.footer ? (R(), K("footer", {
|
|
194
|
-
key: 0,
|
|
195
|
-
class: T([o(r).e("footer"), u.footerClass])
|
|
196
|
-
}, [
|
|
197
|
-
E(u.$slots, "footer")
|
|
198
|
-
], 2)) : q("v-if", !0)
|
|
199
|
-
], 6));
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
var ao = /* @__PURE__ */ re(lo, [["__file", "dialog-content.vue"]]);
|
|
203
|
-
const ro = Q({
|
|
204
|
-
...fe,
|
|
205
|
-
appendToBody: Boolean,
|
|
206
|
-
appendTo: {
|
|
207
|
-
type: X([String, Object]),
|
|
208
|
-
default: "body"
|
|
209
|
-
},
|
|
210
|
-
beforeClose: {
|
|
211
|
-
type: X(Function)
|
|
212
|
-
},
|
|
213
|
-
destroyOnClose: Boolean,
|
|
214
|
-
closeOnClickModal: {
|
|
215
|
-
type: Boolean,
|
|
216
|
-
default: !0
|
|
217
|
-
},
|
|
218
|
-
closeOnPressEscape: {
|
|
219
|
-
type: Boolean,
|
|
220
|
-
default: !0
|
|
221
|
-
},
|
|
222
|
-
lockScroll: {
|
|
223
|
-
type: Boolean,
|
|
224
|
-
default: !0
|
|
225
|
-
},
|
|
226
|
-
modal: {
|
|
227
|
-
type: Boolean,
|
|
228
|
-
default: !0
|
|
229
|
-
},
|
|
230
|
-
openDelay: {
|
|
231
|
-
type: Number,
|
|
232
|
-
default: 0
|
|
233
|
-
},
|
|
234
|
-
closeDelay: {
|
|
235
|
-
type: Number,
|
|
236
|
-
default: 0
|
|
237
|
-
},
|
|
238
|
-
top: {
|
|
239
|
-
type: String
|
|
240
|
-
},
|
|
241
|
-
modelValue: Boolean,
|
|
242
|
-
modalClass: String,
|
|
243
|
-
headerClass: String,
|
|
244
|
-
bodyClass: String,
|
|
245
|
-
footerClass: String,
|
|
246
|
-
width: {
|
|
247
|
-
type: [String, Number]
|
|
248
|
-
},
|
|
249
|
-
zIndex: {
|
|
250
|
-
type: Number
|
|
251
|
-
},
|
|
252
|
-
trapFocus: Boolean,
|
|
253
|
-
headerAriaLevel: {
|
|
254
|
-
type: String,
|
|
255
|
-
default: "2"
|
|
256
|
-
}
|
|
257
|
-
}), io = {
|
|
258
|
-
open: () => !0,
|
|
259
|
-
opened: () => !0,
|
|
260
|
-
close: () => !0,
|
|
261
|
-
closed: () => !0,
|
|
262
|
-
[ue]: (e) => Oe(e),
|
|
263
|
-
openAutoFocus: () => !0,
|
|
264
|
-
closeAutoFocus: () => !0
|
|
265
|
-
}, uo = (e, s = {}) => {
|
|
266
|
-
Ee(e) || Ne("[useLockscreen]", "You need to pass a ref param to this function");
|
|
267
|
-
const t = s.ns || x("popup"), a = h(() => t.bm("parent", "hidden"));
|
|
268
|
-
if (!ie || te(document.body, a.value))
|
|
269
|
-
return;
|
|
270
|
-
let l = 0, d = !1, i = "0";
|
|
271
|
-
const f = () => {
|
|
272
|
-
setTimeout(() => {
|
|
273
|
-
typeof document > "u" || d && document && (document.body.style.width = i, Re(document.body, a.value));
|
|
274
|
-
}, 200);
|
|
275
|
-
};
|
|
276
|
-
J(e, (r) => {
|
|
277
|
-
if (!r) {
|
|
278
|
-
f();
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
d = !te(document.body, a.value), d && (i = document.body.style.width, Ye(document.body, a.value)), l = We(t.namespace.value);
|
|
282
|
-
const c = document.documentElement.clientHeight < document.body.scrollHeight, y = $e(document.body, "overflowY");
|
|
283
|
-
l > 0 && (c || y === "scroll") && d && (document.body.style.width = `calc(100% - ${l}px)`);
|
|
284
|
-
}), ge(() => f());
|
|
285
|
-
}, co = (e, s) => {
|
|
286
|
-
var t;
|
|
287
|
-
const l = Te().emit, { nextZIndex: d } = Ge();
|
|
288
|
-
let i = "";
|
|
289
|
-
const f = ne(), r = ne(), c = O(!1), y = O(!1), b = O(!1), C = O((t = e.zIndex) != null ? t : d());
|
|
290
|
-
let v, m;
|
|
291
|
-
const g = je("namespace", _e), u = h(() => {
|
|
292
|
-
const p = {}, B = `--${g.value}-dialog`;
|
|
293
|
-
return e.fullscreen || (e.top && (p[`${B}-margin-top`] = e.top), e.width && (p[`${B}-width`] = Z(e.width))), p;
|
|
294
|
-
}), N = h(() => e.alignCenter ? { display: "flex" } : {});
|
|
295
|
-
function w() {
|
|
296
|
-
l("opened");
|
|
297
|
-
}
|
|
298
|
-
function _() {
|
|
299
|
-
l("closed"), l(ue, !1), e.destroyOnClose && (b.value = !1);
|
|
300
|
-
}
|
|
301
|
-
function z() {
|
|
302
|
-
l("close");
|
|
303
|
-
}
|
|
304
|
-
function Y() {
|
|
305
|
-
m == null || m(), v == null || v(), e.openDelay && e.openDelay > 0 ? { stop: v } = se(() => D(), e.openDelay) : D();
|
|
306
|
-
}
|
|
307
|
-
function L() {
|
|
308
|
-
v == null || v(), m == null || m(), e.closeDelay && e.closeDelay > 0 ? { stop: m } = se(() => k(), e.closeDelay) : k();
|
|
309
|
-
}
|
|
310
|
-
function A() {
|
|
311
|
-
function p(B) {
|
|
312
|
-
B || (y.value = !0, c.value = !1);
|
|
313
|
-
}
|
|
314
|
-
e.beforeClose ? e.beforeClose(p) : L();
|
|
315
|
-
}
|
|
316
|
-
function M() {
|
|
317
|
-
e.closeOnClickModal && A();
|
|
318
|
-
}
|
|
319
|
-
function D() {
|
|
320
|
-
ie && (c.value = !0);
|
|
321
|
-
}
|
|
322
|
-
function k() {
|
|
323
|
-
c.value = !1;
|
|
324
|
-
}
|
|
325
|
-
function n() {
|
|
326
|
-
l("openAutoFocus");
|
|
327
|
-
}
|
|
328
|
-
function I() {
|
|
329
|
-
l("closeAutoFocus");
|
|
330
|
-
}
|
|
331
|
-
function $(p) {
|
|
332
|
-
var B;
|
|
333
|
-
((B = p.detail) == null ? void 0 : B.focusReason) === "pointer" && p.preventDefault();
|
|
334
|
-
}
|
|
335
|
-
e.lockScroll && uo(c);
|
|
336
|
-
function ve() {
|
|
337
|
-
e.closeOnPressEscape && A();
|
|
338
|
-
}
|
|
339
|
-
return J(() => e.modelValue, (p) => {
|
|
340
|
-
p ? (y.value = !1, Y(), b.value = !0, C.value = Pe(e.zIndex) ? d() : C.value++, Se(() => {
|
|
341
|
-
l("open"), s.value && (s.value.parentElement.scrollTop = 0, s.value.parentElement.scrollLeft = 0, s.value.scrollTop = 0);
|
|
342
|
-
})) : c.value && L();
|
|
343
|
-
}), J(() => e.fullscreen, (p) => {
|
|
344
|
-
s.value && (p ? (i = s.value.style.transform, s.value.style.transform = "") : s.value.style.transform = i);
|
|
345
|
-
}), le(() => {
|
|
346
|
-
e.modelValue && (c.value = !0, b.value = !0, Y());
|
|
347
|
-
}), {
|
|
348
|
-
afterEnter: w,
|
|
349
|
-
afterLeave: _,
|
|
350
|
-
beforeLeave: z,
|
|
351
|
-
handleClose: A,
|
|
352
|
-
onModalClick: M,
|
|
353
|
-
close: L,
|
|
354
|
-
doClose: k,
|
|
355
|
-
onOpenAutoFocus: n,
|
|
356
|
-
onCloseAutoFocus: I,
|
|
357
|
-
onCloseRequested: ve,
|
|
358
|
-
onFocusoutPrevented: $,
|
|
359
|
-
titleId: f,
|
|
360
|
-
bodyId: r,
|
|
361
|
-
closed: y,
|
|
362
|
-
style: u,
|
|
363
|
-
overlayDialogStyle: N,
|
|
364
|
-
rendered: b,
|
|
365
|
-
visible: c,
|
|
366
|
-
zIndex: C
|
|
367
|
-
};
|
|
368
|
-
}, fo = P({
|
|
369
|
-
name: "ElDialog",
|
|
370
|
-
inheritAttrs: !1
|
|
371
|
-
}), vo = /* @__PURE__ */ P({
|
|
372
|
-
...fo,
|
|
373
|
-
props: ro,
|
|
374
|
-
emits: io,
|
|
375
|
-
setup(e, { expose: s }) {
|
|
376
|
-
const t = e, a = he();
|
|
377
|
-
qe({
|
|
378
|
-
scope: "el-dialog",
|
|
379
|
-
from: "the title slot",
|
|
380
|
-
replacement: "the header slot",
|
|
381
|
-
version: "3.0.0",
|
|
382
|
-
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
383
|
-
}, h(() => !!a.title));
|
|
384
|
-
const l = x("dialog"), d = O(), i = O(), f = O(), {
|
|
385
|
-
visible: r,
|
|
386
|
-
titleId: c,
|
|
387
|
-
bodyId: y,
|
|
388
|
-
style: b,
|
|
389
|
-
overlayDialogStyle: C,
|
|
390
|
-
rendered: v,
|
|
391
|
-
zIndex: m,
|
|
392
|
-
afterEnter: g,
|
|
393
|
-
afterLeave: u,
|
|
394
|
-
beforeLeave: N,
|
|
395
|
-
handleClose: w,
|
|
396
|
-
onModalClick: _,
|
|
397
|
-
onOpenAutoFocus: z,
|
|
398
|
-
onCloseAutoFocus: Y,
|
|
399
|
-
onCloseRequested: L,
|
|
400
|
-
onFocusoutPrevented: A
|
|
401
|
-
} = co(t, d);
|
|
402
|
-
we(ce, {
|
|
403
|
-
dialogRef: d,
|
|
404
|
-
headerRef: i,
|
|
405
|
-
bodyId: y,
|
|
406
|
-
ns: l,
|
|
407
|
-
rendered: v,
|
|
408
|
-
style: b
|
|
409
|
-
});
|
|
410
|
-
const M = de(_), D = h(() => t.draggable && !t.fullscreen);
|
|
411
|
-
return s({
|
|
412
|
-
visible: r,
|
|
413
|
-
dialogContentRef: f,
|
|
414
|
-
resetPosition: () => {
|
|
415
|
-
var n;
|
|
416
|
-
(n = f.value) == null || n.resetPosition();
|
|
417
|
-
}
|
|
418
|
-
}), (n, I) => (R(), j(o(Ue), {
|
|
419
|
-
to: n.appendTo,
|
|
420
|
-
disabled: n.appendTo !== "body" ? !1 : !n.appendToBody
|
|
421
|
-
}, {
|
|
422
|
-
default: S(() => [
|
|
423
|
-
H(Le, {
|
|
424
|
-
name: "dialog-fade",
|
|
425
|
-
onAfterEnter: o(g),
|
|
426
|
-
onAfterLeave: o(u),
|
|
427
|
-
onBeforeLeave: o(N),
|
|
428
|
-
persisted: ""
|
|
429
|
-
}, {
|
|
430
|
-
default: S(() => [
|
|
431
|
-
Ae(H(o(eo), {
|
|
432
|
-
"custom-mask-event": "",
|
|
433
|
-
mask: n.modal,
|
|
434
|
-
"overlay-class": n.modalClass,
|
|
435
|
-
"z-index": o(m)
|
|
436
|
-
}, {
|
|
437
|
-
default: S(() => [
|
|
438
|
-
U("div", {
|
|
439
|
-
role: "dialog",
|
|
440
|
-
"aria-modal": "true",
|
|
441
|
-
"aria-label": n.title || void 0,
|
|
442
|
-
"aria-labelledby": n.title ? void 0 : o(c),
|
|
443
|
-
"aria-describedby": o(y),
|
|
444
|
-
class: T(`${o(l).namespace.value}-overlay-dialog`),
|
|
445
|
-
style: ae(o(C)),
|
|
446
|
-
onClick: o(M).onClick,
|
|
447
|
-
onMousedown: o(M).onMousedown,
|
|
448
|
-
onMouseup: o(M).onMouseup
|
|
449
|
-
}, [
|
|
450
|
-
H(o(Ve), {
|
|
451
|
-
loop: "",
|
|
452
|
-
trapped: o(r),
|
|
453
|
-
"focus-start-el": "container",
|
|
454
|
-
onFocusAfterTrapped: o(z),
|
|
455
|
-
onFocusAfterReleased: o(Y),
|
|
456
|
-
onFocusoutPrevented: o(A),
|
|
457
|
-
onReleaseRequested: o(L)
|
|
458
|
-
}, {
|
|
459
|
-
default: S(() => [
|
|
460
|
-
o(v) ? (R(), j(ao, Me({
|
|
461
|
-
key: 0,
|
|
462
|
-
ref_key: "dialogContentRef",
|
|
463
|
-
ref: f
|
|
464
|
-
}, n.$attrs, {
|
|
465
|
-
center: n.center,
|
|
466
|
-
"align-center": n.alignCenter,
|
|
467
|
-
"close-icon": n.closeIcon,
|
|
468
|
-
draggable: o(D),
|
|
469
|
-
overflow: n.overflow,
|
|
470
|
-
fullscreen: n.fullscreen,
|
|
471
|
-
"header-class": n.headerClass,
|
|
472
|
-
"body-class": n.bodyClass,
|
|
473
|
-
"footer-class": n.footerClass,
|
|
474
|
-
"show-close": n.showClose,
|
|
475
|
-
title: n.title,
|
|
476
|
-
"aria-level": n.headerAriaLevel,
|
|
477
|
-
onClose: o(w)
|
|
478
|
-
}), De({
|
|
479
|
-
header: S(() => [
|
|
480
|
-
n.$slots.title ? E(n.$slots, "title", { key: 1 }) : E(n.$slots, "header", {
|
|
481
|
-
key: 0,
|
|
482
|
-
close: o(w),
|
|
483
|
-
titleId: o(c),
|
|
484
|
-
titleClass: o(l).e("title")
|
|
485
|
-
})
|
|
486
|
-
]),
|
|
487
|
-
default: S(() => [
|
|
488
|
-
E(n.$slots, "default")
|
|
489
|
-
]),
|
|
490
|
-
_: 2
|
|
491
|
-
}, [
|
|
492
|
-
n.$slots.footer ? {
|
|
493
|
-
name: "footer",
|
|
494
|
-
fn: S(() => [
|
|
495
|
-
E(n.$slots, "footer")
|
|
496
|
-
])
|
|
497
|
-
} : void 0
|
|
498
|
-
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : q("v-if", !0)
|
|
499
|
-
]),
|
|
500
|
-
_: 3
|
|
501
|
-
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
502
|
-
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
503
|
-
]),
|
|
504
|
-
_: 3
|
|
505
|
-
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
506
|
-
[ke, o(r)]
|
|
507
|
-
])
|
|
508
|
-
]),
|
|
509
|
-
_: 3
|
|
510
|
-
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
511
|
-
]),
|
|
512
|
-
_: 3
|
|
513
|
-
}, 8, ["to", "disabled"]));
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
var mo = /* @__PURE__ */ re(vo, [["__file", "dialog.vue"]]);
|
|
517
|
-
const To = ze(mo);
|
|
518
|
-
export {
|
|
519
|
-
To as E,
|
|
520
|
-
eo as a,
|
|
521
|
-
uo as b,
|
|
522
|
-
de as c,
|
|
523
|
-
no as d,
|
|
524
|
-
W as f,
|
|
525
|
-
to as u
|
|
526
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),n=require("./base-6ccc8fc2.cjs"),O=require("./index-18416440.cjs"),R=require("./use-form-common-props-c1960844.cjs"),G=require("./scroll-c8ac196e.cjs"),P=require("./index-0ed86daf.cjs");var Y=(o=>(o[o.TEXT=1]="TEXT",o[o.CLASS=2]="CLASS",o[o.STYLE=4]="STYLE",o[o.PROPS=8]="PROPS",o[o.FULL_PROPS=16]="FULL_PROPS",o[o.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",o[o.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",o[o.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",o[o.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",o[o.NEED_PATCH=512]="NEED_PATCH",o[o.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",o[o.HOISTED=-1]="HOISTED",o[o.BAIL=-2]="BAIL",o))(Y||{});const z=o=>{const s=n.isArray$1(o)?o:[o],t=[];return s.forEach(a=>{var r;n.isArray$1(a)?t.push(...z(a)):e.isVNode(a)&&((r=a.component)!=null&&r.subTree)?t.push(a,...z(a.component.subTree)):e.isVNode(a)&&n.isArray$1(a.children)?t.push(...z(a.children)):t.push(a)}),t},V=o=>{if(!o)return{onClick:n.NOOP,onMousedown:n.NOOP,onMouseup:n.NOOP};let s=!1,t=!1;return{onClick:i=>{s&&t&&o(i),s=t=!1},onMousedown:i=>{s=i.target===i.currentTarget},onMouseup:i=>{t=i.target===i.currentTarget}}},j=n.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:n.definePropType([String,Array,Object])},zIndex:{type:n.definePropType([String,Number])}}),W={click:o=>o instanceof MouseEvent},x="overlay";var Z=e.defineComponent({name:"ElOverlay",props:j,emits:W,setup(o,{slots:s,emit:t}){const a=n.useNamespace(x),r=u=>{t("click",u)},{onClick:c,onMousedown:i,onMouseup:m}=V(o.customMaskEvent?void 0:r);return()=>o.mask?e.createVNode("div",{class:[a.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:m},[e.renderSlot(s,"default")],Y.STYLE|Y.CLASS|Y.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:o.overlayClass,style:{zIndex:o.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(s,"default")])}});const _=Z,H=Symbol("dialogInjectionKey"),U=n.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:R.iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),J={close:()=>!0},q=(o,s,t,a)=>{let r={offsetX:0,offsetY:0};const c=f=>{const y=f.clientX,b=f.clientY,{offsetX:E,offsetY:v}=r,p=o.value.getBoundingClientRect(),g=p.left,d=p.top,N=p.width,S=p.height,I=document.documentElement.clientWidth,$=document.documentElement.clientHeight,M=-g+E,T=-d+v,h=I-g-N+E,w=$-d-S+v,k=l=>{let D=E+l.clientX-y,B=v+l.clientY-b;a!=null&&a.value||(D=Math.min(Math.max(D,M),h),B=Math.min(Math.max(B,T),w)),r={offsetX:D,offsetY:B},o.value&&(o.value.style.transform=`translate(${n.addUnit(D)}, ${n.addUnit(B)})`)},A=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",A)},i=()=>{s.value&&o.value&&s.value.addEventListener("mousedown",c)},m=()=>{s.value&&o.value&&s.value.removeEventListener("mousedown",c)},u=()=>{r={offsetX:0,offsetY:0},o.value&&(o.value.style.transform="none")};return e.onMounted(()=>{e.watchEffect(()=>{t.value?i():m()})}),e.onBeforeUnmount(()=>{m()}),{resetPosition:u}},X=(...o)=>s=>{o.forEach(t=>{n.isFunction(t)?t(s):t.value=s})},Q=e.defineComponent({name:"ElDialogContent"}),ee=e.defineComponent({...Q,props:U,emits:J,setup(o,{expose:s}){const t=o,{t:a}=n.useLocale(),{Close:r}=R.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:u,style:f}=e.inject(H),{focusTrapRef:y}=e.inject(O.FOCUS_TRAP_INJECTION_KEY),b=e.computed(()=>[u.b(),u.is("fullscreen",t.fullscreen),u.is("draggable",t.draggable),u.is("align-center",t.alignCenter),{[u.m("center")]:t.center}]),E=X(y,c),v=e.computed(()=>t.draggable),p=e.computed(()=>t.overflow),{resetPosition:g}=q(c,i,v,p);return s({resetPosition:g}),(d,N)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(E),class:e.normalizeClass(e.unref(b)),style:e.normalizeStyle(e.unref(f)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(u).e("header"),d.headerClass,{"show-close":d.showClose}])},[e.renderSlot(d.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":d.ariaLevel,class:e.normalizeClass(e.unref(u).e("title"))},e.toDisplayString(d.title),11,["aria-level"])]),d.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(a)("el.dialog.close"),class:e.normalizeClass(e.unref(u).e("headerbtn")),type:"button",onClick:S=>d.$emit("close")},[e.createVNode(e.unref(R.ElIcon),{class:e.normalizeClass(e.unref(u).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.closeIcon||e.unref(r))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(m),class:e.normalizeClass([e.unref(u).e("body"),d.bodyClass])},[e.renderSlot(d.$slots,"default")],10,["id"]),d.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(u).e("footer"),d.footerClass])},[e.renderSlot(d.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var oe=n._export_sfc(ee,[["__file","dialog-content.vue"]]);const ne=n.buildProps({...U,appendToBody:Boolean,appendTo:{type:n.definePropType([String,Object]),default:"body"},beforeClose:{type:n.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),te={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[O.UPDATE_MODEL_EVENT]:o=>n.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},K=(o,s={})=>{e.isRef(o)||n.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=s.ns||n.useNamespace("popup"),a=e.computed(()=>t.bm("parent","hidden"));if(!n.isClient||n.hasClass(document.body,a.value))return;let r=0,c=!1,i="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,n.removeClass(document.body,a.value))},200)};e.watch(o,u=>{if(!u){m();return}c=!n.hasClass(document.body,a.value),c&&(i=document.body.style.width,n.addClass(document.body,a.value)),r=G.getScrollBarWidth(t.namespace.value);const f=document.documentElement.clientHeight<document.body.scrollHeight,y=n.getStyle(document.body,"overflowY");r>0&&(f||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${r}px)`)}),e.onScopeDispose(()=>m())},le=(o,s)=>{var t;const r=e.getCurrentInstance().emit,{nextZIndex:c}=R.useZIndex();let i="";const m=n.useId(),u=n.useId(),f=e.ref(!1),y=e.ref(!1),b=e.ref(!1),E=e.ref((t=o.zIndex)!=null?t:c());let v,p;const g=P.useGlobalConfig("namespace",n.defaultNamespace),d=e.computed(()=>{const C={},L=`--${g.value}-dialog`;return o.fullscreen||(o.top&&(C[`${L}-margin-top`]=o.top),o.width&&(C[`${L}-width`]=n.addUnit(o.width))),C}),N=e.computed(()=>o.alignCenter?{display:"flex"}:{});function S(){r("opened")}function I(){r("closed"),r(O.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(b.value=!1)}function $(){r("close")}function M(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=n.useTimeoutFn(()=>k(),o.openDelay):k()}function T(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=n.useTimeoutFn(()=>A(),o.closeDelay):A()}function h(){function C(L){L||(y.value=!0,f.value=!1)}o.beforeClose?o.beforeClose(C):T()}function w(){o.closeOnClickModal&&h()}function k(){n.isClient&&(f.value=!0)}function A(){f.value=!1}function l(){r("openAutoFocus")}function D(){r("closeAutoFocus")}function B(C){var L;((L=C.detail)==null?void 0:L.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&K(f);function F(){o.closeOnPressEscape&&h()}return e.watch(()=>o.modelValue,C=>{C?(y.value=!1,M(),b.value=!0,E.value=O.isUndefined(o.zIndex)?c():E.value++,e.nextTick(()=>{r("open"),s.value&&(s.value.parentElement.scrollTop=0,s.value.parentElement.scrollLeft=0,s.value.scrollTop=0)})):f.value&&T()}),e.watch(()=>o.fullscreen,C=>{s.value&&(C?(i=s.value.style.transform,s.value.style.transform=""):s.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(f.value=!0,b.value=!0,M())}),{afterEnter:S,afterLeave:I,beforeLeave:$,handleClose:h,onModalClick:w,close:T,doClose:A,onOpenAutoFocus:l,onCloseAutoFocus:D,onCloseRequested:F,onFocusoutPrevented:B,titleId:m,bodyId:u,closed:y,style:d,overlayDialogStyle:N,rendered:b,visible:f,zIndex:E}},se=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),re=e.defineComponent({...se,props:ne,emits:te,setup(o,{expose:s}){const t=o,a=e.useSlots();P.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!a.title));const r=n.useNamespace("dialog"),c=e.ref(),i=e.ref(),m=e.ref(),{visible:u,titleId:f,bodyId:y,style:b,overlayDialogStyle:E,rendered:v,zIndex:p,afterEnter:g,afterLeave:d,beforeLeave:N,handleClose:S,onModalClick:I,onOpenAutoFocus:$,onCloseAutoFocus:M,onCloseRequested:T,onFocusoutPrevented:h}=le(t,c);e.provide(H,{dialogRef:c,headerRef:i,bodyId:y,ns:r,rendered:v,style:b});const w=V(I),k=e.computed(()=>t.draggable&&!t.fullscreen);return s({visible:u,dialogContentRef:m,resetPosition:()=>{var l;(l=m.value)==null||l.resetPosition()}}),(l,D)=>(e.openBlock(),e.createBlock(e.unref(O.ElTeleport),{to:l.appendTo,disabled:l.appendTo!=="body"?!1:!l.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(g),onAfterLeave:e.unref(d),onBeforeLeave:e.unref(N),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(_),{"custom-mask-event":"",mask:l.modal,"overlay-class":l.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":l.title||void 0,"aria-labelledby":l.title?void 0:e.unref(f),"aria-describedby":e.unref(y),class:e.normalizeClass(`${e.unref(r).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(E)),onClick:e.unref(w).onClick,onMousedown:e.unref(w).onMousedown,onMouseup:e.unref(w).onMouseup},[e.createVNode(e.unref(O.ElFocusTrap),{loop:"",trapped:e.unref(u),"focus-start-el":"container",onFocusAfterTrapped:e.unref($),onFocusAfterReleased:e.unref(M),onFocusoutPrevented:e.unref(h),onReleaseRequested:e.unref(T)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(oe,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},l.$attrs,{center:l.center,"align-center":l.alignCenter,"close-icon":l.closeIcon,draggable:e.unref(k),overflow:l.overflow,fullscreen:l.fullscreen,"header-class":l.headerClass,"body-class":l.bodyClass,"footer-class":l.footerClass,"show-close":l.showClose,title:l.title,"aria-level":l.headerAriaLevel,onClose:e.unref(S)}),e.createSlots({header:e.withCtx(()=>[l.$slots.title?e.renderSlot(l.$slots,"title",{key:1}):e.renderSlot(l.$slots,"header",{key:0,close:e.unref(S),titleId:e.unref(f),titleClass:e.unref(r).e("title")})]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(u)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ae=n._export_sfc(re,[["__file","dialog.vue"]]);const ue=n.withInstall(ae);exports.ElDialog=ue;exports.ElOverlay=_;exports.composeRefs=X;exports.flattedChildren=z;exports.useDraggable=q;exports.useLockscreen=K;exports.useSameTarget=V;
|