st-comp 0.0.178 → 0.0.180
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 +3 -3
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +29 -33
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +14 -18
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +25 -30
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +457 -419
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +13 -16
- package/es/KlinePlus.cjs +3 -3
- package/es/KlinePlus.js +140 -142
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +274 -276
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +21 -23
- package/es/User.cjs +1 -1
- package/es/User.js +472 -482
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +440 -2878
- package/es/VarietySearch.cjs +12 -12
- package/es/VarietySearch.js +1199 -1176
- package/es/VirtualTable.cjs +1 -13
- package/es/VirtualTable.js +1547 -1567
- package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
- package/es/_initCloneObject-e2f0deb9.cjs +1 -0
- package/es/base-62a70f61.js +288 -0
- package/es/base-ef747d02.cjs +5 -0
- package/es/config-provider-178bb43c.cjs +1 -0
- package/es/config-provider-2e733cae.js +58 -0
- package/es/dayjs.min-2c20abe6.cjs +1 -0
- package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
- package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
- package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
- package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
- package/es/dropdown-f2fec683.cjs +1 -0
- package/es/el-button-5b08c08a.js +272 -0
- package/es/el-button-fc46a173.cjs +1 -0
- package/es/el-dialog-0b7166c9.cjs +1 -0
- package/es/el-dialog-d8d0da7a.js +276 -0
- package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
- package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
- package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
- package/es/el-empty-bb2b0235.cjs +1 -0
- package/es/el-form-item-caffd133.cjs +12 -0
- package/es/el-form-item-ff9c7d98.js +1267 -0
- package/es/el-input-6db30c8c.js +531 -0
- package/es/el-input-9c912678.cjs +1 -0
- package/es/el-input-number-05f150e5.js +311 -0
- package/es/el-input-number-6fe73563.cjs +1 -0
- package/es/el-loading-8514feaa.cjs +1 -0
- package/es/el-loading-93842445.js +203 -0
- package/es/el-menu-item-7a57c1be.cjs +1 -0
- package/es/el-menu-item-a886fbdd.js +768 -0
- package/es/el-message-8aa674f2.js +406 -0
- package/es/el-message-aad5b42b.cjs +1 -0
- package/es/el-message-box-2b6b2b68.js +550 -0
- package/es/el-message-box-53f355d7.cjs +1 -0
- package/es/el-overlay-540b2a02.js +324 -0
- package/es/el-overlay-96630a2e.cjs +1 -0
- package/es/el-popconfirm-2afdf6fb.cjs +1 -0
- package/es/el-popconfirm-c18d8035.js +162 -0
- package/es/el-popper-544fd77e.js +2412 -0
- package/es/el-popper-73466d7a.cjs +1 -0
- package/es/el-scrollbar-691cfc11.cjs +1 -0
- package/es/el-scrollbar-fae984e3.js +763 -0
- package/es/el-segmented-a7493831.js +142 -0
- package/es/el-segmented-b6bd3c0e.cjs +1 -0
- package/es/el-select-5959e837.cjs +1 -0
- package/es/el-select-ea8feecf.js +1251 -0
- package/es/el-table-column-9ef52443.js +3878 -0
- package/es/el-table-column-b824ac5c.cjs +14 -0
- package/es/el-tag-2fc9b9eb.js +116 -0
- package/es/el-tag-ecad6d02.cjs +1 -0
- package/es/index-2e331d74.js +10 -0
- package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
- package/es/index-3a74eae4.cjs +1 -0
- package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
- package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
- package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
- package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
- package/es/index-a9095b4a.js +163 -0
- package/es/index-a93dd9c4.cjs +1 -0
- package/es/index-ebd2fd7e.cjs +1 -0
- package/es/index-f1c702f6.cjs +1 -0
- package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
- package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
- package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
- package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
- package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-global-config-03735617.cjs +1 -0
- package/es/use-global-config-4b185eb5.js +71 -0
- package/es/validator-0e688e4e.cjs +1 -0
- package/es/validator-d12a8f8c.js +5 -0
- package/es/vnode-4db20540.cjs +1 -0
- package/es/vnode-a0795a4b.js +70 -0
- package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
- package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +226 -245
- package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
- package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -2
- package/packages/KlinePlus/index.vue +2 -1
- package/packages/VarSelectDialog/index.vue +43 -67
- package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
- package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
- package/packages/index.ts +0 -2
- package/src/pages/VarSelectDialog/index.vue +1 -1
- package/src/router/routes.ts +0 -5
- package/es/Dialog.cjs +0 -1
- package/es/Dialog.js +0 -95
- package/es/_commonjsHelpers-10dfc225.js +0 -8
- package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
- package/es/_initCloneObject-9ccbb113.cjs +0 -1
- package/es/base-bdc10baa.cjs +0 -5
- package/es/base-d9284bf0.js +0 -304
- package/es/castArray-37eb9980.cjs +0 -1
- package/es/castArray-b0ab0165.js +0 -10
- package/es/config-provider-ec6b09df.cjs +0 -1
- package/es/config-provider-f0151e9f.js +0 -47
- package/es/dayjs.min-19fb125f.cjs +0 -1
- package/es/dropdown-b2dab5bb.cjs +0 -1
- package/es/el-button-34665425.js +0 -237
- package/es/el-button-960edd49.cjs +0 -1
- package/es/el-dialog-a412484e.js +0 -267
- package/es/el-dialog-cd484c1f.cjs +0 -1
- package/es/el-empty-627ec09e.cjs +0 -1
- package/es/el-form-item-668ba024.js +0 -1263
- package/es/el-form-item-e1c3104b.cjs +0 -12
- package/es/el-input-22e66e37.js +0 -523
- package/es/el-input-5163bda3.cjs +0 -1
- package/es/el-input-number-481e21c5.js +0 -284
- package/es/el-input-number-eb54cde4.cjs +0 -1
- package/es/el-loading-15a5501c.cjs +0 -1
- package/es/el-loading-d4e403ab.js +0 -187
- package/es/el-menu-item-404c10e5.js +0 -772
- package/es/el-menu-item-ac89e804.cjs +0 -1
- package/es/el-message-ad87b9dd.cjs +0 -1
- package/es/el-message-box-41f39f6d.js +0 -558
- package/es/el-message-box-6694f827.cjs +0 -1
- package/es/el-message-ef506caa.js +0 -375
- package/es/el-overlay-4a9fa4e1.js +0 -269
- package/es/el-overlay-e5d318c3.cjs +0 -1
- package/es/el-popconfirm-7b9183aa.js +0 -140
- package/es/el-popconfirm-a497b279.cjs +0 -1
- package/es/el-popper-14a9d493.cjs +0 -1
- package/es/el-popper-e73466eb.js +0 -2263
- package/es/el-scrollbar-45318df0.js +0 -201
- package/es/el-scrollbar-8bf765f2.cjs +0 -1
- package/es/el-segmented-3ba6d664.cjs +0 -1
- package/es/el-segmented-41820018.js +0 -135
- package/es/el-select-1d2309a1.cjs +0 -1
- package/es/el-select-d7a00294.js +0 -1130
- package/es/el-table-column-a2d0c635.js +0 -3805
- package/es/el-table-column-be9a76bb.cjs +0 -14
- package/es/el-tag-7f391090.js +0 -280
- package/es/el-tag-8d49d4d2.cjs +0 -1
- package/es/index-02ca0096.cjs +0 -5
- package/es/index-3120be08.js +0 -14
- package/es/index-5b81f4da.cjs +0 -1
- package/es/index-85a32a00.js +0 -59
- package/es/index-8d3c5e96.cjs +0 -3
- package/es/index-94f38460.js +0 -306
- package/es/index-a99a5307.cjs +0 -1
- package/es/index-b90c746b.cjs +0 -1
- package/es/index-d94bae37.cjs +0 -1
- package/es/index-d99fdc6d.js +0 -159
- package/es/use-form-common-props-592797e2.cjs +0 -2
- package/es/use-form-common-props-cc347a83.js +0 -171
- package/es/use-global-config-584b62f1.cjs +0 -1
- package/es/use-global-config-c7f0a7e3.js +0 -73
- package/es/validator-10fa54fe.js +0 -5
- package/es/validator-af488a9a.cjs +0 -1
- package/es/vnode-1b827c99.cjs +0 -1
- package/es/vnode-6be33bb1.js +0 -14
- package/packages/Dialog/index.ts +0 -8
- package/packages/Dialog/index.vue +0 -54
- package/src/pages/Dialog/index.vue +0 -16
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import { defineComponent as I, computed as d, openBlock as g, createElementBlock as A, normalizeClass as v, unref as o, renderSlot as P, createVNode as z, Transition as J, withCtx as $, withDirectives as K, createElementVNode as x, normalizeStyle as Q, createTextVNode as ve, toDisplayString as X, vShow as Y, shallowReactive as ee, ref as N, onMounted as ye, watch as he, createBlock as E, createCommentVNode as M, resolveDynamicComponent as Ce, Fragment as be, withModifiers as Te, nextTick as Ee, isVNode as te, render as j } from "vue";
|
|
2
|
+
import { i as Se, o as G, c as we, u as Be, T as Ne } from "./el-scrollbar-fae984e3.js";
|
|
3
|
+
import { b as se, e as k, u as Me, p as S, n as W, _ as ne, w as $e, s as oe, d as ke, c as F, x as D, o as O, y as Ie, z as _e, E as Le } from "./base-62a70f61.js";
|
|
4
|
+
import { E as q } from "./index-74fb90c7.js";
|
|
5
|
+
import { m as Oe } from "./typescript-7ae59c4c.js";
|
|
6
|
+
import { u as Ae } from "./use-global-config-4b185eb5.js";
|
|
7
|
+
import { a as Pe, d as xe } from "./el-popper-544fd77e.js";
|
|
8
|
+
import { m as u } from "./config-provider-2e733cae.js";
|
|
9
|
+
const De = se({
|
|
10
|
+
value: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
max: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 99
|
|
17
|
+
},
|
|
18
|
+
isDot: Boolean,
|
|
19
|
+
hidden: Boolean,
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: ["primary", "success", "warning", "info", "danger"],
|
|
23
|
+
default: "danger"
|
|
24
|
+
},
|
|
25
|
+
showZero: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
},
|
|
29
|
+
color: String,
|
|
30
|
+
badgeStyle: {
|
|
31
|
+
type: k([String, Object, Array])
|
|
32
|
+
},
|
|
33
|
+
offset: {
|
|
34
|
+
type: k(Array),
|
|
35
|
+
default: [0, 0]
|
|
36
|
+
},
|
|
37
|
+
badgeClass: {
|
|
38
|
+
type: String
|
|
39
|
+
}
|
|
40
|
+
}), ze = I({
|
|
41
|
+
name: "ElBadge"
|
|
42
|
+
}), Fe = /* @__PURE__ */ I({
|
|
43
|
+
...ze,
|
|
44
|
+
props: De,
|
|
45
|
+
setup(t, { expose: a }) {
|
|
46
|
+
const e = t, s = Me("badge"), i = d(() => e.isDot ? "" : S(e.value) && S(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), r = d(() => {
|
|
47
|
+
var n, p, y, b, m;
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
backgroundColor: e.color,
|
|
51
|
+
marginRight: W(-((p = (n = e.offset) == null ? void 0 : n[0]) != null ? p : 0)),
|
|
52
|
+
marginTop: W((b = (y = e.offset) == null ? void 0 : y[1]) != null ? b : 0)
|
|
53
|
+
},
|
|
54
|
+
(m = e.badgeStyle) != null ? m : {}
|
|
55
|
+
];
|
|
56
|
+
});
|
|
57
|
+
return a({
|
|
58
|
+
content: i
|
|
59
|
+
}), (n, p) => (g(), A("div", {
|
|
60
|
+
class: v(o(s).b())
|
|
61
|
+
}, [
|
|
62
|
+
P(n.$slots, "default"),
|
|
63
|
+
z(J, {
|
|
64
|
+
name: `${o(s).namespace.value}-zoom-in-center`,
|
|
65
|
+
persisted: ""
|
|
66
|
+
}, {
|
|
67
|
+
default: $(() => [
|
|
68
|
+
K(x("sup", {
|
|
69
|
+
class: v([
|
|
70
|
+
o(s).e("content"),
|
|
71
|
+
o(s).em("content", n.type),
|
|
72
|
+
o(s).is("fixed", !!n.$slots.default),
|
|
73
|
+
o(s).is("dot", n.isDot),
|
|
74
|
+
o(s).is("hide-zero", !n.showZero && e.value === 0),
|
|
75
|
+
n.badgeClass
|
|
76
|
+
]),
|
|
77
|
+
style: Q(o(r))
|
|
78
|
+
}, [
|
|
79
|
+
P(n.$slots, "content", { value: o(i) }, () => [
|
|
80
|
+
ve(X(o(i)), 1)
|
|
81
|
+
])
|
|
82
|
+
], 6), [
|
|
83
|
+
[Y, !n.hidden && (o(i) || n.isDot || n.$slots.content)]
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 8, ["name"])
|
|
88
|
+
], 2));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var He = /* @__PURE__ */ ne(Fe, [["__file", "badge.vue"]]);
|
|
92
|
+
const Re = $e(He), ae = [
|
|
93
|
+
"primary",
|
|
94
|
+
"success",
|
|
95
|
+
"info",
|
|
96
|
+
"warning",
|
|
97
|
+
"error"
|
|
98
|
+
], le = [
|
|
99
|
+
"top",
|
|
100
|
+
"top-left",
|
|
101
|
+
"top-right",
|
|
102
|
+
"bottom",
|
|
103
|
+
"bottom-left",
|
|
104
|
+
"bottom-right"
|
|
105
|
+
], C = "top", c = Oe({
|
|
106
|
+
customClass: "",
|
|
107
|
+
dangerouslyUseHTMLString: !1,
|
|
108
|
+
duration: 3e3,
|
|
109
|
+
icon: void 0,
|
|
110
|
+
id: "",
|
|
111
|
+
message: "",
|
|
112
|
+
onClose: void 0,
|
|
113
|
+
showClose: !1,
|
|
114
|
+
type: "info",
|
|
115
|
+
plain: !1,
|
|
116
|
+
offset: 16,
|
|
117
|
+
placement: void 0,
|
|
118
|
+
zIndex: 0,
|
|
119
|
+
grouping: !1,
|
|
120
|
+
repeatNum: 1,
|
|
121
|
+
appendTo: oe ? document.body : void 0
|
|
122
|
+
}), Ue = se({
|
|
123
|
+
customClass: {
|
|
124
|
+
type: String,
|
|
125
|
+
default: c.customClass
|
|
126
|
+
},
|
|
127
|
+
dangerouslyUseHTMLString: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: c.dangerouslyUseHTMLString
|
|
130
|
+
},
|
|
131
|
+
duration: {
|
|
132
|
+
type: Number,
|
|
133
|
+
default: c.duration
|
|
134
|
+
},
|
|
135
|
+
icon: {
|
|
136
|
+
type: Se,
|
|
137
|
+
default: c.icon
|
|
138
|
+
},
|
|
139
|
+
id: {
|
|
140
|
+
type: String,
|
|
141
|
+
default: c.id
|
|
142
|
+
},
|
|
143
|
+
message: {
|
|
144
|
+
type: k([
|
|
145
|
+
String,
|
|
146
|
+
Object,
|
|
147
|
+
Function
|
|
148
|
+
]),
|
|
149
|
+
default: c.message
|
|
150
|
+
},
|
|
151
|
+
onClose: {
|
|
152
|
+
type: k(Function),
|
|
153
|
+
default: c.onClose
|
|
154
|
+
},
|
|
155
|
+
showClose: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
default: c.showClose
|
|
158
|
+
},
|
|
159
|
+
type: {
|
|
160
|
+
type: String,
|
|
161
|
+
values: ae,
|
|
162
|
+
default: c.type
|
|
163
|
+
},
|
|
164
|
+
plain: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
default: c.plain
|
|
167
|
+
},
|
|
168
|
+
offset: {
|
|
169
|
+
type: Number,
|
|
170
|
+
default: c.offset
|
|
171
|
+
},
|
|
172
|
+
placement: {
|
|
173
|
+
type: String,
|
|
174
|
+
values: le,
|
|
175
|
+
default: c.placement
|
|
176
|
+
},
|
|
177
|
+
zIndex: {
|
|
178
|
+
type: Number,
|
|
179
|
+
default: c.zIndex
|
|
180
|
+
},
|
|
181
|
+
grouping: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: c.grouping
|
|
184
|
+
},
|
|
185
|
+
repeatNum: {
|
|
186
|
+
type: Number,
|
|
187
|
+
default: c.repeatNum
|
|
188
|
+
}
|
|
189
|
+
}), Ve = {
|
|
190
|
+
destroy: () => !0
|
|
191
|
+
}, f = ee({}), Ze = (t) => (f[t] || (f[t] = ee([])), f[t]), je = (t, a) => {
|
|
192
|
+
const e = f[a] || [], s = e.findIndex((n) => n.id === t), i = e[s];
|
|
193
|
+
let r;
|
|
194
|
+
return s > 0 && (r = e[s - 1]), { current: i, prev: r };
|
|
195
|
+
}, Ge = (t, a) => {
|
|
196
|
+
const { prev: e } = je(t, a);
|
|
197
|
+
return e ? e.vm.exposed.bottom.value : 0;
|
|
198
|
+
}, We = (t, a, e) => (f[e] || []).findIndex((r) => r.id === t) > 0 ? 16 : a, qe = I({
|
|
199
|
+
name: "ElMessage"
|
|
200
|
+
}), Je = /* @__PURE__ */ I({
|
|
201
|
+
...qe,
|
|
202
|
+
props: Ue,
|
|
203
|
+
emits: Ve,
|
|
204
|
+
setup(t, { expose: a, emit: e }) {
|
|
205
|
+
const s = t, { Close: i } = Ne, r = N(!1), { ns: n, zIndex: p } = Ae("message"), { currentZIndex: y, nextZIndex: b } = p, m = N(), w = N(!1), H = N(0);
|
|
206
|
+
let _;
|
|
207
|
+
const ie = d(() => s.type ? s.type === "error" ? "danger" : s.type : "info"), ce = d(() => {
|
|
208
|
+
const l = s.type;
|
|
209
|
+
return { [n.bm("icon", l)]: l && G[l] };
|
|
210
|
+
}), R = d(() => s.icon || G[s.type] || ""), T = d(() => s.placement || C), ue = d(() => Ge(s.id, T.value)), U = d(() => We(s.id, s.offset, T.value) + ue.value), pe = d(() => H.value + U.value), de = d(() => T.value.includes("left") ? n.is("left") : T.value.includes("right") ? n.is("right") : n.is("center")), V = d(() => T.value.startsWith("top") ? "top" : "bottom"), fe = d(() => ({
|
|
211
|
+
[V.value]: `${U.value}px`,
|
|
212
|
+
zIndex: y.value
|
|
213
|
+
}));
|
|
214
|
+
function L() {
|
|
215
|
+
s.duration !== 0 && ({ stop: _ } = ke(() => {
|
|
216
|
+
B();
|
|
217
|
+
}, s.duration));
|
|
218
|
+
}
|
|
219
|
+
function Z() {
|
|
220
|
+
_ == null || _();
|
|
221
|
+
}
|
|
222
|
+
function B() {
|
|
223
|
+
w.value = !1, Ee(() => {
|
|
224
|
+
var l;
|
|
225
|
+
r.value || ((l = s.onClose) == null || l.call(s), e("destroy"));
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function me({ code: l }) {
|
|
229
|
+
l === Pe.esc && B();
|
|
230
|
+
}
|
|
231
|
+
return ye(() => {
|
|
232
|
+
L(), b(), w.value = !0;
|
|
233
|
+
}), he(() => s.repeatNum, () => {
|
|
234
|
+
Z(), L();
|
|
235
|
+
}), we(document, "keydown", me), Be(m, () => {
|
|
236
|
+
H.value = m.value.getBoundingClientRect().height;
|
|
237
|
+
}), a({
|
|
238
|
+
visible: w,
|
|
239
|
+
bottom: pe,
|
|
240
|
+
close: B
|
|
241
|
+
}), (l, ot) => (g(), E(J, {
|
|
242
|
+
name: o(n).b("fade"),
|
|
243
|
+
onBeforeEnter: (ge) => r.value = !0,
|
|
244
|
+
onBeforeLeave: l.onClose,
|
|
245
|
+
onAfterLeave: (ge) => l.$emit("destroy"),
|
|
246
|
+
persisted: ""
|
|
247
|
+
}, {
|
|
248
|
+
default: $(() => [
|
|
249
|
+
K(x("div", {
|
|
250
|
+
id: l.id,
|
|
251
|
+
ref_key: "messageRef",
|
|
252
|
+
ref: m,
|
|
253
|
+
class: v([
|
|
254
|
+
o(n).b(),
|
|
255
|
+
{ [o(n).m(l.type)]: l.type },
|
|
256
|
+
o(n).is("closable", l.showClose),
|
|
257
|
+
o(n).is("plain", l.plain),
|
|
258
|
+
o(n).is("bottom", o(V) === "bottom"),
|
|
259
|
+
o(de),
|
|
260
|
+
l.customClass
|
|
261
|
+
]),
|
|
262
|
+
style: Q(o(fe)),
|
|
263
|
+
role: "alert",
|
|
264
|
+
onMouseenter: Z,
|
|
265
|
+
onMouseleave: L
|
|
266
|
+
}, [
|
|
267
|
+
l.repeatNum > 1 ? (g(), E(o(Re), {
|
|
268
|
+
key: 0,
|
|
269
|
+
value: l.repeatNum,
|
|
270
|
+
type: o(ie),
|
|
271
|
+
class: v(o(n).e("badge"))
|
|
272
|
+
}, null, 8, ["value", "type", "class"])) : M("v-if", !0),
|
|
273
|
+
o(R) ? (g(), E(o(q), {
|
|
274
|
+
key: 1,
|
|
275
|
+
class: v([o(n).e("icon"), o(ce)])
|
|
276
|
+
}, {
|
|
277
|
+
default: $(() => [
|
|
278
|
+
(g(), E(Ce(o(R))))
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
}, 8, ["class"])) : M("v-if", !0),
|
|
282
|
+
P(l.$slots, "default", {}, () => [
|
|
283
|
+
l.dangerouslyUseHTMLString ? (g(), A(be, { key: 1 }, [
|
|
284
|
+
M(" Caution here, message could've been compromised, never use user's input as message "),
|
|
285
|
+
x("p", {
|
|
286
|
+
class: v(o(n).e("content")),
|
|
287
|
+
innerHTML: l.message
|
|
288
|
+
}, null, 10, ["innerHTML"])
|
|
289
|
+
], 2112)) : (g(), A("p", {
|
|
290
|
+
key: 0,
|
|
291
|
+
class: v(o(n).e("content"))
|
|
292
|
+
}, X(l.message), 3))
|
|
293
|
+
]),
|
|
294
|
+
l.showClose ? (g(), E(o(q), {
|
|
295
|
+
key: 2,
|
|
296
|
+
class: v(o(n).e("closeBtn")),
|
|
297
|
+
onClick: Te(B, ["stop"])
|
|
298
|
+
}, {
|
|
299
|
+
default: $(() => [
|
|
300
|
+
z(o(i))
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["class", "onClick"])) : M("v-if", !0)
|
|
304
|
+
], 46, ["id"]), [
|
|
305
|
+
[Y, w.value]
|
|
306
|
+
])
|
|
307
|
+
]),
|
|
308
|
+
_: 3
|
|
309
|
+
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
var Ke = /* @__PURE__ */ ne(Je, [["__file", "message.vue"]]);
|
|
313
|
+
let Qe = 1;
|
|
314
|
+
const Xe = (t) => {
|
|
315
|
+
if (!t.appendTo)
|
|
316
|
+
t.appendTo = document.body;
|
|
317
|
+
else if (F(t.appendTo)) {
|
|
318
|
+
let e = document.querySelector(t.appendTo);
|
|
319
|
+
_e(e) || (e = document.body), t.appendTo = e;
|
|
320
|
+
}
|
|
321
|
+
}, Ye = (t) => {
|
|
322
|
+
!t.placement && F(u.placement) && u.placement && (t.placement = u.placement), t.placement || (t.placement = C), le.includes(t.placement) || (xe("ElMessage", `Invalid placement: ${t.placement}. Falling back to '${C}'.`), t.placement = C);
|
|
323
|
+
}, re = (t) => {
|
|
324
|
+
const a = !t || F(t) || te(t) || D(t) ? { message: t } : t, e = {
|
|
325
|
+
...c,
|
|
326
|
+
...a
|
|
327
|
+
};
|
|
328
|
+
return Xe(e), Ye(e), O(u.grouping) && !e.grouping && (e.grouping = u.grouping), S(u.duration) && e.duration === 3e3 && (e.duration = u.duration), S(u.offset) && e.offset === 16 && (e.offset = u.offset), O(u.showClose) && !e.showClose && (e.showClose = u.showClose), O(u.plain) && !e.plain && (e.plain = u.plain), e;
|
|
329
|
+
}, et = (t) => {
|
|
330
|
+
const a = t.props.placement || C, e = f[a], s = e.indexOf(t);
|
|
331
|
+
if (s === -1)
|
|
332
|
+
return;
|
|
333
|
+
e.splice(s, 1);
|
|
334
|
+
const { handler: i } = t;
|
|
335
|
+
i.close();
|
|
336
|
+
}, tt = ({ appendTo: t, ...a }, e) => {
|
|
337
|
+
const s = `message_${Qe++}`, i = a.onClose, r = document.createElement("div"), n = {
|
|
338
|
+
...a,
|
|
339
|
+
id: s,
|
|
340
|
+
onClose: () => {
|
|
341
|
+
i == null || i(), et(m);
|
|
342
|
+
},
|
|
343
|
+
onDestroy: () => {
|
|
344
|
+
j(null, r);
|
|
345
|
+
}
|
|
346
|
+
}, p = z(Ke, n, D(n.message) || te(n.message) ? {
|
|
347
|
+
default: D(n.message) ? n.message : () => n.message
|
|
348
|
+
} : null);
|
|
349
|
+
p.appContext = e || h._context, j(p, r), t.appendChild(r.firstElementChild);
|
|
350
|
+
const y = p.component, m = {
|
|
351
|
+
id: s,
|
|
352
|
+
vnode: p,
|
|
353
|
+
vm: y,
|
|
354
|
+
handler: {
|
|
355
|
+
close: () => {
|
|
356
|
+
y.exposed.close();
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
props: p.component.props
|
|
360
|
+
};
|
|
361
|
+
return m;
|
|
362
|
+
}, h = (t = {}, a) => {
|
|
363
|
+
if (!oe)
|
|
364
|
+
return { close: () => {
|
|
365
|
+
} };
|
|
366
|
+
const e = re(t), s = Ze(e.placement || C);
|
|
367
|
+
if (e.grouping && s.length) {
|
|
368
|
+
const r = s.find(({ vnode: n }) => {
|
|
369
|
+
var p;
|
|
370
|
+
return ((p = n.props) == null ? void 0 : p.message) === e.message;
|
|
371
|
+
});
|
|
372
|
+
if (r)
|
|
373
|
+
return r.props.repeatNum += 1, r.props.type = e.type, r.handler;
|
|
374
|
+
}
|
|
375
|
+
if (S(u.max) && s.length >= u.max)
|
|
376
|
+
return { close: () => {
|
|
377
|
+
} };
|
|
378
|
+
const i = tt(e, a);
|
|
379
|
+
return s.push(i), i.handler;
|
|
380
|
+
};
|
|
381
|
+
ae.forEach((t) => {
|
|
382
|
+
h[t] = (a = {}, e) => {
|
|
383
|
+
const s = re(a);
|
|
384
|
+
return h({ ...s, type: t }, e);
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
function st(t) {
|
|
388
|
+
for (const a in f)
|
|
389
|
+
if (Ie(f, a)) {
|
|
390
|
+
const e = [...f[a]];
|
|
391
|
+
for (const s of e)
|
|
392
|
+
(!t || t === s.props.type) && s.handler.close();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function nt(t) {
|
|
396
|
+
if (!f[t])
|
|
397
|
+
return;
|
|
398
|
+
[...f[t]].forEach((e) => e.handler.close());
|
|
399
|
+
}
|
|
400
|
+
h.closeAll = st;
|
|
401
|
+
h.closeAllByPlacement = nt;
|
|
402
|
+
h._context = null;
|
|
403
|
+
const ft = Le(h, "$message");
|
|
404
|
+
export {
|
|
405
|
+
ft as E
|
|
406
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),v=require("./el-scrollbar-691cfc11.cjs"),a=require("./base-ef747d02.cjs"),P=require("./index-f6afafaa.cjs"),U=require("./typescript-b63f8e83.cjs"),H=require("./use-global-config-03735617.cjs"),I=require("./el-popper-73466d7a.cjs"),p=require("./config-provider-178bb43c.cjs"),Z=a.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:a.definePropType([String,Object,Array])},offset:{type:a.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),G=e.defineComponent({name:"ElBadge"}),j=e.defineComponent({...G,props:Z,setup(t,{expose:r}){const n=t,o=a.useNamespace("badge"),c=e.computed(()=>n.isDot?"":a.isNumber(n.value)&&a.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),i=e.computed(()=>{var s,f,g,h,m;return[{backgroundColor:n.color,marginRight:a.addUnit(-((f=(s=n.offset)==null?void 0:s[0])!=null?f:0)),marginTop:a.addUnit((h=(g=n.offset)==null?void 0:g[1])!=null?h:0)},(m=n.badgeStyle)!=null?m:{}]});return r({content:c}),(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(o).b())},[e.renderSlot(s.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(o).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(o).e("content"),e.unref(o).em("content",s.type),e.unref(o).is("fixed",!!s.$slots.default),e.unref(o).is("dot",s.isDot),e.unref(o).is("hide-zero",!s.showZero&&n.value===0),s.badgeClass]),style:e.normalizeStyle(e.unref(i))},[e.renderSlot(s.$slots,"content",{value:e.unref(c)},()=>[e.createTextVNode(e.toDisplayString(e.unref(c)),1)])],6),[[e.vShow,!s.hidden&&(e.unref(c)||s.isDot||s.$slots.content)]])]),_:3},8,["name"])],2))}});var W=a._export_sfc(j,[["__file","badge.vue"]]);const J=a.withInstall(W),_=["primary","success","info","warning","error"],z=["top","top-left","top-right","bottom","bottom-left","bottom-right"],C="top",u=U.mutable({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:a.isClient?document.body:void 0}),K=a.buildProps({customClass:{type:String,default:u.customClass},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:a.definePropType([String,Object,Function]),default:u.message},onClose:{type:a.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:_,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},placement:{type:String,values:z,default:u.placement},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),Q={destroy:()=>!0},d=e.shallowReactive({}),X=t=>(d[t]||(d[t]=e.shallowReactive([])),d[t]),Y=(t,r)=>{const n=d[r]||[],o=n.findIndex(s=>s.id===t),c=n[o];let i;return o>0&&(i=n[o-1]),{current:c,prev:i}},ee=(t,r)=>{const{prev:n}=Y(t,r);return n?n.vm.exposed.bottom.value:0},ne=(t,r,n)=>(d[n]||[]).findIndex(i=>i.id===t)>0?16:r,te=e.defineComponent({name:"ElMessage"}),oe=e.defineComponent({...te,props:K,emits:Q,setup(t,{expose:r,emit:n}){const o=t,{Close:c}=v.TypeComponents,i=e.ref(!1),{ns:s,zIndex:f}=H.useGlobalComponentSettings("message"),{currentZIndex:g,nextZIndex:h}=f,m=e.ref(),T=e.ref(!1),E=e.ref(0);let S;const L=e.computed(()=>o.type?o.type==="error"?"danger":o.type:"info"),V=e.computed(()=>{const l=o.type;return{[s.bm("icon",l)]:l&&v.TypeComponentsMap[l]}}),w=e.computed(()=>o.icon||v.TypeComponentsMap[o.type]||""),b=e.computed(()=>o.placement||C),D=e.computed(()=>ee(o.id,b.value)),k=e.computed(()=>ne(o.id,o.offset,b.value)+D.value),O=e.computed(()=>E.value+k.value),A=e.computed(()=>b.value.includes("left")?s.is("left"):b.value.includes("right")?s.is("right"):s.is("center")),M=e.computed(()=>b.value.startsWith("top")?"top":"bottom"),F=e.computed(()=>({[M.value]:`${k.value}px`,zIndex:g.value}));function N(){o.duration!==0&&({stop:S}=a.useTimeoutFn(()=>{B()},o.duration))}function $(){S==null||S()}function B(){T.value=!1,e.nextTick(()=>{var l;i.value||((l=o.onClose)==null||l.call(o),n("destroy"))})}function q({code:l}){l===I.EVENT_CODE.esc&&B()}return e.onMounted(()=>{N(),h(),T.value=!0}),e.watch(()=>o.repeatNum,()=>{$(),N()}),v.useEventListener(document,"keydown",q),v.useResizeObserver(m,()=>{E.value=m.value.getBoundingClientRect().height}),r({visible:T,bottom:O,close:B}),(l,de)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(s).b("fade"),onBeforeEnter:R=>i.value=!0,onBeforeLeave:l.onClose,onAfterLeave:R=>l.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:l.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(s).b(),{[e.unref(s).m(l.type)]:l.type},e.unref(s).is("closable",l.showClose),e.unref(s).is("plain",l.plain),e.unref(s).is("bottom",e.unref(M)==="bottom"),e.unref(A),l.customClass]),style:e.normalizeStyle(e.unref(F)),role:"alert",onMouseenter:$,onMouseleave:N},[l.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(J),{key:0,value:l.repeatNum,type:e.unref(L),class:e.normalizeClass(e.unref(s).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(w)?(e.openBlock(),e.createBlock(e.unref(P.ElIcon),{key:1,class:e.normalizeClass([e.unref(s).e("icon"),e.unref(V)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(w))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"default",{},()=>[l.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(s).e("content")),innerHTML:l.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(s).e("content"))},e.toDisplayString(l.message),3))]),l.showClose?(e.openBlock(),e.createBlock(e.unref(P.ElIcon),{key:2,class:e.normalizeClass(e.unref(s).e("closeBtn")),onClick:e.withModifiers(B,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(c))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,T.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var se=a._export_sfc(oe,[["__file","message.vue"]]);let ae=1;const re=t=>{if(!t.appendTo)t.appendTo=document.body;else if(a.isString(t.appendTo)){let n=document.querySelector(t.appendTo);a.isElement(n)||(n=document.body),t.appendTo=n}},le=t=>{!t.placement&&a.isString(p.messageConfig.placement)&&p.messageConfig.placement&&(t.placement=p.messageConfig.placement),t.placement||(t.placement=C),z.includes(t.placement)||(I.debugWarn("ElMessage",`Invalid placement: ${t.placement}. Falling back to '${C}'.`),t.placement=C)},x=t=>{const r=!t||a.isString(t)||e.isVNode(t)||a.isFunction(t)?{message:t}:t,n={...u,...r};return re(n),le(n),a.isBoolean(p.messageConfig.grouping)&&!n.grouping&&(n.grouping=p.messageConfig.grouping),a.isNumber(p.messageConfig.duration)&&n.duration===3e3&&(n.duration=p.messageConfig.duration),a.isNumber(p.messageConfig.offset)&&n.offset===16&&(n.offset=p.messageConfig.offset),a.isBoolean(p.messageConfig.showClose)&&!n.showClose&&(n.showClose=p.messageConfig.showClose),a.isBoolean(p.messageConfig.plain)&&!n.plain&&(n.plain=p.messageConfig.plain),n},ie=t=>{const r=t.props.placement||C,n=d[r],o=n.indexOf(t);if(o===-1)return;n.splice(o,1);const{handler:c}=t;c.close()},ce=({appendTo:t,...r},n)=>{const o=`message_${ae++}`,c=r.onClose,i=document.createElement("div"),s={...r,id:o,onClose:()=>{c==null||c(),ie(m)},onDestroy:()=>{e.render(null,i)}},f=e.createVNode(se,s,a.isFunction(s.message)||e.isVNode(s.message)?{default:a.isFunction(s.message)?s.message:()=>s.message}:null);f.appContext=n||y._context,e.render(f,i),t.appendChild(i.firstElementChild);const g=f.component,m={id:o,vnode:f,vm:g,handler:{close:()=>{g.exposed.close()}},props:f.component.props};return m},y=(t={},r)=>{if(!a.isClient)return{close:()=>{}};const n=x(t),o=X(n.placement||C);if(n.grouping&&o.length){const i=o.find(({vnode:s})=>{var f;return((f=s.props)==null?void 0:f.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(a.isNumber(p.messageConfig.max)&&o.length>=p.messageConfig.max)return{close:()=>{}};const c=ce(n,r);return o.push(c),c.handler};_.forEach(t=>{y[t]=(r={},n)=>{const o=x(r);return y({...o,type:t},n)}});function ue(t){for(const r in d)if(a.hasOwn(d,r)){const n=[...d[r]];for(const o of n)(!t||t===o.props.type)&&o.handler.close()}}function pe(t){if(!d[t])return;[...d[t]].forEach(n=>n.handler.close())}y.closeAll=ue;y.closeAllByPlacement=pe;y._context=null;const fe=a.withInstallFunction(y,"$message");exports.ElMessage=fe;
|