st-comp 0.0.147 → 0.0.149
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 +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +26 -22
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +112 -103
- package/es/Kline.cjs +1 -0
- package/es/Kline.js +1901 -0
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +675 -1422
- package/es/KlineNew.cjs +1 -3
- package/es/KlineNew.js +314 -2736
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +102 -96
- package/es/Table.cjs +1 -1
- package/es/Table.js +66 -60
- package/es/User.cjs +1 -1
- package/es/User.js +102 -95
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +41 -32
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +2801 -1
- package/es/{_initCloneObject-a8dcd058.js → _initCloneObject-14b53c6f.js} +26 -26
- package/es/_initCloneObject-441db749.cjs +1 -0
- package/es/{base-674a354a.js → base-437d17f3.js} +64 -63
- package/es/{base-00ce90ec.cjs → base-ec05f348.cjs} +3 -3
- package/es/castArray-4251bbe4.js +10 -0
- package/es/castArray-a45823fe.cjs +1 -0
- package/es/config-provider-55482a43.js +47 -0
- package/es/config-provider-7cdfca4d.cjs +1 -0
- package/es/debounce-ac30be50.js +83 -0
- package/es/debounce-b2ff12bd.cjs +1 -0
- package/es/{dropdown-ce30ada6.js → dropdown-634b5e27.js} +31 -30
- package/es/dropdown-d7c59a21.cjs +1 -0
- package/es/el-button-196807af.cjs +1 -0
- package/es/el-button-e1665717.js +235 -0
- package/es/el-checkbox-group-492b95cc.cjs +1 -0
- package/es/{el-checkbox-group-0554b352.js → el-checkbox-group-e8fece80.js} +10 -10
- package/es/{el-empty-87154b6d.cjs → el-empty-19ea04f4.cjs} +1 -1
- package/es/{el-empty-39b3aed7.js → el-empty-bacc6613.js} +5 -5
- package/es/el-form-item-5bdffd07.cjs +12 -0
- package/es/{el-form-item-fc6f80ab.js → el-form-item-af1855f0.js} +79 -78
- package/es/el-input-23e2bac3.cjs +1 -0
- package/es/{el-input-d249ac86.js → el-input-4961b99f.js} +84 -82
- package/es/el-input-number-40a81eb5.cjs +1 -0
- package/es/{el-input-number-2066fbb7.js → el-input-number-610fc8ba.js} +36 -35
- package/es/el-menu-item-78b858f2.cjs +1 -0
- package/es/el-menu-item-7d04c11a.js +771 -0
- package/es/{el-message-9859835d.js → el-message-c3b3ac96.js} +81 -79
- package/es/el-message-d4df8136.cjs +1 -0
- package/es/el-overlay-12dd9b35.js +519 -0
- package/es/el-overlay-bc0790a2.cjs +1 -0
- package/es/{el-popover-b7b43c1f.js → el-popover-0aa071f2.js} +18 -18
- package/es/el-popover-8a77e015.cjs +1 -0
- package/es/el-popper-50100766.js +2262 -0
- package/es/el-popper-746070ba.cjs +1 -0
- package/es/el-scrollbar-562d0595.js +201 -0
- package/es/el-scrollbar-d1c3e7f7.cjs +1 -0
- package/es/{el-select-bcbb7e55.js → el-select-9381b156.js} +333 -329
- package/es/el-select-b162dffc.cjs +1 -0
- package/es/{el-table-column-c1e1a206.js → el-table-column-55bffba5.js} +350 -346
- package/es/el-table-column-6d761fce.cjs +14 -0
- package/es/el-tag-985d9aff.js +279 -0
- package/es/el-tag-c51a6490.cjs +1 -0
- package/es/index-09e01b1d.js +81 -0
- package/es/index-0cb48e01.js +306 -0
- package/es/{index-45de4a12.js → index-39ec9741.js} +7 -7
- package/es/index-3bf8d597.cjs +1 -0
- package/es/index-657047bb.js +513 -0
- package/es/index-8a0b1c53.cjs +3 -0
- package/es/index-a387515d.cjs +1 -0
- package/es/index-a902a0d9.js +59 -0
- package/es/index-deb8de52.cjs +1 -0
- 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-8fc301fd.cjs +1 -0
- package/es/raf-b128c7b7.js +6 -0
- package/es/{scroll-cb696ed2.js → scroll-387fcfdb.js} +1 -1
- package/es/{scroll-cca17da0.cjs → scroll-41224831.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/typescript-7ae59c4c.js +4 -0
- package/es/typescript-b63f8e83.cjs +1 -0
- package/es/use-form-common-props-1b84d8f4.cjs +2 -0
- package/es/use-form-common-props-f377e500.js +587 -0
- package/es/vnode-7dfd4ed5.js +14 -0
- package/es/vnode-7fbc61e1.cjs +1 -0
- package/es/{zh-cn-37af467d.cjs → zh-cn-ab9a583d.cjs} +1 -1
- package/es/{zh-cn-ef7d7220.js → zh-cn-eb9c2820.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-24f8572c.js → index-d2de454d.js} +33249 -31372
- package/lib/{python-2143eee4.js → python-22975586.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/KlineBasic/utils.js +1 -1
- package/packages/index.ts +2 -0
- package/src/pages/Kline/index.vue +12 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-7493ecd5.cjs +0 -1
- package/es/config-provider-419ffbf2.js +0 -120
- package/es/config-provider-68414290.cjs +0 -3
- package/es/dropdown-127a8c0d.cjs +0 -1
- package/es/el-button-7b9f5933.js +0 -745
- package/es/el-button-c00975e1.cjs +0 -1
- package/es/el-checkbox-group-7a313d34.cjs +0 -1
- package/es/el-form-item-7867f64d.cjs +0 -12
- package/es/el-input-2ff1628c.cjs +0 -1
- package/es/el-input-number-d6801a5c.cjs +0 -1
- package/es/el-message-ffcf690c.cjs +0 -1
- package/es/el-overlay-91784be2.cjs +0 -1
- package/es/el-overlay-f0757cc4.js +0 -525
- package/es/el-popover-4db657e2.cjs +0 -1
- package/es/el-scrollbar-35bac6b3.js +0 -2452
- package/es/el-scrollbar-ec09bbd3.cjs +0 -1
- package/es/el-select-0785c35a.cjs +0 -1
- package/es/el-table-column-2478adf8.cjs +0 -14
- package/es/el-tag-13ee17b3.cjs +0 -1
- package/es/el-tag-73372c6c.js +0 -359
- package/es/index-07b61d12.cjs +0 -1
- package/es/index-65b719a4.cjs +0 -1
- package/es/index-8b5fbc11.js +0 -66
- package/es/index-8c85d7c5.js +0 -858
- package/es/index-a49f4743.cjs +0 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { b as me,
|
|
3
|
-
import { b as K, d as
|
|
4
|
-
import {
|
|
5
|
-
import { m as
|
|
6
|
-
import { u as
|
|
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 O, Transition as j, withCtx as E, withDirectives as Z, createElementVNode as L, normalizeStyle as q, createTextVNode as re, toDisplayString as G, vShow as W, 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 J, render as H } from "vue";
|
|
2
|
+
import { b as me, a as ge } from "./el-scrollbar-562d0595.js";
|
|
3
|
+
import { b as K, d as N, u as ye, a as T, y as A, _ as Q, w as ve, j as X, p as Ce, i as R, h as _, m as he, f as be, c as V, T as Te } from "./base-437d17f3.js";
|
|
4
|
+
import { j as we, f as P, E as U, T as Se } from "./use-form-common-props-f377e500.js";
|
|
5
|
+
import { m as Ee } from "./typescript-7ae59c4c.js";
|
|
6
|
+
import { u as Ne } from "./index-09e01b1d.js";
|
|
7
|
+
import { E as Be } from "./index-0cb48e01.js";
|
|
8
|
+
import { m as c } from "./config-provider-55482a43.js";
|
|
7
9
|
const Me = K({
|
|
8
10
|
value: {
|
|
9
11
|
type: [String, Number],
|
|
@@ -26,22 +28,22 @@ const Me = K({
|
|
|
26
28
|
},
|
|
27
29
|
color: String,
|
|
28
30
|
badgeStyle: {
|
|
29
|
-
type:
|
|
31
|
+
type: N([String, Object, Array])
|
|
30
32
|
},
|
|
31
33
|
offset: {
|
|
32
|
-
type:
|
|
34
|
+
type: N(Array),
|
|
33
35
|
default: [0, 0]
|
|
34
36
|
},
|
|
35
37
|
badgeClass: {
|
|
36
38
|
type: String
|
|
37
39
|
}
|
|
38
|
-
}),
|
|
40
|
+
}), $e = B({
|
|
39
41
|
name: "ElBadge"
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
+
}), ke = /* @__PURE__ */ B({
|
|
43
|
+
...$e,
|
|
42
44
|
props: Me,
|
|
43
|
-
setup(o, { expose:
|
|
44
|
-
const e = o, a = ye("badge"),
|
|
45
|
+
setup(o, { expose: t }) {
|
|
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(() => {
|
|
45
47
|
var l, u, f, g, y;
|
|
46
48
|
return [
|
|
47
49
|
{
|
|
@@ -52,18 +54,18 @@ const Me = K({
|
|
|
52
54
|
(y = e.badgeStyle) != null ? y : {}
|
|
53
55
|
];
|
|
54
56
|
});
|
|
55
|
-
return
|
|
56
|
-
content:
|
|
57
|
+
return t({
|
|
58
|
+
content: n
|
|
57
59
|
}), (l, u) => (v(), z("div", {
|
|
58
60
|
class: C(s(a).b())
|
|
59
61
|
}, [
|
|
60
62
|
I(l.$slots, "default"),
|
|
61
|
-
O(
|
|
63
|
+
O(j, {
|
|
62
64
|
name: `${s(a).namespace.value}-zoom-in-center`,
|
|
63
65
|
persisted: ""
|
|
64
66
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
67
|
+
default: E(() => [
|
|
68
|
+
Z(L("sup", {
|
|
67
69
|
class: C([
|
|
68
70
|
s(a).e("content"),
|
|
69
71
|
s(a).em("content", l.type),
|
|
@@ -74,11 +76,11 @@ const Me = K({
|
|
|
74
76
|
]),
|
|
75
77
|
style: q(s(p))
|
|
76
78
|
}, [
|
|
77
|
-
I(l.$slots, "content", { value: s(
|
|
78
|
-
re(G(s(
|
|
79
|
+
I(l.$slots, "content", { value: s(n) }, () => [
|
|
80
|
+
re(G(s(n)), 1)
|
|
79
81
|
])
|
|
80
82
|
], 6), [
|
|
81
|
-
[W, !l.hidden && (s(
|
|
83
|
+
[W, !l.hidden && (s(n) || l.isDot || l.$slots.content)]
|
|
82
84
|
])
|
|
83
85
|
]),
|
|
84
86
|
_: 3
|
|
@@ -86,8 +88,8 @@ const Me = K({
|
|
|
86
88
|
], 2));
|
|
87
89
|
}
|
|
88
90
|
});
|
|
89
|
-
var ze = /* @__PURE__ */ Q(
|
|
90
|
-
const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i =
|
|
91
|
+
var ze = /* @__PURE__ */ Q(ke, [["__file", "badge.vue"]]);
|
|
92
|
+
const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
91
93
|
customClass: "",
|
|
92
94
|
center: !1,
|
|
93
95
|
dangerouslyUseHTMLString: !1,
|
|
@@ -130,7 +132,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
130
132
|
default: i.id
|
|
131
133
|
},
|
|
132
134
|
message: {
|
|
133
|
-
type:
|
|
135
|
+
type: N([
|
|
134
136
|
String,
|
|
135
137
|
Object,
|
|
136
138
|
Function
|
|
@@ -138,7 +140,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
138
140
|
default: i.message
|
|
139
141
|
},
|
|
140
142
|
onClose: {
|
|
141
|
-
type:
|
|
143
|
+
type: N(Function),
|
|
142
144
|
default: i.onClose
|
|
143
145
|
},
|
|
144
146
|
showClose: {
|
|
@@ -173,29 +175,29 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
173
175
|
}), _e = {
|
|
174
176
|
destroy: () => !0
|
|
175
177
|
}, d = ie([]), Oe = (o) => {
|
|
176
|
-
const
|
|
178
|
+
const t = d.findIndex((n) => n.id === o), e = d[t];
|
|
177
179
|
let a;
|
|
178
|
-
return
|
|
180
|
+
return t > 0 && (a = d[t - 1]), { current: e, prev: a };
|
|
179
181
|
}, De = (o) => {
|
|
180
|
-
const { prev:
|
|
181
|
-
return
|
|
182
|
-
}, xe = (o,
|
|
182
|
+
const { prev: t } = Oe(o);
|
|
183
|
+
return t ? t.vm.exposed.bottom.value : 0;
|
|
184
|
+
}, xe = (o, t) => d.findIndex((a) => a.id === o) > 0 ? 16 : t, Fe = B({
|
|
183
185
|
name: "ElMessage"
|
|
184
|
-
}), He = /* @__PURE__ */
|
|
186
|
+
}), He = /* @__PURE__ */ B({
|
|
185
187
|
...Fe,
|
|
186
188
|
props: Le,
|
|
187
189
|
emits: _e,
|
|
188
|
-
setup(o, { expose:
|
|
189
|
-
const e = o, { Close: a } = Se, { ns:
|
|
190
|
+
setup(o, { expose: t }) {
|
|
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);
|
|
190
192
|
let M;
|
|
191
193
|
const se = m(() => e.type ? e.type === "error" ? "danger" : e.type : "info"), oe = m(() => {
|
|
192
194
|
const r = e.type;
|
|
193
|
-
return { [
|
|
194
|
-
}), D = m(() => e.icon || P[e.type] || ""),
|
|
195
|
+
return { [n.bm("icon", r)]: r && P[r] };
|
|
196
|
+
}), D = m(() => e.icon || P[e.type] || ""), te = m(() => De(e.id)), x = m(() => xe(e.id, e.offset) + te.value), ne = m(() => y.value + x.value), ae = m(() => ({
|
|
195
197
|
top: `${x.value}px`,
|
|
196
198
|
zIndex: l.value
|
|
197
199
|
}));
|
|
198
|
-
function
|
|
200
|
+
function $() {
|
|
199
201
|
e.duration !== 0 && ({ stop: M } = Ce(() => {
|
|
200
202
|
w();
|
|
201
203
|
}, e.duration));
|
|
@@ -207,53 +209,53 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
207
209
|
g.value = !1;
|
|
208
210
|
}
|
|
209
211
|
function le({ code: r }) {
|
|
210
|
-
r ===
|
|
212
|
+
r === Be.esc && w();
|
|
211
213
|
}
|
|
212
214
|
return ue(() => {
|
|
213
|
-
|
|
215
|
+
$(), u(), g.value = !0;
|
|
214
216
|
}), de(() => e.repeatNum, () => {
|
|
215
|
-
F(),
|
|
217
|
+
F(), $();
|
|
216
218
|
}), me(document, "keydown", le), ge(f, () => {
|
|
217
219
|
y.value = f.value.getBoundingClientRect().height;
|
|
218
|
-
}),
|
|
220
|
+
}), t({
|
|
219
221
|
visible: g,
|
|
220
|
-
bottom:
|
|
222
|
+
bottom: ne,
|
|
221
223
|
close: w
|
|
222
|
-
}), (r,
|
|
223
|
-
name: s(
|
|
224
|
+
}), (r, je) => (v(), b(j, {
|
|
225
|
+
name: s(n).b("fade"),
|
|
224
226
|
onBeforeLeave: r.onClose,
|
|
225
|
-
onAfterLeave: (
|
|
227
|
+
onAfterLeave: (Ze) => r.$emit("destroy"),
|
|
226
228
|
persisted: ""
|
|
227
229
|
}, {
|
|
228
|
-
default:
|
|
229
|
-
|
|
230
|
+
default: E(() => [
|
|
231
|
+
Z(L("div", {
|
|
230
232
|
id: r.id,
|
|
231
233
|
ref_key: "messageRef",
|
|
232
234
|
ref: f,
|
|
233
235
|
class: C([
|
|
234
|
-
s(
|
|
235
|
-
{ [s(
|
|
236
|
-
s(
|
|
237
|
-
s(
|
|
238
|
-
s(
|
|
236
|
+
s(n).b(),
|
|
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),
|
|
239
241
|
r.customClass
|
|
240
242
|
]),
|
|
241
243
|
style: q(s(ae)),
|
|
242
244
|
role: "alert",
|
|
243
245
|
onMouseenter: F,
|
|
244
|
-
onMouseleave:
|
|
246
|
+
onMouseleave: $
|
|
245
247
|
}, [
|
|
246
248
|
r.repeatNum > 1 ? (v(), b(s(Ie), {
|
|
247
249
|
key: 0,
|
|
248
250
|
value: r.repeatNum,
|
|
249
251
|
type: s(se),
|
|
250
|
-
class: C(s(
|
|
252
|
+
class: C(s(n).e("badge"))
|
|
251
253
|
}, null, 8, ["value", "type", "class"])) : S("v-if", !0),
|
|
252
254
|
s(D) ? (v(), b(s(U), {
|
|
253
255
|
key: 1,
|
|
254
|
-
class: C([s(
|
|
256
|
+
class: C([s(n).e("icon"), s(oe)])
|
|
255
257
|
}, {
|
|
256
|
-
default:
|
|
258
|
+
default: E(() => [
|
|
257
259
|
(v(), b(ce(s(D))))
|
|
258
260
|
]),
|
|
259
261
|
_: 1
|
|
@@ -262,20 +264,20 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
262
264
|
r.dangerouslyUseHTMLString ? (v(), z(pe, { key: 1 }, [
|
|
263
265
|
S(" Caution here, message could've been compromised, never use user's input as message "),
|
|
264
266
|
L("p", {
|
|
265
|
-
class: C(s(
|
|
267
|
+
class: C(s(n).e("content")),
|
|
266
268
|
innerHTML: r.message
|
|
267
269
|
}, null, 10, ["innerHTML"])
|
|
268
270
|
], 2112)) : (v(), z("p", {
|
|
269
271
|
key: 0,
|
|
270
|
-
class: C(s(
|
|
272
|
+
class: C(s(n).e("content"))
|
|
271
273
|
}, G(r.message), 3))
|
|
272
274
|
]),
|
|
273
275
|
r.showClose ? (v(), b(s(U), {
|
|
274
276
|
key: 2,
|
|
275
|
-
class: C(s(
|
|
277
|
+
class: C(s(n).e("closeBtn")),
|
|
276
278
|
onClick: fe(w, ["stop"])
|
|
277
279
|
}, {
|
|
278
|
-
default:
|
|
280
|
+
default: E(() => [
|
|
279
281
|
O(s(a))
|
|
280
282
|
]),
|
|
281
283
|
_: 1
|
|
@@ -291,9 +293,9 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
|
|
|
291
293
|
var Ae = /* @__PURE__ */ Q(He, [["__file", "message.vue"]]);
|
|
292
294
|
let Re = 1;
|
|
293
295
|
const ee = (o) => {
|
|
294
|
-
const
|
|
296
|
+
const t = !o || R(o) || J(o) || _(o) ? { message: o } : o, e = {
|
|
295
297
|
...i,
|
|
296
|
-
...
|
|
298
|
+
...t
|
|
297
299
|
};
|
|
298
300
|
if (!e.appendTo)
|
|
299
301
|
e.appendTo = document.body;
|
|
@@ -303,18 +305,18 @@ const ee = (o) => {
|
|
|
303
305
|
}
|
|
304
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;
|
|
305
307
|
}, Ve = (o) => {
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
+
const t = d.indexOf(o);
|
|
309
|
+
if (t === -1)
|
|
308
310
|
return;
|
|
309
|
-
d.splice(
|
|
311
|
+
d.splice(t, 1);
|
|
310
312
|
const { handler: e } = o;
|
|
311
313
|
e.close();
|
|
312
|
-
}, Pe = ({ appendTo: o, ...
|
|
313
|
-
const a = `message_${Re++}`,
|
|
314
|
-
...
|
|
314
|
+
}, Pe = ({ appendTo: o, ...t }, e) => {
|
|
315
|
+
const a = `message_${Re++}`, n = t.onClose, p = document.createElement("div"), l = {
|
|
316
|
+
...t,
|
|
315
317
|
id: a,
|
|
316
318
|
onClose: () => {
|
|
317
|
-
|
|
319
|
+
n == null || n(), Ve(y);
|
|
318
320
|
},
|
|
319
321
|
onDestroy: () => {
|
|
320
322
|
H(null, p);
|
|
@@ -335,38 +337,38 @@ const ee = (o) => {
|
|
|
335
337
|
props: u.component.props
|
|
336
338
|
};
|
|
337
339
|
return y;
|
|
338
|
-
}, h = (o = {},
|
|
340
|
+
}, h = (o = {}, t) => {
|
|
339
341
|
if (!X)
|
|
340
342
|
return { close: () => {
|
|
341
343
|
} };
|
|
342
344
|
const e = ee(o);
|
|
343
345
|
if (e.grouping && d.length) {
|
|
344
|
-
const
|
|
346
|
+
const n = d.find(({ vnode: p }) => {
|
|
345
347
|
var l;
|
|
346
348
|
return ((l = p.props) == null ? void 0 : l.message) === e.message;
|
|
347
349
|
});
|
|
348
|
-
if (
|
|
349
|
-
return
|
|
350
|
+
if (n)
|
|
351
|
+
return n.props.repeatNum += 1, n.props.type = e.type, n.handler;
|
|
350
352
|
}
|
|
351
353
|
if (T(c.max) && d.length >= c.max)
|
|
352
354
|
return { close: () => {
|
|
353
355
|
} };
|
|
354
|
-
const a = Pe(e,
|
|
356
|
+
const a = Pe(e, t);
|
|
355
357
|
return d.push(a), a.handler;
|
|
356
358
|
};
|
|
357
359
|
Y.forEach((o) => {
|
|
358
|
-
h[o] = (
|
|
359
|
-
const a = ee(
|
|
360
|
+
h[o] = (t = {}, e) => {
|
|
361
|
+
const a = ee(t);
|
|
360
362
|
return h({ ...a, type: o }, e);
|
|
361
363
|
};
|
|
362
364
|
});
|
|
363
365
|
function Ue(o) {
|
|
364
|
-
for (const
|
|
365
|
-
(!o || o ===
|
|
366
|
+
for (const t of d)
|
|
367
|
+
(!o || o === t.props.type) && t.handler.close();
|
|
366
368
|
}
|
|
367
369
|
h.closeAll = Ue;
|
|
368
370
|
h._context = null;
|
|
369
|
-
const
|
|
371
|
+
const es = Te(h, "$message");
|
|
370
372
|
export {
|
|
371
|
-
|
|
373
|
+
es as E
|
|
372
374
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),k=require("./el-scrollbar-d1c3e7f7.cjs"),o=require("./base-ec05f348.cjs"),v=require("./use-form-common-props-1b84d8f4.cjs"),L=require("./typescript-b63f8e83.cjs"),_=require("./index-8a0b1c53.cjs"),D=require("./index-3bf8d597.cjs"),p=require("./config-provider-7cdfca4d.cjs"),O=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),P=e.defineComponent({name:"ElBadge"}),F=e.defineComponent({...P,props:O,setup(s,{expose:t}){const n=s,a=o.useNamespace("badge"),r=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var l,c,m,g,y;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(l=n.offset)==null?void 0:l[0])!=null?c:0)),marginTop:o.addUnit((g=(m=n.offset)==null?void 0:m[1])!=null?g:0)},(y=n.badgeStyle)!=null?y:{}]});return t({content:r}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.renderSlot(l.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(a).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(a).e("content"),e.unref(a).em("content",l.type),e.unref(a).is("fixed",!!l.$slots.default),e.unref(a).is("dot",l.isDot),e.unref(a).is("hide-zero",!l.showZero&&n.value===0),l.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(l.$slots,"content",{value:e.unref(r)},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)])],6),[[e.vShow,!l.hidden&&(e.unref(r)||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var q=o._export_sfc(F,[["__file","badge.vue"]]);const H=o.withInstall(q),w=["success","info","warning","error"],u=L.mutable({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},center:{type:Boolean,default:u.center},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:v.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:w,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},d=e.shallowReactive([]),U=s=>{const t=d.findIndex(r=>r.id===s),n=d[t];let a;return t>0&&(a=d[t-1]),{current:n,prev:a}},Z=s=>{const{prev:t}=U(s);return t?t.vm.exposed.bottom.value:0},j=(s,t)=>d.findIndex(a=>a.id===s)>0?16:t,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(s,{expose:t}){const n=s,{Close:a}=v.TypeComponents,{ns:r,zIndex:f}=_.useGlobalComponentSettings("message"),{currentZIndex:l,nextZIndex:c}=f,m=e.ref(),g=e.ref(!1),y=e.ref(0);let b;const z=e.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),M=e.computed(()=>{const i=n.type;return{[r.bm("icon",i)]:i&&v.TypeComponentsMap[i]}}),T=e.computed(()=>n.icon||v.TypeComponentsMap[n.type]||""),$=e.computed(()=>Z(n.id)),N=e.computed(()=>j(n.id,n.offset)+$.value),I=e.computed(()=>y.value+N.value),V=e.computed(()=>({top:`${N.value}px`,zIndex:l.value}));function B(){n.duration!==0&&({stop:b}=o.useTimeoutFn(()=>{h()},n.duration))}function S(){b==null||b()}function h(){g.value=!1}function x({code:i}){i===D.EVENT_CODE.esc&&h()}return e.onMounted(()=>{B(),c(),g.value=!0}),e.watch(()=>n.repeatNum,()=>{S(),B()}),k.useEventListener(document,"keydown",x),k.useResizeObserver(m,()=>{y.value=m.value.getBoundingClientRect().height}),t({visible:g,bottom:I,close:h}),(i,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(r).b("fade"),onBeforeLeave:i.onClose,onAfterLeave:oe=>i.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:i.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(r).b(),{[e.unref(r).m(i.type)]:i.type},e.unref(r).is("center",i.center),e.unref(r).is("closable",i.showClose),e.unref(r).is("plain",i.plain),i.customClass]),style:e.normalizeStyle(e.unref(V)),role:"alert",onMouseenter:S,onMouseleave:B},[i.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(H),{key:0,value:i.repeatNum,type:e.unref(z),class:e.normalizeClass(e.unref(r).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(M)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(T))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(i.$slots,"default",{},()=>[i.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(r).e("content")),innerHTML:i.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(r).e("content"))},e.toDisplayString(i.message),3))]),i.showClose?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:2,class:e.normalizeClass(e.unref(r).e("closeBtn")),onClick:e.withModifiers(h,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,g.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const E=s=>{const t=!s||o.isString(s)||e.isVNode(s)||o.isFunction(s)?{message:s}:s,n={...u,...t};if(!n.appendTo)n.appendTo=document.body;else if(o.isString(n.appendTo)){let a=document.querySelector(n.appendTo);o.isElement(a)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body),n.appendTo=a}return o.isBoolean(p.messageConfig.grouping)&&!n.grouping&&(n.grouping=p.messageConfig.grouping),o.isNumber(p.messageConfig.duration)&&n.duration===3e3&&(n.duration=p.messageConfig.duration),o.isNumber(p.messageConfig.offset)&&n.offset===16&&(n.offset=p.messageConfig.offset),o.isBoolean(p.messageConfig.showClose)&&!n.showClose&&(n.showClose=p.messageConfig.showClose),n},Q=s=>{const t=d.indexOf(s);if(t===-1)return;d.splice(t,1);const{handler:n}=s;n.close()},X=({appendTo:s,...t},n)=>{const a=`message_${K++}`,r=t.onClose,f=document.createElement("div"),l={...t,id:a,onClose:()=>{r==null||r(),Q(y)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,l,o.isFunction(l.message)||e.isVNode(l.message)?{default:o.isFunction(l.message)?l.message:()=>l.message}:null);c.appContext=n||C._context,e.render(c,f),s.appendChild(f.firstElementChild);const m=c.component,y={id:a,vnode:c,vm:m,handler:{close:()=>{m.exposed.visible.value=!1}},props:c.component.props};return y},C=(s={},t)=>{if(!o.isClient)return{close:()=>{}};const n=E(s);if(n.grouping&&d.length){const r=d.find(({vnode:f})=>{var l;return((l=f.props)==null?void 0:l.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(o.isNumber(p.messageConfig.max)&&d.length>=p.messageConfig.max)return{close:()=>{}};const a=X(n,t);return d.push(a),a.handler};w.forEach(s=>{C[s]=(t={},n)=>{const a=E(t);return C({...a,type:s},n)}});function Y(s){for(const t of d)(!s||s===t.props.type)&&t.handler.close()}C.closeAll=Y;C._context=null;const ee=o.withInstallFunction(C,"$message");exports.ElMessage=ee;
|