st-comp 0.0.155 → 0.0.156
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +1 -73
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +22 -24
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +84 -86
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +16 -18
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +24 -26
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +14 -16
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +54 -56
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +154 -156
- package/es/User.cjs +1 -1
- package/es/User.js +143 -145
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +51 -53
- package/es/VirtualTable.cjs +5 -5
- package/es/VirtualTable.js +160 -162
- package/es/{_initCloneObject-e3d8a9ab.js → _initCloneObject-8f85a96c.js} +34 -35
- package/es/_initCloneObject-e4534778.cjs +1 -0
- package/es/base-12a831d5.cjs +5 -0
- package/es/{index-72151b24.js → base-684eb9e1.js} +448 -150
- package/es/{castArray-8405000b.js → castArray-40b04f9d.js} +1 -1
- package/es/castArray-636c916c.cjs +1 -0
- package/es/{config-provider-cfbb9cd8.cjs → config-provider-cbbe303b.cjs} +1 -1
- package/es/{config-provider-0f6672af.js → config-provider-d3567354.js} +3 -3
- package/es/{debounce-6cb0781f.js → debounce-1474a11f.js} +13 -13
- package/es/debounce-317b8502.cjs +1 -0
- package/es/{dropdown-17b3ef6a.js → dropdown-0df01c01.js} +4 -4
- package/es/{dropdown-790d31ea.cjs → dropdown-db585641.cjs} +1 -1
- package/es/{el-button-0bf1d532.js → el-button-45a4c20f.js} +27 -28
- package/es/el-button-d1e1053b.cjs +1 -0
- package/es/{el-checkbox-group-d53bc316.js → el-checkbox-group-0a002b34.js} +9 -9
- package/es/{el-checkbox-group-45247bbf.cjs → el-checkbox-group-f63d75fa.cjs} +1 -1
- package/es/el-empty-b90b1d71.cjs +1 -0
- package/es/{el-empty-bd5343a7.js → el-empty-d4395563.js} +18 -18
- package/es/{el-form-item-05c0e335.js → el-form-item-0e2f2f50.js} +32 -33
- package/es/el-form-item-54aa10ba.cjs +12 -0
- package/es/el-input-8f26c59f.cjs +1 -0
- package/es/{el-input-1e309239.js → el-input-9fa1ff16.js} +43 -44
- package/es/{el-input-number-60ebc58f.js → el-input-number-09ab38ca.js} +55 -57
- package/es/el-input-number-243c370c.cjs +1 -0
- package/es/el-menu-item-b0b8f7e7.cjs +1 -0
- package/es/{el-menu-item-6c6236a1.js → el-menu-item-dcd129a2.js} +63 -64
- package/es/el-message-a47aa393.cjs +1 -0
- package/es/{el-message-7d927756.js → el-message-ff58b3e1.js} +70 -71
- package/es/el-overlay-2e275c8b.cjs +1 -0
- package/es/{el-overlay-26bf0945.js → el-overlay-58488ca9.js} +69 -71
- package/es/el-popover-7f431071.cjs +1 -0
- package/es/{el-popover-17e2e66c.js → el-popover-8253cb85.js} +26 -28
- package/es/el-popper-41feed2f.cjs +1 -0
- package/es/{el-popper-b6527ae2.js → el-popper-7c6f2aa7.js} +204 -205
- package/es/{el-scrollbar-29bcab5f.js → el-scrollbar-41d54029.js} +22 -22
- package/es/el-scrollbar-994f4975.cjs +1 -0
- package/es/el-select-2001b9be.cjs +1 -0
- package/es/{el-select-7395562b.js → el-select-7126baad.js} +33 -35
- package/es/el-table-column-b7615fa7.cjs +14 -0
- package/es/{el-table-column-47d80736.js → el-table-column-cb842955.js} +260 -262
- package/es/{el-tag-7414e0c7.js → el-tag-82921cf8.js} +28 -28
- package/es/el-tag-d7d821c4.cjs +1 -0
- package/es/{index-75cce588.js → index-11219ee5.js} +11 -12
- package/es/{index-273822d1.js → index-225cc10a.js} +16 -17
- package/es/index-4a1bbe07.cjs +1 -0
- package/es/index-6fd572af.js +59 -0
- package/es/{index-621b092b.js → index-7d1d201c.js} +1 -1
- package/es/index-858867bc.cjs +3 -0
- package/es/index-b7de6897.js +81 -0
- package/es/{index-65b4113e.cjs → index-d4202769.cjs} +1 -1
- package/es/{index-1d85ba4b.cjs → index-e32698d9.cjs} +1 -1
- package/es/index-f32a92f4.cjs +1 -0
- package/es/{raf-f46caea0.cjs → raf-46aa1661.cjs} +1 -1
- package/es/raf-fef33013.js +6 -0
- package/es/{scroll-d787d648.js → scroll-037086b0.js} +5 -5
- package/es/{scroll-339681d4.cjs → scroll-7d889620.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-55b310d1.js +684 -0
- package/es/use-form-common-props-87ba8842.cjs +6 -0
- package/es/{vnode-6a0c7411.js → vnode-1939d932.js} +1 -1
- package/es/{vnode-b15eb11b.cjs → vnode-7028b17d.cjs} +1 -1
- package/es/{zh-cn-36f34912.cjs → zh-cn-dba02740.cjs} +1 -1
- package/es/{zh-cn-f37255ae.js → zh-cn-fe562ff6.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-1e2ed5f3.js → index-71617d1a.js} +4 -4
- package/lib/{python-258cd090.js → python-66457064.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietySearch/index.vue +1 -1
- package/es/_initCloneObject-47814efa.cjs +0 -1
- package/es/base-0ca7c43a.cjs +0 -5
- package/es/base-19787dfb.js +0 -303
- package/es/castArray-a78ae889.cjs +0 -1
- package/es/debounce-cf26af24.cjs +0 -1
- package/es/el-button-62966947.cjs +0 -1
- package/es/el-empty-2ece1134.cjs +0 -1
- package/es/el-form-item-47e255d4.cjs +0 -12
- package/es/el-input-6a3805c5.cjs +0 -1
- package/es/el-input-number-96ff2e47.cjs +0 -1
- package/es/el-menu-item-4c9eb7ad.cjs +0 -1
- package/es/el-message-d5ed7a4f.cjs +0 -1
- package/es/el-overlay-41994f67.cjs +0 -1
- package/es/el-popover-7bd8a7c3.cjs +0 -1
- package/es/el-popper-7adbf1c6.cjs +0 -1
- package/es/el-scrollbar-ac525239.cjs +0 -1
- package/es/el-select-31f8ac8a.cjs +0 -1
- package/es/el-table-column-bdc46568.cjs +0 -14
- package/es/el-tag-9732314f.cjs +0 -1
- package/es/index-2d9c78d4.cjs +0 -1
- package/es/index-2f958e56.cjs +0 -3
- package/es/index-375e8de4.cjs +0 -5
- package/es/index-70372cdb.js +0 -519
- package/es/index-9e6e8d03.cjs +0 -1
- package/es/index-afc88a4b.cjs +0 -1
- package/es/index-c066fe0d.js +0 -82
- package/es/index-dc22ffe4.js +0 -59
- package/es/raf-a532c514.js +0 -6
- package/es/use-form-common-props-5ff2f51b.js +0 -171
- package/es/use-form-common-props-74a96df2.cjs +0 -2
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as B, computed as m, openBlock as v, createElementBlock as z, normalizeClass as C, unref as s, renderSlot as I, createVNode as
|
|
2
|
-
import {
|
|
3
|
-
import { b as
|
|
4
|
-
import {
|
|
5
|
-
import { i as we, f as U, T as Se } from "./use-form-common-props-5ff2f51b.js";
|
|
1
|
+
import { defineComponent as B, computed as m, openBlock as v, createElementBlock as z, normalizeClass as C, unref as s, renderSlot as I, createVNode as D, Transition as Z, withCtx as E, withDirectives as j, createElementVNode as L, normalizeStyle as q, createTextVNode as re, toDisplayString as G, vShow as Q, shallowReactive as ie, ref as k, onMounted as ue, watch as de, createBlock as b, createCommentVNode as S, resolveDynamicComponent as ce, Fragment as pe, withModifiers as fe, isVNode as W, render as H } from "vue";
|
|
2
|
+
import { u as me, a as ge } from "./el-scrollbar-41d54029.js";
|
|
3
|
+
import { b as J, d as N, u as ye, s as T, o as R, _ as K, w as ve, a as X, E as A, P as Ce, D as P, g as _, f as he, x as be, Q as V, R as Te } from "./base-684eb9e1.js";
|
|
4
|
+
import { d as we, T as U, t as Se } from "./use-form-common-props-55b310d1.js";
|
|
6
5
|
import { m as Ee } from "./typescript-7ae59c4c.js";
|
|
7
|
-
import {
|
|
8
|
-
import { E as Be } from "./index-
|
|
9
|
-
import { m as c } from "./config-provider-
|
|
10
|
-
const Me =
|
|
6
|
+
import { b as Ne } from "./index-b7de6897.js";
|
|
7
|
+
import { E as Be } from "./index-7d1d201c.js";
|
|
8
|
+
import { m as c } from "./config-provider-d3567354.js";
|
|
9
|
+
const Me = J({
|
|
11
10
|
value: {
|
|
12
11
|
type: [String, Number],
|
|
13
12
|
default: ""
|
|
@@ -45,23 +44,23 @@ const Me = K({
|
|
|
45
44
|
props: Me,
|
|
46
45
|
setup(o, { expose: t }) {
|
|
47
46
|
const e = o, a = ye("badge"), n = m(() => e.isDot ? "" : T(e.value) && T(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), p = m(() => {
|
|
48
|
-
var
|
|
47
|
+
var l, u, f, g, y;
|
|
49
48
|
return [
|
|
50
49
|
{
|
|
51
50
|
backgroundColor: e.color,
|
|
52
|
-
marginRight:
|
|
53
|
-
marginTop:
|
|
51
|
+
marginRight: R(-((u = (l = e.offset) == null ? void 0 : l[0]) != null ? u : 0)),
|
|
52
|
+
marginTop: R((g = (f = e.offset) == null ? void 0 : f[1]) != null ? g : 0)
|
|
54
53
|
},
|
|
55
54
|
(y = e.badgeStyle) != null ? y : {}
|
|
56
55
|
];
|
|
57
56
|
});
|
|
58
57
|
return t({
|
|
59
58
|
content: n
|
|
60
|
-
}), (
|
|
59
|
+
}), (l, u) => (v(), z("div", {
|
|
61
60
|
class: C(s(a).b())
|
|
62
61
|
}, [
|
|
63
|
-
I(
|
|
64
|
-
|
|
62
|
+
I(l.$slots, "default"),
|
|
63
|
+
D(Z, {
|
|
65
64
|
name: `${s(a).namespace.value}-zoom-in-center`,
|
|
66
65
|
persisted: ""
|
|
67
66
|
}, {
|
|
@@ -69,19 +68,19 @@ const Me = K({
|
|
|
69
68
|
j(L("sup", {
|
|
70
69
|
class: C([
|
|
71
70
|
s(a).e("content"),
|
|
72
|
-
s(a).em("content",
|
|
73
|
-
s(a).is("fixed", !!
|
|
74
|
-
s(a).is("dot",
|
|
75
|
-
s(a).is("hide-zero", !
|
|
76
|
-
|
|
71
|
+
s(a).em("content", l.type),
|
|
72
|
+
s(a).is("fixed", !!l.$slots.default),
|
|
73
|
+
s(a).is("dot", l.isDot),
|
|
74
|
+
s(a).is("hide-zero", !l.showZero && e.value === 0),
|
|
75
|
+
l.badgeClass
|
|
77
76
|
]),
|
|
78
77
|
style: q(s(p))
|
|
79
78
|
}, [
|
|
80
|
-
I(
|
|
81
|
-
|
|
79
|
+
I(l.$slots, "content", { value: s(n) }, () => [
|
|
80
|
+
re(G(s(n)), 1)
|
|
82
81
|
])
|
|
83
82
|
], 6), [
|
|
84
|
-
[
|
|
83
|
+
[Q, !l.hidden && (s(n) || l.isDot || l.$slots.content)]
|
|
85
84
|
])
|
|
86
85
|
]),
|
|
87
86
|
_: 3
|
|
@@ -89,7 +88,7 @@ const Me = K({
|
|
|
89
88
|
], 2));
|
|
90
89
|
}
|
|
91
90
|
});
|
|
92
|
-
var ze = /* @__PURE__ */
|
|
91
|
+
var ze = /* @__PURE__ */ K(ke, [["__file", "badge.vue"]]);
|
|
93
92
|
const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
94
93
|
customClass: "",
|
|
95
94
|
center: !1,
|
|
@@ -107,7 +106,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
107
106
|
grouping: !1,
|
|
108
107
|
repeatNum: 1,
|
|
109
108
|
appendTo: X ? document.body : void 0
|
|
110
|
-
}), Le =
|
|
109
|
+
}), Le = J({
|
|
111
110
|
customClass: {
|
|
112
111
|
type: String,
|
|
113
112
|
default: i.customClass
|
|
@@ -175,12 +174,12 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
175
174
|
}
|
|
176
175
|
}), _e = {
|
|
177
176
|
destroy: () => !0
|
|
178
|
-
}, d = ie([]),
|
|
177
|
+
}, d = ie([]), De = (o) => {
|
|
179
178
|
const t = d.findIndex((n) => n.id === o), e = d[t];
|
|
180
179
|
let a;
|
|
181
180
|
return t > 0 && (a = d[t - 1]), { current: e, prev: a };
|
|
182
|
-
},
|
|
183
|
-
const { prev: t } =
|
|
181
|
+
}, Oe = (o) => {
|
|
182
|
+
const { prev: t } = De(o);
|
|
184
183
|
return t ? t.vm.exposed.bottom.value : 0;
|
|
185
184
|
}, xe = (o, t) => d.findIndex((a) => a.id === o) > 0 ? 16 : t, Fe = B({
|
|
186
185
|
name: "ElMessage"
|
|
@@ -189,14 +188,14 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
189
188
|
props: Le,
|
|
190
189
|
emits: _e,
|
|
191
190
|
setup(o, { expose: t }) {
|
|
192
|
-
const e = o, { Close: a } = Se, { ns: n, zIndex: p } = Ne("message"), { currentZIndex:
|
|
191
|
+
const e = o, { Close: a } = Se, { ns: n, zIndex: p } = Ne("message"), { currentZIndex: l, nextZIndex: u } = p, f = k(), g = k(!1), y = k(0);
|
|
193
192
|
let M;
|
|
194
193
|
const se = m(() => e.type ? e.type === "error" ? "danger" : e.type : "info"), oe = m(() => {
|
|
195
|
-
const
|
|
196
|
-
return { [n.bm("icon",
|
|
197
|
-
}),
|
|
194
|
+
const r = e.type;
|
|
195
|
+
return { [n.bm("icon", r)]: r && U[r] };
|
|
196
|
+
}), O = m(() => e.icon || U[e.type] || ""), te = m(() => Oe(e.id)), x = m(() => xe(e.id, e.offset) + te.value), ne = m(() => y.value + x.value), ae = m(() => ({
|
|
198
197
|
top: `${x.value}px`,
|
|
199
|
-
zIndex:
|
|
198
|
+
zIndex: l.value
|
|
200
199
|
}));
|
|
201
200
|
function $() {
|
|
202
201
|
e.duration !== 0 && ({ stop: M } = Ce(() => {
|
|
@@ -209,121 +208,121 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
209
208
|
function w() {
|
|
210
209
|
g.value = !1;
|
|
211
210
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
211
|
+
function le({ code: r }) {
|
|
212
|
+
r === Be.esc && w();
|
|
214
213
|
}
|
|
215
214
|
return ue(() => {
|
|
216
215
|
$(), u(), g.value = !0;
|
|
217
216
|
}), de(() => e.repeatNum, () => {
|
|
218
217
|
F(), $();
|
|
219
|
-
}), me(document, "keydown",
|
|
218
|
+
}), me(document, "keydown", le), ge(f, () => {
|
|
220
219
|
y.value = f.value.getBoundingClientRect().height;
|
|
221
220
|
}), t({
|
|
222
221
|
visible: g,
|
|
223
222
|
bottom: ne,
|
|
224
223
|
close: w
|
|
225
|
-
}), (
|
|
224
|
+
}), (r, Ze) => (v(), b(Z, {
|
|
226
225
|
name: s(n).b("fade"),
|
|
227
|
-
onBeforeLeave:
|
|
228
|
-
onAfterLeave: (je) =>
|
|
226
|
+
onBeforeLeave: r.onClose,
|
|
227
|
+
onAfterLeave: (je) => r.$emit("destroy"),
|
|
229
228
|
persisted: ""
|
|
230
229
|
}, {
|
|
231
230
|
default: E(() => [
|
|
232
231
|
j(L("div", {
|
|
233
|
-
id:
|
|
232
|
+
id: r.id,
|
|
234
233
|
ref_key: "messageRef",
|
|
235
234
|
ref: f,
|
|
236
235
|
class: C([
|
|
237
236
|
s(n).b(),
|
|
238
|
-
{ [s(n).m(
|
|
239
|
-
s(n).is("center",
|
|
240
|
-
s(n).is("closable",
|
|
241
|
-
s(n).is("plain",
|
|
242
|
-
|
|
237
|
+
{ [s(n).m(r.type)]: r.type },
|
|
238
|
+
s(n).is("center", r.center),
|
|
239
|
+
s(n).is("closable", r.showClose),
|
|
240
|
+
s(n).is("plain", r.plain),
|
|
241
|
+
r.customClass
|
|
243
242
|
]),
|
|
244
243
|
style: q(s(ae)),
|
|
245
244
|
role: "alert",
|
|
246
245
|
onMouseenter: F,
|
|
247
246
|
onMouseleave: $
|
|
248
247
|
}, [
|
|
249
|
-
|
|
248
|
+
r.repeatNum > 1 ? (v(), b(s(Ie), {
|
|
250
249
|
key: 0,
|
|
251
|
-
value:
|
|
250
|
+
value: r.repeatNum,
|
|
252
251
|
type: s(se),
|
|
253
252
|
class: C(s(n).e("badge"))
|
|
254
253
|
}, null, 8, ["value", "type", "class"])) : S("v-if", !0),
|
|
255
|
-
s(
|
|
254
|
+
s(O) ? (v(), b(s(A), {
|
|
256
255
|
key: 1,
|
|
257
256
|
class: C([s(n).e("icon"), s(oe)])
|
|
258
257
|
}, {
|
|
259
258
|
default: E(() => [
|
|
260
|
-
(v(), b(ce(s(
|
|
259
|
+
(v(), b(ce(s(O))))
|
|
261
260
|
]),
|
|
262
261
|
_: 1
|
|
263
262
|
}, 8, ["class"])) : S("v-if", !0),
|
|
264
|
-
I(
|
|
265
|
-
|
|
263
|
+
I(r.$slots, "default", {}, () => [
|
|
264
|
+
r.dangerouslyUseHTMLString ? (v(), z(pe, { key: 1 }, [
|
|
266
265
|
S(" Caution here, message could've been compromised, never use user's input as message "),
|
|
267
266
|
L("p", {
|
|
268
267
|
class: C(s(n).e("content")),
|
|
269
|
-
innerHTML:
|
|
268
|
+
innerHTML: r.message
|
|
270
269
|
}, null, 10, ["innerHTML"])
|
|
271
270
|
], 2112)) : (v(), z("p", {
|
|
272
271
|
key: 0,
|
|
273
272
|
class: C(s(n).e("content"))
|
|
274
|
-
}, G(
|
|
273
|
+
}, G(r.message), 3))
|
|
275
274
|
]),
|
|
276
|
-
|
|
275
|
+
r.showClose ? (v(), b(s(A), {
|
|
277
276
|
key: 2,
|
|
278
277
|
class: C(s(n).e("closeBtn")),
|
|
279
278
|
onClick: fe(w, ["stop"])
|
|
280
279
|
}, {
|
|
281
280
|
default: E(() => [
|
|
282
|
-
|
|
281
|
+
D(s(a))
|
|
283
282
|
]),
|
|
284
283
|
_: 1
|
|
285
284
|
}, 8, ["class", "onClick"])) : S("v-if", !0)
|
|
286
285
|
], 46, ["id"]), [
|
|
287
|
-
[
|
|
286
|
+
[Q, g.value]
|
|
288
287
|
])
|
|
289
288
|
]),
|
|
290
289
|
_: 3
|
|
291
290
|
}, 8, ["name", "onBeforeLeave", "onAfterLeave"]));
|
|
292
291
|
}
|
|
293
292
|
});
|
|
294
|
-
var
|
|
295
|
-
let
|
|
293
|
+
var Re = /* @__PURE__ */ K(He, [["__file", "message.vue"]]);
|
|
294
|
+
let Ae = 1;
|
|
296
295
|
const ee = (o) => {
|
|
297
|
-
const t = !o ||
|
|
296
|
+
const t = !o || P(o) || W(o) || _(o) ? { message: o } : o, e = {
|
|
298
297
|
...i,
|
|
299
298
|
...t
|
|
300
299
|
};
|
|
301
300
|
if (!e.appendTo)
|
|
302
301
|
e.appendTo = document.body;
|
|
303
|
-
else if (
|
|
302
|
+
else if (P(e.appendTo)) {
|
|
304
303
|
let a = document.querySelector(e.appendTo);
|
|
305
304
|
he(a) || (be("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), a = document.body), e.appendTo = a;
|
|
306
305
|
}
|
|
307
306
|
return V(c.grouping) && !e.grouping && (e.grouping = c.grouping), T(c.duration) && e.duration === 3e3 && (e.duration = c.duration), T(c.offset) && e.offset === 16 && (e.offset = c.offset), V(c.showClose) && !e.showClose && (e.showClose = c.showClose), e;
|
|
308
|
-
},
|
|
307
|
+
}, Pe = (o) => {
|
|
309
308
|
const t = d.indexOf(o);
|
|
310
309
|
if (t === -1)
|
|
311
310
|
return;
|
|
312
311
|
d.splice(t, 1);
|
|
313
312
|
const { handler: e } = o;
|
|
314
313
|
e.close();
|
|
315
|
-
},
|
|
316
|
-
const a = `message_${
|
|
314
|
+
}, Ve = ({ appendTo: o, ...t }, e) => {
|
|
315
|
+
const a = `message_${Ae++}`, n = t.onClose, p = document.createElement("div"), l = {
|
|
317
316
|
...t,
|
|
318
317
|
id: a,
|
|
319
318
|
onClose: () => {
|
|
320
|
-
n == null || n(),
|
|
319
|
+
n == null || n(), Pe(y);
|
|
321
320
|
},
|
|
322
321
|
onDestroy: () => {
|
|
323
322
|
H(null, p);
|
|
324
323
|
}
|
|
325
|
-
}, u =
|
|
326
|
-
default: _(
|
|
324
|
+
}, u = D(Re, l, _(l.message) || W(l.message) ? {
|
|
325
|
+
default: _(l.message) ? l.message : () => l.message
|
|
327
326
|
} : null);
|
|
328
327
|
u.appContext = e || h._context, H(u, p), o.appendChild(p.firstElementChild);
|
|
329
328
|
const f = u.component, y = {
|
|
@@ -345,8 +344,8 @@ const ee = (o) => {
|
|
|
345
344
|
const e = ee(o);
|
|
346
345
|
if (e.grouping && d.length) {
|
|
347
346
|
const n = d.find(({ vnode: p }) => {
|
|
348
|
-
var
|
|
349
|
-
return ((
|
|
347
|
+
var l;
|
|
348
|
+
return ((l = p.props) == null ? void 0 : l.message) === e.message;
|
|
350
349
|
});
|
|
351
350
|
if (n)
|
|
352
351
|
return n.props.repeatNum += 1, n.props.type = e.type, n.handler;
|
|
@@ -354,7 +353,7 @@ const ee = (o) => {
|
|
|
354
353
|
if (T(c.max) && d.length >= c.max)
|
|
355
354
|
return { close: () => {
|
|
356
355
|
} };
|
|
357
|
-
const a =
|
|
356
|
+
const a = Ve(e, t);
|
|
358
357
|
return d.push(a), a.handler;
|
|
359
358
|
};
|
|
360
359
|
Y.forEach((o) => {
|
|
@@ -369,7 +368,7 @@ function Ue(o) {
|
|
|
369
368
|
}
|
|
370
369
|
h.closeAll = Ue;
|
|
371
370
|
h._context = null;
|
|
372
|
-
const
|
|
371
|
+
const es = Te(h, "$message");
|
|
373
372
|
export {
|
|
374
|
-
|
|
373
|
+
es as E
|
|
375
374
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),n=require("./base-12a831d5.cjs"),$=require("./vnode-7028b17d.cjs"),N=require("./index-d4202769.cjs"),O=require("./use-form-common-props-87ba8842.cjs"),W=require("./scroll-7d889620.cjs"),V=require("./index-858867bc.cjs"),z=o=>{if(!o)return{onClick:n.NOOP,onMousedown:n.NOOP,onMouseup:n.NOOP};let l=!1,s=!1;return{onClick:i=>{l&&s&&o(i),l=s=!1},onMousedown:i=>{l=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},x=n.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:n.definePropType([String,Array,Object])},zIndex:{type:n.definePropType([String,Number])}}),K={click:o=>o instanceof MouseEvent},_="overlay";var Z=e.defineComponent({name:"ElOverlay",props:x,emits:K,setup(o,{slots:l,emit:s}){const f=n.useNamespace(_),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:m}=z(o.customMaskEvent?void 0:a);return()=>o.mask?e.createVNode("div",{class:[f.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:m},[e.renderSlot(l,"default")],$.PatchFlags.STYLE|$.PatchFlags.CLASS|$.PatchFlags.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(l,"default")])}});const Y=Z,q=Symbol("dialogInjectionKey"),R=n.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:O.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"}}),G={close:()=>!0},U=(o,l,s,f)=>{let a={offsetX:0,offsetY:0};const c=d=>{const y=d.clientX,h=d.clientY,{offsetX:g,offsetY:v}=a,p=o.value.getBoundingClientRect(),b=p.left,u=p.top,D=p.width,E=p.height,F=document.documentElement.clientWidth,A=document.documentElement.clientHeight,L=-b+g,w=-u+v,k=F-b-D+g,S=A-u-E+v,T=t=>{let P=g+t.clientX-y,I=v+t.clientY-h;f!=null&&f.value||(P=Math.min(Math.max(P,L),k),I=Math.min(Math.max(I,w),S)),a={offsetX:P,offsetY:I},o.value&&(o.value.style.transform=`translate(${n.addUnit(P)}, ${n.addUnit(I)})`)},B=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",B)},i=()=>{l.value&&o.value&&l.value.addEventListener("mousedown",c)},m=()=>{l.value&&o.value&&l.value.removeEventListener("mousedown",c)},r=()=>{a={offsetX:0,offsetY:0},o.value&&(o.value.style.transform="none")};return e.onMounted(()=>{e.watchEffect(()=>{s.value?i():m()})}),e.onBeforeUnmount(()=>{m()}),{resetPosition:r}},X=(...o)=>l=>{o.forEach(s=>{n.isFunction(s)?s(l):s.value=l})},J=e.defineComponent({name:"ElDialogContent"}),Q=e.defineComponent({...J,props:R,emits:G,setup(o,{expose:l}){const s=o,{t:f}=O.useLocale(),{Close:a}=O.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:r,style:d}=e.inject(q),{focusTrapRef:y}=e.inject(N.FOCUS_TRAP_INJECTION_KEY),h=e.computed(()=>[r.b(),r.is("fullscreen",s.fullscreen),r.is("draggable",s.draggable),r.is("align-center",s.alignCenter),{[r.m("center")]:s.center}]),g=X(y,c),v=e.computed(()=>s.draggable),p=e.computed(()=>s.overflow),{resetPosition:b}=U(c,i,v,p);return l({resetPosition:b}),(u,D)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(g),class:e.normalizeClass(e.unref(h)),style:e.normalizeStyle(e.unref(d)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(r).e("header"),u.headerClass,{"show-close":u.showClose}])},[e.renderSlot(u.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":u.ariaLevel,class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(f)("el.dialog.close"),class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:E=>u.$emit("close")},[e.createVNode(e.unref(n.ElIcon),{class:e.normalizeClass(e.unref(r).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(a))))]),_: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(r).e("body"),u.bodyClass])},[e.renderSlot(u.$slots,"default")],10,["id"]),u.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(r).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var ee=n._export_sfc(Q,[["__file","dialog-content.vue"]]);const oe=n.buildProps({...R,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,[N.UPDATE_MODEL_EVENT]:o=>n.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},H=(o,l={})=>{e.isRef(o)||n.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||n.useNamespace("popup"),f=e.computed(()=>s.bm("parent","hidden"));if(!n.isClient||n.hasClass(document.body,f.value))return;let a=0,c=!1,i="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,n.removeClass(document.body,f.value))},200)};e.watch(o,r=>{if(!r){m();return}c=!n.hasClass(document.body,f.value),c&&(i=document.body.style.width,n.addClass(document.body,f.value)),a=W.getScrollBarWidth(s.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,y=n.getStyle(document.body,"overflowY");a>0&&(d||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>m())},ne=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=O.useZIndex();let i="";const m=O.useId(),r=O.useId(),d=e.ref(!1),y=e.ref(!1),h=e.ref(!1),g=e.ref((s=o.zIndex)!=null?s:c());let v,p;const b=V.useGlobalConfig("namespace",n.defaultNamespace),u=e.computed(()=>{const C={},M=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(C[`${M}-margin-top`]=o.top),o.width&&(C[`${M}-width`]=n.addUnit(o.width))),C}),D=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function F(){a("closed"),a(N.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(h.value=!1)}function A(){a("close")}function L(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=n.useTimeoutFn(()=>T(),o.openDelay):T()}function w(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=n.useTimeoutFn(()=>B(),o.closeDelay):B()}function k(){function C(M){M||(y.value=!0,d.value=!1)}o.beforeClose?o.beforeClose(C):w()}function S(){o.closeOnClickModal&&k()}function T(){n.isClient&&(d.value=!0)}function B(){d.value=!1}function t(){a("openAutoFocus")}function P(){a("closeAutoFocus")}function I(C){var M;((M=C.detail)==null?void 0:M.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&H(d);function j(){o.closeOnPressEscape&&k()}return e.watch(()=>o.modelValue,C=>{C?(y.value=!1,L(),h.value=!0,g.value=N.isUndefined(o.zIndex)?c():g.value++,e.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):d.value&&w()}),e.watch(()=>o.fullscreen,C=>{l.value&&(C?(i=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(d.value=!0,h.value=!0,L())}),{afterEnter:E,afterLeave:F,beforeLeave:A,handleClose:k,onModalClick:S,close:w,doClose:B,onOpenAutoFocus:t,onCloseAutoFocus:P,onCloseRequested:j,onFocusoutPrevented:I,titleId:m,bodyId:r,closed:y,style:u,overlayDialogStyle:D,rendered:h,visible:d,zIndex:g}},le=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),se=e.defineComponent({...le,props:oe,emits:te,setup(o,{expose:l}){const s=o,f=e.useSlots();V.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(()=>!!f.title));const a=n.useNamespace("dialog"),c=e.ref(),i=e.ref(),m=e.ref(),{visible:r,titleId:d,bodyId:y,style:h,overlayDialogStyle:g,rendered:v,zIndex:p,afterEnter:b,afterLeave:u,beforeLeave:D,handleClose:E,onModalClick:F,onOpenAutoFocus:A,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:k}=ne(s,c);e.provide(q,{dialogRef:c,headerRef:i,bodyId:y,ns:a,rendered:v,style:h});const S=z(F),T=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:m,resetPosition:()=>{var t;(t=m.value)==null||t.resetPosition()}}),(t,P)=>(e.openBlock(),e.createBlock(e.unref(N.ElTeleport),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(b),onAfterLeave:e.unref(u),onBeforeLeave:e.unref(D),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(Y),{"custom-mask-event":"",mask:t.modal,"overlay-class":t.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:e.unref(d),"aria-describedby":e.unref(y),class:e.normalizeClass(`${e.unref(a).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(g)),onClick:e.unref(S).onClick,onMousedown:e.unref(S).onMousedown,onMouseup:e.unref(S).onMouseup},[e.createVNode(e.unref(N.ElFocusTrap),{loop:"",trapped:e.unref(r),"focus-start-el":"container",onFocusAfterTrapped:e.unref(A),onFocusAfterReleased:e.unref(L),onFocusoutPrevented:e.unref(k),onReleaseRequested:e.unref(w)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(ee,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},t.$attrs,{center:t.center,"align-center":t.alignCenter,"close-icon":t.closeIcon,draggable:e.unref(T),overflow:t.overflow,fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[t.$slots.title?e.renderSlot(t.$slots,"title",{key:1}):e.renderSlot(t.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(d),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(t.$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(r)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ae=n._export_sfc(se,[["__file","dialog.vue"]]);const re=n.withInstall(ae);exports.ElDialog=re;exports.ElOverlay=Y;exports.composeRefs=X;exports.useDraggable=U;exports.useLockscreen=H;exports.useSameTarget=z;
|