st-comp 0.0.200 → 0.0.202
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.js +4 -4
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +1 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +44 -40
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +84 -78
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +21 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +345 -331
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +20 -18
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +610 -588
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +2 -2
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +74 -72
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +9 -157
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +56 -52
- package/es/User.cjs +1 -1
- package/es/User.js +1313 -1
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +28 -26
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +19 -18
- package/es/VarietySearch.cjs +8 -8
- package/es/VarietySearch.js +704 -697
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +12 -12
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +80 -79
- package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
- package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
- package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
- package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/debounce-8d53f4dd.js +83 -0
- package/es/dropdown-071c5d7e.cjs +1 -0
- package/es/dropdown-a59bba73.js +178 -0
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
- package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
- package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
- package/es/el-checkbox-7421ccd3.js +459 -0
- package/es/el-checkbox-c25236a6.cjs +1 -0
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
- package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
- package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/el-form-item-c53c374d.js +1269 -0
- package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
- package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
- package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
- package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
- package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
- package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
- package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
- package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
- package/es/el-message-box-a93d2f6a.js +489 -0
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
- package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
- package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
- package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
- package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
- package/es/el-popover-0ea8fbf8.cjs +1 -0
- package/es/el-popover-4ed993c7.js +1 -0
- package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
- package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
- package/es/el-scrollbar-323542e7.js +34 -0
- package/es/el-scrollbar-bc3f790d.cjs +1 -0
- package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
- package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
- package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/el-table-column-376cd907.js +3432 -0
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
- package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
- package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
- package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
- package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
- package/es/index-1f7d4f70.js +157 -0
- package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
- package/es/index-57672682.js +113 -0
- package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
- package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
- package/es/index-88546436.js +163 -0
- package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
- package/es/{index-e00ee015.js → index-960806da.js} +36 -36
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
- package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
- package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
- package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
- package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
- package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
- package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
- package/es/index-f3562b52.cjs +1 -0
- package/es/index-f967d6c1.cjs +1 -0
- package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
- package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
- package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
- package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
- package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
- package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
- package/es/vnode-5ddb7ed1.js +14 -0
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +156 -156
- package/lib/{index-410c490f.js → index-a45d1494.js} +11238 -11207
- package/lib/{python-589861d2.js → python-82d17c8d.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/config.js +2 -0
- package/packages/KlineConfig/index.vue +9 -0
- package/packages/KlinePlus/index.vue +18 -8
- package/packages/KlinePlus/utils.js +41 -5
- package/src/pages/KlinePlus/index.vue +6 -5
- package/es/el-autocomplete-86c0d989.cjs +0 -1
- package/es/el-form-item-41becb31.js +0 -1749
- package/es/el-form-item-95476197.cjs +0 -12
- package/es/el-scrollbar-139aa96d.cjs +0 -1
- package/es/el-scrollbar-cdadd788.js +0 -115
- package/es/el-select-e1046cc6.cjs +0 -1
- package/es/el-table-column-91d69c86.js +0 -3882
- package/es/el-table-column-f1c4af89.cjs +0 -14
- package/es/index-56ea97a9.js +0 -122
- package/es/index-8583c047.cjs +0 -1
- package/es/index-ce63356a.cjs +0 -1
- package/es/index-db1e1861.js +0 -318
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed as c, getCurrentInstance as Ue, defineComponent as Pe, useAttrs as We, useSlots as Ye, shallowRef as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { computed as c, getCurrentInstance as Ue, defineComponent as Pe, useAttrs as We, useSlots as Ye, shallowRef as Z, ref as q, watch as J, nextTick as R, onMounted as Xe, toRef as Ge, openBlock as d, createElementBlock as S, normalizeClass as m, unref as t, normalizeStyle as be, createCommentVNode as p, Fragment as Q, renderSlot as j, createElementVNode as T, createBlock as C, withCtx as L, resolveDynamicComponent as O, mergeProps as we, withModifiers as _e, toDisplayString as U } from "vue";
|
|
2
|
+
import { h as Ze, i as ee, d as qe, f as Je, e as Qe, g as et, V as tt, u as ot } from "./use-form-common-props-815d48a6.js";
|
|
3
|
+
import { w as nt, x as at, y as st, E as B } from "./index-a871c3eb.js";
|
|
4
|
+
import { s as Te, p as xe, b as lt, e as H, c as te, G as rt, u as Se, g as it, N as ut, _ as dt, f as Ce, w as ct } from "./base-a5af3db3.js";
|
|
5
5
|
import { m as pt } from "./typescript-7ae59c4c.js";
|
|
6
|
-
import { u as ft, U as oe, d as Ie, I as Ee, C as Ne } from "./el-popper-
|
|
7
|
-
import {
|
|
8
|
-
const ht = () =>
|
|
6
|
+
import { u as ft, U as oe, d as Ie, I as Ee, C as Ne } from "./el-popper-b4f97157.js";
|
|
7
|
+
import { a as vt, u as mt } from "./index-d91dc23f.js";
|
|
8
|
+
const ht = () => Te && /firefox/i.test(window.navigator.userAgent);
|
|
9
9
|
let g;
|
|
10
10
|
const yt = {
|
|
11
11
|
height: "0",
|
|
@@ -48,13 +48,13 @@ function ze(n, f = 1, r) {
|
|
|
48
48
|
let h = g.scrollHeight;
|
|
49
49
|
const v = {};
|
|
50
50
|
b === "border-box" ? h = h + l : b === "content-box" && (h = h - u), g.value = "";
|
|
51
|
-
const
|
|
51
|
+
const k = g.scrollHeight - u;
|
|
52
52
|
if (xe(f)) {
|
|
53
|
-
let y =
|
|
53
|
+
let y = k * f;
|
|
54
54
|
b === "border-box" && (y = y + u + l), h = Math.max(y, h), v.minHeight = `${y}px`;
|
|
55
55
|
}
|
|
56
56
|
if (xe(r)) {
|
|
57
|
-
let y =
|
|
57
|
+
let y = k * r;
|
|
58
58
|
b === "border-box" && (y = y + u + l), h = Math.min(y, h);
|
|
59
59
|
}
|
|
60
60
|
return v.height = `${h}px`, (i = g.parentNode) == null || i.removeChild(g), g = void 0, v;
|
|
@@ -64,7 +64,7 @@ const wt = lt({
|
|
|
64
64
|
type: String,
|
|
65
65
|
default: void 0
|
|
66
66
|
},
|
|
67
|
-
size:
|
|
67
|
+
size: Ze,
|
|
68
68
|
disabled: Boolean,
|
|
69
69
|
modelValue: {
|
|
70
70
|
type: H([
|
|
@@ -229,9 +229,9 @@ const Nt = "ElInput", zt = Pe({
|
|
|
229
229
|
]), w = c(() => [
|
|
230
230
|
a.e("wrapper"),
|
|
231
231
|
a.is("focus", Y.value)
|
|
232
|
-
]), { form: h, formItem: v } =
|
|
232
|
+
]), { form: h, formItem: v } = qe(), { inputId: k } = Je(o, {
|
|
233
233
|
formItemContext: v
|
|
234
|
-
}), y = Qe(), x = et(), a = Se("input"), ne = Se("textarea"), $ =
|
|
234
|
+
}), y = Qe(), x = et(), a = Se("input"), ne = Se("textarea"), $ = Z(), I = Z(), W = q(!1), A = q(!1), ae = q(), D = Z(o.inputStyle), N = c(() => $.value || I.value), { wrapperRef: ke, isFocused: Y, handleFocus: Ve, handleBlur: Fe } = vt(N, {
|
|
235
235
|
disabled: x,
|
|
236
236
|
afterBlur() {
|
|
237
237
|
var e;
|
|
@@ -246,7 +246,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
246
246
|
o.inputStyle,
|
|
247
247
|
D.value,
|
|
248
248
|
{ resize: o.resize }
|
|
249
|
-
]), E = c(() => it(o.modelValue) ? "" : String(o.modelValue)), K = c(() => o.clearable && !x.value && !o.readonly && !!E.value && (Y.value || W.value)), X = c(() => o.showPassword && !x.value && !!E.value), z = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword),
|
|
249
|
+
]), E = c(() => it(o.modelValue) ? "" : String(o.modelValue)), K = c(() => o.clearable && !x.value && !o.readonly && !!E.value && (Y.value || W.value)), X = c(() => o.showPassword && !x.value && !!E.value), z = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword), G = c(() => E.value.length), Le = c(() => !!z.value && G.value > Number(o.maxlength)), Oe = c(() => !!l.suffix || !!o.suffixIcon || K.value || o.showPassword || z.value || !!V.value && se.value), [ie, ue] = Et($);
|
|
250
250
|
ot(I, (e) => {
|
|
251
251
|
if (Be(), !z.value || o.resize !== "both")
|
|
252
252
|
return;
|
|
@@ -257,7 +257,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
257
257
|
});
|
|
258
258
|
const F = () => {
|
|
259
259
|
const { type: e, autosize: s } = o;
|
|
260
|
-
if (!(!
|
|
260
|
+
if (!(!Te || e !== "textarea" || !I.value))
|
|
261
261
|
if (s) {
|
|
262
262
|
const P = Ce(s) ? s.minRows : void 0, ye = Ce(s) ? s.maxRows : void 0, ge = ze(I.value, P, ye);
|
|
263
263
|
D.value = {
|
|
@@ -281,7 +281,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
281
281
|
})(F), M = () => {
|
|
282
282
|
const e = N.value, s = o.formatter ? o.formatter(E.value) : E.value;
|
|
283
283
|
!e || e.value === s || (e.value = s);
|
|
284
|
-
},
|
|
284
|
+
}, _ = async (e) => {
|
|
285
285
|
ie();
|
|
286
286
|
let { value: s } = e.target;
|
|
287
287
|
if (o.formatter && o.parser && (s = o.parser(s)), !ce.value) {
|
|
@@ -299,7 +299,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
299
299
|
handleCompositionStart: pe,
|
|
300
300
|
handleCompositionUpdate: fe,
|
|
301
301
|
handleCompositionEnd: ve
|
|
302
|
-
} = mt({ emit: r, afterComposition:
|
|
302
|
+
} = mt({ emit: r, afterComposition: _ }), He = () => {
|
|
303
303
|
ie(), A.value = !A.value, setTimeout(ue);
|
|
304
304
|
}, $e = () => {
|
|
305
305
|
var e;
|
|
@@ -331,7 +331,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
331
331
|
textarea: I,
|
|
332
332
|
ref: N,
|
|
333
333
|
textareaStyle: re,
|
|
334
|
-
autosize:
|
|
334
|
+
autosize: Ge(o, "autosize"),
|
|
335
335
|
isComposing: ce,
|
|
336
336
|
focus: $e,
|
|
337
337
|
blur: Ae,
|
|
@@ -359,9 +359,9 @@ const Nt = "ElInput", zt = Pe({
|
|
|
359
359
|
}, [
|
|
360
360
|
j(e.$slots, "prepend")
|
|
361
361
|
], 2)) : p("v-if", !0),
|
|
362
|
-
|
|
362
|
+
T("div", {
|
|
363
363
|
ref_key: "wrapperRef",
|
|
364
|
-
ref:
|
|
364
|
+
ref: ke,
|
|
365
365
|
class: m(t(w))
|
|
366
366
|
}, [
|
|
367
367
|
p(" prefix slot "),
|
|
@@ -369,7 +369,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
369
369
|
key: 0,
|
|
370
370
|
class: m(t(a).e("prefix"))
|
|
371
371
|
}, [
|
|
372
|
-
|
|
372
|
+
T("span", {
|
|
373
373
|
class: m(t(a).e("prefix-inner"))
|
|
374
374
|
}, [
|
|
375
375
|
j(e.$slots, "prefix"),
|
|
@@ -384,8 +384,8 @@ const Nt = "ElInput", zt = Pe({
|
|
|
384
384
|
}, 8, ["class"])) : p("v-if", !0)
|
|
385
385
|
], 2)
|
|
386
386
|
], 2)) : p("v-if", !0),
|
|
387
|
-
|
|
388
|
-
id: t(
|
|
387
|
+
T("input", we({
|
|
388
|
+
id: t(k),
|
|
389
389
|
ref_key: "input",
|
|
390
390
|
ref: $,
|
|
391
391
|
class: t(a).e("inner")
|
|
@@ -408,7 +408,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
408
408
|
onCompositionstart: t(pe),
|
|
409
409
|
onCompositionupdate: t(fe),
|
|
410
410
|
onCompositionend: t(ve),
|
|
411
|
-
onInput:
|
|
411
|
+
onInput: _,
|
|
412
412
|
onChange: de,
|
|
413
413
|
onKeydown: me
|
|
414
414
|
}), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
@@ -417,7 +417,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
417
417
|
key: 1,
|
|
418
418
|
class: m(t(a).e("suffix"))
|
|
419
419
|
}, [
|
|
420
|
-
|
|
420
|
+
T("span", {
|
|
421
421
|
class: m(t(a).e("suffix-inner"))
|
|
422
422
|
}, [
|
|
423
423
|
!t(K) || !t(X) || !t(z) ? (d(), S(Q, { key: 0 }, [
|
|
@@ -435,7 +435,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
435
435
|
t(K) ? (d(), C(t(B), {
|
|
436
436
|
key: 1,
|
|
437
437
|
class: m([t(a).e("icon"), t(a).e("clear")]),
|
|
438
|
-
onMousedown:
|
|
438
|
+
onMousedown: _e(t(ut), ["prevent"]),
|
|
439
439
|
onClick: he
|
|
440
440
|
}, {
|
|
441
441
|
default: L(() => [
|
|
@@ -457,9 +457,9 @@ const Nt = "ElInput", zt = Pe({
|
|
|
457
457
|
key: 3,
|
|
458
458
|
class: m(t(a).e("count"))
|
|
459
459
|
}, [
|
|
460
|
-
|
|
460
|
+
T("span", {
|
|
461
461
|
class: m(t(a).e("count-inner"))
|
|
462
|
-
}, U(t(
|
|
462
|
+
}, U(t(G)) + " / " + U(e.maxlength), 3)
|
|
463
463
|
], 2)) : p("v-if", !0),
|
|
464
464
|
t(V) && t(le) && t(se) ? (d(), C(t(B), {
|
|
465
465
|
key: 4,
|
|
@@ -486,8 +486,8 @@ const Nt = "ElInput", zt = Pe({
|
|
|
486
486
|
], 2)) : p("v-if", !0)
|
|
487
487
|
], 64)) : (d(), S(Q, { key: 1 }, [
|
|
488
488
|
p(" textarea "),
|
|
489
|
-
|
|
490
|
-
id: t(
|
|
489
|
+
T("textarea", we({
|
|
490
|
+
id: t(k),
|
|
491
491
|
ref_key: "textarea",
|
|
492
492
|
ref: I,
|
|
493
493
|
class: [t(ne).e("inner"), t(a).is("focus", t(Y))]
|
|
@@ -508,7 +508,7 @@ const Nt = "ElInput", zt = Pe({
|
|
|
508
508
|
onCompositionstart: t(pe),
|
|
509
509
|
onCompositionupdate: t(fe),
|
|
510
510
|
onCompositionend: t(ve),
|
|
511
|
-
onInput:
|
|
511
|
+
onInput: _,
|
|
512
512
|
onFocus: t(Ve),
|
|
513
513
|
onBlur: t(Fe),
|
|
514
514
|
onChange: de,
|
|
@@ -518,13 +518,13 @@ const Nt = "ElInput", zt = Pe({
|
|
|
518
518
|
key: 0,
|
|
519
519
|
style: be(ae.value),
|
|
520
520
|
class: m(t(a).e("count"))
|
|
521
|
-
}, U(t(
|
|
521
|
+
}, U(t(G)) + " / " + U(e.maxlength), 7)) : p("v-if", !0)
|
|
522
522
|
], 64))
|
|
523
523
|
], 38));
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
|
-
var
|
|
527
|
-
const Ht = ct(
|
|
526
|
+
var Tt = /* @__PURE__ */ dt(Pt, [["__file", "input.vue"]]);
|
|
527
|
+
const Ht = ct(Tt);
|
|
528
528
|
export {
|
|
529
529
|
Ht as E,
|
|
530
530
|
wt as i
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),C=require("./use-form-common-props-d8866dc6.cjs"),x=require("./index-1fb95601.cjs"),s=require("./base-ef747d02.cjs"),be=require("./typescript-b63f8e83.cjs"),b=require("./el-popper-b962125f.cjs"),oe=require("./index-16802b35.cjs"),Ce=()=>s.isClient&&/firefox/i.test(window.navigator.userAgent);let v;const Ee={height:"0",visibility:"hidden",overflow:Ce()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},xe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"];function we(n){const d=window.getComputedStyle(n),i=d.getPropertyValue("box-sizing"),o=Number.parseFloat(d.getPropertyValue("padding-bottom"))+Number.parseFloat(d.getPropertyValue("padding-top")),u=Number.parseFloat(d.getPropertyValue("border-bottom-width"))+Number.parseFloat(d.getPropertyValue("border-top-width"));return{contextStyle:xe.map(l=>[l,d.getPropertyValue(l)]),paddingSize:o,borderSize:u,boxSizing:i}}function ne(n,d=1,i){var o,u;v||(v=document.createElement("textarea"),((o=n.parentNode)!=null?o:document.body).appendChild(v));const{paddingSize:c,borderSize:l,boxSizing:h,contextStyle:y}=we(n);y.forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g)),Object.entries(Ee).forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g,"important")),v.value=n.value||n.placeholder||"";let f=v.scrollHeight;const p={};h==="border-box"?f=f+l:h==="content-box"&&(f=f-c),v.value="";const I=v.scrollHeight-c;if(s.isNumber(d)){let m=I*d;h==="border-box"&&(m=m+c+l),f=Math.max(m,f),p.minHeight=`${m}px`}if(s.isNumber(i)){let m=I*i;h==="border-box"&&(m=m+c+l),f=Math.min(m,f)}return p.height=`${f}px`,(u=v.parentNode)==null||u.removeChild(v),v=void 0,p}const re=s.buildProps({id:{type:String,default:void 0},size:C.useSizeProp,disabled:Boolean,modelValue:{type:s.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:s.definePropType([Boolean,Object]),default:!1},autocomplete:{type:s.definePropType(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:C.iconPropType,default:x.circle_close_default},showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:C.iconPropType},prefixIcon:{type:C.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:s.definePropType([Object,Array,String]),default:()=>be.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...b.useAriaProps(["ariaLabel"]),inputmode:{type:s.definePropType(String),default:void 0},name:String}),ke={[b.UPDATE_MODEL_EVENT]:n=>s.isString(n),input:n=>s.isString(n),change:n=>s.isString(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,mouseleave:n=>n instanceof MouseEvent,mouseenter:n=>n instanceof MouseEvent,keydown:n=>n instanceof Event,compositionstart:n=>n instanceof CompositionEvent,compositionupdate:n=>n instanceof CompositionEvent,compositionend:n=>n instanceof CompositionEvent},Se=["class","style"],Ne=/^on[A-Z]/,Ie=(n={})=>{const{excludeListeners:d=!1,excludeKeys:i}=n,o=e.computed(()=>((i==null?void 0:i.value)||[]).concat(Se)),u=e.getCurrentInstance();return u?e.computed(()=>{var c;return s.fromPairs(Object.entries((c=u.proxy)==null?void 0:c.$attrs).filter(([l])=>!o.value.includes(l)&&!(d&&Ne.test(l))))}):e.computed(()=>({}))};function Be(n){let d;function i(){if(n.value==null)return;const{selectionStart:u,selectionEnd:c,value:l}=n.value;if(u==null||c==null)return;const h=l.slice(0,Math.max(0,u)),y=l.slice(Math.max(0,c));d={selectionStart:u,selectionEnd:c,value:l,beforeTxt:h,afterTxt:y}}function o(){if(n.value==null||d==null)return;const{value:u}=n.value,{beforeTxt:c,afterTxt:l,selectionStart:h}=d;if(c==null||l==null||h==null)return;let y=u.length;if(u.endsWith(l))y=u.length-l.length;else if(u.startsWith(c))y=c.length;else{const f=c[h-1],p=u.indexOf(f,h-1);p!==-1&&(y=p+1)}n.value.setSelectionRange(y,y)}return[i,o]}const Ve="ElInput",ze=e.defineComponent({name:Ve,inheritAttrs:!1}),Pe=e.defineComponent({...ze,props:re,emits:ke,setup(n,{expose:d,emit:i}){const o=n,u=e.useAttrs(),c=Ie(),l=e.useSlots(),h=e.computed(()=>[o.type==="textarea"?H.b():r.b(),r.m(m.value),r.is("disabled",g.value),r.is("exceed",ce.value),{[r.b("group")]:l.prepend||l.append,[r.m("prefix")]:l.prefix||o.prefixIcon,[r.m("suffix")]:l.suffix||o.suffixIcon||o.clearable||o.showPassword,[r.bm("suffix","password-clear")]:D.value&&R.value,[r.b("hidden")]:o.type==="hidden"},u.class]),y=e.computed(()=>[r.e("wrapper"),r.is("focus",O.value)]),{form:f,formItem:p}=C.useFormItem(),{inputId:I}=C.useFormItemInputId(o,{formItemContext:p}),m=C.useFormSize(),g=C.useFormDisabled(),r=s.useNamespace("input"),H=s.useNamespace("textarea"),P=e.shallowRef(),E=e.shallowRef(),M=e.ref(!1),T=e.ref(!1),$=e.ref(),F=e.shallowRef(o.inputStyle),k=e.computed(()=>P.value||E.value),{wrapperRef:ae,isFocused:O,handleFocus:le,handleBlur:se}=oe.useFocusController(k,{disabled:g,afterBlur(){var t;o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"blur").catch(a=>b.debugWarn()))}}),K=e.computed(()=>{var t;return(t=f==null?void 0:f.statusIcon)!=null?t:!1}),B=e.computed(()=>(p==null?void 0:p.validateState)||""),U=e.computed(()=>B.value&&C.ValidateComponentsMap[B.value]),ie=e.computed(()=>T.value?x.view_default:x.hide_default),ue=e.computed(()=>[u.style]),j=e.computed(()=>[o.inputStyle,F.value,{resize:o.resize}]),w=e.computed(()=>s.isNil(o.modelValue)?"":String(o.modelValue)),D=e.computed(()=>o.clearable&&!g.value&&!o.readonly&&!!w.value&&(O.value||M.value)),R=e.computed(()=>o.showPassword&&!g.value&&!!w.value),S=e.computed(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),L=e.computed(()=>w.value.length),ce=e.computed(()=>!!S.value&&L.value>Number(o.maxlength)),de=e.computed(()=>!!l.suffix||!!o.suffixIcon||D.value||o.showPassword||S.value||!!B.value&&K.value),[q,W]=Be(P);C.useResizeObserver(E,t=>{if(pe(),!S.value||o.resize!=="both")return;const a=t[0],{width:N}=a.contentRect;$.value={right:`calc(100% - ${N+15+6}px)`}});const V=()=>{const{type:t,autosize:a}=o;if(!(!s.isClient||t!=="textarea"||!E.value))if(a){const N=s.isObject(a)?a.minRows:void 0,ee=s.isObject(a)?a.maxRows:void 0,te=ne(E.value,N,ee);F.value={overflowY:"hidden",...te},e.nextTick(()=>{E.value.offsetHeight,F.value=te})}else F.value={minHeight:ne(E.value).minHeight}},pe=(t=>{let a=!1;return()=>{var N;if(a||!o.autosize)return;((N=E.value)==null?void 0:N.offsetParent)===null||(setTimeout(t),a=!0)}})(V),z=()=>{const t=k.value,a=o.formatter?o.formatter(w.value):w.value;!t||t.value===a||(t.value=a)},A=async t=>{q();let{value:a}=t.target;if(o.formatter&&o.parser&&(a=o.parser(a)),!Y.value){if(a===w.value){z();return}i(b.UPDATE_MODEL_EVENT,a),i(b.INPUT_EVENT,a),await e.nextTick(),z(),W()}},_=t=>{let{value:a}=t.target;o.formatter&&o.parser&&(a=o.parser(a)),i(b.CHANGE_EVENT,a)},{isComposing:Y,handleCompositionStart:X,handleCompositionUpdate:G,handleCompositionEnd:Z}=oe.useComposition({emit:i,afterComposition:A}),fe=()=>{q(),T.value=!T.value,setTimeout(W)},me=()=>{var t;return(t=k.value)==null?void 0:t.focus()},ve=()=>{var t;return(t=k.value)==null?void 0:t.blur()},he=t=>{M.value=!1,i("mouseleave",t)},ye=t=>{M.value=!0,i("mouseenter",t)},J=t=>{i("keydown",t)},ge=()=>{var t;(t=k.value)==null||t.select()},Q=()=>{i(b.UPDATE_MODEL_EVENT,""),i(b.CHANGE_EVENT,""),i("clear"),i(b.INPUT_EVENT,"")};return e.watch(()=>o.modelValue,()=>{var t;e.nextTick(()=>V()),o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"change").catch(a=>b.debugWarn()))}),e.watch(w,()=>z()),e.watch(()=>o.type,async()=>{await e.nextTick(),z(),V()}),e.onMounted(()=>{!o.formatter&&o.parser,z(),e.nextTick(V)}),d({input:P,textarea:E,ref:k,textareaStyle:j,autosize:e.toRef(o,"autosize"),isComposing:Y,focus:me,blur:ve,select:ge,clear:Q,resizeTextarea:V}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(h),{[e.unref(r).bm("group","append")]:t.$slots.append,[e.unref(r).bm("group","prepend")]:t.$slots.prepend}]),style:e.normalizeStyle(e.unref(ue)),onMouseenter:ye,onMouseleave:he},[e.createCommentVNode(" input "),t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" prepend slot "),t.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).be("group","prepend"))},[e.renderSlot(t.$slots,"prepend")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperRef",ref:ae,class:e.normalizeClass(e.unref(y))},[e.createCommentVNode(" prefix slot "),t.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("prefix-inner"))},[e.renderSlot(t.$slots,"prefix"),t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(I),ref_key:"input",ref:P,class:e.unref(r).e("inner")},e.unref(c),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?T.value?"text":"password":t.type,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onChange:_,onKeydown:J}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),e.createCommentVNode(" suffix slot "),e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("suffix-inner"))},[!e.unref(D)||!e.unref(R)||!e.unref(S)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(t.$slots,"suffix"),t.suffixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.suffixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0),e.unref(D)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("clear")]),onMousedown:e.withModifiers(e.unref(s.NOOP),["prevent"]),onClick:Q},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(R)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:2,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("password")]),onClick:fe},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ie))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(r).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("count-inner"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(B)&&e.unref(U)&&e.unref(K)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:4,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("validateIcon"),e.unref(r).is("loading",e.unref(B)==="validating")])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0)],2),e.createCommentVNode(" append slot "),t.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("group","append"))},[e.renderSlot(t.$slots,"append")],2)):e.createCommentVNode("v-if",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" textarea "),e.createElementVNode("textarea",e.mergeProps({id:e.unref(I),ref_key:"textarea",ref:E,class:[e.unref(H).e("inner"),e.unref(r).is("focus",e.unref(O))]},e.unref(c),{minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,style:e.unref(j),"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onFocus:e.unref(le),onBlur:e.unref(se),onChange:_,onKeydown:J}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle($.value),class:e.normalizeClass(e.unref(r).e("count"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),7)):e.createCommentVNode("v-if",!0)],64))],38))}});var Te=s._export_sfc(Pe,[["__file","input.vue"]]);const Fe=s.withInstall(Te);exports.ElInput=Fe;exports.inputProps=re;
|
|
1
|
+
"use strict";const e=require("vue"),C=require("./use-form-common-props-fd9b61a0.cjs"),x=require("./index-098c2447.cjs"),s=require("./base-ef747d02.cjs"),be=require("./typescript-b63f8e83.cjs"),b=require("./el-popper-b6c99b28.cjs"),oe=require("./index-11547a0c.cjs"),Ce=()=>s.isClient&&/firefox/i.test(window.navigator.userAgent);let v;const Ee={height:"0",visibility:"hidden",overflow:Ce()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},xe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"];function we(n){const d=window.getComputedStyle(n),i=d.getPropertyValue("box-sizing"),o=Number.parseFloat(d.getPropertyValue("padding-bottom"))+Number.parseFloat(d.getPropertyValue("padding-top")),u=Number.parseFloat(d.getPropertyValue("border-bottom-width"))+Number.parseFloat(d.getPropertyValue("border-top-width"));return{contextStyle:xe.map(l=>[l,d.getPropertyValue(l)]),paddingSize:o,borderSize:u,boxSizing:i}}function ne(n,d=1,i){var o,u;v||(v=document.createElement("textarea"),((o=n.parentNode)!=null?o:document.body).appendChild(v));const{paddingSize:c,borderSize:l,boxSizing:h,contextStyle:y}=we(n);y.forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g)),Object.entries(Ee).forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g,"important")),v.value=n.value||n.placeholder||"";let f=v.scrollHeight;const p={};h==="border-box"?f=f+l:h==="content-box"&&(f=f-c),v.value="";const I=v.scrollHeight-c;if(s.isNumber(d)){let m=I*d;h==="border-box"&&(m=m+c+l),f=Math.max(m,f),p.minHeight=`${m}px`}if(s.isNumber(i)){let m=I*i;h==="border-box"&&(m=m+c+l),f=Math.min(m,f)}return p.height=`${f}px`,(u=v.parentNode)==null||u.removeChild(v),v=void 0,p}const re=s.buildProps({id:{type:String,default:void 0},size:C.useSizeProp,disabled:Boolean,modelValue:{type:s.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:s.definePropType([Boolean,Object]),default:!1},autocomplete:{type:s.definePropType(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:C.iconPropType,default:x.circle_close_default},showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:C.iconPropType},prefixIcon:{type:C.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:s.definePropType([Object,Array,String]),default:()=>be.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...b.useAriaProps(["ariaLabel"]),inputmode:{type:s.definePropType(String),default:void 0},name:String}),ke={[b.UPDATE_MODEL_EVENT]:n=>s.isString(n),input:n=>s.isString(n),change:n=>s.isString(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,mouseleave:n=>n instanceof MouseEvent,mouseenter:n=>n instanceof MouseEvent,keydown:n=>n instanceof Event,compositionstart:n=>n instanceof CompositionEvent,compositionupdate:n=>n instanceof CompositionEvent,compositionend:n=>n instanceof CompositionEvent},Se=["class","style"],Ne=/^on[A-Z]/,Ie=(n={})=>{const{excludeListeners:d=!1,excludeKeys:i}=n,o=e.computed(()=>((i==null?void 0:i.value)||[]).concat(Se)),u=e.getCurrentInstance();return u?e.computed(()=>{var c;return s.fromPairs(Object.entries((c=u.proxy)==null?void 0:c.$attrs).filter(([l])=>!o.value.includes(l)&&!(d&&Ne.test(l))))}):e.computed(()=>({}))};function Be(n){let d;function i(){if(n.value==null)return;const{selectionStart:u,selectionEnd:c,value:l}=n.value;if(u==null||c==null)return;const h=l.slice(0,Math.max(0,u)),y=l.slice(Math.max(0,c));d={selectionStart:u,selectionEnd:c,value:l,beforeTxt:h,afterTxt:y}}function o(){if(n.value==null||d==null)return;const{value:u}=n.value,{beforeTxt:c,afterTxt:l,selectionStart:h}=d;if(c==null||l==null||h==null)return;let y=u.length;if(u.endsWith(l))y=u.length-l.length;else if(u.startsWith(c))y=c.length;else{const f=c[h-1],p=u.indexOf(f,h-1);p!==-1&&(y=p+1)}n.value.setSelectionRange(y,y)}return[i,o]}const Ve="ElInput",ze=e.defineComponent({name:Ve,inheritAttrs:!1}),Pe=e.defineComponent({...ze,props:re,emits:ke,setup(n,{expose:d,emit:i}){const o=n,u=e.useAttrs(),c=Ie(),l=e.useSlots(),h=e.computed(()=>[o.type==="textarea"?H.b():r.b(),r.m(m.value),r.is("disabled",g.value),r.is("exceed",ce.value),{[r.b("group")]:l.prepend||l.append,[r.m("prefix")]:l.prefix||o.prefixIcon,[r.m("suffix")]:l.suffix||o.suffixIcon||o.clearable||o.showPassword,[r.bm("suffix","password-clear")]:D.value&&R.value,[r.b("hidden")]:o.type==="hidden"},u.class]),y=e.computed(()=>[r.e("wrapper"),r.is("focus",O.value)]),{form:f,formItem:p}=C.useFormItem(),{inputId:I}=C.useFormItemInputId(o,{formItemContext:p}),m=C.useFormSize(),g=C.useFormDisabled(),r=s.useNamespace("input"),H=s.useNamespace("textarea"),P=e.shallowRef(),E=e.shallowRef(),M=e.ref(!1),T=e.ref(!1),$=e.ref(),F=e.shallowRef(o.inputStyle),k=e.computed(()=>P.value||E.value),{wrapperRef:ae,isFocused:O,handleFocus:le,handleBlur:se}=oe.useFocusController(k,{disabled:g,afterBlur(){var t;o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"blur").catch(a=>b.debugWarn()))}}),K=e.computed(()=>{var t;return(t=f==null?void 0:f.statusIcon)!=null?t:!1}),B=e.computed(()=>(p==null?void 0:p.validateState)||""),U=e.computed(()=>B.value&&C.ValidateComponentsMap[B.value]),ie=e.computed(()=>T.value?x.view_default:x.hide_default),ue=e.computed(()=>[u.style]),j=e.computed(()=>[o.inputStyle,F.value,{resize:o.resize}]),w=e.computed(()=>s.isNil(o.modelValue)?"":String(o.modelValue)),D=e.computed(()=>o.clearable&&!g.value&&!o.readonly&&!!w.value&&(O.value||M.value)),R=e.computed(()=>o.showPassword&&!g.value&&!!w.value),S=e.computed(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),L=e.computed(()=>w.value.length),ce=e.computed(()=>!!S.value&&L.value>Number(o.maxlength)),de=e.computed(()=>!!l.suffix||!!o.suffixIcon||D.value||o.showPassword||S.value||!!B.value&&K.value),[q,W]=Be(P);C.useResizeObserver(E,t=>{if(pe(),!S.value||o.resize!=="both")return;const a=t[0],{width:N}=a.contentRect;$.value={right:`calc(100% - ${N+15+6}px)`}});const V=()=>{const{type:t,autosize:a}=o;if(!(!s.isClient||t!=="textarea"||!E.value))if(a){const N=s.isObject(a)?a.minRows:void 0,ee=s.isObject(a)?a.maxRows:void 0,te=ne(E.value,N,ee);F.value={overflowY:"hidden",...te},e.nextTick(()=>{E.value.offsetHeight,F.value=te})}else F.value={minHeight:ne(E.value).minHeight}},pe=(t=>{let a=!1;return()=>{var N;if(a||!o.autosize)return;((N=E.value)==null?void 0:N.offsetParent)===null||(setTimeout(t),a=!0)}})(V),z=()=>{const t=k.value,a=o.formatter?o.formatter(w.value):w.value;!t||t.value===a||(t.value=a)},A=async t=>{q();let{value:a}=t.target;if(o.formatter&&o.parser&&(a=o.parser(a)),!Y.value){if(a===w.value){z();return}i(b.UPDATE_MODEL_EVENT,a),i(b.INPUT_EVENT,a),await e.nextTick(),z(),W()}},_=t=>{let{value:a}=t.target;o.formatter&&o.parser&&(a=o.parser(a)),i(b.CHANGE_EVENT,a)},{isComposing:Y,handleCompositionStart:X,handleCompositionUpdate:G,handleCompositionEnd:Z}=oe.useComposition({emit:i,afterComposition:A}),fe=()=>{q(),T.value=!T.value,setTimeout(W)},me=()=>{var t;return(t=k.value)==null?void 0:t.focus()},ve=()=>{var t;return(t=k.value)==null?void 0:t.blur()},he=t=>{M.value=!1,i("mouseleave",t)},ye=t=>{M.value=!0,i("mouseenter",t)},J=t=>{i("keydown",t)},ge=()=>{var t;(t=k.value)==null||t.select()},Q=()=>{i(b.UPDATE_MODEL_EVENT,""),i(b.CHANGE_EVENT,""),i("clear"),i(b.INPUT_EVENT,"")};return e.watch(()=>o.modelValue,()=>{var t;e.nextTick(()=>V()),o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"change").catch(a=>b.debugWarn()))}),e.watch(w,()=>z()),e.watch(()=>o.type,async()=>{await e.nextTick(),z(),V()}),e.onMounted(()=>{!o.formatter&&o.parser,z(),e.nextTick(V)}),d({input:P,textarea:E,ref:k,textareaStyle:j,autosize:e.toRef(o,"autosize"),isComposing:Y,focus:me,blur:ve,select:ge,clear:Q,resizeTextarea:V}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(h),{[e.unref(r).bm("group","append")]:t.$slots.append,[e.unref(r).bm("group","prepend")]:t.$slots.prepend}]),style:e.normalizeStyle(e.unref(ue)),onMouseenter:ye,onMouseleave:he},[e.createCommentVNode(" input "),t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" prepend slot "),t.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).be("group","prepend"))},[e.renderSlot(t.$slots,"prepend")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperRef",ref:ae,class:e.normalizeClass(e.unref(y))},[e.createCommentVNode(" prefix slot "),t.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("prefix-inner"))},[e.renderSlot(t.$slots,"prefix"),t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(I),ref_key:"input",ref:P,class:e.unref(r).e("inner")},e.unref(c),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?T.value?"text":"password":t.type,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onChange:_,onKeydown:J}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),e.createCommentVNode(" suffix slot "),e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("suffix-inner"))},[!e.unref(D)||!e.unref(R)||!e.unref(S)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(t.$slots,"suffix"),t.suffixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.suffixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0),e.unref(D)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("clear")]),onMousedown:e.withModifiers(e.unref(s.NOOP),["prevent"]),onClick:Q},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(R)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:2,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("password")]),onClick:fe},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ie))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(r).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("count-inner"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(B)&&e.unref(U)&&e.unref(K)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:4,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("validateIcon"),e.unref(r).is("loading",e.unref(B)==="validating")])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0)],2),e.createCommentVNode(" append slot "),t.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("group","append"))},[e.renderSlot(t.$slots,"append")],2)):e.createCommentVNode("v-if",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" textarea "),e.createElementVNode("textarea",e.mergeProps({id:e.unref(I),ref_key:"textarea",ref:E,class:[e.unref(H).e("inner"),e.unref(r).is("focus",e.unref(O))]},e.unref(c),{minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,style:e.unref(j),"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onFocus:e.unref(le),onBlur:e.unref(se),onChange:_,onKeydown:J}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle($.value),class:e.normalizeClass(e.unref(r).e("count"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),7)):e.createCommentVNode("v-if",!0)],64))],38))}});var Te=s._export_sfc(Pe,[["__file","input.vue"]]);const Fe=s.withInstall(Te);exports.ElInput=Fe;exports.inputProps=re;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),W=require("./el-input-
|
|
1
|
+
"use strict";const n=require("vue"),W=require("./el-input-7fd293af.cjs"),E=require("./index-098c2447.cjs"),l=require("./base-ef747d02.cjs"),g=require("./use-form-common-props-fd9b61a0.cjs"),c=require("./el-popper-b6c99b28.cjs"),X=require("./index-bb833443.cjs"),Y=100,j=600,L={beforeMount(o,v){const d=v.value,{interval:u=Y,delay:h=j}=l.isFunction(d)?{}:d;let f,p;const i=()=>l.isFunction(d)?d():d.handler(),b=()=>{p&&(clearTimeout(p),p=void 0),f&&(clearInterval(f),f=void 0)};o.addEventListener("mousedown",y=>{y.button===0&&(b(),i(),document.addEventListener("mouseup",()=>b(),{once:!0}),p=setTimeout(()=>{f=setInterval(()=>{i()},u)},h))})}},J=l.buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:g.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:o=>o===null||l.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},...c.useAriaProps(["ariaLabel"]),inputmode:{type:l.definePropType(String),default:void 0},align:{type:l.definePropType(String),default:"center"},disabledScientific:Boolean}),Q={[c.CHANGE_EVENT]:(o,v)=>v!==o,blur:o=>o instanceof FocusEvent,focus:o=>o instanceof FocusEvent,[c.INPUT_EVENT]:o=>l.isNumber(o)||l.isNil(o),[c.UPDATE_MODEL_EVENT]:o=>l.isNumber(o)||l.isNil(o)},Z=n.defineComponent({name:"ElInputNumber"}),ee=n.defineComponent({...Z,props:J,emits:Q,setup(o,{expose:v,emit:d}){const u=o,{t:h}=X.useLocale(),f=l.useNamespace("input-number"),p=n.ref(),i=n.reactive({currentValue:u.modelValue,userInput:null}),{formItem:b}=g.useFormItem(),y=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue<=u.min),B=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue>=u.max),x=n.computed(()=>{const e=M(u.step);return l.isUndefined(u.precision)?Math.max(M(u.modelValue),e):(e>u.precision,u.precision)}),w=n.computed(()=>u.controls&&u.controlsPosition==="right"),F=g.useFormSize(),V=g.useFormDisabled(),S=n.computed(()=>{if(i.userInput!==null)return i.userInput;let e=i.currentValue;if(l.isNil(e))return"";if(l.isNumber(e)){if(Number.isNaN(e))return"";l.isUndefined(u.precision)||(e=e.toFixed(u.precision))}return e}),A=(e,r)=>{if(l.isUndefined(r)&&(r=x.value),r===0)return Math.round(e);let t=String(e);const a=t.indexOf(".");if(a===-1||!t.replace(".","").split("")[a+r])return e;const I=t.length;return t.charAt(I-1)==="5"&&(t=`${t.slice(0,Math.max(0,I-1))}6`),Number.parseFloat(Number(t).toFixed(r))},M=e=>{if(l.isNil(e))return 0;const r=e.toString(),t=r.indexOf(".");let a=0;return t!==-1&&(a=r.length-t-1),a},U=(e,r=1)=>l.isNumber(e)?e>=Number.MAX_SAFE_INTEGER&&r===1||e<=Number.MIN_SAFE_INTEGER&&r===-1?e:A(e+u.step*r):i.currentValue,O=e=>{var r;const t=e;if(u.disabledScientific&&["e","E"].includes(t.key)){t.preventDefault();return}const a={[c.EVENT_CODE.up]:()=>{t.preventDefault(),P()},[c.EVENT_CODE.down]:()=>{t.preventDefault(),D()}};(r=a[t.key])==null||r.call(a)},P=()=>{if(u.readonly||V.value||B.value)return;const e=Number(S.value)||0,r=U(e);_(r),d(c.INPUT_EVENT,i.currentValue),C()},D=()=>{if(u.readonly||V.value||y.value)return;const e=Number(S.value)||0,r=U(e,-1);_(r),d(c.INPUT_EVENT,i.currentValue),C()},k=(e,r)=>{const{max:t,min:a,step:s,precision:N,stepStrictly:I,valueOnClear:T}=u;t<a&&c.throwError("InputNumber","min should not be greater than max.");let m=Number(e);if(l.isNil(e)||Number.isNaN(m))return null;if(e===""){if(T===null)return null;m=l.isString(T)?{min:a,max:t}[T]:T}return I&&(m=A(Math.round(m/s)*s,N),m!==e&&r&&d(c.UPDATE_MODEL_EVENT,m)),l.isUndefined(N)||(m=A(m,N)),(m>t||m<a)&&(m=m>t?t:a,r&&d(c.UPDATE_MODEL_EVENT,m)),m},_=(e,r=!0)=>{var t;const a=i.currentValue,s=k(e);if(!r){d(c.UPDATE_MODEL_EVENT,s);return}a===s&&e||(i.userInput=null,d(c.UPDATE_MODEL_EVENT,s),a!==s&&d(c.CHANGE_EVENT,s,a),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"change").catch(N=>c.debugWarn())),i.currentValue=s)},$=e=>{i.userInput=e;const r=e===""?null:Number(e);d(c.INPUT_EVENT,r),_(r,!1)},z=e=>{const r=e!==""?Number(e):"";(l.isNumber(r)&&!Number.isNaN(r)||e==="")&&_(r),C(),i.userInput=null},R=()=>{var e,r;(r=(e=p.value)==null?void 0:e.focus)==null||r.call(e)},K=()=>{var e,r;(r=(e=p.value)==null?void 0:e.blur)==null||r.call(e)},q=e=>{d("focus",e)},G=e=>{var r,t;i.userInput=null,i.currentValue===null&&((r=p.value)!=null&&r.input)&&(p.value.input.value=""),d("blur",e),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"blur").catch(a=>c.debugWarn()))},C=()=>{i.currentValue!==u.modelValue&&(i.currentValue=u.modelValue)},H=e=>{document.activeElement===e.target&&e.preventDefault()};return n.watch(()=>u.modelValue,(e,r)=>{const t=k(e,!0);i.userInput===null&&t!==r&&(i.currentValue=t)},{immediate:!0}),n.watch(()=>u.precision,()=>{i.currentValue=k(u.modelValue)}),n.onMounted(()=>{var e;const{min:r,max:t,modelValue:a}=u,s=(e=p.value)==null?void 0:e.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(t)?s.setAttribute("aria-valuemax",String(t)):s.removeAttribute("aria-valuemax"),Number.isFinite(r)?s.setAttribute("aria-valuemin",String(r)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),s.setAttribute("aria-disabled",String(V.value)),!l.isNumber(a)&&a!=null){let N=Number(a);Number.isNaN(N)&&(N=null),d(c.UPDATE_MODEL_EVENT,N)}s.addEventListener("wheel",H,{passive:!1})}),n.onUpdated(()=>{var e,r;const t=(e=p.value)==null?void 0:e.input;t==null||t.setAttribute("aria-valuenow",`${(r=i.currentValue)!=null?r:""}`)}),v({focus:R,blur:K}),(e,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([n.unref(f).b(),n.unref(f).m(n.unref(F)),n.unref(f).is("disabled",n.unref(V)),n.unref(f).is("without-controls",!e.controls),n.unref(f).is("controls-right",n.unref(w)),n.unref(f).is(e.align,!!e.align)]),onDragstart:n.withModifiers(()=>{},["prevent"])},[e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:0,role:"button","aria-label":n.unref(h)("el.inputNumber.decrease"),class:n.normalizeClass([n.unref(f).e("decrease"),n.unref(f).is("disabled",n.unref(y))]),onKeydown:n.withKeys(D,["enter"])},[n.renderSlot(e.$slots,"decrease-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_down_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),D]]):n.createCommentVNode("v-if",!0),e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:1,role:"button","aria-label":n.unref(h)("el.inputNumber.increase"),class:n.normalizeClass([n.unref(f).e("increase"),n.unref(f).is("disabled",n.unref(B))]),onKeydown:n.withKeys(P,["enter"])},[n.renderSlot(e.$slots,"increase-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_up_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),P]]):n.createCommentVNode("v-if",!0),n.createVNode(n.unref(W.ElInput),{id:e.id,ref_key:"input",ref:p,type:"number",step:e.step,"model-value":n.unref(S),placeholder:e.placeholder,readonly:e.readonly,disabled:n.unref(V),size:n.unref(F),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,inputmode:e.inputmode,onKeydown:O,onBlur:G,onFocus:q,onInput:$,onChange:z},n.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix")])}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],42,["onDragstart"]))}});var ne=l._export_sfc(ee,[["__file","input-number.vue"]]);const re=l.withInstall(ne);exports.ElInputNumber=re;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as te, ref as pe, reactive as fe, computed as h, watch as W, onMounted as be, onUpdated as ve, openBlock as v, createElementBlock as
|
|
2
|
-
import { E as Ve } from "./el-input-
|
|
3
|
-
import { E as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as Ce, C as re, I as D, U as N,
|
|
7
|
-
import { u as Be } from "./index-
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as te, ref as pe, reactive as fe, computed as h, watch as W, onMounted as be, onUpdated as ve, openBlock as v, createElementBlock as $, normalizeClass as z, unref as l, withModifiers as Ne, withDirectives as X, withKeys as Y, renderSlot as A, createVNode as K, withCtx as P, createBlock as F, createCommentVNode as j, createSlots as Ee } from "vue";
|
|
2
|
+
import { E as Ve } from "./el-input-2f75c4ba.js";
|
|
3
|
+
import { E as q, f as he, t as ye, v as Ie, p as ge } from "./index-a871c3eb.js";
|
|
4
|
+
import { x as J, b as we, p as b, e as Q, g as y, u as _e, i as T, _ as Se, c as Ae, w as Pe } from "./base-a5af3db3.js";
|
|
5
|
+
import { h as Fe, d as Te, e as De, g as ke } from "./use-form-common-props-815d48a6.js";
|
|
6
|
+
import { u as Ce, C as re, I as D, U as N, b as Me, d as Z, a as ee } from "./el-popper-b4f97157.js";
|
|
7
|
+
import { u as Be } from "./index-d77a7336.js";
|
|
8
|
+
const xe = 100, Le = 600, ne = {
|
|
9
9
|
beforeMount(u, E) {
|
|
10
|
-
const s = E.value, { interval: r =
|
|
10
|
+
const s = E.value, { interval: r = xe, delay: I = Le } = J(s) ? {} : s;
|
|
11
11
|
let d, m;
|
|
12
12
|
const a = () => J(s) ? s() : s.handler(), p = () => {
|
|
13
13
|
m && (clearTimeout(m), m = void 0), d && (clearInterval(d), d = void 0);
|
|
@@ -22,7 +22,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
22
22
|
}, I));
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, Re = we({
|
|
26
26
|
id: {
|
|
27
27
|
type: String,
|
|
28
28
|
default: void 0
|
|
@@ -80,7 +80,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
80
80
|
default: "center"
|
|
81
81
|
},
|
|
82
82
|
disabledScientific: Boolean
|
|
83
|
-
}),
|
|
83
|
+
}), $e = {
|
|
84
84
|
[re]: (u, E) => E !== u,
|
|
85
85
|
blur: (u) => u instanceof FocusEvent,
|
|
86
86
|
focus: (u) => u instanceof FocusEvent,
|
|
@@ -90,8 +90,8 @@ const Le = 100, Re = 600, ne = {
|
|
|
90
90
|
name: "ElInputNumber"
|
|
91
91
|
}), Ke = /* @__PURE__ */ te({
|
|
92
92
|
...ze,
|
|
93
|
-
props:
|
|
94
|
-
emits:
|
|
93
|
+
props: Re,
|
|
94
|
+
emits: $e,
|
|
95
95
|
setup(u, { expose: E, emit: s }) {
|
|
96
96
|
const r = u, { t: I } = Be(), d = _e("input-number"), m = pe(), a = fe({
|
|
97
97
|
currentValue: r.modelValue,
|
|
@@ -138,7 +138,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
138
138
|
t.preventDefault(), B();
|
|
139
139
|
},
|
|
140
140
|
[ee.down]: () => {
|
|
141
|
-
t.preventDefault(),
|
|
141
|
+
t.preventDefault(), x();
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
(n = i[t.key]) == null || n.call(i);
|
|
@@ -146,13 +146,13 @@ const Le = 100, Re = 600, ne = {
|
|
|
146
146
|
if (r.readonly || V.value || O.value)
|
|
147
147
|
return;
|
|
148
148
|
const e = Number(C.value) || 0, n = H(e);
|
|
149
|
-
w(n), s(D, a.currentValue),
|
|
150
|
-
},
|
|
149
|
+
w(n), s(D, a.currentValue), R();
|
|
150
|
+
}, x = () => {
|
|
151
151
|
if (r.readonly || V.value || g.value)
|
|
152
152
|
return;
|
|
153
153
|
const e = Number(C.value) || 0, n = H(e, -1);
|
|
154
|
-
w(n), s(D, a.currentValue),
|
|
155
|
-
},
|
|
154
|
+
w(n), s(D, a.currentValue), R();
|
|
155
|
+
}, L = (e, n) => {
|
|
156
156
|
const { max: t, min: i, step: o, precision: f, stepStrictly: _, valueOnClear: S } = r;
|
|
157
157
|
t < i && Me("InputNumber", "min should not be greater than max.");
|
|
158
158
|
let c = Number(e);
|
|
@@ -166,7 +166,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
166
166
|
return _ && (c = M(Math.round(c / o) * o, f), c !== e && n && s(N, c)), T(f) || (c = M(c, f)), (c > t || c < i) && (c = c > t ? t : i, n && s(N, c)), c;
|
|
167
167
|
}, w = (e, n = !0) => {
|
|
168
168
|
var t;
|
|
169
|
-
const i = a.currentValue, o =
|
|
169
|
+
const i = a.currentValue, o = L(e);
|
|
170
170
|
if (!n) {
|
|
171
171
|
s(N, o);
|
|
172
172
|
return;
|
|
@@ -178,7 +178,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
178
178
|
s(D, n), w(n, !1);
|
|
179
179
|
}, ie = (e) => {
|
|
180
180
|
const n = e !== "" ? Number(e) : "";
|
|
181
|
-
(b(n) && !Number.isNaN(n) || e === "") && w(n),
|
|
181
|
+
(b(n) && !Number.isNaN(n) || e === "") && w(n), R(), a.userInput = null;
|
|
182
182
|
}, oe = () => {
|
|
183
183
|
var e, n;
|
|
184
184
|
(n = (e = m.value) == null ? void 0 : e.focus) == null || n.call(e);
|
|
@@ -190,16 +190,16 @@ const Le = 100, Re = 600, ne = {
|
|
|
190
190
|
}, ce = (e) => {
|
|
191
191
|
var n, t;
|
|
192
192
|
a.userInput = null, a.currentValue === null && ((n = m.value) != null && n.input) && (m.value.input.value = ""), s("blur", e), r.validateEvent && ((t = p == null ? void 0 : p.validate) == null || t.call(p, "blur").catch((i) => Z()));
|
|
193
|
-
},
|
|
193
|
+
}, R = () => {
|
|
194
194
|
a.currentValue !== r.modelValue && (a.currentValue = r.modelValue);
|
|
195
195
|
}, me = (e) => {
|
|
196
196
|
document.activeElement === e.target && e.preventDefault();
|
|
197
197
|
};
|
|
198
198
|
return W(() => r.modelValue, (e, n) => {
|
|
199
|
-
const t =
|
|
199
|
+
const t = L(e, !0);
|
|
200
200
|
a.userInput === null && t !== n && (a.currentValue = t);
|
|
201
201
|
}, { immediate: !0 }), W(() => r.precision, () => {
|
|
202
|
-
a.currentValue =
|
|
202
|
+
a.currentValue = L(r.modelValue);
|
|
203
203
|
}), be(() => {
|
|
204
204
|
var e;
|
|
205
205
|
const { min: n, max: t, modelValue: i } = r, o = (e = m.value) == null ? void 0 : e.input;
|
|
@@ -215,7 +215,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
215
215
|
}), E({
|
|
216
216
|
focus: oe,
|
|
217
217
|
blur: se
|
|
218
|
-
}), (e, n) => (v(),
|
|
218
|
+
}), (e, n) => (v(), $("div", {
|
|
219
219
|
class: z([
|
|
220
220
|
l(d).b(),
|
|
221
221
|
l(d).m(l(G)),
|
|
@@ -227,15 +227,15 @@ const Le = 100, Re = 600, ne = {
|
|
|
227
227
|
onDragstart: Ne(() => {
|
|
228
228
|
}, ["prevent"])
|
|
229
229
|
}, [
|
|
230
|
-
e.controls ? X((v(),
|
|
230
|
+
e.controls ? X((v(), $("span", {
|
|
231
231
|
key: 0,
|
|
232
232
|
role: "button",
|
|
233
233
|
"aria-label": l(I)("el.inputNumber.decrease"),
|
|
234
234
|
class: z([l(d).e("decrease"), l(d).is("disabled", l(g))]),
|
|
235
|
-
onKeydown:
|
|
235
|
+
onKeydown: Y(x, ["enter"])
|
|
236
236
|
}, [
|
|
237
237
|
A(e.$slots, "decrease-icon", {}, () => [
|
|
238
|
-
K(l(
|
|
238
|
+
K(l(q), null, {
|
|
239
239
|
default: P(() => [
|
|
240
240
|
l(k) ? (v(), F(l(he), { key: 0 })) : (v(), F(l(ye), { key: 1 }))
|
|
241
241
|
]),
|
|
@@ -243,17 +243,17 @@ const Le = 100, Re = 600, ne = {
|
|
|
243
243
|
})
|
|
244
244
|
])
|
|
245
245
|
], 42, ["aria-label", "onKeydown"])), [
|
|
246
|
-
[l(ne),
|
|
247
|
-
]) :
|
|
248
|
-
e.controls ? X((v(),
|
|
246
|
+
[l(ne), x]
|
|
247
|
+
]) : j("v-if", !0),
|
|
248
|
+
e.controls ? X((v(), $("span", {
|
|
249
249
|
key: 1,
|
|
250
250
|
role: "button",
|
|
251
251
|
"aria-label": l(I)("el.inputNumber.increase"),
|
|
252
252
|
class: z([l(d).e("increase"), l(d).is("disabled", l(O))]),
|
|
253
|
-
onKeydown:
|
|
253
|
+
onKeydown: Y(B, ["enter"])
|
|
254
254
|
}, [
|
|
255
255
|
A(e.$slots, "increase-icon", {}, () => [
|
|
256
|
-
K(l(
|
|
256
|
+
K(l(q), null, {
|
|
257
257
|
default: P(() => [
|
|
258
258
|
l(k) ? (v(), F(l(Ie), { key: 0 })) : (v(), F(l(ge), { key: 1 }))
|
|
259
259
|
]),
|
|
@@ -262,7 +262,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
262
262
|
])
|
|
263
263
|
], 42, ["aria-label", "onKeydown"])), [
|
|
264
264
|
[l(ne), B]
|
|
265
|
-
]) :
|
|
265
|
+
]) : j("v-if", !0),
|
|
266
266
|
K(l(Ve), {
|
|
267
267
|
id: e.id,
|
|
268
268
|
ref_key: "input",
|
|
@@ -305,7 +305,7 @@ const Le = 100, Re = 600, ne = {
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
var Oe = /* @__PURE__ */ Se(Ke, [["__file", "input-number.vue"]]);
|
|
308
|
-
const
|
|
308
|
+
const qe = Pe(Oe);
|
|
309
309
|
export {
|
|
310
|
-
|
|
310
|
+
qe as E
|
|
311
311
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),I=require("./use-global-config-
|
|
1
|
+
"use strict";const a=require("vue"),I=require("./use-global-config-30d7d8ce.cjs"),i=require("./base-ef747d02.cjs");function T(e,t){let n;const s=a.ref(!1),l=a.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(o){l.text=o}function d(){const o=l.parent,v=f.ns;if(!o.vLoadingAddClassList){let u=o.getAttribute("loading-number");u=Number.parseInt(u)-1,u?o.setAttribute("loading-number",u.toString()):(i.removeClass(o,v.bm("parent","relative")),o.removeAttribute("loading-number")),i.removeClass(o,v.bm("parent","hidden"))}g(),b.unmount()}function g(){var o,v;(v=(o=f.$el)==null?void 0:o.parentNode)==null||v.removeChild(f.$el)}function C(){var o;e.beforeClose&&!e.beforeClose()||(s.value=!0,clearTimeout(n),n=setTimeout(c,400),l.visible=!1,(o=e.closed)==null||o.call(e))}function c(){if(!s.value)return;const o=l.parent;s.value=!1,o.vLoadingAddClassList=void 0,d()}const p=a.defineComponent({name:"ElLoading",setup(o,{expose:v}){const{ns:u,zIndex:w}=I.useGlobalComponentSettings("loading");return v({ns:u,zIndex:w}),()=>{const h=l.spinner||l.svg,S=a.h("svg",{class:"circular",viewBox:l.svgViewBox?l.svgViewBox:"0 0 50 50",...h?{innerHTML:h}:{}},[a.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),B=l.text?a.h("p",{class:u.b("text")},[l.text]):void 0;return a.h(a.Transition,{name:u.b("fade"),onAfterLeave:c},{default:a.withCtx(()=>[a.withDirectives(a.createVNode("div",{style:{backgroundColor:l.background||""},class:[u.b("mask"),l.customClass,l.fullscreen?"is-fullscreen":""]},[a.h("div",{class:u.b("spinner")},[S,B])]),[[a.vShow,l.visible]])])})}}}),b=a.createApp(p);Object.assign(b._context,t??{});const f=b.mount(document.createElement("div"));return{...a.toRefs(l),setText:r,removeElLoadingChild:g,close:C,handleAfterLeave:c,vm:f,get $el(){return f.$el}}}let y;const _=function(e={}){if(!i.isClient)return;const t=$(e);if(t.fullscreen&&y)return y;const n=T({...t,closed:()=>{var l;(l=t.closed)==null||l.call(t),t.fullscreen&&(y=void 0)}},_._context);N(t,t.parent,n),k(t,t.parent,n),t.parent.vLoadingAddClassList=()=>k(t,t.parent,n);let s=t.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",t.parent.setAttribute("loading-number",s),t.parent.appendChild(n.$el),a.nextTick(()=>n.visible.value=t.visible),t.fullscreen&&(y=n),n},$=e=>{var t,n,s,l;let r;return i.isString(e.target)?r=(t=document.querySelector(e.target))!=null?t:document.body:r=e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(s=e.lock)!=null?s:!1,customClass:e.customClass||"",visible:(l=e.visible)!=null?l:!0,beforeClose:e.beforeClose,closed:e.closed,target:r}},N=async(e,t,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=i.getStyle(document.body,"position"),n.originalOverflow.value=i.getStyle(document.body,"overflow"),l.zIndex=s();else if(e.parent===document.body){n.originalPosition.value=i.getStyle(document.body,"position"),await a.nextTick();for(const r of["top","left"]){const d=r==="top"?"scrollTop":"scrollLeft";l[r]=`${e.target.getBoundingClientRect()[r]+document.body[d]+document.documentElement[d]-Number.parseInt(i.getStyle(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])l[r]=`${e.target.getBoundingClientRect()[r]}px`}else n.originalPosition.value=i.getStyle(t,"position");for(const[r,d]of Object.entries(l))n.$el.style[r]=d},k=(e,t,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?i.removeClass(t,s.bm("parent","relative")):i.addClass(t,s.bm("parent","relative")),e.fullscreen&&e.lock?i.addClass(t,s.bm("parent","hidden")):i.removeClass(t,s.bm("parent","hidden"))};_._context=null;const x=Symbol("ElLoading"),m=e=>`element-loading-${i.hyphenate(e)}`,A=(e,t)=>{var n,s,l,r;const d=t.instance,g=o=>i.isObject(t.value)?t.value[o]:void 0,C=o=>{const v=i.isString(o)&&(d==null?void 0:d[o])||o;return a.ref(v)},c=o=>C(g(o)||e.getAttribute(m(o))),p=(n=g("fullscreen"))!=null?n:t.modifiers.fullscreen,b={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:p,target:(s=g("target"))!=null?s:p?void 0:e,body:(l=g("body"))!=null?l:t.modifiers.body,lock:(r=g("lock"))!=null?r:t.modifiers.lock},f=_(b);f._context=L._context,e[x]={options:b,instance:f}},V=(e,t)=>{for(const n of Object.keys(e))a.isRef(e[n])&&(e[n].value=t[n])},L={mounted(e,t){t.value&&A(e,t)},updated(e,t){const n=e[x];if(!t.value){n==null||n.instance.close(),e[x]=null;return}n?V(n.options,i.isObject(t.value)?t.value:{text:e.getAttribute(m("text")),svg:e.getAttribute(m("svg")),svgViewBox:e.getAttribute(m("svgViewBox")),spinner:e.getAttribute(m("spinner")),background:e.getAttribute(m("background")),customClass:e.getAttribute(m("customClass"))}):A(e,t)},unmounted(e){var t;(t=e[x])==null||t.instance.close(),e[x]=null}};L._context=null;exports.vLoading=L;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as B, reactive as P, defineComponent as O, h as m, Transition as j, withCtx as z, withDirectives as R, createVNode as q, vShow as D, createApp as F, toRefs as G, nextTick as I, isRef as H } from "vue";
|
|
2
|
-
import { u as K } from "./use-global-config-
|
|
3
|
-
import { r as C,
|
|
2
|
+
import { u as K } from "./use-global-config-b5e9d3d5.js";
|
|
3
|
+
import { r as C, s as M, c as S, t as b, a as k, f as $, v as Y } from "./base-a5af3db3.js";
|
|
4
4
|
function Z(e, t) {
|
|
5
5
|
let n;
|
|
6
6
|
const s = B(!1), o = P({
|
|
@@ -42,10 +42,10 @@ function Z(e, t) {
|
|
|
42
42
|
ns: i,
|
|
43
43
|
zIndex: T
|
|
44
44
|
}), () => {
|
|
45
|
-
const
|
|
45
|
+
const A = o.spinner || o.svg, V = m("svg", {
|
|
46
46
|
class: "circular",
|
|
47
47
|
viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
|
|
48
|
-
...
|
|
48
|
+
...A ? { innerHTML: A } : {}
|
|
49
49
|
}, [
|
|
50
50
|
m("circle", {
|
|
51
51
|
class: "path",
|
|
@@ -146,7 +146,7 @@ const L = function(e = {}) {
|
|
|
146
146
|
n.$el.style[r] = c;
|
|
147
147
|
}, h = (e, t, n) => {
|
|
148
148
|
const s = n.vm.ns || n.vm._.exposed.ns;
|
|
149
|
-
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? C(t, s.bm("parent", "relative")) :
|
|
149
|
+
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? C(t, s.bm("parent", "relative")) : k(t, s.bm("parent", "relative")), e.fullscreen && e.lock ? k(t, s.bm("parent", "hidden")) : C(t, s.bm("parent", "hidden"));
|
|
150
150
|
};
|
|
151
151
|
L._context = null;
|
|
152
152
|
const x = Symbol("ElLoading"), f = (e) => `element-loading-${Y(e)}`, w = (e, t) => {
|