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,12 +1,13 @@
|
|
|
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 Z, withCtx as E, withDirectives as j, createElementVNode as L, normalizeStyle as q, createTextVNode as
|
|
2
|
-
import {
|
|
3
|
-
import { b as
|
|
4
|
-
import {
|
|
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 Z, withCtx as E, withDirectives as j, createElementVNode as L, normalizeStyle as q, createTextVNode as le, 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-29bcab5f.js";
|
|
3
|
+
import { b as K, d as N, u as ye, a as T, v as A, _ as Q, w as ve, h as X, o as Ce, i as R, g as _, l as he, e as be, c as V, E as Te } from "./base-19787dfb.js";
|
|
4
|
+
import { E as P } from "./index-72151b24.js";
|
|
5
|
+
import { i as we, f as U, T as Se } from "./use-form-common-props-5ff2f51b.js";
|
|
5
6
|
import { m as Ee } from "./typescript-7ae59c4c.js";
|
|
6
|
-
import { u as Ne } from "./index-
|
|
7
|
-
import { E as Be } from "./index-
|
|
8
|
-
import { m as c } from "./config-provider-
|
|
9
|
-
const Me =
|
|
7
|
+
import { u as Ne } from "./index-c066fe0d.js";
|
|
8
|
+
import { E as Be } from "./index-621b092b.js";
|
|
9
|
+
import { m as c } from "./config-provider-0f6672af.js";
|
|
10
|
+
const Me = K({
|
|
10
11
|
value: {
|
|
11
12
|
type: [String, Number],
|
|
12
13
|
default: ""
|
|
@@ -44,11 +45,11 @@ const Me = W({
|
|
|
44
45
|
props: Me,
|
|
45
46
|
setup(o, { expose: t }) {
|
|
46
47
|
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(() => {
|
|
47
|
-
var
|
|
48
|
+
var r, u, f, g, y;
|
|
48
49
|
return [
|
|
49
50
|
{
|
|
50
51
|
backgroundColor: e.color,
|
|
51
|
-
marginRight: A(-((u = (
|
|
52
|
+
marginRight: A(-((u = (r = e.offset) == null ? void 0 : r[0]) != null ? u : 0)),
|
|
52
53
|
marginTop: A((g = (f = e.offset) == null ? void 0 : f[1]) != null ? g : 0)
|
|
53
54
|
},
|
|
54
55
|
(y = e.badgeStyle) != null ? y : {}
|
|
@@ -56,10 +57,10 @@ const Me = W({
|
|
|
56
57
|
});
|
|
57
58
|
return t({
|
|
58
59
|
content: n
|
|
59
|
-
}), (
|
|
60
|
+
}), (r, u) => (v(), z("div", {
|
|
60
61
|
class: C(s(a).b())
|
|
61
62
|
}, [
|
|
62
|
-
I(
|
|
63
|
+
I(r.$slots, "default"),
|
|
63
64
|
O(Z, {
|
|
64
65
|
name: `${s(a).namespace.value}-zoom-in-center`,
|
|
65
66
|
persisted: ""
|
|
@@ -68,19 +69,19 @@ const Me = W({
|
|
|
68
69
|
j(L("sup", {
|
|
69
70
|
class: C([
|
|
70
71
|
s(a).e("content"),
|
|
71
|
-
s(a).em("content",
|
|
72
|
-
s(a).is("fixed", !!
|
|
73
|
-
s(a).is("dot",
|
|
74
|
-
s(a).is("hide-zero", !
|
|
75
|
-
|
|
72
|
+
s(a).em("content", r.type),
|
|
73
|
+
s(a).is("fixed", !!r.$slots.default),
|
|
74
|
+
s(a).is("dot", r.isDot),
|
|
75
|
+
s(a).is("hide-zero", !r.showZero && e.value === 0),
|
|
76
|
+
r.badgeClass
|
|
76
77
|
]),
|
|
77
78
|
style: q(s(p))
|
|
78
79
|
}, [
|
|
79
|
-
I(
|
|
80
|
-
|
|
80
|
+
I(r.$slots, "content", { value: s(n) }, () => [
|
|
81
|
+
le(G(s(n)), 1)
|
|
81
82
|
])
|
|
82
83
|
], 6), [
|
|
83
|
-
[
|
|
84
|
+
[W, !r.hidden && (s(n) || r.isDot || r.$slots.content)]
|
|
84
85
|
])
|
|
85
86
|
]),
|
|
86
87
|
_: 3
|
|
@@ -106,7 +107,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
106
107
|
grouping: !1,
|
|
107
108
|
repeatNum: 1,
|
|
108
109
|
appendTo: X ? document.body : void 0
|
|
109
|
-
}), Le =
|
|
110
|
+
}), Le = K({
|
|
110
111
|
customClass: {
|
|
111
112
|
type: String,
|
|
112
113
|
default: i.customClass
|
|
@@ -188,14 +189,14 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
188
189
|
props: Le,
|
|
189
190
|
emits: _e,
|
|
190
191
|
setup(o, { expose: t }) {
|
|
191
|
-
const e = o, { Close: a } = Se, { ns: n, zIndex: p } = Ne("message"), { currentZIndex:
|
|
192
|
+
const e = o, { Close: a } = Se, { ns: n, zIndex: p } = Ne("message"), { currentZIndex: r, nextZIndex: u } = p, f = k(), g = k(!1), y = k(0);
|
|
192
193
|
let M;
|
|
193
194
|
const se = m(() => e.type ? e.type === "error" ? "danger" : e.type : "info"), oe = m(() => {
|
|
194
|
-
const
|
|
195
|
-
return { [n.bm("icon",
|
|
196
|
-
}), D = m(() => e.icon ||
|
|
195
|
+
const l = e.type;
|
|
196
|
+
return { [n.bm("icon", l)]: l && U[l] };
|
|
197
|
+
}), D = m(() => e.icon || U[e.type] || ""), te = m(() => De(e.id)), x = m(() => xe(e.id, e.offset) + te.value), ne = m(() => y.value + x.value), ae = m(() => ({
|
|
197
198
|
top: `${x.value}px`,
|
|
198
|
-
zIndex:
|
|
199
|
+
zIndex: r.value
|
|
199
200
|
}));
|
|
200
201
|
function $() {
|
|
201
202
|
e.duration !== 0 && ({ stop: M } = Ce(() => {
|
|
@@ -208,50 +209,50 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
208
209
|
function w() {
|
|
209
210
|
g.value = !1;
|
|
210
211
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
212
|
+
function re({ code: l }) {
|
|
213
|
+
l === Be.esc && w();
|
|
213
214
|
}
|
|
214
215
|
return ue(() => {
|
|
215
216
|
$(), u(), g.value = !0;
|
|
216
217
|
}), de(() => e.repeatNum, () => {
|
|
217
218
|
F(), $();
|
|
218
|
-
}), me(document, "keydown",
|
|
219
|
+
}), me(document, "keydown", re), ge(f, () => {
|
|
219
220
|
y.value = f.value.getBoundingClientRect().height;
|
|
220
221
|
}), t({
|
|
221
222
|
visible: g,
|
|
222
223
|
bottom: ne,
|
|
223
224
|
close: w
|
|
224
|
-
}), (
|
|
225
|
+
}), (l, Ze) => (v(), b(Z, {
|
|
225
226
|
name: s(n).b("fade"),
|
|
226
|
-
onBeforeLeave:
|
|
227
|
-
onAfterLeave: (je) =>
|
|
227
|
+
onBeforeLeave: l.onClose,
|
|
228
|
+
onAfterLeave: (je) => l.$emit("destroy"),
|
|
228
229
|
persisted: ""
|
|
229
230
|
}, {
|
|
230
231
|
default: E(() => [
|
|
231
232
|
j(L("div", {
|
|
232
|
-
id:
|
|
233
|
+
id: l.id,
|
|
233
234
|
ref_key: "messageRef",
|
|
234
235
|
ref: f,
|
|
235
236
|
class: C([
|
|
236
237
|
s(n).b(),
|
|
237
|
-
{ [s(n).m(
|
|
238
|
-
s(n).is("center",
|
|
239
|
-
s(n).is("closable",
|
|
240
|
-
s(n).is("plain",
|
|
241
|
-
|
|
238
|
+
{ [s(n).m(l.type)]: l.type },
|
|
239
|
+
s(n).is("center", l.center),
|
|
240
|
+
s(n).is("closable", l.showClose),
|
|
241
|
+
s(n).is("plain", l.plain),
|
|
242
|
+
l.customClass
|
|
242
243
|
]),
|
|
243
244
|
style: q(s(ae)),
|
|
244
245
|
role: "alert",
|
|
245
246
|
onMouseenter: F,
|
|
246
247
|
onMouseleave: $
|
|
247
248
|
}, [
|
|
248
|
-
|
|
249
|
+
l.repeatNum > 1 ? (v(), b(s(Ie), {
|
|
249
250
|
key: 0,
|
|
250
|
-
value:
|
|
251
|
+
value: l.repeatNum,
|
|
251
252
|
type: s(se),
|
|
252
253
|
class: C(s(n).e("badge"))
|
|
253
254
|
}, null, 8, ["value", "type", "class"])) : S("v-if", !0),
|
|
254
|
-
s(D) ? (v(), b(s(
|
|
255
|
+
s(D) ? (v(), b(s(P), {
|
|
255
256
|
key: 1,
|
|
256
257
|
class: C([s(n).e("icon"), s(oe)])
|
|
257
258
|
}, {
|
|
@@ -260,19 +261,19 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
260
261
|
]),
|
|
261
262
|
_: 1
|
|
262
263
|
}, 8, ["class"])) : S("v-if", !0),
|
|
263
|
-
I(
|
|
264
|
-
|
|
264
|
+
I(l.$slots, "default", {}, () => [
|
|
265
|
+
l.dangerouslyUseHTMLString ? (v(), z(pe, { key: 1 }, [
|
|
265
266
|
S(" Caution here, message could've been compromised, never use user's input as message "),
|
|
266
267
|
L("p", {
|
|
267
268
|
class: C(s(n).e("content")),
|
|
268
|
-
innerHTML:
|
|
269
|
+
innerHTML: l.message
|
|
269
270
|
}, null, 10, ["innerHTML"])
|
|
270
271
|
], 2112)) : (v(), z("p", {
|
|
271
272
|
key: 0,
|
|
272
273
|
class: C(s(n).e("content"))
|
|
273
|
-
}, G(
|
|
274
|
+
}, G(l.message), 3))
|
|
274
275
|
]),
|
|
275
|
-
|
|
276
|
+
l.showClose ? (v(), b(s(P), {
|
|
276
277
|
key: 2,
|
|
277
278
|
class: C(s(n).e("closeBtn")),
|
|
278
279
|
onClick: fe(w, ["stop"])
|
|
@@ -283,7 +284,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
283
284
|
_: 1
|
|
284
285
|
}, 8, ["class", "onClick"])) : S("v-if", !0)
|
|
285
286
|
], 46, ["id"]), [
|
|
286
|
-
[
|
|
287
|
+
[W, g.value]
|
|
287
288
|
])
|
|
288
289
|
]),
|
|
289
290
|
_: 3
|
|
@@ -293,7 +294,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
|
|
|
293
294
|
var Ae = /* @__PURE__ */ Q(He, [["__file", "message.vue"]]);
|
|
294
295
|
let Re = 1;
|
|
295
296
|
const ee = (o) => {
|
|
296
|
-
const t = !o || R(o) ||
|
|
297
|
+
const t = !o || R(o) || J(o) || _(o) ? { message: o } : o, e = {
|
|
297
298
|
...i,
|
|
298
299
|
...t
|
|
299
300
|
};
|
|
@@ -312,7 +313,7 @@ const ee = (o) => {
|
|
|
312
313
|
const { handler: e } = o;
|
|
313
314
|
e.close();
|
|
314
315
|
}, Pe = ({ appendTo: o, ...t }, e) => {
|
|
315
|
-
const a = `message_${Re++}`, n = t.onClose, p = document.createElement("div"),
|
|
316
|
+
const a = `message_${Re++}`, n = t.onClose, p = document.createElement("div"), r = {
|
|
316
317
|
...t,
|
|
317
318
|
id: a,
|
|
318
319
|
onClose: () => {
|
|
@@ -321,8 +322,8 @@ const ee = (o) => {
|
|
|
321
322
|
onDestroy: () => {
|
|
322
323
|
H(null, p);
|
|
323
324
|
}
|
|
324
|
-
}, u = O(Ae,
|
|
325
|
-
default: _(
|
|
325
|
+
}, u = O(Ae, r, _(r.message) || J(r.message) ? {
|
|
326
|
+
default: _(r.message) ? r.message : () => r.message
|
|
326
327
|
} : null);
|
|
327
328
|
u.appContext = e || h._context, H(u, p), o.appendChild(p.firstElementChild);
|
|
328
329
|
const f = u.component, y = {
|
|
@@ -344,8 +345,8 @@ const ee = (o) => {
|
|
|
344
345
|
const e = ee(o);
|
|
345
346
|
if (e.grouping && d.length) {
|
|
346
347
|
const n = d.find(({ vnode: p }) => {
|
|
347
|
-
var
|
|
348
|
-
return ((
|
|
348
|
+
var r;
|
|
349
|
+
return ((r = p.props) == null ? void 0 : r.message) === e.message;
|
|
349
350
|
});
|
|
350
351
|
if (n)
|
|
351
352
|
return n.props.repeatNum += 1, n.props.type = e.type, n.handler;
|
|
@@ -368,7 +369,7 @@ function Ue(o) {
|
|
|
368
369
|
}
|
|
369
370
|
h.closeAll = Ue;
|
|
370
371
|
h._context = null;
|
|
371
|
-
const
|
|
372
|
+
const ss = Te(h, "$message");
|
|
372
373
|
export {
|
|
373
|
-
|
|
374
|
+
ss as E
|
|
374
375
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),k=require("./el-scrollbar-ac525239.cjs"),o=require("./base-0ca7c43a.cjs"),w=require("./index-afc88a4b.cjs"),h=require("./use-form-common-props-74a96df2.cjs"),_=require("./typescript-b63f8e83.cjs"),D=require("./index-2f958e56.cjs"),O=require("./index-65b4113e.cjs"),p=require("./config-provider-cfbb9cd8.cjs"),P=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}}),q=e.defineComponent({name:"ElBadge"}),F=e.defineComponent({...q,props:P,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 H=o._export_sfc(F,[["__file","badge.vue"]]);const A=o.withInstall(H),E=["success","info","warning","error"],u=_.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}),R=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:h.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:E,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}}),U={destroy:()=>!0},d=e.shallowReactive([]),Z=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}},j=s=>{const{prev:t}=Z(s);return t?t.vm.exposed.bottom.value:0},G=(s,t)=>d.findIndex(a=>a.id===s)>0?16:t,W=e.defineComponent({name:"ElMessage"}),J=e.defineComponent({...W,props:R,emits:U,setup(s,{expose:t}){const n=s,{Close:a}=h.TypeComponents,{ns:r,zIndex:f}=D.useGlobalComponentSettings("message"),{currentZIndex:l,nextZIndex:c}=f,m=e.ref(),g=e.ref(!1),y=e.ref(0);let b;const M=e.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),$=e.computed(()=>{const i=n.type;return{[r.bm("icon",i)]:i&&h.TypeComponentsMap[i]}}),T=e.computed(()=>n.icon||h.TypeComponentsMap[n.type]||""),x=e.computed(()=>j(n.id)),N=e.computed(()=>G(n.id,n.offset)+x.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(()=>{C()},n.duration))}function S(){b==null||b()}function C(){g.value=!1}function L({code:i}){i===O.EVENT_CODE.esc&&C()}return e.onMounted(()=>{B(),c(),g.value=!0}),e.watch(()=>n.repeatNum,()=>{S(),B()}),k.useEventListener(document,"keydown",L),k.useResizeObserver(m,()=>{y.value=m.value.getBoundingClientRect().height}),t({visible:g,bottom:I,close:C}),(i,oe)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(r).b("fade"),onBeforeLeave:i.onClose,onAfterLeave:se=>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(A),{key:0,value:i.repeatNum,type:e.unref(M),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(w.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref($)])},{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(w.ElIcon),{key:2,class:e.normalizeClass(e.unref(r).e("closeBtn")),onClick:e.withModifiers(C,["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 K=o._export_sfc(J,[["__file","message.vue"]]);let Q=1;const z=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},X=s=>{const t=d.indexOf(s);if(t===-1)return;d.splice(t,1);const{handler:n}=s;n.close()},Y=({appendTo:s,...t},n)=>{const a=`message_${Q++}`,r=t.onClose,f=document.createElement("div"),l={...t,id:a,onClose:()=>{r==null||r(),X(y)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(K,l,o.isFunction(l.message)||e.isVNode(l.message)?{default:o.isFunction(l.message)?l.message:()=>l.message}:null);c.appContext=n||v._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},v=(s={},t)=>{if(!o.isClient)return{close:()=>{}};const n=z(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=Y(n,t);return d.push(a),a.handler};E.forEach(s=>{v[s]=(t={},n)=>{const a=z(t);return v({...a,type:s},n)}});function ee(s){for(const t of d)(!s||s===t.props.type)&&t.handler.close()}v.closeAll=ee;v._context=null;const ne=o.withInstallFunction(v,"$message");exports.ElMessage=ne;
|