st-comp 0.0.262 → 0.0.263
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.js +4 -4
- package/es/CustomFunction.js +31 -31
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +37 -36
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +839 -1593
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +1198 -1
- package/es/KlineConfig.js +89 -89
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.js +20 -20
- package/es/MonacoEditor.js +25 -25
- package/es/Pagination.js +113 -113
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.js +29 -29
- package/es/User.js +25 -25
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +27 -27
- package/es/VarietyAiHelper.js +27 -27
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +55 -54
- package/es/{VarietySelect-faef4799.js → VarietySelect-9f267958.js} +4 -4
- package/es/VarietyTextCopy.js +13 -13
- package/es/VirtualTable.js +74 -74
- package/es/{_initCloneObject-009eedf8.js → _initCloneObject-69c8ae23.js} +7 -7
- package/es/{base-7ff209fc.js → base-29f73b05.js} +40 -40
- package/es/{castArray-b9f1609f.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-071b8bec.js → config-provider-7860903c.js} +6 -6
- package/es/{debounce-23c2f7e1.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-9941f401.js → dropdown-497442b7.js} +4 -4
- package/es/{el-autocomplete-43f205b0.js → el-autocomplete-27c60cc8.js} +17 -17
- package/es/{el-button-7f58608d.js → el-button-e2c63c08.js} +33 -33
- package/es/{el-checkbox-40664b27.js → el-checkbox-71ebd862.js} +17 -17
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-2f10a2f4.js → el-dialog-eedcfd3e.js} +15 -15
- package/es/{el-divider-4e66c835.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-e0d826de.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-2b68cdf5.js → el-form-item-bdcfd297.js} +36 -36
- package/es/{el-input-31a818d4.js → el-input-d47281da.js} +36 -36
- package/es/{el-checkbox-group-f775e73f.cjs → el-input-number-3d94fa58.cjs} +1 -1
- package/es/{el-checkbox-group-3ddad0d7.js → el-input-number-c8018cb1.js} +34 -34
- package/es/{el-loading-3e350f5e.js → el-loading-0cd81d05.js} +5 -5
- package/es/el-menu-item-26071fd6.cjs +1 -0
- package/es/el-menu-item-dac65bb3.js +769 -0
- package/es/{el-message-box-a3aa9b89.js → el-message-box-fea4fca8.js} +11 -11
- package/es/{el-overlay-4e9a99e0.js → el-overlay-1ee0338d.js} +59 -59
- package/es/{el-popconfirm-c2896741.js → el-popconfirm-089b8bec.js} +12 -12
- package/es/{el-popper-003b3af7.js → el-popper-c9b3d3cf.js} +177 -177
- package/es/{el-segmented-4ae54e6a.js → el-segmented-9d3a9e11.js} +8 -8
- package/es/{el-select-19ee0e79.js → el-select-e51e11c1.js} +65 -65
- package/es/{el-table-column-3be856d7.js → el-table-column-05d292a8.js} +16 -16
- package/es/{el-tag-19cc5b59.js → el-tag-17cd04a1.js} +14 -14
- package/es/{el-text-9a7a4f0f.js → el-text-2710fff3.js} +2 -2
- package/es/{index-6917da9d.js → index-0ee486ad.js} +43 -43
- package/es/{index-19ac550e.js → index-0f79095c.js} +49 -49
- package/es/{index-308aab33.js → index-1d9b50de.js} +34 -34
- package/es/{index-d898531c.js → index-8391a3df.js} +37 -37
- package/es/{index-41dd5a1c.js → index-8a54ceeb.js} +10 -10
- package/es/{index-b56d81e8.js → index-95e5d454.js} +3 -3
- package/es/{index-f3799536.js → index-b0117ba2.js} +2 -2
- package/es/{index-6d530e54.js → index-bcd895a0.js} +13 -13
- package/es/{index-e17987ac.js → index-c2b9bbfd.js} +30 -30
- package/es/{index-808db9b4.js → index-c71e37dc.js} +11 -11
- package/es/{index-f402d1da.js → index-de24705f.js} +1 -1
- package/es/{index-99abf4ff.js → index-f30561d3.js} +17 -17
- package/es/{python-be79c7c1.js → python-99011a53.js} +25 -25
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-8642151c.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-d170ccfd.js → use-form-common-props-cb0ca65c.js} +72 -72
- package/es/{use-global-config-74436b92.js → use-global-config-cdaeca54.js} +14 -14
- package/es/{validator-672bad4a.js → validator-4ab9774f.js} +1 -1
- package/es/{vnode-6d2615f0.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-ed10eeb1.js → zh-cn-8a6390a4.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-c3ddbee7.js → index-0969ca9d.js} +784 -783
- package/lib/{python-da8fd227.js → python-506107bf.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/index.vue +1 -1
- package/es/raf-ba3dfafe.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as B, computed as E, defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { b as je,
|
|
4
|
-
import { c as be } from "./castArray-
|
|
5
|
-
import { d as Wt,
|
|
6
|
-
import { S as Be,
|
|
7
|
-
import { g as ge } from "./use-global-config-
|
|
8
|
-
import { k as lt, g as ut, s as Gt,
|
|
9
|
-
import { c as le, k as Te, g as
|
|
1
|
+
import { ref as B, computed as E, defineComponent as H, reactive as ve, watch as ne, provide as Qe, toRefs as Xe, openBlock as ye, createElementBlock as ke, normalizeClass as K, unref as q, renderSlot as ee, inject as ie, onMounted as et, onBeforeUnmount as tt, onUpdated as Et, createVNode as ae, Fragment as St, nextTick as rt, useSlots as Tt, withCtx as pe, createBlock as _t, resolveDynamicComponent as Pt, normalizeStyle as Ie, createTextVNode as $t, toDisplayString as Me, createCommentVNode as Ne, createElementVNode as Re, TransitionGroup as It } from "vue";
|
|
2
|
+
import { q as Mt, r as Nt, k as nt, e as it, s as qe, t as he, u as Rt } from "./use-form-common-props-cb0ca65c.js";
|
|
3
|
+
import { b as je, e as oe, j as se, c as Le, o as at, u as Ee, _ as ot, x as st, B as Lt, n as Ve, w as Vt, l as Bt } from "./base-29f73b05.js";
|
|
4
|
+
import { c as be } from "./castArray-609a313e.js";
|
|
5
|
+
import { d as Wt, a as Ct } from "./index-0f79095c.js";
|
|
6
|
+
import { S as Be, a as ft, i as Dt, c as Ut, u as zt } from "./index-8391a3df.js";
|
|
7
|
+
import { g as ge } from "./use-global-config-cdaeca54.js";
|
|
8
|
+
import { k as lt, g as ut, s as Gt, d as Kt, e as Se, n as fe, f as dt, b as Yt, S as Jt, h as Zt } from "./index-0ee486ad.js";
|
|
9
|
+
import { c as le, k as Te, g as Ht, e as ct, d as Qt, a as Xt, b as kt, i as er } from "./_initCloneObject-69c8ae23.js";
|
|
10
10
|
function tr(r, e) {
|
|
11
11
|
for (var t = -1, n = r == null ? 0 : r.length; ++t < n && e(r[t], t, r) !== !1; )
|
|
12
12
|
;
|
|
@@ -23,7 +23,7 @@ function ir(r, e) {
|
|
|
23
23
|
}
|
|
24
24
|
var ar = Object.getOwnPropertySymbols, or = ar ? function(r) {
|
|
25
25
|
for (var e = []; r; )
|
|
26
|
-
Mt(e, ut(r)), r =
|
|
26
|
+
Mt(e, ut(r)), r = Ht(r);
|
|
27
27
|
return e;
|
|
28
28
|
} : Gt;
|
|
29
29
|
const pt = or;
|
|
@@ -71,7 +71,7 @@ function Nr(r, e, t) {
|
|
|
71
71
|
case $r:
|
|
72
72
|
case Ir:
|
|
73
73
|
case Mr:
|
|
74
|
-
return
|
|
74
|
+
return Qt(r, t);
|
|
75
75
|
case hr:
|
|
76
76
|
return new n();
|
|
77
77
|
case br:
|
|
@@ -97,9 +97,9 @@ function Cr(r) {
|
|
|
97
97
|
}
|
|
98
98
|
var Ue = fe && fe.isSet, Dr = Ue ? dt(Ue) : Cr;
|
|
99
99
|
const Ur = Dr;
|
|
100
|
-
var zr = 1, Gr = 2, Kr = 4, gt = "[object Arguments]", Yr = "[object Array]", Jr = "[object Boolean]", Zr = "[object Date]",
|
|
100
|
+
var zr = 1, Gr = 2, Kr = 4, gt = "[object Arguments]", Yr = "[object Array]", Jr = "[object Boolean]", Zr = "[object Date]", Hr = "[object Error]", mt = "[object Function]", Qr = "[object GeneratorFunction]", Xr = "[object Map]", kr = "[object Number]", vt = "[object Object]", en = "[object RegExp]", tn = "[object Set]", rn = "[object String]", nn = "[object Symbol]", an = "[object WeakMap]", on = "[object ArrayBuffer]", sn = "[object DataView]", fn = "[object Float32Array]", ln = "[object Float64Array]", un = "[object Int8Array]", dn = "[object Int16Array]", cn = "[object Int32Array]", pn = "[object Uint8Array]", gn = "[object Uint8ClampedArray]", mn = "[object Uint16Array]", vn = "[object Uint32Array]", A = {};
|
|
101
101
|
A[gt] = A[Yr] = A[on] = A[sn] = A[Jr] = A[Zr] = A[fn] = A[ln] = A[un] = A[dn] = A[cn] = A[Xr] = A[kr] = A[vt] = A[en] = A[tn] = A[rn] = A[nn] = A[pn] = A[gn] = A[mn] = A[vn] = !0;
|
|
102
|
-
A[
|
|
102
|
+
A[Hr] = A[mt] = A[an] = !1;
|
|
103
103
|
function te(r, e, t, n, i, a) {
|
|
104
104
|
var o, s = e & zr, l = e & Gr, w = e & Kr;
|
|
105
105
|
if (t && (o = i ? t(r, n, i, a) : t(r)), o !== void 0)
|
|
@@ -111,7 +111,7 @@ function te(r, e, t, n, i, a) {
|
|
|
111
111
|
if (o = dr(r), !s)
|
|
112
112
|
return Xt(r, o);
|
|
113
113
|
} else {
|
|
114
|
-
var m = Se(r), b = m == mt || m ==
|
|
114
|
+
var m = Se(r), b = m == mt || m == Qr;
|
|
115
115
|
if (Yt(r))
|
|
116
116
|
return kt(r, s);
|
|
117
117
|
if (m == vt || m == gt || b && !i) {
|
|
@@ -222,9 +222,9 @@ function Fn() {
|
|
|
222
222
|
const X = (r, e) => {
|
|
223
223
|
const t = be(e).map((n) => se(n) ? n.join(".") : n);
|
|
224
224
|
return t.length > 0 ? r.filter((n) => n.propString && t.includes(n.propString)) : r;
|
|
225
|
-
}, xn = "ElForm", An =
|
|
225
|
+
}, xn = "ElForm", An = H({
|
|
226
226
|
name: xn
|
|
227
|
-
}), On = /* @__PURE__ */
|
|
227
|
+
}), On = /* @__PURE__ */ H({
|
|
228
228
|
...An,
|
|
229
229
|
props: bn,
|
|
230
230
|
emits: wn,
|
|
@@ -291,7 +291,7 @@ const X = (r, e) => {
|
|
|
291
291
|
};
|
|
292
292
|
return ne(() => n.rules, () => {
|
|
293
293
|
n.validateOnRuleChange && g().catch((u) => Wt());
|
|
294
|
-
}, { deep: !0, flush: "post" }),
|
|
294
|
+
}, { deep: !0, flush: "post" }), Qe(qe, ve({
|
|
295
295
|
...Xe(n),
|
|
296
296
|
emit: t,
|
|
297
297
|
resetFields: b,
|
|
@@ -708,7 +708,7 @@ var ht = function(e, t, n, i, a, o) {
|
|
|
708
708
|
h.required(e, t, i, o, a, "array"), t != null && (h.type(e, t, i, o, a), h.range(e, t, i, o, a));
|
|
709
709
|
}
|
|
710
710
|
n(o);
|
|
711
|
-
},
|
|
711
|
+
}, Hn = function(e, t, n, i, a) {
|
|
712
712
|
var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
|
|
713
713
|
if (s) {
|
|
714
714
|
if (T(t) && !e.required)
|
|
@@ -716,12 +716,12 @@ var ht = function(e, t, n, i, a, o) {
|
|
|
716
716
|
h.required(e, t, i, o, a), t !== void 0 && h.type(e, t, i, o, a);
|
|
717
717
|
}
|
|
718
718
|
n(o);
|
|
719
|
-
},
|
|
719
|
+
}, Qn = "enum", Xn = function(e, t, n, i, a) {
|
|
720
720
|
var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
|
|
721
721
|
if (s) {
|
|
722
722
|
if (T(t) && !e.required)
|
|
723
723
|
return n();
|
|
724
|
-
h.required(e, t, i, o, a), t !== void 0 && h[
|
|
724
|
+
h.required(e, t, i, o, a), t !== void 0 && h[Qn](e, t, i, o, a);
|
|
725
725
|
}
|
|
726
726
|
n(o);
|
|
727
727
|
}, kn = function(e, t, n, i, a) {
|
|
@@ -771,7 +771,7 @@ var ht = function(e, t, n, i, a, o) {
|
|
|
771
771
|
integer: Yn,
|
|
772
772
|
float: Jn,
|
|
773
773
|
array: Zn,
|
|
774
|
-
object:
|
|
774
|
+
object: Hn,
|
|
775
775
|
enum: Xn,
|
|
776
776
|
pattern: kn,
|
|
777
777
|
date: ei,
|
|
@@ -834,7 +834,7 @@ function Ae() {
|
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
var Oe = Ae(),
|
|
837
|
+
var Oe = Ae(), Q = /* @__PURE__ */ function() {
|
|
838
838
|
function r(t) {
|
|
839
839
|
this.rules = null, this._messages = Oe, this.define(t);
|
|
840
840
|
}
|
|
@@ -961,14 +961,14 @@ var Oe = Ae(), H = /* @__PURE__ */ function() {
|
|
|
961
961
|
return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? J.required : J[this.getType(n)] || void 0;
|
|
962
962
|
}, r;
|
|
963
963
|
}();
|
|
964
|
-
|
|
964
|
+
Q.register = function(e, t) {
|
|
965
965
|
if (typeof t != "function")
|
|
966
966
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
967
967
|
J[e] = t;
|
|
968
968
|
};
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
969
|
+
Q.warning = yt;
|
|
970
|
+
Q.messages = Oe;
|
|
971
|
+
Q.validators = J;
|
|
972
972
|
const ni = [
|
|
973
973
|
"",
|
|
974
974
|
"error",
|
|
@@ -1013,9 +1013,9 @@ const ni = [
|
|
|
1013
1013
|
type: String,
|
|
1014
1014
|
values: nt
|
|
1015
1015
|
}
|
|
1016
|
-
}),
|
|
1017
|
-
var ai =
|
|
1018
|
-
name:
|
|
1016
|
+
}), He = "ElLabelWrap";
|
|
1017
|
+
var ai = H({
|
|
1018
|
+
name: He,
|
|
1019
1019
|
props: {
|
|
1020
1020
|
isAutoWidth: Boolean,
|
|
1021
1021
|
updateAll: Boolean
|
|
@@ -1024,7 +1024,7 @@ var ai = Q({
|
|
|
1024
1024
|
slots: e
|
|
1025
1025
|
}) {
|
|
1026
1026
|
const t = ie(qe, void 0), n = ie(he);
|
|
1027
|
-
n || Ct(
|
|
1027
|
+
n || Ct(He, "usage: <el-form-item><label-wrap /></el-form-item>");
|
|
1028
1028
|
const i = Ee("form"), a = B(), o = B(0), s = () => {
|
|
1029
1029
|
var p;
|
|
1030
1030
|
if ((p = a.value) != null && p.firstElementChild) {
|
|
@@ -1071,9 +1071,9 @@ var ai = Q({
|
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
|
-
const oi =
|
|
1074
|
+
const oi = H({
|
|
1075
1075
|
name: "ElFormItem"
|
|
1076
|
-
}), si = /* @__PURE__ */
|
|
1076
|
+
}), si = /* @__PURE__ */ H({
|
|
1077
1077
|
...oi,
|
|
1078
1078
|
props: ii,
|
|
1079
1079
|
setup(r, { expose: e }) {
|
|
@@ -1144,7 +1144,7 @@ const oi = Q({
|
|
|
1144
1144
|
U("success"), i == null || i.emit("validate", t.prop, !0, "");
|
|
1145
1145
|
}, Ot = async (c) => {
|
|
1146
1146
|
const x = F.value;
|
|
1147
|
-
return new
|
|
1147
|
+
return new Q({
|
|
1148
1148
|
[x]: c
|
|
1149
1149
|
}).validate({ [x]: D.value }, { firstFields: !0 }).then(() => (At(), !0)).catch((P) => (xt(P), Promise.reject(P)));
|
|
1150
1150
|
}, Pe = async (c, x) => {
|
|
@@ -1192,7 +1192,7 @@ const oi = Q({
|
|
|
1192
1192
|
validate: Pe,
|
|
1193
1193
|
propString: F
|
|
1194
1194
|
});
|
|
1195
|
-
return
|
|
1195
|
+
return Qe(he, ce), et(() => {
|
|
1196
1196
|
t.prop && (i == null || i.addField(ce), j = ze(D.value));
|
|
1197
1197
|
}), tt(() => {
|
|
1198
1198
|
i == null || i.removeField(ce);
|
|
@@ -1264,6 +1264,6 @@ const yi = Vt(qn, {
|
|
|
1264
1264
|
FormItem: bt
|
|
1265
1265
|
}), hi = Bt(bt);
|
|
1266
1266
|
export {
|
|
1267
|
-
|
|
1268
|
-
|
|
1267
|
+
yi as E,
|
|
1268
|
+
hi as a
|
|
1269
1269
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
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 _e, 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
|
|
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 _e, 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 B, resolveDynamicComponent as L, mergeProps as we, withModifiers as Ge, 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-cb0ca65c.js";
|
|
3
|
+
import { z as nt, A as at, B as st, E as O } from "./index-c2b9bbfd.js";
|
|
4
|
+
import { s as Te, p as xe, b as lt, e as H, c as te, H as rt, u as Se, g as it, N as ut, _ as dt, f as Ce, w as ct } from "./base-29f73b05.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 ze } from "./index-
|
|
7
|
-
import {
|
|
6
|
+
import { u as ft, U as oe, d as Ie, I as Ee, C as ze } from "./index-0f79095c.js";
|
|
7
|
+
import { a as vt, u as mt } from "./index-c71e37dc.js";
|
|
8
8
|
const ht = () => Te && /firefox/i.test(window.navigator.userAgent);
|
|
9
9
|
let g;
|
|
10
10
|
const yt = {
|
|
@@ -217,7 +217,7 @@ const zt = "ElInput", Nt = Pe({
|
|
|
217
217
|
o.type === "textarea" ? ne.b() : a.b(),
|
|
218
218
|
a.m(y.value),
|
|
219
219
|
a.is("disabled", x.value),
|
|
220
|
-
a.is("exceed",
|
|
220
|
+
a.is("exceed", Be.value),
|
|
221
221
|
{
|
|
222
222
|
[a.b("group")]: l.prepend || l.append,
|
|
223
223
|
[a.m("prefix")]: l.prefix || o.prefixIcon,
|
|
@@ -231,7 +231,7 @@ const zt = "ElInput", Nt = Pe({
|
|
|
231
231
|
a.is("focus", Y.value)
|
|
232
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"), A = Z(), I = Z(), W = q(!1), $ = q(!1), ae = q(), D = Z(o.inputStyle), z = c(() => A.value || I.value), { wrapperRef: ke, isFocused: Y, handleFocus: Ve, handleBlur: Fe } = vt(z, {
|
|
235
235
|
disabled: x,
|
|
236
236
|
afterBlur() {
|
|
237
237
|
var e;
|
|
@@ -240,15 +240,15 @@ const zt = "ElInput", Nt = Pe({
|
|
|
240
240
|
}), se = c(() => {
|
|
241
241
|
var e;
|
|
242
242
|
return (e = h == null ? void 0 : h.statusIcon) != null ? e : !1;
|
|
243
|
-
}), V = c(() => (v == null ? void 0 : v.validateState) || ""), le = c(() => V.value && tt[V.value]), Me = c(() =>
|
|
243
|
+
}), V = c(() => (v == null ? void 0 : v.validateState) || ""), le = c(() => V.value && tt[V.value]), Me = c(() => $.value ? at : st), Re = c(() => [
|
|
244
244
|
i.style
|
|
245
245
|
]), re = c(() => [
|
|
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), N = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword), _ = c(() => E.value.length),
|
|
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), N = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword), _ = c(() => E.value.length), Be = c(() => !!N.value && _.value > Number(o.maxlength)), Le = c(() => !!l.suffix || !!o.suffixIcon || K.value || o.showPassword || N.value || !!V.value && se.value), [ie, ue] = Et(A);
|
|
250
250
|
ot(I, (e) => {
|
|
251
|
-
if (
|
|
251
|
+
if (Oe(), !N.value || o.resize !== "both")
|
|
252
252
|
return;
|
|
253
253
|
const s = e[0], { width: P } = s.contentRect;
|
|
254
254
|
ae.value = {
|
|
@@ -270,7 +270,7 @@ const zt = "ElInput", Nt = Pe({
|
|
|
270
270
|
D.value = {
|
|
271
271
|
minHeight: Ne(I.value).minHeight
|
|
272
272
|
};
|
|
273
|
-
},
|
|
273
|
+
}, Oe = ((e) => {
|
|
274
274
|
let s = !1;
|
|
275
275
|
return () => {
|
|
276
276
|
var P;
|
|
@@ -300,11 +300,11 @@ const zt = "ElInput", Nt = Pe({
|
|
|
300
300
|
handleCompositionUpdate: fe,
|
|
301
301
|
handleCompositionEnd: ve
|
|
302
302
|
} = mt({ emit: r, afterComposition: G }), He = () => {
|
|
303
|
-
ie(),
|
|
304
|
-
},
|
|
303
|
+
ie(), $.value = !$.value, setTimeout(ue);
|
|
304
|
+
}, Ae = () => {
|
|
305
305
|
var e;
|
|
306
306
|
return (e = z.value) == null ? void 0 : e.focus();
|
|
307
|
-
},
|
|
307
|
+
}, $e = () => {
|
|
308
308
|
var e;
|
|
309
309
|
return (e = z.value) == null ? void 0 : e.blur();
|
|
310
310
|
}, De = (e) => {
|
|
@@ -327,14 +327,14 @@ const zt = "ElInput", Nt = Pe({
|
|
|
327
327
|
}), Xe(() => {
|
|
328
328
|
!o.formatter && o.parser, M(), R(F);
|
|
329
329
|
}), f({
|
|
330
|
-
input:
|
|
330
|
+
input: A,
|
|
331
331
|
textarea: I,
|
|
332
332
|
ref: z,
|
|
333
333
|
textareaStyle: re,
|
|
334
334
|
autosize: _e(o, "autosize"),
|
|
335
335
|
isComposing: ce,
|
|
336
|
-
focus:
|
|
337
|
-
blur:
|
|
336
|
+
focus: Ae,
|
|
337
|
+
blur: $e,
|
|
338
338
|
select: je,
|
|
339
339
|
clear: he,
|
|
340
340
|
resizeTextarea: F
|
|
@@ -373,12 +373,12 @@ const zt = "ElInput", Nt = Pe({
|
|
|
373
373
|
class: m(t(a).e("prefix-inner"))
|
|
374
374
|
}, [
|
|
375
375
|
j(e.$slots, "prefix"),
|
|
376
|
-
e.prefixIcon ? (d(), C(t(
|
|
376
|
+
e.prefixIcon ? (d(), C(t(O), {
|
|
377
377
|
key: 0,
|
|
378
378
|
class: m(t(a).e("icon"))
|
|
379
379
|
}, {
|
|
380
|
-
default:
|
|
381
|
-
(d(), C(
|
|
380
|
+
default: B(() => [
|
|
381
|
+
(d(), C(L(e.prefixIcon)))
|
|
382
382
|
]),
|
|
383
383
|
_: 1
|
|
384
384
|
}, 8, ["class"])) : p("v-if", !0)
|
|
@@ -387,13 +387,13 @@ const zt = "ElInput", Nt = Pe({
|
|
|
387
387
|
T("input", we({
|
|
388
388
|
id: t(k),
|
|
389
389
|
ref_key: "input",
|
|
390
|
-
ref:
|
|
390
|
+
ref: A,
|
|
391
391
|
class: t(a).e("inner")
|
|
392
392
|
}, t(u), {
|
|
393
393
|
name: e.name,
|
|
394
394
|
minlength: e.minlength,
|
|
395
395
|
maxlength: e.maxlength,
|
|
396
|
-
type: e.showPassword ?
|
|
396
|
+
type: e.showPassword ? $.value ? "text" : "password" : e.type,
|
|
397
397
|
disabled: t(x),
|
|
398
398
|
readonly: e.readonly,
|
|
399
399
|
autocomplete: e.autocomplete,
|
|
@@ -413,7 +413,7 @@ const zt = "ElInput", Nt = Pe({
|
|
|
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"]),
|
|
415
415
|
p(" suffix slot "),
|
|
416
|
-
t(
|
|
416
|
+
t(Le) ? (d(), S("span", {
|
|
417
417
|
key: 1,
|
|
418
418
|
class: m(t(a).e("suffix"))
|
|
419
419
|
}, [
|
|
@@ -422,34 +422,34 @@ const zt = "ElInput", Nt = Pe({
|
|
|
422
422
|
}, [
|
|
423
423
|
!t(K) || !t(X) || !t(N) ? (d(), S(Q, { key: 0 }, [
|
|
424
424
|
j(e.$slots, "suffix"),
|
|
425
|
-
e.suffixIcon ? (d(), C(t(
|
|
425
|
+
e.suffixIcon ? (d(), C(t(O), {
|
|
426
426
|
key: 0,
|
|
427
427
|
class: m(t(a).e("icon"))
|
|
428
428
|
}, {
|
|
429
|
-
default:
|
|
430
|
-
(d(), C(
|
|
429
|
+
default: B(() => [
|
|
430
|
+
(d(), C(L(e.suffixIcon)))
|
|
431
431
|
]),
|
|
432
432
|
_: 1
|
|
433
433
|
}, 8, ["class"])) : p("v-if", !0)
|
|
434
434
|
], 64)) : p("v-if", !0),
|
|
435
|
-
t(K) ? (d(), C(t(
|
|
435
|
+
t(K) ? (d(), C(t(O), {
|
|
436
436
|
key: 1,
|
|
437
437
|
class: m([t(a).e("icon"), t(a).e("clear")]),
|
|
438
438
|
onMousedown: Ge(t(ut), ["prevent"]),
|
|
439
439
|
onClick: he
|
|
440
440
|
}, {
|
|
441
|
-
default:
|
|
442
|
-
(d(), C(
|
|
441
|
+
default: B(() => [
|
|
442
|
+
(d(), C(L(e.clearIcon)))
|
|
443
443
|
]),
|
|
444
444
|
_: 1
|
|
445
445
|
}, 8, ["class", "onMousedown"])) : p("v-if", !0),
|
|
446
|
-
t(X) ? (d(), C(t(
|
|
446
|
+
t(X) ? (d(), C(t(O), {
|
|
447
447
|
key: 2,
|
|
448
448
|
class: m([t(a).e("icon"), t(a).e("password")]),
|
|
449
449
|
onClick: He
|
|
450
450
|
}, {
|
|
451
|
-
default:
|
|
452
|
-
(d(), C(
|
|
451
|
+
default: B(() => [
|
|
452
|
+
(d(), C(L(t(Me))))
|
|
453
453
|
]),
|
|
454
454
|
_: 1
|
|
455
455
|
}, 8, ["class"])) : p("v-if", !0),
|
|
@@ -461,7 +461,7 @@ const zt = "ElInput", Nt = Pe({
|
|
|
461
461
|
class: m(t(a).e("count-inner"))
|
|
462
462
|
}, U(t(_)) + " / " + U(e.maxlength), 3)
|
|
463
463
|
], 2)) : p("v-if", !0),
|
|
464
|
-
t(V) && t(le) && t(se) ? (d(), C(t(
|
|
464
|
+
t(V) && t(le) && t(se) ? (d(), C(t(O), {
|
|
465
465
|
key: 4,
|
|
466
466
|
class: m([
|
|
467
467
|
t(a).e("icon"),
|
|
@@ -469,8 +469,8 @@ const zt = "ElInput", Nt = Pe({
|
|
|
469
469
|
t(a).is("loading", t(V) === "validating")
|
|
470
470
|
])
|
|
471
471
|
}, {
|
|
472
|
-
default:
|
|
473
|
-
(d(), C(
|
|
472
|
+
default: B(() => [
|
|
473
|
+
(d(), C(L(t(le))))
|
|
474
474
|
]),
|
|
475
475
|
_: 1
|
|
476
476
|
}, 8, ["class"])) : p("v-if", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),W=require("./el-input-fa18ef84.cjs"),E=require("./index-33f80550.cjs"),l=require("./base-ef747d02.cjs"),g=require("./use-form-common-props-d3ed62c6.cjs"),c=require("./index-28e03bad.cjs"),X=require("./index-bb833443.cjs"),Y=100,j=600,
|
|
1
|
+
"use strict";const n=require("vue"),W=require("./el-input-fa18ef84.cjs"),E=require("./index-33f80550.cjs"),l=require("./base-ef747d02.cjs"),g=require("./use-form-common-props-d3ed62c6.cjs"),c=require("./index-28e03bad.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,t)=>{if(l.isUndefined(t)&&(t=x.value),t===0)return Math.round(e);let r=String(e);const a=r.indexOf(".");if(a===-1||!r.replace(".","").split("")[a+t])return e;const I=r.length;return r.charAt(I-1)==="5"&&(r=`${r.slice(0,Math.max(0,I-1))}6`),Number.parseFloat(Number(r).toFixed(t))},M=e=>{if(l.isNil(e))return 0;const t=e.toString(),r=t.indexOf(".");let a=0;return r!==-1&&(a=t.length-r-1),a},U=(e,t=1)=>l.isNumber(e)?e>=Number.MAX_SAFE_INTEGER&&t===1||e<=Number.MIN_SAFE_INTEGER&&t===-1?e:A(e+u.step*t):i.currentValue,O=e=>{var t;const r=e;if(u.disabledScientific&&["e","E"].includes(r.key)){r.preventDefault();return}const a={[c.EVENT_CODE.up]:()=>{r.preventDefault(),P()},[c.EVENT_CODE.down]:()=>{r.preventDefault(),D()}};(t=a[r.key])==null||t.call(a)},P=()=>{if(u.readonly||V.value||B.value)return;const e=Number(S.value)||0,t=U(e);_(t),d(c.INPUT_EVENT,i.currentValue),C()},D=()=>{if(u.readonly||V.value||y.value)return;const e=Number(S.value)||0,t=U(e,-1);_(t),d(c.INPUT_EVENT,i.currentValue),C()},k=(e,t)=>{const{max:r,min:a,step:s,precision:N,stepStrictly:I,valueOnClear:T}=u;r<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:r}[T]:T}return I&&(m=A(Math.round(m/s)*s,N),m!==e&&t&&d(c.UPDATE_MODEL_EVENT,m)),l.isUndefined(N)||(m=A(m,N)),(m>r||m<a)&&(m=m>r?r:a,t&&d(c.UPDATE_MODEL_EVENT,m)),m},_=(e,t=!0)=>{var r;const a=i.currentValue,s=k(e);if(!t){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&&((r=b==null?void 0:b.validate)==null||r.call(b,"change").catch(N=>c.debugWarn())),i.currentValue=s)},$=e=>{i.userInput=e;const t=e===""?null:Number(e);d(c.INPUT_EVENT,t),_(t,!1)},z=e=>{const t=e!==""?Number(e):"";(l.isNumber(t)&&!Number.isNaN(t)||e==="")&&_(t),C(),i.userInput=null},R=()=>{var e,t;(t=(e=p.value)==null?void 0:e.focus)==null||t.call(e)},K=()=>{var e,t;(t=(e=p.value)==null?void 0:e.blur)==null||t.call(e)},q=e=>{d("focus",e)},G=e=>{var t,r;i.userInput=null,i.currentValue===null&&((t=p.value)!=null&&t.input)&&(p.value.input.value=""),d("blur",e),u.validateEvent&&((r=b==null?void 0:b.validate)==null||r.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,t)=>{const r=k(e,!0);i.userInput===null&&r!==t&&(i.currentValue=r)},{immediate:!0}),n.watch(()=>u.precision,()=>{i.currentValue=k(u.modelValue)}),n.onMounted(()=>{var e;const{min:t,max:r,modelValue:a}=u,s=(e=p.value)==null?void 0:e.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)),!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,t;const r=(e=p.value)==null?void 0:e.input;r==null||r.setAttribute("aria-valuenow",`${(t=i.currentValue)!=null?t:""}`)}),v({focus:R,blur:K}),(e,t)=>(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 te=l.withInstall(ne);exports.ElInputNumber=te;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as te, ref as pe, reactive as fe, computed as
|
|
2
|
-
import { E as Ve } from "./el-input-
|
|
3
|
-
import { E as q,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as Be } from "./index-
|
|
1
|
+
import { defineComponent as te, ref as pe, reactive as fe, computed as y, 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-d47281da.js";
|
|
3
|
+
import { E as q, f as ye, x as he, y as Ie, v as ge } from "./index-c2b9bbfd.js";
|
|
4
|
+
import { x as J, b as we, p as b, e as Q, g as h, u as _e, i as T, _ as Se, c as Ae, w as Pe } from "./base-29f73b05.js";
|
|
5
|
+
import { h as Fe, d as Te, e as De, g as ke } from "./use-form-common-props-cb0ca65c.js";
|
|
6
|
+
import { u as Ce, C as re, I as D, U as N, a as Me, d as Z, E as ee } from "./index-0f79095c.js";
|
|
7
|
+
import { u as Be } from "./index-de24705f.js";
|
|
8
8
|
const xe = 100, Le = 600, ne = {
|
|
9
9
|
beforeMount(u, E) {
|
|
10
10
|
const s = E.value, { interval: r = xe, delay: I = Le } = J(s) ? {} : s;
|
|
@@ -70,7 +70,7 @@ const xe = 100, Le = 600, ne = {
|
|
|
70
70
|
type: Boolean,
|
|
71
71
|
default: !0
|
|
72
72
|
},
|
|
73
|
-
...
|
|
73
|
+
...Ce(["ariaLabel"]),
|
|
74
74
|
inputmode: {
|
|
75
75
|
type: Q(String),
|
|
76
76
|
default: void 0
|
|
@@ -84,8 +84,8 @@ const xe = 100, Le = 600, ne = {
|
|
|
84
84
|
[re]: (u, E) => E !== u,
|
|
85
85
|
blur: (u) => u instanceof FocusEvent,
|
|
86
86
|
focus: (u) => u instanceof FocusEvent,
|
|
87
|
-
[
|
|
88
|
-
[N]: (u) => b(u) ||
|
|
87
|
+
[D]: (u) => b(u) || h(u),
|
|
88
|
+
[N]: (u) => b(u) || h(u)
|
|
89
89
|
}, ze = te({
|
|
90
90
|
name: "ElInputNumber"
|
|
91
91
|
}), Ke = /* @__PURE__ */ te({
|
|
@@ -96,14 +96,14 @@ const xe = 100, Le = 600, ne = {
|
|
|
96
96
|
const r = u, { t: I } = Be(), d = _e("input-number"), m = pe(), a = fe({
|
|
97
97
|
currentValue: r.modelValue,
|
|
98
98
|
userInput: null
|
|
99
|
-
}), { formItem: p } = Te(), g =
|
|
99
|
+
}), { formItem: p } = Te(), g = y(() => b(r.modelValue) && r.modelValue <= r.min), O = y(() => b(r.modelValue) && r.modelValue >= r.max), le = y(() => {
|
|
100
100
|
const e = U(r.step);
|
|
101
101
|
return T(r.precision) ? Math.max(U(r.modelValue), e) : (e > r.precision, r.precision);
|
|
102
|
-
}),
|
|
102
|
+
}), k = y(() => r.controls && r.controlsPosition === "right"), G = De(), V = ke(), C = y(() => {
|
|
103
103
|
if (a.userInput !== null)
|
|
104
104
|
return a.userInput;
|
|
105
105
|
let e = a.currentValue;
|
|
106
|
-
if (
|
|
106
|
+
if (h(e))
|
|
107
107
|
return "";
|
|
108
108
|
if (b(e)) {
|
|
109
109
|
if (Number.isNaN(e))
|
|
@@ -121,7 +121,7 @@ const xe = 100, Le = 600, ne = {
|
|
|
121
121
|
const _ = t.length;
|
|
122
122
|
return t.charAt(_ - 1) === "5" && (t = `${t.slice(0, Math.max(0, _ - 1))}6`), Number.parseFloat(Number(t).toFixed(n));
|
|
123
123
|
}, U = (e) => {
|
|
124
|
-
if (
|
|
124
|
+
if (h(e))
|
|
125
125
|
return 0;
|
|
126
126
|
const n = e.toString(), t = n.indexOf(".");
|
|
127
127
|
let i = 0;
|
|
@@ -143,20 +143,20 @@ const xe = 100, Le = 600, ne = {
|
|
|
143
143
|
};
|
|
144
144
|
(n = i[t.key]) == null || n.call(i);
|
|
145
145
|
}, B = () => {
|
|
146
|
-
if (r.readonly || V.value ||
|
|
146
|
+
if (r.readonly || V.value || O.value)
|
|
147
147
|
return;
|
|
148
|
-
const e = Number(
|
|
149
|
-
w(n), s(
|
|
148
|
+
const e = Number(C.value) || 0, n = H(e);
|
|
149
|
+
w(n), s(D, a.currentValue), R();
|
|
150
150
|
}, x = () => {
|
|
151
151
|
if (r.readonly || V.value || g.value)
|
|
152
152
|
return;
|
|
153
|
-
const e = Number(
|
|
154
|
-
w(n), s(
|
|
153
|
+
const e = Number(C.value) || 0, n = H(e, -1);
|
|
154
|
+
w(n), s(D, a.currentValue), R();
|
|
155
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);
|
|
159
|
-
if (
|
|
159
|
+
if (h(e) || Number.isNaN(c))
|
|
160
160
|
return null;
|
|
161
161
|
if (e === "") {
|
|
162
162
|
if (S === null)
|
|
@@ -175,7 +175,7 @@ const xe = 100, Le = 600, ne = {
|
|
|
175
175
|
}, ue = (e) => {
|
|
176
176
|
a.userInput = e;
|
|
177
177
|
const n = e === "" ? null : Number(e);
|
|
178
|
-
s(
|
|
178
|
+
s(D, n), w(n, !1);
|
|
179
179
|
}, ie = (e) => {
|
|
180
180
|
const n = e !== "" ? Number(e) : "";
|
|
181
181
|
(b(n) && !Number.isNaN(n) || e === "") && w(n), R(), a.userInput = null;
|
|
@@ -218,10 +218,10 @@ const xe = 100, Le = 600, ne = {
|
|
|
218
218
|
}), (e, n) => (v(), $("div", {
|
|
219
219
|
class: z([
|
|
220
220
|
l(d).b(),
|
|
221
|
-
l(d).m(l(
|
|
221
|
+
l(d).m(l(G)),
|
|
222
222
|
l(d).is("disabled", l(V)),
|
|
223
223
|
l(d).is("without-controls", !e.controls),
|
|
224
|
-
l(d).is("controls-right", l(
|
|
224
|
+
l(d).is("controls-right", l(k)),
|
|
225
225
|
l(d).is(e.align, !!e.align)
|
|
226
226
|
]),
|
|
227
227
|
onDragstart: Ne(() => {
|
|
@@ -232,48 +232,48 @@ const xe = 100, Le = 600, ne = {
|
|
|
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
238
|
K(l(q), null, {
|
|
239
239
|
default: P(() => [
|
|
240
|
-
l(
|
|
240
|
+
l(k) ? (v(), F(l(ye), { key: 0 })) : (v(), F(l(he), { key: 1 }))
|
|
241
241
|
]),
|
|
242
242
|
_: 1
|
|
243
243
|
})
|
|
244
244
|
])
|
|
245
245
|
], 42, ["aria-label", "onKeydown"])), [
|
|
246
246
|
[l(ne), x]
|
|
247
|
-
]) :
|
|
247
|
+
]) : j("v-if", !0),
|
|
248
248
|
e.controls ? X((v(), $("span", {
|
|
249
249
|
key: 1,
|
|
250
250
|
role: "button",
|
|
251
251
|
"aria-label": l(I)("el.inputNumber.increase"),
|
|
252
|
-
class: z([l(d).e("increase"), l(d).is("disabled", l(
|
|
253
|
-
onKeydown:
|
|
252
|
+
class: z([l(d).e("increase"), l(d).is("disabled", l(O))]),
|
|
253
|
+
onKeydown: Y(B, ["enter"])
|
|
254
254
|
}, [
|
|
255
255
|
A(e.$slots, "increase-icon", {}, () => [
|
|
256
256
|
K(l(q), null, {
|
|
257
257
|
default: P(() => [
|
|
258
|
-
l(
|
|
258
|
+
l(k) ? (v(), F(l(Ie), { key: 0 })) : (v(), F(l(ge), { key: 1 }))
|
|
259
259
|
]),
|
|
260
260
|
_: 1
|
|
261
261
|
})
|
|
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",
|
|
269
269
|
ref: m,
|
|
270
270
|
type: "number",
|
|
271
271
|
step: e.step,
|
|
272
|
-
"model-value": l(
|
|
272
|
+
"model-value": l(C),
|
|
273
273
|
placeholder: e.placeholder,
|
|
274
274
|
readonly: e.readonly,
|
|
275
275
|
disabled: l(V),
|
|
276
|
-
size: l(
|
|
276
|
+
size: l(G),
|
|
277
277
|
max: e.max,
|
|
278
278
|
min: e.min,
|
|
279
279
|
name: e.name,
|
|
@@ -304,8 +304,8 @@ const xe = 100, Le = 600, ne = {
|
|
|
304
304
|
], 42, ["onDragstart"]));
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
var
|
|
308
|
-
const qe = Pe(
|
|
307
|
+
var Oe = /* @__PURE__ */ Se(Ke, [["__file", "input-number.vue"]]);
|
|
308
|
+
const qe = Pe(Oe);
|
|
309
309
|
export {
|
|
310
310
|
qe as E
|
|
311
311
|
};
|