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
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as ce, reactive as de, computed as I, watch as me, onMounted as pe, onUpdated as fe, openBlock as v, createElementBlock as z, normalizeClass as K, unref as r, withModifiers as O, withDirectives as q, withKeys as A, renderSlot as P, createVNode as R, withCtx as F, createBlock as T, createCommentVNode as J, createSlots as be } from "vue";
|
|
2
|
-
import { E as ve, i as Ne } from "./el-input-22e66e37.js";
|
|
3
|
-
import { E as Q, a as Ve, k as he, n as Ie, p as ye } from "./index-ee1cebbc.js";
|
|
4
|
-
import { y as X, b as Ee, m as b, f as y, u as we, x, n as U, _ as ge, t as _e, i as Se, w as Ae } from "./base-d9284bf0.js";
|
|
5
|
-
import { d as Pe, u as Fe, a as Te, c as xe } from "./use-form-common-props-cc347a83.js";
|
|
6
|
-
import { u as Ce } from "./el-popper-e73466eb.js";
|
|
7
|
-
import { C as ne, I as C, U as N } from "./index-94f38460.js";
|
|
8
|
-
import { u as ke } from "./index-a8e9ec0f.js";
|
|
9
|
-
const De = 100, Be = 600, Z = {
|
|
10
|
-
beforeMount(u, V) {
|
|
11
|
-
const s = V.value, { interval: a = De, delay: E = Be } = X(s) ? {} : s;
|
|
12
|
-
let c, m;
|
|
13
|
-
const l = () => X(s) ? s() : s.handler(), f = () => {
|
|
14
|
-
m && (clearTimeout(m), m = void 0), c && (clearInterval(c), c = void 0);
|
|
15
|
-
};
|
|
16
|
-
u.addEventListener("mousedown", (w) => {
|
|
17
|
-
w.button === 0 && (f(), l(), document.addEventListener("mouseup", () => f(), {
|
|
18
|
-
once: !0
|
|
19
|
-
}), m = setTimeout(() => {
|
|
20
|
-
c = setInterval(() => {
|
|
21
|
-
l();
|
|
22
|
-
}, a);
|
|
23
|
-
}, E));
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}, Le = Ee({
|
|
27
|
-
id: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: void 0
|
|
30
|
-
},
|
|
31
|
-
step: {
|
|
32
|
-
type: Number,
|
|
33
|
-
default: 1
|
|
34
|
-
},
|
|
35
|
-
stepStrictly: Boolean,
|
|
36
|
-
max: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: Number.POSITIVE_INFINITY
|
|
39
|
-
},
|
|
40
|
-
min: {
|
|
41
|
-
type: Number,
|
|
42
|
-
default: Number.NEGATIVE_INFINITY
|
|
43
|
-
},
|
|
44
|
-
modelValue: Number,
|
|
45
|
-
readonly: Boolean,
|
|
46
|
-
disabled: Boolean,
|
|
47
|
-
size: Pe,
|
|
48
|
-
controls: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: !0
|
|
51
|
-
},
|
|
52
|
-
controlsPosition: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: "",
|
|
55
|
-
values: ["", "right"]
|
|
56
|
-
},
|
|
57
|
-
valueOnClear: {
|
|
58
|
-
type: [String, Number, null],
|
|
59
|
-
validator: (u) => u === null || b(u) || ["min", "max"].includes(u),
|
|
60
|
-
default: null
|
|
61
|
-
},
|
|
62
|
-
name: String,
|
|
63
|
-
placeholder: String,
|
|
64
|
-
precision: {
|
|
65
|
-
type: Number,
|
|
66
|
-
validator: (u) => u >= 0 && u === Number.parseInt(`${u}`, 10)
|
|
67
|
-
},
|
|
68
|
-
validateEvent: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: !0
|
|
71
|
-
},
|
|
72
|
-
...Ce(["ariaLabel"])
|
|
73
|
-
}), Me = {
|
|
74
|
-
[ne]: (u, V) => V !== u,
|
|
75
|
-
blur: (u) => u instanceof FocusEvent,
|
|
76
|
-
focus: (u) => u instanceof FocusEvent,
|
|
77
|
-
[C]: (u) => b(u) || y(u),
|
|
78
|
-
[N]: (u) => b(u) || y(u)
|
|
79
|
-
}, $e = ee({
|
|
80
|
-
name: "ElInputNumber"
|
|
81
|
-
}), ze = /* @__PURE__ */ ee({
|
|
82
|
-
...$e,
|
|
83
|
-
props: Le,
|
|
84
|
-
emits: Me,
|
|
85
|
-
setup(u, { expose: V, emit: s }) {
|
|
86
|
-
const a = u, { t: E } = ke(), c = we("input-number"), m = ce(), l = de({
|
|
87
|
-
currentValue: a.modelValue,
|
|
88
|
-
userInput: null
|
|
89
|
-
}), { formItem: f } = Fe(), w = I(() => b(a.modelValue) && a.modelValue <= a.min), Y = I(() => b(a.modelValue) && a.modelValue >= a.max), te = I(() => {
|
|
90
|
-
const e = W(a.step);
|
|
91
|
-
return x(a.precision) ? Math.max(W(a.modelValue), e) : (e > a.precision && U("InputNumber", "precision should not be less than the decimal places of step"), a.precision);
|
|
92
|
-
}), k = I(() => a.controls && a.controlsPosition === "right"), G = Te(), h = xe(), D = I(() => {
|
|
93
|
-
if (l.userInput !== null)
|
|
94
|
-
return l.userInput;
|
|
95
|
-
let e = l.currentValue;
|
|
96
|
-
if (y(e))
|
|
97
|
-
return "";
|
|
98
|
-
if (b(e)) {
|
|
99
|
-
if (Number.isNaN(e))
|
|
100
|
-
return "";
|
|
101
|
-
x(a.precision) || (e = e.toFixed(a.precision));
|
|
102
|
-
}
|
|
103
|
-
return e;
|
|
104
|
-
}), B = (e, n) => {
|
|
105
|
-
if (x(n) && (n = te.value), n === 0)
|
|
106
|
-
return Math.round(e);
|
|
107
|
-
let t = String(e);
|
|
108
|
-
const o = t.indexOf(".");
|
|
109
|
-
if (o === -1 || !t.replace(".", "").split("")[o + n])
|
|
110
|
-
return e;
|
|
111
|
-
const _ = t.length;
|
|
112
|
-
return t.charAt(_ - 1) === "5" && (t = `${t.slice(0, Math.max(0, _ - 1))}6`), Number.parseFloat(Number(t).toFixed(n));
|
|
113
|
-
}, W = (e) => {
|
|
114
|
-
if (y(e))
|
|
115
|
-
return 0;
|
|
116
|
-
const n = e.toString(), t = n.indexOf(".");
|
|
117
|
-
let o = 0;
|
|
118
|
-
return t !== -1 && (o = n.length - t - 1), o;
|
|
119
|
-
}, H = (e, n = 1) => b(e) ? B(e + a.step * n) : l.currentValue, L = () => {
|
|
120
|
-
if (a.readonly || h.value || Y.value)
|
|
121
|
-
return;
|
|
122
|
-
const e = Number(D.value) || 0, n = H(e);
|
|
123
|
-
g(n), s(C, l.currentValue), $();
|
|
124
|
-
}, M = () => {
|
|
125
|
-
if (a.readonly || h.value || w.value)
|
|
126
|
-
return;
|
|
127
|
-
const e = Number(D.value) || 0, n = H(e, -1);
|
|
128
|
-
g(n), s(C, l.currentValue), $();
|
|
129
|
-
}, j = (e, n) => {
|
|
130
|
-
const { max: t, min: o, step: i, precision: p, stepStrictly: _, valueOnClear: S } = a;
|
|
131
|
-
t < o && _e("InputNumber", "min should not be greater than max.");
|
|
132
|
-
let d = Number(e);
|
|
133
|
-
if (y(e) || Number.isNaN(d))
|
|
134
|
-
return null;
|
|
135
|
-
if (e === "") {
|
|
136
|
-
if (S === null)
|
|
137
|
-
return null;
|
|
138
|
-
d = Se(S) ? { min: o, max: t }[S] : S;
|
|
139
|
-
}
|
|
140
|
-
return _ && (d = B(Math.round(d / i) * i, p), d !== e && n && s(N, d)), x(p) || (d = B(d, p)), (d > t || d < o) && (d = d > t ? t : o, n && s(N, d)), d;
|
|
141
|
-
}, g = (e, n = !0) => {
|
|
142
|
-
var t;
|
|
143
|
-
const o = l.currentValue, i = j(e);
|
|
144
|
-
if (!n) {
|
|
145
|
-
s(N, i);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
o === i && e || (l.userInput = null, s(N, i), o !== i && s(ne, i, o), a.validateEvent && ((t = f == null ? void 0 : f.validate) == null || t.call(f, "change").catch((p) => U(p))), l.currentValue = i);
|
|
149
|
-
}, re = (e) => {
|
|
150
|
-
l.userInput = e;
|
|
151
|
-
const n = e === "" ? null : Number(e);
|
|
152
|
-
s(C, n), g(n, !1);
|
|
153
|
-
}, ae = (e) => {
|
|
154
|
-
const n = e !== "" ? Number(e) : "";
|
|
155
|
-
(b(n) && !Number.isNaN(n) || e === "") && g(n), $(), l.userInput = null;
|
|
156
|
-
}, le = () => {
|
|
157
|
-
var e, n;
|
|
158
|
-
(n = (e = m.value) == null ? void 0 : e.focus) == null || n.call(e);
|
|
159
|
-
}, ue = () => {
|
|
160
|
-
var e, n;
|
|
161
|
-
(n = (e = m.value) == null ? void 0 : e.blur) == null || n.call(e);
|
|
162
|
-
}, oe = (e) => {
|
|
163
|
-
s("focus", e);
|
|
164
|
-
}, ie = (e) => {
|
|
165
|
-
var n, t;
|
|
166
|
-
l.userInput = null, Ne() && l.currentValue === null && ((n = m.value) != null && n.input) && (m.value.input.value = ""), s("blur", e), a.validateEvent && ((t = f == null ? void 0 : f.validate) == null || t.call(f, "blur").catch((o) => U(o)));
|
|
167
|
-
}, $ = () => {
|
|
168
|
-
l.currentValue !== a.modelValue && (l.currentValue = a.modelValue);
|
|
169
|
-
}, se = (e) => {
|
|
170
|
-
document.activeElement === e.target && e.preventDefault();
|
|
171
|
-
};
|
|
172
|
-
return me(() => a.modelValue, (e, n) => {
|
|
173
|
-
const t = j(e, !0);
|
|
174
|
-
l.userInput === null && t !== n && (l.currentValue = t);
|
|
175
|
-
}, { immediate: !0 }), pe(() => {
|
|
176
|
-
var e;
|
|
177
|
-
const { min: n, max: t, modelValue: o } = a, i = (e = m.value) == null ? void 0 : e.input;
|
|
178
|
-
if (i.setAttribute("role", "spinbutton"), Number.isFinite(t) ? i.setAttribute("aria-valuemax", String(t)) : i.removeAttribute("aria-valuemax"), Number.isFinite(n) ? i.setAttribute("aria-valuemin", String(n)) : i.removeAttribute("aria-valuemin"), i.setAttribute("aria-valuenow", l.currentValue || l.currentValue === 0 ? String(l.currentValue) : ""), i.setAttribute("aria-disabled", String(h.value)), !b(o) && o != null) {
|
|
179
|
-
let p = Number(o);
|
|
180
|
-
Number.isNaN(p) && (p = null), s(N, p);
|
|
181
|
-
}
|
|
182
|
-
i.addEventListener("wheel", se, { passive: !1 });
|
|
183
|
-
}), fe(() => {
|
|
184
|
-
var e, n;
|
|
185
|
-
const t = (e = m.value) == null ? void 0 : e.input;
|
|
186
|
-
t == null || t.setAttribute("aria-valuenow", `${(n = l.currentValue) != null ? n : ""}`);
|
|
187
|
-
}), V({
|
|
188
|
-
focus: le,
|
|
189
|
-
blur: ue
|
|
190
|
-
}), (e, n) => (v(), z("div", {
|
|
191
|
-
class: K([
|
|
192
|
-
r(c).b(),
|
|
193
|
-
r(c).m(r(G)),
|
|
194
|
-
r(c).is("disabled", r(h)),
|
|
195
|
-
r(c).is("without-controls", !e.controls),
|
|
196
|
-
r(c).is("controls-right", r(k))
|
|
197
|
-
]),
|
|
198
|
-
onDragstart: O(() => {
|
|
199
|
-
}, ["prevent"])
|
|
200
|
-
}, [
|
|
201
|
-
e.controls ? q((v(), z("span", {
|
|
202
|
-
key: 0,
|
|
203
|
-
role: "button",
|
|
204
|
-
"aria-label": r(E)("el.inputNumber.decrease"),
|
|
205
|
-
class: K([r(c).e("decrease"), r(c).is("disabled", r(w))]),
|
|
206
|
-
onKeydown: A(M, ["enter"])
|
|
207
|
-
}, [
|
|
208
|
-
P(e.$slots, "decrease-icon", {}, () => [
|
|
209
|
-
R(r(Q), null, {
|
|
210
|
-
default: F(() => [
|
|
211
|
-
r(k) ? (v(), T(r(Ve), { key: 0 })) : (v(), T(r(he), { key: 1 }))
|
|
212
|
-
]),
|
|
213
|
-
_: 1
|
|
214
|
-
})
|
|
215
|
-
])
|
|
216
|
-
], 42, ["aria-label", "onKeydown"])), [
|
|
217
|
-
[r(Z), M]
|
|
218
|
-
]) : J("v-if", !0),
|
|
219
|
-
e.controls ? q((v(), z("span", {
|
|
220
|
-
key: 1,
|
|
221
|
-
role: "button",
|
|
222
|
-
"aria-label": r(E)("el.inputNumber.increase"),
|
|
223
|
-
class: K([r(c).e("increase"), r(c).is("disabled", r(Y))]),
|
|
224
|
-
onKeydown: A(L, ["enter"])
|
|
225
|
-
}, [
|
|
226
|
-
P(e.$slots, "increase-icon", {}, () => [
|
|
227
|
-
R(r(Q), null, {
|
|
228
|
-
default: F(() => [
|
|
229
|
-
r(k) ? (v(), T(r(Ie), { key: 0 })) : (v(), T(r(ye), { key: 1 }))
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
})
|
|
233
|
-
])
|
|
234
|
-
], 42, ["aria-label", "onKeydown"])), [
|
|
235
|
-
[r(Z), L]
|
|
236
|
-
]) : J("v-if", !0),
|
|
237
|
-
R(r(ve), {
|
|
238
|
-
id: e.id,
|
|
239
|
-
ref_key: "input",
|
|
240
|
-
ref: m,
|
|
241
|
-
type: "number",
|
|
242
|
-
step: e.step,
|
|
243
|
-
"model-value": r(D),
|
|
244
|
-
placeholder: e.placeholder,
|
|
245
|
-
readonly: e.readonly,
|
|
246
|
-
disabled: r(h),
|
|
247
|
-
size: r(G),
|
|
248
|
-
max: e.max,
|
|
249
|
-
min: e.min,
|
|
250
|
-
name: e.name,
|
|
251
|
-
"aria-label": e.ariaLabel,
|
|
252
|
-
"validate-event": !1,
|
|
253
|
-
onKeydown: [
|
|
254
|
-
A(O(L, ["prevent"]), ["up"]),
|
|
255
|
-
A(O(M, ["prevent"]), ["down"])
|
|
256
|
-
],
|
|
257
|
-
onBlur: ie,
|
|
258
|
-
onFocus: oe,
|
|
259
|
-
onInput: re,
|
|
260
|
-
onChange: ae
|
|
261
|
-
}, be({
|
|
262
|
-
_: 2
|
|
263
|
-
}, [
|
|
264
|
-
e.$slots.prefix ? {
|
|
265
|
-
name: "prefix",
|
|
266
|
-
fn: F(() => [
|
|
267
|
-
P(e.$slots, "prefix")
|
|
268
|
-
])
|
|
269
|
-
} : void 0,
|
|
270
|
-
e.$slots.suffix ? {
|
|
271
|
-
name: "suffix",
|
|
272
|
-
fn: F(() => [
|
|
273
|
-
P(e.$slots, "suffix")
|
|
274
|
-
])
|
|
275
|
-
} : void 0
|
|
276
|
-
]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "onKeydown"])
|
|
277
|
-
], 42, ["onDragstart"]));
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
var Ke = /* @__PURE__ */ ge(ze, [["__file", "input-number.vue"]]);
|
|
281
|
-
const qe = Ae(Ke);
|
|
282
|
-
export {
|
|
283
|
-
qe as E
|
|
284
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),U=require("./el-input-5163bda3.cjs"),v=require("./index-19fa1fcf.cjs"),u=require("./base-bdc10baa.cjs"),T=require("./use-form-common-props-592797e2.cjs"),Y=require("./el-popper-14a9d493.cjs"),p=require("./index-d94bae37.cjs"),H=require("./index-02ca0096.cjs"),j=100,J=600,L={beforeMount(o,E){const c=E.value,{interval:l=j,delay:h=J}=u.isFunction(c)?{}:c;let d,m;const i=()=>u.isFunction(c)?c():c.handler(),N=()=>{m&&(clearTimeout(m),m=void 0),d&&(clearInterval(d),d=void 0)};o.addEventListener("mousedown",I=>{I.button===0&&(N(),i(),document.addEventListener("mouseup",()=>N(),{once:!0}),m=setTimeout(()=>{d=setInterval(()=>{i()},l)},h))})}},Q=u.buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:T.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:o=>o===null||u.isNumber(o)||["min","max"].includes(o),default:null},name:String,placeholder:String,precision:{type:Number,validator:o=>o>=0&&o===Number.parseInt(`${o}`,10)},validateEvent:{type:Boolean,default:!0},...Y.useAriaProps(["ariaLabel"])}),X={[p.CHANGE_EVENT]:(o,E)=>E!==o,blur:o=>o instanceof FocusEvent,focus:o=>o instanceof FocusEvent,[p.INPUT_EVENT]:o=>u.isNumber(o)||u.isNil(o),[p.UPDATE_MODEL_EVENT]:o=>u.isNumber(o)||u.isNil(o)},Z=e.defineComponent({name:"ElInputNumber"}),ee=e.defineComponent({...Z,props:Q,emits:X,setup(o,{expose:E,emit:c}){const l=o,{t:h}=H.useLocale(),d=u.useNamespace("input-number"),m=e.ref(),i=e.reactive({currentValue:l.modelValue,userInput:null}),{formItem:N}=T.useFormItem(),I=e.computed(()=>u.isNumber(l.modelValue)&&l.modelValue<=l.min),B=e.computed(()=>u.isNumber(l.modelValue)&&l.modelValue>=l.max),O=e.computed(()=>{const n=F(l.step);return u.isUndefined(l.precision)?Math.max(F(l.modelValue),n):(n>l.precision&&u.debugWarn("InputNumber","precision should not be less than the decimal places of step"),l.precision)}),g=e.computed(()=>l.controls&&l.controlsPosition==="right"),C=T.useFormSize(),V=T.useFormDisabled(),P=e.computed(()=>{if(i.userInput!==null)return i.userInput;let n=i.currentValue;if(u.isNil(n))return"";if(u.isNumber(n)){if(Number.isNaN(n))return"";u.isUndefined(l.precision)||(n=n.toFixed(l.precision))}return n}),A=(n,t)=>{if(u.isUndefined(t)&&(t=O.value),t===0)return Math.round(n);let r=String(n);const a=r.indexOf(".");if(a===-1||!r.replace(".","").split("")[a+t])return n;const w=r.length;return r.charAt(w-1)==="5"&&(r=`${r.slice(0,Math.max(0,w-1))}6`),Number.parseFloat(Number(r).toFixed(t))},F=n=>{if(u.isNil(n))return 0;const t=n.toString(),r=t.indexOf(".");let a=0;return r!==-1&&(a=t.length-r-1),a},x=(n,t=1)=>u.isNumber(n)?A(n+l.step*t):i.currentValue,S=()=>{if(l.readonly||V.value||B.value)return;const n=Number(P.value)||0,t=x(n);y(t),c(p.INPUT_EVENT,i.currentValue),D()},k=()=>{if(l.readonly||V.value||I.value)return;const n=Number(P.value)||0,t=x(n,-1);y(t),c(p.INPUT_EVENT,i.currentValue),D()},M=(n,t)=>{const{max:r,min:a,step:s,precision:b,stepStrictly:w,valueOnClear:_}=l;r<a&&u.throwError("InputNumber","min should not be greater than max.");let f=Number(n);if(u.isNil(n)||Number.isNaN(f))return null;if(n===""){if(_===null)return null;f=u.isString(_)?{min:a,max:r}[_]:_}return w&&(f=A(Math.round(f/s)*s,b),f!==n&&t&&c(p.UPDATE_MODEL_EVENT,f)),u.isUndefined(b)||(f=A(f,b)),(f>r||f<a)&&(f=f>r?r:a,t&&c(p.UPDATE_MODEL_EVENT,f)),f},y=(n,t=!0)=>{var r;const a=i.currentValue,s=M(n);if(!t){c(p.UPDATE_MODEL_EVENT,s);return}a===s&&n||(i.userInput=null,c(p.UPDATE_MODEL_EVENT,s),a!==s&&c(p.CHANGE_EVENT,s,a),l.validateEvent&&((r=N==null?void 0:N.validate)==null||r.call(N,"change").catch(b=>u.debugWarn(b))),i.currentValue=s)},$=n=>{i.userInput=n;const t=n===""?null:Number(n);c(p.INPUT_EVENT,t),y(t,!1)},K=n=>{const t=n!==""?Number(n):"";(u.isNumber(t)&&!Number.isNaN(t)||n==="")&&y(t),D(),i.userInput=null},z=()=>{var n,t;(t=(n=m.value)==null?void 0:n.focus)==null||t.call(n)},q=()=>{var n,t;(t=(n=m.value)==null?void 0:n.blur)==null||t.call(n)},R=n=>{c("focus",n)},W=n=>{var t,r;i.userInput=null,U.isFirefox()&&i.currentValue===null&&((t=m.value)!=null&&t.input)&&(m.value.input.value=""),c("blur",n),l.validateEvent&&((r=N==null?void 0:N.validate)==null||r.call(N,"blur").catch(a=>u.debugWarn(a)))},D=()=>{i.currentValue!==l.modelValue&&(i.currentValue=l.modelValue)},G=n=>{document.activeElement===n.target&&n.preventDefault()};return e.watch(()=>l.modelValue,(n,t)=>{const r=M(n,!0);i.userInput===null&&r!==t&&(i.currentValue=r)},{immediate:!0}),e.onMounted(()=>{var n;const{min:t,max:r,modelValue:a}=l,s=(n=m.value)==null?void 0:n.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(r)?s.setAttribute("aria-valuemax",String(r)):s.removeAttribute("aria-valuemax"),Number.isFinite(t)?s.setAttribute("aria-valuemin",String(t)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),s.setAttribute("aria-disabled",String(V.value)),!u.isNumber(a)&&a!=null){let b=Number(a);Number.isNaN(b)&&(b=null),c(p.UPDATE_MODEL_EVENT,b)}s.addEventListener("wheel",G,{passive:!1})}),e.onUpdated(()=>{var n,t;const r=(n=m.value)==null?void 0:n.input;r==null||r.setAttribute("aria-valuenow",`${(t=i.currentValue)!=null?t:""}`)}),E({focus:z,blur:q}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(d).b(),e.unref(d).m(e.unref(C)),e.unref(d).is("disabled",e.unref(V)),e.unref(d).is("without-controls",!n.controls),e.unref(d).is("controls-right",e.unref(g))]),onDragstart:e.withModifiers(()=>{},["prevent"])},[n.controls?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,role:"button","aria-label":e.unref(h)("el.inputNumber.decrease"),class:e.normalizeClass([e.unref(d).e("decrease"),e.unref(d).is("disabled",e.unref(I))]),onKeydown:e.withKeys(k,["enter"])},[e.renderSlot(n.$slots,"decrease-icon",{},()=>[e.createVNode(e.unref(v.ElIcon),null,{default:e.withCtx(()=>[e.unref(g)?(e.openBlock(),e.createBlock(e.unref(v.arrow_down_default),{key:0})):(e.openBlock(),e.createBlock(e.unref(v.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[e.unref(L),k]]):e.createCommentVNode("v-if",!0),n.controls?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:1,role:"button","aria-label":e.unref(h)("el.inputNumber.increase"),class:e.normalizeClass([e.unref(d).e("increase"),e.unref(d).is("disabled",e.unref(B))]),onKeydown:e.withKeys(S,["enter"])},[e.renderSlot(n.$slots,"increase-icon",{},()=>[e.createVNode(e.unref(v.ElIcon),null,{default:e.withCtx(()=>[e.unref(g)?(e.openBlock(),e.createBlock(e.unref(v.arrow_up_default),{key:0})):(e.openBlock(),e.createBlock(e.unref(v.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[e.unref(L),S]]):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(U.ElInput),{id:n.id,ref_key:"input",ref:m,type:"number",step:n.step,"model-value":e.unref(P),placeholder:n.placeholder,readonly:n.readonly,disabled:e.unref(V),size:e.unref(C),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,onKeydown:[e.withKeys(e.withModifiers(S,["prevent"]),["up"]),e.withKeys(e.withModifiers(k,["prevent"]),["down"])],onBlur:W,onFocus:R,onInput:$,onChange:K},e.createSlots({_:2},[n.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var ne=u._export_sfc(ee,[["__file","input-number.vue"]]);const te=u.withInstall(ne);exports.ElInputNumber=te;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),S=require("./use-global-config-584b62f1.cjs"),a=require("./base-bdc10baa.cjs");function w(t){let e;const l=r.ref(!1),n=r.reactive({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(o){n.text=o}function s(){const o=n.parent,c=f.ns;if(!o.vLoadingAddClassList){let d=o.getAttribute("loading-number");d=Number.parseInt(d)-1,d?o.setAttribute("loading-number",d.toString()):(a.removeClass(o,c.bm("parent","relative")),o.removeAttribute("loading-number")),a.removeClass(o,c.bm("parent","hidden"))}u(),b.unmount()}function u(){var o,c;(c=(o=f.$el)==null?void 0:o.parentNode)==null||c.removeChild(f.$el)}function m(){var o;t.beforeClose&&!t.beforeClose()||(l.value=!0,clearTimeout(e),e=setTimeout(g,400),n.visible=!1,(o=t.closed)==null||o.call(t))}function g(){if(!l.value)return;const o=n.parent;l.value=!1,o.vLoadingAddClassList=void 0,s()}const v=r.defineComponent({name:"ElLoading",setup(o,{expose:c}){const{ns:d,zIndex:h}=S.useGlobalComponentSettings("loading");return c({ns:d,zIndex:h}),()=>{const x=n.spinner||n.svg,k=r.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...x?{innerHTML:x}:{}},[r.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),_=n.text?r.h("p",{class:d.b("text")},[n.text]):void 0;return r.h(r.Transition,{name:d.b("fade"),onAfterLeave:g},{default:r.withCtx(()=>[r.withDirectives(r.createVNode("div",{style:{backgroundColor:n.background||""},class:[d.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[r.h("div",{class:d.b("spinner")},[k,_])]),[[r.vShow,n.visible]])])})}}}),b=r.createApp(v),f=b.mount(document.createElement("div"));return{...r.toRefs(n),setText:i,removeElLoadingChild:u,close:m,handleAfterLeave:g,vm:f,get $el(){return f.$el}}}let p;const A=function(t={}){if(!a.isClient)return;const e=I(t);if(e.fullscreen&&p)return p;const l=w({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(p=void 0)}});T(e,e.parent,l),C(e,e.parent,l),e.parent.vLoadingAddClassList=()=>C(e,e.parent,l);let n=e.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",e.parent.setAttribute("loading-number",n),e.parent.appendChild(l.$el),r.nextTick(()=>l.visible.value=e.visible),e.fullscreen&&(p=l),l},I=t=>{var e,l,n,i;let s;return a.isString(t.target)?s=(e=document.querySelector(t.target))!=null?e:document.body:s=t.target||document.body,{parent:s===document.body||t.body?document.body:s,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:s===document.body&&((l=t.fullscreen)!=null?l:!0),lock:(n=t.lock)!=null?n:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,beforeClose:t.beforeClose,closed:t.closed,target:s}},T=async(t,e,l)=>{const{nextZIndex:n}=l.vm.zIndex||l.vm._.exposed.zIndex,i={};if(t.fullscreen)l.originalPosition.value=a.getStyle(document.body,"position"),l.originalOverflow.value=a.getStyle(document.body,"overflow"),i.zIndex=n();else if(t.parent===document.body){l.originalPosition.value=a.getStyle(document.body,"position"),await r.nextTick();for(const s of["top","left"]){const u=s==="top"?"scrollTop":"scrollLeft";i[s]=`${t.target.getBoundingClientRect()[s]+document.body[u]+document.documentElement[u]-Number.parseInt(a.getStyle(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])i[s]=`${t.target.getBoundingClientRect()[s]}px`}else l.originalPosition.value=a.getStyle(e,"position");for(const[s,u]of Object.entries(i))l.$el.style[s]=u},C=(t,e,l)=>{const n=l.vm.ns||l.vm._.exposed.ns;["absolute","fixed","sticky"].includes(l.originalPosition.value)?a.removeClass(e,n.bm("parent","relative")):a.addClass(e,n.bm("parent","relative")),t.fullscreen&&t.lock?a.addClass(e,n.bm("parent","hidden")):a.removeClass(e,n.bm("parent","hidden"))},y=Symbol("ElLoading"),L=(t,e)=>{var l,n,i,s;const u=e.instance,m=o=>a.isObject(e.value)?e.value[o]:void 0,g=o=>{const c=a.isString(o)&&(u==null?void 0:u[o])||o;return c&&r.ref(c)},v=o=>g(m(o)||t.getAttribute(`element-loading-${a.hyphenate(o)}`)),b=(l=m("fullscreen"))!=null?l:e.modifiers.fullscreen,f={text:v("text"),svg:v("svg"),svgViewBox:v("svgViewBox"),spinner:v("spinner"),background:v("background"),customClass:v("customClass"),fullscreen:b,target:(n=m("target"))!=null?n:b?void 0:t,body:(i=m("body"))!=null?i:e.modifiers.body,lock:(s=m("lock"))!=null?s:e.modifiers.lock};t[y]={options:f,instance:A(f)}},$=(t,e)=>{for(const l of Object.keys(e))r.isRef(e[l])&&(e[l].value=t[l])},B={mounted(t,e){e.value&&L(t,e)},updated(t,e){const l=t[y];e.oldValue!==e.value&&(e.value&&!e.oldValue?L(t,e):e.value&&e.oldValue?a.isObject(e.value)&&$(e.value,l.options):l==null||l.instance.close())},unmounted(t){var e;(e=t[y])==null||e.instance.close(),t[y]=null}};exports.vLoading=B;
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { ref as _, reactive as T, defineComponent as V, h as g, Transition as N, withCtx as E, withDirectives as P, createVNode as O, vShow as z, createApp as R, toRefs as j, nextTick as w, isRef as q } from "vue";
|
|
2
|
-
import { u as D } from "./use-global-config-c7f0a7e3.js";
|
|
3
|
-
import { r as y, p as F, i as A, q as b, a as L, e as I, s as G } from "./base-d9284bf0.js";
|
|
4
|
-
function H(t) {
|
|
5
|
-
let e;
|
|
6
|
-
const l = _(!1), o = T({
|
|
7
|
-
...t,
|
|
8
|
-
originalPosition: "",
|
|
9
|
-
originalOverflow: "",
|
|
10
|
-
visible: !1
|
|
11
|
-
});
|
|
12
|
-
function r(n) {
|
|
13
|
-
o.text = n;
|
|
14
|
-
}
|
|
15
|
-
function s() {
|
|
16
|
-
const n = o.parent, a = d.ns;
|
|
17
|
-
if (!n.vLoadingAddClassList) {
|
|
18
|
-
let c = n.getAttribute("loading-number");
|
|
19
|
-
c = Number.parseInt(c) - 1, c ? n.setAttribute("loading-number", c.toString()) : (y(n, a.bm("parent", "relative")), n.removeAttribute("loading-number")), y(n, a.bm("parent", "hidden"));
|
|
20
|
-
}
|
|
21
|
-
i(), m.unmount();
|
|
22
|
-
}
|
|
23
|
-
function i() {
|
|
24
|
-
var n, a;
|
|
25
|
-
(a = (n = d.$el) == null ? void 0 : n.parentNode) == null || a.removeChild(d.$el);
|
|
26
|
-
}
|
|
27
|
-
function v() {
|
|
28
|
-
var n;
|
|
29
|
-
t.beforeClose && !t.beforeClose() || (l.value = !0, clearTimeout(e), e = setTimeout(f, 400), o.visible = !1, (n = t.closed) == null || n.call(t));
|
|
30
|
-
}
|
|
31
|
-
function f() {
|
|
32
|
-
if (!l.value)
|
|
33
|
-
return;
|
|
34
|
-
const n = o.parent;
|
|
35
|
-
l.value = !1, n.vLoadingAddClassList = void 0, s();
|
|
36
|
-
}
|
|
37
|
-
const u = V({
|
|
38
|
-
name: "ElLoading",
|
|
39
|
-
setup(n, { expose: a }) {
|
|
40
|
-
const { ns: c, zIndex: S } = D("loading");
|
|
41
|
-
return a({
|
|
42
|
-
ns: c,
|
|
43
|
-
zIndex: S
|
|
44
|
-
}), () => {
|
|
45
|
-
const C = o.spinner || o.svg, $ = g("svg", {
|
|
46
|
-
class: "circular",
|
|
47
|
-
viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
|
|
48
|
-
...C ? { innerHTML: C } : {}
|
|
49
|
-
}, [
|
|
50
|
-
g("circle", {
|
|
51
|
-
class: "path",
|
|
52
|
-
cx: "25",
|
|
53
|
-
cy: "25",
|
|
54
|
-
r: "20",
|
|
55
|
-
fill: "none"
|
|
56
|
-
})
|
|
57
|
-
]), B = o.text ? g("p", { class: c.b("text") }, [o.text]) : void 0;
|
|
58
|
-
return g(N, {
|
|
59
|
-
name: c.b("fade"),
|
|
60
|
-
onAfterLeave: f
|
|
61
|
-
}, {
|
|
62
|
-
default: E(() => [
|
|
63
|
-
P(O("div", {
|
|
64
|
-
style: {
|
|
65
|
-
backgroundColor: o.background || ""
|
|
66
|
-
},
|
|
67
|
-
class: [
|
|
68
|
-
c.b("mask"),
|
|
69
|
-
o.customClass,
|
|
70
|
-
o.fullscreen ? "is-fullscreen" : ""
|
|
71
|
-
]
|
|
72
|
-
}, [
|
|
73
|
-
g("div", {
|
|
74
|
-
class: c.b("spinner")
|
|
75
|
-
}, [$, B])
|
|
76
|
-
]), [[z, o.visible]])
|
|
77
|
-
])
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}), m = R(u), d = m.mount(document.createElement("div"));
|
|
82
|
-
return {
|
|
83
|
-
...j(o),
|
|
84
|
-
setText: r,
|
|
85
|
-
removeElLoadingChild: i,
|
|
86
|
-
close: v,
|
|
87
|
-
handleAfterLeave: f,
|
|
88
|
-
vm: d,
|
|
89
|
-
get $el() {
|
|
90
|
-
return d.$el;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
let p;
|
|
95
|
-
const K = function(t = {}) {
|
|
96
|
-
if (!F)
|
|
97
|
-
return;
|
|
98
|
-
const e = M(t);
|
|
99
|
-
if (e.fullscreen && p)
|
|
100
|
-
return p;
|
|
101
|
-
const l = H({
|
|
102
|
-
...e,
|
|
103
|
-
closed: () => {
|
|
104
|
-
var r;
|
|
105
|
-
(r = e.closed) == null || r.call(e), e.fullscreen && (p = void 0);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Y(e, e.parent, l), h(e, e.parent, l), e.parent.vLoadingAddClassList = () => h(e, e.parent, l);
|
|
109
|
-
let o = e.parent.getAttribute("loading-number");
|
|
110
|
-
return o ? o = `${Number.parseInt(o) + 1}` : o = "1", e.parent.setAttribute("loading-number", o), e.parent.appendChild(l.$el), w(() => l.visible.value = e.visible), e.fullscreen && (p = l), l;
|
|
111
|
-
}, M = (t) => {
|
|
112
|
-
var e, l, o, r;
|
|
113
|
-
let s;
|
|
114
|
-
return A(t.target) ? s = (e = document.querySelector(t.target)) != null ? e : document.body : s = t.target || document.body, {
|
|
115
|
-
parent: s === document.body || t.body ? document.body : s,
|
|
116
|
-
background: t.background || "",
|
|
117
|
-
svg: t.svg || "",
|
|
118
|
-
svgViewBox: t.svgViewBox || "",
|
|
119
|
-
spinner: t.spinner || !1,
|
|
120
|
-
text: t.text || "",
|
|
121
|
-
fullscreen: s === document.body && ((l = t.fullscreen) != null ? l : !0),
|
|
122
|
-
lock: (o = t.lock) != null ? o : !1,
|
|
123
|
-
customClass: t.customClass || "",
|
|
124
|
-
visible: (r = t.visible) != null ? r : !0,
|
|
125
|
-
beforeClose: t.beforeClose,
|
|
126
|
-
closed: t.closed,
|
|
127
|
-
target: s
|
|
128
|
-
};
|
|
129
|
-
}, Y = async (t, e, l) => {
|
|
130
|
-
const { nextZIndex: o } = l.vm.zIndex || l.vm._.exposed.zIndex, r = {};
|
|
131
|
-
if (t.fullscreen)
|
|
132
|
-
l.originalPosition.value = b(document.body, "position"), l.originalOverflow.value = b(document.body, "overflow"), r.zIndex = o();
|
|
133
|
-
else if (t.parent === document.body) {
|
|
134
|
-
l.originalPosition.value = b(document.body, "position"), await w();
|
|
135
|
-
for (const s of ["top", "left"]) {
|
|
136
|
-
const i = s === "top" ? "scrollTop" : "scrollLeft";
|
|
137
|
-
r[s] = `${t.target.getBoundingClientRect()[s] + document.body[i] + document.documentElement[i] - Number.parseInt(b(document.body, `margin-${s}`), 10)}px`;
|
|
138
|
-
}
|
|
139
|
-
for (const s of ["height", "width"])
|
|
140
|
-
r[s] = `${t.target.getBoundingClientRect()[s]}px`;
|
|
141
|
-
} else
|
|
142
|
-
l.originalPosition.value = b(e, "position");
|
|
143
|
-
for (const [s, i] of Object.entries(r))
|
|
144
|
-
l.$el.style[s] = i;
|
|
145
|
-
}, h = (t, e, l) => {
|
|
146
|
-
const o = l.vm.ns || l.vm._.exposed.ns;
|
|
147
|
-
["absolute", "fixed", "sticky"].includes(l.originalPosition.value) ? y(e, o.bm("parent", "relative")) : L(e, o.bm("parent", "relative")), t.fullscreen && t.lock ? L(e, o.bm("parent", "hidden")) : y(e, o.bm("parent", "hidden"));
|
|
148
|
-
}, x = Symbol("ElLoading"), k = (t, e) => {
|
|
149
|
-
var l, o, r, s;
|
|
150
|
-
const i = e.instance, v = (n) => I(e.value) ? e.value[n] : void 0, f = (n) => {
|
|
151
|
-
const a = A(n) && (i == null ? void 0 : i[n]) || n;
|
|
152
|
-
return a && _(a);
|
|
153
|
-
}, u = (n) => f(v(n) || t.getAttribute(`element-loading-${G(n)}`)), m = (l = v("fullscreen")) != null ? l : e.modifiers.fullscreen, d = {
|
|
154
|
-
text: u("text"),
|
|
155
|
-
svg: u("svg"),
|
|
156
|
-
svgViewBox: u("svgViewBox"),
|
|
157
|
-
spinner: u("spinner"),
|
|
158
|
-
background: u("background"),
|
|
159
|
-
customClass: u("customClass"),
|
|
160
|
-
fullscreen: m,
|
|
161
|
-
target: (o = v("target")) != null ? o : m ? void 0 : t,
|
|
162
|
-
body: (r = v("body")) != null ? r : e.modifiers.body,
|
|
163
|
-
lock: (s = v("lock")) != null ? s : e.modifiers.lock
|
|
164
|
-
};
|
|
165
|
-
t[x] = {
|
|
166
|
-
options: d,
|
|
167
|
-
instance: K(d)
|
|
168
|
-
};
|
|
169
|
-
}, Z = (t, e) => {
|
|
170
|
-
for (const l of Object.keys(e))
|
|
171
|
-
q(e[l]) && (e[l].value = t[l]);
|
|
172
|
-
}, W = {
|
|
173
|
-
mounted(t, e) {
|
|
174
|
-
e.value && k(t, e);
|
|
175
|
-
},
|
|
176
|
-
updated(t, e) {
|
|
177
|
-
const l = t[x];
|
|
178
|
-
e.oldValue !== e.value && (e.value && !e.oldValue ? k(t, e) : e.value && e.oldValue ? I(e.value) && Z(e.value, l.options) : l == null || l.instance.close());
|
|
179
|
-
},
|
|
180
|
-
unmounted(t) {
|
|
181
|
-
var e;
|
|
182
|
-
(e = t[x]) == null || e.instance.close(), t[x] = null;
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
export {
|
|
186
|
-
W as v
|
|
187
|
-
};
|