@witlink/usercenter 1.1.2 → 1.1.3
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/README.md +2 -2
- package/dist/{404.08ea6f3c.mjs → 404.e6c1d8dd.mjs} +2 -2
- package/dist/{RegionSelect.afe427c2.mjs → RegionSelect.7d18c910.mjs} +6 -6
- package/dist/{Standard.ed2888d0.mjs → Standard.35b8ec9b.mjs} +7 -7
- package/dist/UpOutlined.ba191e28.mjs +30 -0
- package/dist/{WebClient.479aab7c.mjs → WebClient.61bb21a5.mjs} +10 -10
- package/dist/assets/{index.43998394.css → index.4bb02813.css} +1 -1
- package/dist/assets/{index.b2304597.css → index.60694a0c.css} +1 -1
- package/dist/{index.70d8b510.mjs → index.27c88033.mjs} +2 -2
- package/dist/{index.dfbb717a.mjs → index.2b6a0655.mjs} +344 -368
- package/dist/{index.fdd6c184.mjs → index.3384b0b5.mjs} +6390 -6356
- package/dist/{index.06bf2d50.mjs → index.53c10059.mjs} +20 -20
- package/dist/{index.247581b1.mjs → index.598283be.mjs} +23 -23
- package/dist/{index.2447f1cc.mjs → index.d75298d8.mjs} +26 -28
- package/dist/{index.7ffbf3f0.mjs → index.e830f365.mjs} +83 -83
- package/dist/{index.eb476980.mjs → index.ea149a51.mjs} +2 -2
- package/dist/{index.6e0b7acd.mjs → index.f6b08b41.mjs} +2 -2
- package/dist/index.f96008a2.mjs +408 -0
- package/dist/usercenter.es.js +5 -5
- package/dist/usercenter.umd.js +55 -55
- package/package.json +1 -1
- package/version.md +4 -1
- package/dist/index.4ab2779c.mjs +0 -497
@@ -1,64 +1,40 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
const wt = yt;
|
5
|
-
function Fe(e) {
|
6
|
-
for (var t = 1; t < arguments.length; t++) {
|
7
|
-
var n = arguments[t] != null ? Object(arguments[t]) : {}, a = Object.keys(n);
|
8
|
-
typeof Object.getOwnPropertySymbols == "function" && (a = a.concat(Object.getOwnPropertySymbols(n).filter(function(l) {
|
9
|
-
return Object.getOwnPropertyDescriptor(n, l).enumerable;
|
10
|
-
}))), a.forEach(function(l) {
|
11
|
-
xt(e, l, n[l]);
|
12
|
-
});
|
13
|
-
}
|
14
|
-
return e;
|
15
|
-
}
|
16
|
-
function xt(e, t, n) {
|
17
|
-
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
18
|
-
}
|
19
|
-
var Ee = function(t, n) {
|
20
|
-
var a = Fe({}, t, n.attrs);
|
21
|
-
return h(nt, Fe({}, a, {
|
22
|
-
icon: wt
|
23
|
-
}), null);
|
24
|
-
};
|
25
|
-
Ee.displayName = "UpOutlined";
|
26
|
-
Ee.inheritAttrs = !1;
|
27
|
-
const It = Ee;
|
1
|
+
import { Z as A, $ as et, a0 as j, a1 as T, a2 as tt, a3 as Ae, a4 as v, a5 as B, a6 as ee, a7 as ye, a8 as le, a9 as nt, aa as at, ab as rt, ac as Te, ad as je, ae as We, af as He, ag as lt, ah as it, ai as st, aj as ot, ak as ut, al as dt, am as ct, an as ft, ao as pt, ap as mt, aq as gt, ar as be, as as vt, D as ht, at as Ve, au as Oe, av as bt, aw as Se } from "./index.3384b0b5.mjs";
|
2
|
+
import { defineComponent as Ie, ref as Ge, onBeforeUnmount as qe, createVNode as b, shallowRef as M, computed as W, watch as te } from "vue";
|
3
|
+
import { U as St } from "./UpOutlined.ba191e28.mjs";
|
28
4
|
function we() {
|
29
5
|
return typeof BigInt == "function";
|
30
6
|
}
|
31
7
|
function ne(e) {
|
32
8
|
let t = e.trim(), n = t.startsWith("-");
|
33
9
|
n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = `0${t}`);
|
34
|
-
const
|
35
|
-
|
10
|
+
const r = t || "0", s = r.split("."), i = s[0] || "0", d = s[1] || "0";
|
11
|
+
i === "0" && d === "0" && (n = !1);
|
36
12
|
const c = n ? "-" : "";
|
37
13
|
return {
|
38
14
|
negative: n,
|
39
15
|
negativeStr: c,
|
40
|
-
trimStr:
|
41
|
-
integerStr:
|
16
|
+
trimStr: r,
|
17
|
+
integerStr: i,
|
42
18
|
decimalStr: d,
|
43
|
-
fullStr: `${c}${
|
19
|
+
fullStr: `${c}${r}`
|
44
20
|
};
|
45
21
|
}
|
46
|
-
function
|
22
|
+
function Ee(e) {
|
47
23
|
const t = String(e);
|
48
24
|
return !Number.isNaN(Number(t)) && t.includes("e");
|
49
25
|
}
|
50
26
|
function ae(e) {
|
51
27
|
const t = String(e);
|
52
|
-
if (
|
28
|
+
if (Ee(e)) {
|
53
29
|
let n = Number(t.slice(t.indexOf("e-") + 2));
|
54
|
-
const
|
55
|
-
return
|
30
|
+
const r = t.match(/\.(\d+)/);
|
31
|
+
return r != null && r[1] && (n += r[1].length), n;
|
56
32
|
}
|
57
|
-
return t.includes(".") &&
|
33
|
+
return t.includes(".") && De(t) ? t.length - t.indexOf(".") - 1 : 0;
|
58
34
|
}
|
59
|
-
function
|
35
|
+
function Ce(e) {
|
60
36
|
let t = String(e);
|
61
|
-
if (
|
37
|
+
if (Ee(e)) {
|
62
38
|
if (e > Number.MAX_SAFE_INTEGER)
|
63
39
|
return String(we() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
|
64
40
|
if (e < Number.MIN_SAFE_INTEGER)
|
@@ -67,15 +43,15 @@ function Oe(e) {
|
|
67
43
|
}
|
68
44
|
return ne(t).fullStr;
|
69
45
|
}
|
70
|
-
function
|
46
|
+
function De(e) {
|
71
47
|
return typeof e == "number" ? !Number.isNaN(e) : e ? /^\s*-?\d+(\.\d+)?\s*$/.test(e) || /^\s*-?\d+\.\s*$/.test(e) || /^\s*-?\.\d+\s*$/.test(e) : !1;
|
72
48
|
}
|
73
|
-
function
|
49
|
+
function Le(e) {
|
74
50
|
return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
|
75
51
|
}
|
76
52
|
class z {
|
77
53
|
constructor(t) {
|
78
|
-
if (this.origin = "",
|
54
|
+
if (this.origin = "", Le(t)) {
|
79
55
|
this.empty = !0;
|
80
56
|
return;
|
81
57
|
}
|
@@ -90,13 +66,13 @@ class z {
|
|
90
66
|
const n = Number(t);
|
91
67
|
if (Number.isNaN(n))
|
92
68
|
return this;
|
93
|
-
const
|
94
|
-
if (
|
69
|
+
const r = this.number + n;
|
70
|
+
if (r > Number.MAX_SAFE_INTEGER)
|
95
71
|
return new z(Number.MAX_SAFE_INTEGER);
|
96
|
-
if (
|
72
|
+
if (r < Number.MIN_SAFE_INTEGER)
|
97
73
|
return new z(Number.MIN_SAFE_INTEGER);
|
98
|
-
const
|
99
|
-
return new z(
|
74
|
+
const s = Math.max(ae(this.number), ae(n));
|
75
|
+
return new z(r.toFixed(s));
|
100
76
|
}
|
101
77
|
isEmpty() {
|
102
78
|
return this.empty;
|
@@ -117,12 +93,12 @@ class z {
|
|
117
93
|
return this.number;
|
118
94
|
}
|
119
95
|
toString() {
|
120
|
-
return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" :
|
96
|
+
return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Ce(this.number) : this.origin;
|
121
97
|
}
|
122
98
|
}
|
123
|
-
class
|
99
|
+
class U {
|
124
100
|
constructor(t) {
|
125
|
-
if (this.origin = "",
|
101
|
+
if (this.origin = "", Le(t)) {
|
126
102
|
this.empty = !0;
|
127
103
|
return;
|
128
104
|
}
|
@@ -131,13 +107,13 @@ class q {
|
|
131
107
|
return;
|
132
108
|
}
|
133
109
|
let n = t;
|
134
|
-
if (
|
135
|
-
const
|
136
|
-
this.negative =
|
137
|
-
const
|
138
|
-
this.integer = BigInt(
|
139
|
-
const
|
140
|
-
this.decimal = BigInt(
|
110
|
+
if (Ee(n) && (n = Number(n)), n = typeof n == "string" ? n : Ce(n), De(n)) {
|
111
|
+
const r = ne(n);
|
112
|
+
this.negative = r.negative;
|
113
|
+
const s = r.trimStr.split(".");
|
114
|
+
this.integer = BigInt(s[0]);
|
115
|
+
const i = s[1] || "0";
|
116
|
+
this.decimal = BigInt(i), this.decimalLen = i.length;
|
141
117
|
} else
|
142
118
|
this.nan = !0;
|
143
119
|
}
|
@@ -155,20 +131,20 @@ class q {
|
|
155
131
|
return BigInt(n);
|
156
132
|
}
|
157
133
|
negate() {
|
158
|
-
const t = new
|
134
|
+
const t = new U(this.toString());
|
159
135
|
return t.negative = !t.negative, t;
|
160
136
|
}
|
161
137
|
add(t) {
|
162
138
|
if (this.isInvalidate())
|
163
|
-
return new
|
164
|
-
const n = new
|
139
|
+
return new U(t);
|
140
|
+
const n = new U(t);
|
165
141
|
if (n.isInvalidate())
|
166
142
|
return this;
|
167
|
-
const
|
143
|
+
const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), s = this.alignDecimal(r), i = n.alignDecimal(r), d = (s + i).toString(), {
|
168
144
|
negativeStr: c,
|
169
145
|
trimStr: m
|
170
|
-
} = ne(d), f = `${c}${m.padStart(
|
171
|
-
return new
|
146
|
+
} = ne(d), f = `${c}${m.padStart(r + 1, "0")}`;
|
147
|
+
return new U(`${f.slice(0, -r)}.${f.slice(-r)}`);
|
172
148
|
}
|
173
149
|
isEmpty() {
|
174
150
|
return this.empty;
|
@@ -192,29 +168,29 @@ class q {
|
|
192
168
|
return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : ne(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
|
193
169
|
}
|
194
170
|
}
|
195
|
-
function
|
196
|
-
return we() ? new
|
171
|
+
function _(e) {
|
172
|
+
return we() ? new U(e) : new z(e);
|
197
173
|
}
|
198
174
|
function xe(e, t, n) {
|
199
|
-
let
|
175
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
200
176
|
if (e === "")
|
201
177
|
return "";
|
202
178
|
const {
|
203
|
-
negativeStr:
|
204
|
-
integerStr:
|
179
|
+
negativeStr: s,
|
180
|
+
integerStr: i,
|
205
181
|
decimalStr: d
|
206
|
-
} = ne(e), c = `${t}${d}`, m = `${
|
182
|
+
} = ne(e), c = `${t}${d}`, m = `${s}${i}`;
|
207
183
|
if (n >= 0) {
|
208
184
|
const f = Number(d[n]);
|
209
|
-
if (f >= 5 && !
|
210
|
-
const
|
211
|
-
return xe(
|
185
|
+
if (f >= 5 && !r) {
|
186
|
+
const o = _(e).add(`${s}0.${"0".repeat(n)}${10 - f}`);
|
187
|
+
return xe(o.toString(), t, n, r);
|
212
188
|
}
|
213
189
|
return n === 0 ? m : `${m}${t}${d.padEnd(n, "0").slice(0, n)}`;
|
214
190
|
}
|
215
191
|
return c === ".0" ? m : `${m}${c}`;
|
216
192
|
}
|
217
|
-
const
|
193
|
+
const $t = 200, Nt = 600, yt = Ie({
|
218
194
|
compatConfig: {
|
219
195
|
MODE: 3
|
220
196
|
},
|
@@ -224,36 +200,36 @@ const Et = 200, Ct = 600, Ot = Ie({
|
|
224
200
|
prefixCls: String,
|
225
201
|
upDisabled: Boolean,
|
226
202
|
downDisabled: Boolean,
|
227
|
-
onStep:
|
203
|
+
onStep: A()
|
228
204
|
},
|
229
205
|
slots: Object,
|
230
206
|
setup(e, t) {
|
231
207
|
let {
|
232
208
|
slots: n,
|
233
|
-
emit:
|
209
|
+
emit: r
|
234
210
|
} = t;
|
235
|
-
const
|
236
|
-
c.preventDefault(),
|
211
|
+
const s = Ge(), i = (c, m) => {
|
212
|
+
c.preventDefault(), r("step", m);
|
237
213
|
function f() {
|
238
|
-
|
214
|
+
r("step", m), s.value = setTimeout(f, $t);
|
239
215
|
}
|
240
|
-
|
216
|
+
s.value = setTimeout(f, Nt);
|
241
217
|
}, d = () => {
|
242
|
-
clearTimeout(
|
218
|
+
clearTimeout(s.value);
|
243
219
|
};
|
244
220
|
return qe(() => {
|
245
221
|
d();
|
246
222
|
}), () => {
|
247
|
-
if (
|
223
|
+
if (et())
|
248
224
|
return null;
|
249
225
|
const {
|
250
226
|
prefixCls: c,
|
251
227
|
upDisabled: m,
|
252
228
|
downDisabled: f
|
253
|
-
} = e,
|
254
|
-
[`${
|
255
|
-
}), S = j(
|
256
|
-
[`${
|
229
|
+
} = e, o = `${c}-handler`, w = j(o, `${o}-up`, {
|
230
|
+
[`${o}-up-disabled`]: m
|
231
|
+
}), S = j(o, `${o}-down`, {
|
232
|
+
[`${o}-down-disabled`]: f
|
257
233
|
}), I = {
|
258
234
|
unselectable: "on",
|
259
235
|
role: "button",
|
@@ -263,43 +239,43 @@ const Et = 200, Ct = 600, Ot = Ie({
|
|
263
239
|
upNode: $,
|
264
240
|
downNode: E
|
265
241
|
} = n;
|
266
|
-
return
|
267
|
-
class: `${
|
268
|
-
}, [
|
269
|
-
onMousedown: (
|
270
|
-
|
242
|
+
return b("div", {
|
243
|
+
class: `${o}-wrap`
|
244
|
+
}, [b("span", T(T({}, I), {}, {
|
245
|
+
onMousedown: (P) => {
|
246
|
+
i(P, !0);
|
271
247
|
},
|
272
248
|
"aria-label": "Increase Value",
|
273
249
|
"aria-disabled": m,
|
274
250
|
class: w
|
275
|
-
}), [($ == null ? void 0 : $()) ||
|
251
|
+
}), [($ == null ? void 0 : $()) || b("span", {
|
276
252
|
unselectable: "on",
|
277
253
|
class: `${c}-handler-up-inner`
|
278
|
-
}, null)]),
|
279
|
-
onMousedown: (
|
280
|
-
|
254
|
+
}, null)]), b("span", T(T({}, I), {}, {
|
255
|
+
onMousedown: (P) => {
|
256
|
+
i(P, !1);
|
281
257
|
},
|
282
258
|
"aria-label": "Decrease Value",
|
283
259
|
"aria-disabled": f,
|
284
260
|
class: S
|
285
|
-
}), [(E == null ? void 0 : E()) ||
|
261
|
+
}), [(E == null ? void 0 : E()) || b("span", {
|
286
262
|
unselectable: "on",
|
287
263
|
class: `${c}-handler-down-inner`
|
288
264
|
}, null)])]);
|
289
265
|
};
|
290
266
|
}
|
291
267
|
});
|
292
|
-
function
|
293
|
-
const n =
|
294
|
-
function
|
268
|
+
function wt(e, t) {
|
269
|
+
const n = Ge(null);
|
270
|
+
function r() {
|
295
271
|
try {
|
296
272
|
const {
|
297
|
-
selectionStart:
|
273
|
+
selectionStart: i,
|
298
274
|
selectionEnd: d,
|
299
275
|
value: c
|
300
|
-
} = e.value, m = c.substring(0,
|
276
|
+
} = e.value, m = c.substring(0, i), f = c.substring(d);
|
301
277
|
n.value = {
|
302
|
-
start:
|
278
|
+
start: i,
|
303
279
|
end: d,
|
304
280
|
value: c,
|
305
281
|
beforeTxt: m,
|
@@ -308,34 +284,34 @@ function Pt(e, t) {
|
|
308
284
|
} catch {
|
309
285
|
}
|
310
286
|
}
|
311
|
-
function
|
287
|
+
function s() {
|
312
288
|
if (e.value && n.value && t.value)
|
313
289
|
try {
|
314
290
|
const {
|
315
|
-
value:
|
291
|
+
value: i
|
316
292
|
} = e.value, {
|
317
293
|
beforeTxt: d,
|
318
294
|
afterTxt: c,
|
319
295
|
start: m
|
320
296
|
} = n.value;
|
321
|
-
let f =
|
322
|
-
if (
|
323
|
-
f =
|
324
|
-
else if (
|
297
|
+
let f = i.length;
|
298
|
+
if (i.endsWith(c))
|
299
|
+
f = i.length - n.value.afterTxt.length;
|
300
|
+
else if (i.startsWith(d))
|
325
301
|
f = d.length;
|
326
302
|
else {
|
327
|
-
const
|
303
|
+
const o = d[m - 1], w = i.indexOf(o, m - 1);
|
328
304
|
w !== -1 && (f = w + 1);
|
329
305
|
}
|
330
306
|
e.value.setSelectionRange(f, f);
|
331
|
-
} catch (
|
332
|
-
|
307
|
+
} catch (i) {
|
308
|
+
tt(!1, `Something warning of cursor restore. Please fire issue about this: ${i.message}`);
|
333
309
|
}
|
334
310
|
}
|
335
|
-
return [
|
311
|
+
return [r, s];
|
336
312
|
}
|
337
|
-
const
|
338
|
-
const e =
|
313
|
+
const xt = () => {
|
314
|
+
const e = M(0), t = () => {
|
339
315
|
Ae.cancel(e.value);
|
340
316
|
};
|
341
317
|
return qe(() => {
|
@@ -346,20 +322,20 @@ const _t = () => {
|
|
346
322
|
});
|
347
323
|
};
|
348
324
|
};
|
349
|
-
var
|
325
|
+
var It = globalThis && globalThis.__rest || function(e, t) {
|
350
326
|
var n = {};
|
351
|
-
for (var
|
352
|
-
Object.prototype.hasOwnProperty.call(e,
|
327
|
+
for (var r in e)
|
328
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
353
329
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
354
|
-
for (var
|
355
|
-
t.indexOf(
|
330
|
+
for (var s = 0, r = Object.getOwnPropertySymbols(e); s < r.length; s++)
|
331
|
+
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
356
332
|
return n;
|
357
333
|
};
|
358
|
-
const
|
359
|
-
const t =
|
334
|
+
const Fe = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), Be = (e) => {
|
335
|
+
const t = _(e);
|
360
336
|
return t.isInvalidate() ? null : t;
|
361
|
-
},
|
362
|
-
stringMode:
|
337
|
+
}, Ue = () => ({
|
338
|
+
stringMode: B(),
|
363
339
|
defaultValue: ee([String, Number]),
|
364
340
|
value: ee([String, Number]),
|
365
341
|
prefixCls: ye(),
|
@@ -367,225 +343,225 @@ const ze = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), je = (e) =>
|
|
367
343
|
max: ee([String, Number]),
|
368
344
|
step: ee([String, Number], 1),
|
369
345
|
tabindex: Number,
|
370
|
-
controls:
|
371
|
-
readonly:
|
372
|
-
disabled:
|
373
|
-
autofocus:
|
374
|
-
keyboard:
|
375
|
-
parser:
|
376
|
-
formatter:
|
346
|
+
controls: B(!0),
|
347
|
+
readonly: B(),
|
348
|
+
disabled: B(),
|
349
|
+
autofocus: B(),
|
350
|
+
keyboard: B(!0),
|
351
|
+
parser: A(),
|
352
|
+
formatter: A(),
|
377
353
|
precision: Number,
|
378
354
|
decimalSeparator: String,
|
379
|
-
onInput:
|
380
|
-
onChange:
|
381
|
-
onPressEnter:
|
382
|
-
onStep:
|
383
|
-
onBlur:
|
384
|
-
onFocus:
|
385
|
-
}),
|
355
|
+
onInput: A(),
|
356
|
+
onChange: A(),
|
357
|
+
onPressEnter: A(),
|
358
|
+
onStep: A(),
|
359
|
+
onBlur: A(),
|
360
|
+
onFocus: A()
|
361
|
+
}), Et = Ie({
|
386
362
|
compatConfig: {
|
387
363
|
MODE: 3
|
388
364
|
},
|
389
365
|
name: "InnerInputNumber",
|
390
366
|
inheritAttrs: !1,
|
391
|
-
props: v(v({},
|
367
|
+
props: v(v({}, Ue()), {
|
392
368
|
lazy: Boolean
|
393
369
|
}),
|
394
370
|
slots: Object,
|
395
371
|
setup(e, t) {
|
396
372
|
let {
|
397
373
|
attrs: n,
|
398
|
-
slots:
|
399
|
-
emit:
|
400
|
-
expose:
|
374
|
+
slots: r,
|
375
|
+
emit: s,
|
376
|
+
expose: i
|
401
377
|
} = t;
|
402
|
-
const d =
|
403
|
-
function w(
|
404
|
-
e.value === void 0 && (
|
378
|
+
const d = M(), c = M(!1), m = M(!1), f = M(!1), o = M(_(e.value));
|
379
|
+
function w(a) {
|
380
|
+
e.value === void 0 && (o.value = a);
|
405
381
|
}
|
406
|
-
const S = (
|
407
|
-
if (!
|
408
|
-
return e.precision >= 0 ? e.precision : Math.max(ae(
|
409
|
-
}, I = (
|
410
|
-
const
|
382
|
+
const S = (a, l) => {
|
383
|
+
if (!l)
|
384
|
+
return e.precision >= 0 ? e.precision : Math.max(ae(a), ae(e.step));
|
385
|
+
}, I = (a) => {
|
386
|
+
const l = String(a);
|
411
387
|
if (e.parser)
|
412
|
-
return e.parser(
|
413
|
-
let u =
|
388
|
+
return e.parser(l);
|
389
|
+
let u = l;
|
414
390
|
return e.decimalSeparator && (u = u.replace(e.decimalSeparator, ".")), u.replace(/[^\w.-]+/g, "");
|
415
|
-
}, $ =
|
391
|
+
}, $ = M(""), E = (a, l) => {
|
416
392
|
if (e.formatter)
|
417
|
-
return e.formatter(
|
418
|
-
userTyping:
|
393
|
+
return e.formatter(a, {
|
394
|
+
userTyping: l,
|
419
395
|
input: String($.value)
|
420
396
|
});
|
421
|
-
let u = typeof
|
422
|
-
if (!
|
423
|
-
const g = S(u,
|
424
|
-
if (
|
397
|
+
let u = typeof a == "number" ? Ce(a) : a;
|
398
|
+
if (!l) {
|
399
|
+
const g = S(u, l);
|
400
|
+
if (De(u) && (e.decimalSeparator || g >= 0)) {
|
425
401
|
const y = e.decimalSeparator || ".";
|
426
402
|
u = xe(u, y, g);
|
427
403
|
}
|
428
404
|
}
|
429
405
|
return u;
|
430
|
-
},
|
431
|
-
const
|
432
|
-
return
|
406
|
+
}, P = (() => {
|
407
|
+
const a = e.value;
|
408
|
+
return o.value.isInvalidate() && ["string", "number"].includes(typeof a) ? Number.isNaN(a) ? "" : a : E(o.value.toString(), !1);
|
433
409
|
})();
|
434
|
-
$.value =
|
435
|
-
function C(
|
410
|
+
$.value = P;
|
411
|
+
function C(a, l) {
|
436
412
|
$.value = E(
|
437
|
-
|
438
|
-
|
413
|
+
a.isInvalidate() ? a.toString(!1) : a.toString(!l),
|
414
|
+
l
|
439
415
|
);
|
440
416
|
}
|
441
|
-
const
|
417
|
+
const D = W(() => Be(e.max)), N = W(() => Be(e.min)), x = W(() => !D.value || !o.value || o.value.isInvalidate() ? !1 : D.value.lessEquals(o.value)), V = W(() => !N.value || !o.value || o.value.isInvalidate() ? !1 : o.value.lessEquals(N.value)), [k, K] = wt(d, c), X = (a) => D.value && !a.lessEquals(D.value) ? D.value : N.value && !N.value.lessEquals(a) ? N.value : null, ie = (a) => !X(a), Y = (a, l) => {
|
442
418
|
var u;
|
443
|
-
let g =
|
444
|
-
if (!g.isEmpty() && !
|
445
|
-
const
|
446
|
-
return
|
419
|
+
let g = a, y = ie(g) || g.isEmpty();
|
420
|
+
if (!g.isEmpty() && !l && (g = X(g) || g, y = !0), !e.readonly && !e.disabled && y) {
|
421
|
+
const R = g.toString(), F = S(R, l);
|
422
|
+
return F >= 0 && (g = _(xe(R, ".", F))), g.equals(o.value) || (w(g), (u = e.onChange) === null || u === void 0 || u.call(e, g.isEmpty() ? null : Fe(e.stringMode, g)), e.value === void 0 && C(g, l)), g;
|
447
423
|
}
|
448
|
-
return
|
449
|
-
},
|
450
|
-
var
|
451
|
-
if (k(), $.value =
|
452
|
-
const u = I(
|
424
|
+
return o.value;
|
425
|
+
}, se = xt(), Z = (a) => {
|
426
|
+
var l;
|
427
|
+
if (k(), $.value = a, !f.value) {
|
428
|
+
const u = I(a), g = _(u);
|
453
429
|
g.isNaN() || Y(g, !0);
|
454
430
|
}
|
455
|
-
(
|
456
|
-
let u =
|
457
|
-
e.parser || (u =
|
431
|
+
(l = e.onInput) === null || l === void 0 || l.call(e, a), se(() => {
|
432
|
+
let u = a;
|
433
|
+
e.parser || (u = a.replace(/。/g, ".")), u !== a && Z(u);
|
458
434
|
});
|
459
|
-
},
|
435
|
+
}, h = () => {
|
460
436
|
f.value = !0;
|
461
|
-
},
|
462
|
-
f.value = !1,
|
463
|
-
}, H = (
|
464
|
-
|
465
|
-
},
|
466
|
-
var
|
467
|
-
if (
|
437
|
+
}, J = () => {
|
438
|
+
f.value = !1, Z(d.value.value);
|
439
|
+
}, H = (a) => {
|
440
|
+
Z(a.target.value);
|
441
|
+
}, G = (a) => {
|
442
|
+
var l, u;
|
443
|
+
if (a && x.value || !a && V.value)
|
468
444
|
return;
|
469
445
|
m.value = !1;
|
470
|
-
let g =
|
471
|
-
|
472
|
-
const y = (
|
473
|
-
(
|
446
|
+
let g = _(e.step);
|
447
|
+
a || (g = g.negate());
|
448
|
+
const y = (o.value || _(0)).add(g.toString()), R = Y(y, !1);
|
449
|
+
(l = e.onStep) === null || l === void 0 || l.call(e, Fe(e.stringMode, R), {
|
474
450
|
offset: e.step,
|
475
|
-
type:
|
451
|
+
type: a ? "up" : "down"
|
476
452
|
}), (u = d.value) === null || u === void 0 || u.focus();
|
477
|
-
},
|
478
|
-
const
|
479
|
-
let u =
|
480
|
-
|
481
|
-
},
|
482
|
-
var
|
453
|
+
}, O = (a) => {
|
454
|
+
const l = _(I($.value));
|
455
|
+
let u = l;
|
456
|
+
l.isNaN() ? u = o.value : u = Y(l, a), e.value !== void 0 ? C(o.value, !1) : u.isNaN() || C(u, !1);
|
457
|
+
}, oe = (a) => {
|
458
|
+
var l;
|
483
459
|
const {
|
484
460
|
which: u
|
485
|
-
} =
|
486
|
-
m.value = !0, u === le.ENTER && (f.value || (m.value = !1),
|
461
|
+
} = a;
|
462
|
+
m.value = !0, u === le.ENTER && (f.value || (m.value = !1), O(!1), (l = e.onPressEnter) === null || l === void 0 || l.call(e, a)), e.keyboard !== !1 && !f.value && [le.UP, le.DOWN].includes(u) && (G(le.UP === u), a.preventDefault());
|
487
463
|
}, ue = () => {
|
488
464
|
m.value = !1;
|
489
|
-
}, de = (
|
490
|
-
|
465
|
+
}, de = (a) => {
|
466
|
+
O(!1), c.value = !1, m.value = !1, s("blur", a);
|
491
467
|
};
|
492
468
|
return te(() => e.precision, () => {
|
493
|
-
|
469
|
+
o.value.isInvalidate() || C(o.value, !1);
|
494
470
|
}, {
|
495
471
|
flush: "post"
|
496
472
|
}), te(() => e.value, () => {
|
497
|
-
const
|
498
|
-
|
499
|
-
const
|
500
|
-
(!
|
473
|
+
const a = _(e.value);
|
474
|
+
o.value = a;
|
475
|
+
const l = _(I($.value));
|
476
|
+
(!a.equals(l) || !m.value || e.formatter) && C(a, m.value);
|
501
477
|
}, {
|
502
478
|
flush: "post"
|
503
479
|
}), te($, () => {
|
504
|
-
e.formatter &&
|
480
|
+
e.formatter && K();
|
505
481
|
}, {
|
506
482
|
flush: "post"
|
507
|
-
}), te(() => e.disabled, (
|
508
|
-
|
509
|
-
}),
|
483
|
+
}), te(() => e.disabled, (a) => {
|
484
|
+
a && (c.value = !1);
|
485
|
+
}), i({
|
510
486
|
focus: () => {
|
511
|
-
var
|
512
|
-
(
|
487
|
+
var a;
|
488
|
+
(a = d.value) === null || a === void 0 || a.focus();
|
513
489
|
},
|
514
490
|
blur: () => {
|
515
|
-
var
|
516
|
-
(
|
491
|
+
var a;
|
492
|
+
(a = d.value) === null || a === void 0 || a.blur();
|
517
493
|
}
|
518
494
|
}), () => {
|
519
|
-
const
|
520
|
-
prefixCls:
|
495
|
+
const a = v(v({}, n), e), {
|
496
|
+
prefixCls: l = "rc-input-number",
|
521
497
|
min: u,
|
522
498
|
max: g,
|
523
499
|
step: y = 1,
|
524
|
-
defaultValue:
|
525
|
-
value:
|
526
|
-
disabled:
|
500
|
+
defaultValue: R,
|
501
|
+
value: F,
|
502
|
+
disabled: Q,
|
527
503
|
readonly: re,
|
528
504
|
keyboard: _e,
|
529
505
|
controls: p = !0,
|
530
506
|
autofocus: ce,
|
531
|
-
stringMode:
|
507
|
+
stringMode: q,
|
532
508
|
parser: fe,
|
533
509
|
formatter: pe,
|
534
510
|
precision: L,
|
535
511
|
decimalSeparator: me,
|
536
512
|
onChange: ge,
|
537
513
|
onInput: ve,
|
538
|
-
onPressEnter:
|
539
|
-
onStep:
|
540
|
-
lazy:
|
541
|
-
class:
|
542
|
-
style:
|
543
|
-
} =
|
544
|
-
upHandler:
|
545
|
-
downHandler:
|
546
|
-
} =
|
547
|
-
return
|
548
|
-
class: j(
|
549
|
-
[`${
|
550
|
-
[`${
|
551
|
-
[`${
|
552
|
-
[`${
|
553
|
-
[`${
|
514
|
+
onPressEnter: Me,
|
515
|
+
onStep: Pe,
|
516
|
+
lazy: ke,
|
517
|
+
class: Ke,
|
518
|
+
style: Xe
|
519
|
+
} = a, Ye = It(a, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
|
520
|
+
upHandler: Ze,
|
521
|
+
downHandler: Je
|
522
|
+
} = r, Re = `${l}-input`, he = {};
|
523
|
+
return ke ? he.onChange = H : he.onInput = H, b("div", {
|
524
|
+
class: j(l, Ke, {
|
525
|
+
[`${l}-focused`]: c.value,
|
526
|
+
[`${l}-disabled`]: Q,
|
527
|
+
[`${l}-readonly`]: re,
|
528
|
+
[`${l}-not-a-number`]: o.value.isNaN(),
|
529
|
+
[`${l}-out-of-range`]: !o.value.isInvalidate() && !ie(o.value)
|
554
530
|
}),
|
555
|
-
style:
|
556
|
-
onKeydown:
|
531
|
+
style: Xe,
|
532
|
+
onKeydown: oe,
|
557
533
|
onKeyup: ue
|
558
|
-
}, [p &&
|
559
|
-
prefixCls:
|
534
|
+
}, [p && b(yt, {
|
535
|
+
prefixCls: l,
|
560
536
|
upDisabled: x.value,
|
561
537
|
downDisabled: V.value,
|
562
|
-
onStep:
|
538
|
+
onStep: G
|
563
539
|
}, {
|
564
|
-
upNode:
|
565
|
-
downNode:
|
566
|
-
}),
|
540
|
+
upNode: Ze,
|
541
|
+
downNode: Je
|
542
|
+
}), b("div", {
|
567
543
|
class: `${Re}-wrap`
|
568
|
-
}, [
|
544
|
+
}, [b("input", T(T(T({
|
569
545
|
autofocus: ce,
|
570
546
|
autocomplete: "off",
|
571
547
|
role: "spinbutton",
|
572
548
|
"aria-valuemin": u,
|
573
549
|
"aria-valuemax": g,
|
574
|
-
"aria-valuenow":
|
550
|
+
"aria-valuenow": o.value.isInvalidate() ? null : o.value.toString(),
|
575
551
|
step: y
|
576
|
-
},
|
552
|
+
}, Ye), {}, {
|
577
553
|
ref: d,
|
578
554
|
class: Re,
|
579
555
|
value: $.value,
|
580
|
-
disabled:
|
556
|
+
disabled: Q,
|
581
557
|
readonly: re,
|
582
|
-
onFocus: (
|
583
|
-
c.value = !0,
|
558
|
+
onFocus: (Qe) => {
|
559
|
+
c.value = !0, s("focus", Qe);
|
584
560
|
}
|
585
561
|
}, he), {}, {
|
586
562
|
onBlur: de,
|
587
|
-
onCompositionstart:
|
588
|
-
onCompositionend:
|
563
|
+
onCompositionstart: h,
|
564
|
+
onCompositionend: J
|
589
565
|
}), null)])]);
|
590
566
|
};
|
591
567
|
}
|
@@ -593,39 +569,39 @@ const ze = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), je = (e) =>
|
|
593
569
|
function $e(e) {
|
594
570
|
return e != null;
|
595
571
|
}
|
596
|
-
const
|
572
|
+
const Ct = (e) => {
|
597
573
|
const {
|
598
574
|
componentCls: t,
|
599
575
|
lineWidth: n,
|
600
|
-
lineType:
|
601
|
-
colorBorder:
|
602
|
-
borderRadius:
|
576
|
+
lineType: r,
|
577
|
+
colorBorder: s,
|
578
|
+
borderRadius: i,
|
603
579
|
fontSizeLG: d,
|
604
580
|
controlHeightLG: c,
|
605
581
|
controlHeightSM: m,
|
606
582
|
colorError: f,
|
607
|
-
inputPaddingHorizontalSM:
|
583
|
+
inputPaddingHorizontalSM: o,
|
608
584
|
colorTextDescription: w,
|
609
585
|
motionDurationMid: S,
|
610
586
|
colorPrimary: I,
|
611
587
|
controlHeight: $,
|
612
588
|
inputPaddingHorizontal: E,
|
613
|
-
colorBgContainer:
|
589
|
+
colorBgContainer: P,
|
614
590
|
colorTextDisabled: C,
|
615
|
-
borderRadiusSM:
|
591
|
+
borderRadiusSM: D,
|
616
592
|
borderRadiusLG: N,
|
617
593
|
controlWidth: x,
|
618
594
|
handleVisible: V
|
619
595
|
} = e;
|
620
596
|
return [
|
621
597
|
{
|
622
|
-
[t]: v(v(v(v({},
|
598
|
+
[t]: v(v(v(v({}, Te(e)), je(e)), We(e, t)), {
|
623
599
|
display: "inline-block",
|
624
600
|
width: x,
|
625
601
|
margin: 0,
|
626
602
|
padding: 0,
|
627
|
-
border: `${n}px ${
|
628
|
-
borderRadius:
|
603
|
+
border: `${n}px ${r} ${s}`,
|
604
|
+
borderRadius: i,
|
629
605
|
"&-rtl": {
|
630
606
|
direction: "rtl",
|
631
607
|
[`${t}-input`]: {
|
@@ -642,15 +618,15 @@ const Rt = (e) => {
|
|
642
618
|
},
|
643
619
|
"&-sm": {
|
644
620
|
padding: 0,
|
645
|
-
borderRadius:
|
621
|
+
borderRadius: D,
|
646
622
|
[`input${t}-input`]: {
|
647
623
|
height: m - 2 * n,
|
648
|
-
padding: `0 ${
|
624
|
+
padding: `0 ${o}px`
|
649
625
|
}
|
650
626
|
},
|
651
|
-
"&:hover": v({},
|
652
|
-
"&-focused": v({},
|
653
|
-
"&-disabled": v(v({},
|
627
|
+
"&:hover": v({}, He(e)),
|
628
|
+
"&-focused": v({}, lt(e)),
|
629
|
+
"&-disabled": v(v({}, it(e)), {
|
654
630
|
[`${t}-input`]: {
|
655
631
|
cursor: "not-allowed"
|
656
632
|
}
|
@@ -660,7 +636,7 @@ const Rt = (e) => {
|
|
660
636
|
color: f
|
661
637
|
}
|
662
638
|
},
|
663
|
-
"&-group": v(v(v({},
|
639
|
+
"&-group": v(v(v({}, Te(e)), st(e)), {
|
664
640
|
"&-wrapper": {
|
665
641
|
display: "inline-block",
|
666
642
|
textAlign: "start",
|
@@ -675,7 +651,7 @@ const Rt = (e) => {
|
|
675
651
|
},
|
676
652
|
"&-sm": {
|
677
653
|
[`${t}-group-addon`]: {
|
678
|
-
borderRadius:
|
654
|
+
borderRadius: D
|
679
655
|
}
|
680
656
|
}
|
681
657
|
}
|
@@ -688,14 +664,14 @@ const Rt = (e) => {
|
|
688
664
|
textAlign: "start",
|
689
665
|
backgroundColor: "transparent",
|
690
666
|
border: 0,
|
691
|
-
borderRadius:
|
667
|
+
borderRadius: i,
|
692
668
|
outline: 0,
|
693
669
|
transition: `all ${S} linear`,
|
694
670
|
appearance: "textfield",
|
695
671
|
color: e.colorText,
|
696
672
|
fontSize: "inherit",
|
697
673
|
verticalAlign: "top"
|
698
|
-
},
|
674
|
+
}, ot(e.colorTextPlaceholder)), {
|
699
675
|
'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
|
700
676
|
margin: 0,
|
701
677
|
webkitAppearance: "none",
|
@@ -716,10 +692,10 @@ const Rt = (e) => {
|
|
716
692
|
insetInlineEnd: 0,
|
717
693
|
width: e.handleWidth,
|
718
694
|
height: "100%",
|
719
|
-
background:
|
695
|
+
background: P,
|
720
696
|
borderStartStartRadius: 0,
|
721
|
-
borderStartEndRadius:
|
722
|
-
borderEndEndRadius:
|
697
|
+
borderStartEndRadius: i,
|
698
|
+
borderEndEndRadius: i,
|
723
699
|
borderEndStartRadius: 0,
|
724
700
|
opacity: V === !0 ? 1 : 0,
|
725
701
|
display: "flex",
|
@@ -749,7 +725,7 @@ const Rt = (e) => {
|
|
749
725
|
lineHeight: 0,
|
750
726
|
textAlign: "center",
|
751
727
|
cursor: "pointer",
|
752
|
-
borderInlineStart: `${n}px ${
|
728
|
+
borderInlineStart: `${n}px ${r} ${s}`,
|
753
729
|
transition: `all ${S} linear`,
|
754
730
|
"&:active": {
|
755
731
|
background: e.colorFillAlter
|
@@ -763,18 +739,18 @@ const Rt = (e) => {
|
|
763
739
|
color: I
|
764
740
|
}
|
765
741
|
},
|
766
|
-
"&-up-inner, &-down-inner": v(v({},
|
742
|
+
"&-up-inner, &-down-inner": v(v({}, ut()), {
|
767
743
|
color: w,
|
768
744
|
transition: `all ${S} linear`,
|
769
745
|
userSelect: "none"
|
770
746
|
})
|
771
747
|
},
|
772
748
|
[`${t}-handler-up`]: {
|
773
|
-
borderStartEndRadius:
|
749
|
+
borderStartEndRadius: i
|
774
750
|
},
|
775
751
|
[`${t}-handler-down`]: {
|
776
|
-
borderBlockStart: `${n}px ${
|
777
|
-
borderEndEndRadius:
|
752
|
+
borderBlockStart: `${n}px ${r} ${s}`,
|
753
|
+
borderEndEndRadius: i
|
778
754
|
},
|
779
755
|
"&-disabled, &-readonly": {
|
780
756
|
[`${t}-handler-wrap`]: {
|
@@ -805,29 +781,29 @@ const Rt = (e) => {
|
|
805
781
|
}
|
806
782
|
}
|
807
783
|
];
|
808
|
-
},
|
784
|
+
}, Dt = (e) => {
|
809
785
|
const {
|
810
786
|
componentCls: t,
|
811
787
|
inputPaddingHorizontal: n,
|
812
|
-
inputAffixPadding:
|
813
|
-
controlWidth:
|
814
|
-
borderRadiusLG:
|
788
|
+
inputAffixPadding: r,
|
789
|
+
controlWidth: s,
|
790
|
+
borderRadiusLG: i,
|
815
791
|
borderRadiusSM: d
|
816
792
|
} = e;
|
817
793
|
return {
|
818
|
-
[`${t}-affix-wrapper`]: v(v(v({},
|
794
|
+
[`${t}-affix-wrapper`]: v(v(v({}, je(e)), We(e, `${t}-affix-wrapper`)), {
|
819
795
|
position: "relative",
|
820
796
|
display: "inline-flex",
|
821
|
-
width:
|
797
|
+
width: s,
|
822
798
|
padding: 0,
|
823
799
|
paddingInlineStart: n,
|
824
800
|
"&-lg": {
|
825
|
-
borderRadius:
|
801
|
+
borderRadius: i
|
826
802
|
},
|
827
803
|
"&-sm": {
|
828
804
|
borderRadius: d
|
829
805
|
},
|
830
|
-
[`&:not(${t}-affix-wrapper-disabled):hover`]: v(v({},
|
806
|
+
[`&:not(${t}-affix-wrapper-disabled):hover`]: v(v({}, He(e)), {
|
831
807
|
zIndex: 1
|
832
808
|
}),
|
833
809
|
"&-focused, &:focus": {
|
@@ -865,7 +841,7 @@ const Rt = (e) => {
|
|
865
841
|
pointerEvents: "none"
|
866
842
|
},
|
867
843
|
"&-prefix": {
|
868
|
-
marginInlineEnd:
|
844
|
+
marginInlineEnd: r
|
869
845
|
},
|
870
846
|
"&-suffix": {
|
871
847
|
position: "absolute",
|
@@ -874,17 +850,17 @@ const Rt = (e) => {
|
|
874
850
|
zIndex: 1,
|
875
851
|
height: "100%",
|
876
852
|
marginInlineEnd: n,
|
877
|
-
marginInlineStart:
|
853
|
+
marginInlineStart: r
|
878
854
|
}
|
879
855
|
}
|
880
856
|
})
|
881
857
|
};
|
882
|
-
},
|
883
|
-
const t =
|
858
|
+
}, _t = nt("InputNumber", (e) => {
|
859
|
+
const t = at(e);
|
884
860
|
return [
|
885
|
-
|
886
|
-
|
887
|
-
|
861
|
+
Ct(t),
|
862
|
+
Dt(t),
|
863
|
+
rt(t)
|
888
864
|
];
|
889
865
|
}, (e) => ({
|
890
866
|
controlWidth: 90,
|
@@ -892,18 +868,18 @@ const Rt = (e) => {
|
|
892
868
|
handleFontSize: e.fontSize / 2,
|
893
869
|
handleVisible: "auto"
|
894
870
|
}));
|
895
|
-
var
|
871
|
+
var Mt = globalThis && globalThis.__rest || function(e, t) {
|
896
872
|
var n = {};
|
897
|
-
for (var
|
898
|
-
Object.prototype.hasOwnProperty.call(e,
|
873
|
+
for (var r in e)
|
874
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
899
875
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
900
|
-
for (var
|
901
|
-
t.indexOf(
|
876
|
+
for (var s = 0, r = Object.getOwnPropertySymbols(e); s < r.length; s++)
|
877
|
+
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
902
878
|
return n;
|
903
879
|
};
|
904
|
-
const
|
880
|
+
const ze = Ue(), Pt = () => v(v({}, ze), {
|
905
881
|
size: ye(),
|
906
|
-
bordered:
|
882
|
+
bordered: B(!0),
|
907
883
|
placeholder: String,
|
908
884
|
name: String,
|
909
885
|
id: String,
|
@@ -911,7 +887,7 @@ const We = Xe(), Bt = () => v(v({}, We), {
|
|
911
887
|
addonBefore: Se.any,
|
912
888
|
addonAfter: Se.any,
|
913
889
|
prefix: Se.any,
|
914
|
-
"onUpdate:value":
|
890
|
+
"onUpdate:value": ze.onChange,
|
915
891
|
valueModifiers: Object,
|
916
892
|
status: ye()
|
917
893
|
}), Ne = Ie({
|
@@ -920,100 +896,100 @@ const We = Xe(), Bt = () => v(v({}, We), {
|
|
920
896
|
},
|
921
897
|
name: "AInputNumber",
|
922
898
|
inheritAttrs: !1,
|
923
|
-
props:
|
899
|
+
props: Pt(),
|
924
900
|
slots: Object,
|
925
901
|
setup(e, t) {
|
926
902
|
let {
|
927
903
|
emit: n,
|
928
|
-
expose:
|
929
|
-
attrs:
|
930
|
-
slots:
|
904
|
+
expose: r,
|
905
|
+
attrs: s,
|
906
|
+
slots: i
|
931
907
|
} = t;
|
932
908
|
var d;
|
933
|
-
const c =
|
934
|
-
prefixCls:
|
909
|
+
const c = dt(), m = ct.useInject(), f = W(() => ft(m.status, e.status)), {
|
910
|
+
prefixCls: o,
|
935
911
|
size: w,
|
936
912
|
direction: S,
|
937
913
|
disabled: I
|
938
|
-
} =
|
914
|
+
} = pt("input-number", e), {
|
939
915
|
compactSize: $,
|
940
916
|
compactItemClassnames: E
|
941
|
-
} =
|
942
|
-
var
|
943
|
-
return (
|
944
|
-
}), [
|
917
|
+
} = mt(o, S), P = gt(), C = W(() => {
|
918
|
+
var h;
|
919
|
+
return (h = I.value) !== null && h !== void 0 ? h : P.value;
|
920
|
+
}), [D, N] = _t(o), x = W(() => $.value || w.value), V = M((d = e.value) !== null && d !== void 0 ? d : e.defaultValue), k = M(!1);
|
945
921
|
te(() => e.value, () => {
|
946
922
|
V.value = e.value;
|
947
923
|
});
|
948
|
-
const
|
949
|
-
var
|
950
|
-
(
|
924
|
+
const K = M(null), X = () => {
|
925
|
+
var h;
|
926
|
+
(h = K.value) === null || h === void 0 || h.focus();
|
951
927
|
};
|
952
|
-
|
953
|
-
focus:
|
928
|
+
r({
|
929
|
+
focus: X,
|
954
930
|
blur: () => {
|
955
|
-
var
|
956
|
-
(
|
931
|
+
var h;
|
932
|
+
(h = K.value) === null || h === void 0 || h.blur();
|
957
933
|
}
|
958
934
|
});
|
959
|
-
const Y = (
|
960
|
-
e.value === void 0 && (V.value =
|
961
|
-
},
|
962
|
-
k.value = !1, n("blur",
|
963
|
-
},
|
964
|
-
k.value = !0, n("focus",
|
935
|
+
const Y = (h) => {
|
936
|
+
e.value === void 0 && (V.value = h), n("update:value", h), n("change", h), c.onFieldChange();
|
937
|
+
}, se = (h) => {
|
938
|
+
k.value = !1, n("blur", h), c.onFieldBlur();
|
939
|
+
}, Z = (h) => {
|
940
|
+
k.value = !0, n("focus", h);
|
965
941
|
};
|
966
942
|
return () => {
|
967
|
-
var
|
943
|
+
var h, J, H, G;
|
968
944
|
const {
|
969
|
-
hasFeedback:
|
970
|
-
isFormItemInput:
|
945
|
+
hasFeedback: O,
|
946
|
+
isFormItemInput: oe,
|
971
947
|
feedbackIcon: ue
|
972
|
-
} = m, de = (
|
948
|
+
} = m, de = (h = e.id) !== null && h !== void 0 ? h : c.id.value, a = v(v(v({}, s), e), {
|
973
949
|
id: de,
|
974
950
|
disabled: C.value
|
975
951
|
}), {
|
976
|
-
class:
|
952
|
+
class: l,
|
977
953
|
bordered: u,
|
978
954
|
readonly: g,
|
979
955
|
style: y,
|
980
|
-
addonBefore:
|
981
|
-
addonAfter:
|
982
|
-
prefix:
|
956
|
+
addonBefore: R = (J = i.addonBefore) === null || J === void 0 ? void 0 : J.call(i),
|
957
|
+
addonAfter: F = (H = i.addonAfter) === null || H === void 0 ? void 0 : H.call(i),
|
958
|
+
prefix: Q = (G = i.prefix) === null || G === void 0 ? void 0 : G.call(i),
|
983
959
|
valueModifiers: re = {}
|
984
|
-
} =
|
960
|
+
} = a, _e = Mt(a, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), p = o.value, ce = j({
|
985
961
|
[`${p}-lg`]: x.value === "large",
|
986
962
|
[`${p}-sm`]: x.value === "small",
|
987
963
|
[`${p}-rtl`]: S.value === "rtl",
|
988
964
|
[`${p}-readonly`]: g,
|
989
965
|
[`${p}-borderless`]: !u,
|
990
|
-
[`${p}-in-form-item`]:
|
991
|
-
}, be(p, f.value),
|
992
|
-
let
|
993
|
-
ref:
|
966
|
+
[`${p}-in-form-item`]: oe
|
967
|
+
}, be(p, f.value), l, E.value, N.value);
|
968
|
+
let q = b(Et, T(T({}, vt(_e, ["size", "defaultValue"])), {}, {
|
969
|
+
ref: K,
|
994
970
|
lazy: !!re.lazy,
|
995
971
|
value: V.value,
|
996
972
|
class: ce,
|
997
973
|
prefixCls: p,
|
998
974
|
readonly: g,
|
999
975
|
onChange: Y,
|
1000
|
-
onBlur:
|
1001
|
-
onFocus:
|
976
|
+
onBlur: se,
|
977
|
+
onFocus: Z
|
1002
978
|
}), {
|
1003
|
-
upHandler:
|
979
|
+
upHandler: i.upIcon ? () => b("span", {
|
1004
980
|
class: `${p}-handler-up-inner`
|
1005
|
-
}, [
|
981
|
+
}, [i.upIcon()]) : () => b(St, {
|
1006
982
|
class: `${p}-handler-up-inner`
|
1007
983
|
}, null),
|
1008
|
-
downHandler:
|
984
|
+
downHandler: i.downIcon ? () => b("span", {
|
1009
985
|
class: `${p}-handler-down-inner`
|
1010
|
-
}, [
|
986
|
+
}, [i.downIcon()]) : () => b(ht, {
|
1011
987
|
class: `${p}-handler-down-inner`
|
1012
988
|
}, null)
|
1013
989
|
});
|
1014
|
-
const fe = $e(
|
1015
|
-
if (pe ||
|
1016
|
-
const L = j(`${p}-affix-wrapper`, be(`${p}-affix-wrapper`, f.value,
|
990
|
+
const fe = $e(R) || $e(F), pe = $e(Q);
|
991
|
+
if (pe || O) {
|
992
|
+
const L = j(`${p}-affix-wrapper`, be(`${p}-affix-wrapper`, f.value, O), {
|
1017
993
|
[`${p}-affix-wrapper-focused`]: k.value,
|
1018
994
|
[`${p}-affix-wrapper-disabled`]: C.value,
|
1019
995
|
[`${p}-affix-wrapper-sm`]: x.value === "small",
|
@@ -1021,53 +997,53 @@ const We = Xe(), Bt = () => v(v({}, We), {
|
|
1021
997
|
[`${p}-affix-wrapper-rtl`]: S.value === "rtl",
|
1022
998
|
[`${p}-affix-wrapper-readonly`]: g,
|
1023
999
|
[`${p}-affix-wrapper-borderless`]: !u,
|
1024
|
-
[`${
|
1000
|
+
[`${l}`]: !fe && l
|
1025
1001
|
}, N.value);
|
1026
|
-
|
1002
|
+
q = b("div", {
|
1027
1003
|
class: L,
|
1028
1004
|
style: y,
|
1029
|
-
onClick:
|
1030
|
-
}, [pe &&
|
1005
|
+
onClick: X
|
1006
|
+
}, [pe && b("span", {
|
1031
1007
|
class: `${p}-prefix`
|
1032
|
-
}, [
|
1008
|
+
}, [Q]), q, O && b("span", {
|
1033
1009
|
class: `${p}-suffix`
|
1034
1010
|
}, [ue])]);
|
1035
1011
|
}
|
1036
1012
|
if (fe) {
|
1037
|
-
const L = `${p}-group`, me = `${L}-addon`, ge =
|
1013
|
+
const L = `${p}-group`, me = `${L}-addon`, ge = R ? b("div", {
|
1038
1014
|
class: me
|
1039
|
-
}, [
|
1015
|
+
}, [R]) : null, ve = F ? b("div", {
|
1040
1016
|
class: me
|
1041
|
-
}, [
|
1017
|
+
}, [F]) : null, Me = j(`${p}-wrapper`, L, {
|
1042
1018
|
[`${L}-rtl`]: S.value === "rtl"
|
1043
|
-
}, N.value),
|
1019
|
+
}, N.value), Pe = j(`${p}-group-wrapper`, {
|
1044
1020
|
[`${p}-group-wrapper-sm`]: x.value === "small",
|
1045
1021
|
[`${p}-group-wrapper-lg`]: x.value === "large",
|
1046
1022
|
[`${p}-group-wrapper-rtl`]: S.value === "rtl"
|
1047
|
-
}, be(`${
|
1048
|
-
|
1049
|
-
class:
|
1023
|
+
}, be(`${o}-group-wrapper`, f.value, O), l, N.value);
|
1024
|
+
q = b("div", {
|
1025
|
+
class: Pe,
|
1050
1026
|
style: y
|
1051
|
-
}, [
|
1052
|
-
class:
|
1053
|
-
}, [ge &&
|
1054
|
-
default: () => [
|
1027
|
+
}, [b("div", {
|
1028
|
+
class: Me
|
1029
|
+
}, [ge && b(Ve, null, {
|
1030
|
+
default: () => [b(Oe, null, {
|
1055
1031
|
default: () => [ge]
|
1056
1032
|
})]
|
1057
|
-
}),
|
1058
|
-
default: () => [
|
1033
|
+
}), q, ve && b(Ve, null, {
|
1034
|
+
default: () => [b(Oe, null, {
|
1059
1035
|
default: () => [ve]
|
1060
1036
|
})]
|
1061
1037
|
})])]);
|
1062
1038
|
}
|
1063
|
-
return
|
1039
|
+
return D(bt(q, {
|
1064
1040
|
style: y
|
1065
1041
|
}));
|
1066
1042
|
};
|
1067
1043
|
}
|
1068
|
-
}),
|
1044
|
+
}), Vt = v(Ne, {
|
1069
1045
|
install: (e) => (e.component(Ne.name, Ne), e)
|
1070
1046
|
});
|
1071
1047
|
export {
|
1072
|
-
|
1048
|
+
Vt as _
|
1073
1049
|
};
|