wyfe-ivue 1.9.0 → 1.10.1
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/dist/{InlineForm-ux7u2OkU.js → InlineForm-EPf4hFTl.js} +3 -3
- package/dist/{RecTableColumn-DokVurlf.js → RecTableColumn-A6WPkbYS.js} +2 -2
- package/dist/{RowForm-cAUvBTfu.js → RowForm-DyehW4XB.js} +120 -119
- package/dist/{Selection-OFLFQNcv.js → Selection-CU0WcnW8.js} +2 -2
- package/dist/{Span-DsJPZtSv.js → Span-Dt5bBZ4L.js} +1 -1
- package/dist/{el-radio-sOtVZezV.js → el-radio-BCWPD3ua.js} +1 -1
- package/dist/{index-B4Tr1Z04.js → index-CbICvRRu.js} +2578 -2508
- package/dist/index.es.js +10 -9
- package/dist/index.umd.cjs +19 -19
- package/dist/types/index.d.ts +83 -31
- package/dist/{useFormHook-Ci_Gj-p9.js → useFormHook-CW3qhyoo.js} +2 -2
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { b as yn, S as De, s as
|
|
2
|
-
import { t as Ln, P as Gn, u as Wn, T as
|
|
3
|
-
import { E as sa, a as ra } from "./el-radio-
|
|
4
|
-
import { defineComponent as W, inject as
|
|
1
|
+
import { b as yn, S as De, s as nn, a as Cn, c as Vn, d as kn, e as Sn, i as wn, f as ge, m as we, g as D, _ as he, u as ie, h as B, j as _n, w as ye, k as He, l as Je, n as an, E as Be, U as L, o as _e, I as re, C as ue, p as tn, q as ln, r as on, t as Ie, v as se, x as sn, y as Le, z as Z, A as Nn, B as In, D as Pn, F as En, G as Tn, H as rn, J as Ee, K as Mn, L as $n, M as Te, N as Pe, O as On, P as Rn, Q as An, R as Xe, T as Dn, V as Fn, W as Un, X as qe, Y as Bn, Z as Kn, $ as jn, a0 as zn, a1 as Hn } from "./index-CbICvRRu.js";
|
|
2
|
+
import { t as Ln, P as Gn, u as Wn, T as Ze, a as Yn, d as Q, b as xn, c as Jn, e as Xn, f as qn, D as Zn, C as Qn, g as un, v as Qe, h as ea, E as na, i as aa, j as ta, k as la, l as oa } from "./useFormHook-CW3qhyoo.js";
|
|
3
|
+
import { E as sa, a as ra } from "./el-radio-BCWPD3ua.js";
|
|
4
|
+
import { defineComponent as W, inject as cn, computed as y, createBlock as C, openBlock as p, resolveDynamicComponent as le, normalizeStyle as ve, normalizeClass as S, unref as n, withCtx as M, renderSlot as ne, ref as Ne, createElementBlock as O, createCommentVNode as _, createElementVNode as U, toDisplayString as oe, createVNode as G, nextTick as dn, provide as pn, mergeProps as fn, reactive as ia, watch as $e, onMounted as mn, onUpdated as ua, withModifiers as Ge, withDirectives as Ke, withKeys as Oe, createSlots as ca, shallowRef as da, Fragment as Me, renderList as je, createTextVNode as pa } from "vue";
|
|
5
5
|
function fa() {
|
|
6
6
|
}
|
|
7
7
|
function ma(o) {
|
|
8
8
|
return o !== o;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
for (var l = s - 1,
|
|
10
|
+
function ba(o, d, s) {
|
|
11
|
+
for (var l = s - 1, b = o.length; ++l < b; )
|
|
12
12
|
if (o[l] === d)
|
|
13
13
|
return l;
|
|
14
14
|
return -1;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return d === d ?
|
|
16
|
+
function va(o, d, s) {
|
|
17
|
+
return d === d ? ba(o, d, s) : yn(o, ma, s);
|
|
18
18
|
}
|
|
19
19
|
function ga(o, d) {
|
|
20
20
|
var s = o == null ? 0 : o.length;
|
|
21
|
-
return !!s &&
|
|
21
|
+
return !!s && va(o, d, 0) > -1;
|
|
22
22
|
}
|
|
23
|
-
var ha = 1 / 0, ya = De && 1 /
|
|
23
|
+
var ha = 1 / 0, ya = De && 1 / nn(new De([, -0]))[1] == ha ? function(o) {
|
|
24
24
|
return new De(o);
|
|
25
25
|
} : fa, Ca = 200;
|
|
26
26
|
function Va(o, d, s) {
|
|
27
|
-
var l = -1,
|
|
27
|
+
var l = -1, b = ga, g = o.length, t = !0, m = [], k = m;
|
|
28
28
|
if (g >= Ca) {
|
|
29
29
|
var V = ya(o);
|
|
30
30
|
if (V)
|
|
31
|
-
return
|
|
32
|
-
t = !1,
|
|
31
|
+
return nn(V);
|
|
32
|
+
t = !1, b = Vn, k = new Cn();
|
|
33
33
|
} else
|
|
34
34
|
k = m;
|
|
35
35
|
e:
|
|
@@ -40,7 +40,7 @@ function Va(o, d, s) {
|
|
|
40
40
|
if (k[F] === $)
|
|
41
41
|
continue e;
|
|
42
42
|
m.push(h);
|
|
43
|
-
} else
|
|
43
|
+
} else b(k, $, s) || (k !== m && k.push($), m.push(h));
|
|
44
44
|
}
|
|
45
45
|
return m;
|
|
46
46
|
}
|
|
@@ -88,13 +88,13 @@ const ka = ge({
|
|
|
88
88
|
type: D([Number, Object]),
|
|
89
89
|
default: () => we({})
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
91
|
+
}), bn = /* @__PURE__ */ Symbol("rowContextKey"), Sa = W({
|
|
92
92
|
name: "ElCol"
|
|
93
93
|
}), wa = /* @__PURE__ */ W({
|
|
94
94
|
...Sa,
|
|
95
95
|
props: ka,
|
|
96
96
|
setup(o) {
|
|
97
|
-
const d = o, { gutter: s } =
|
|
97
|
+
const d = o, { gutter: s } = cn(bn, { gutter: y(() => 0) }), l = ie("col"), b = y(() => {
|
|
98
98
|
const t = {};
|
|
99
99
|
return s.value && (t.paddingLeft = t.paddingRight = `${s.value / 2}px`), t;
|
|
100
100
|
}), g = y(() => {
|
|
@@ -110,7 +110,7 @@ const ka = ge({
|
|
|
110
110
|
});
|
|
111
111
|
return (t, m) => (p(), C(le(t.tag), {
|
|
112
112
|
class: S(n(g)),
|
|
113
|
-
style:
|
|
113
|
+
style: ve(n(b))
|
|
114
114
|
}, {
|
|
115
115
|
default: M(() => [
|
|
116
116
|
ne(t.$slots, "default")
|
|
@@ -130,12 +130,12 @@ const Na = ye(_a), Ia = ge({
|
|
|
130
130
|
props: Ia,
|
|
131
131
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
132
132
|
setup(o, { emit: d }) {
|
|
133
|
-
const s = o, l = (f,
|
|
133
|
+
const s = o, l = (f, v) => {
|
|
134
134
|
const E = [];
|
|
135
|
-
for (let A = f; A <=
|
|
135
|
+
for (let A = f; A <= v; A++)
|
|
136
136
|
E.push(A);
|
|
137
137
|
return E;
|
|
138
|
-
}, { t:
|
|
138
|
+
}, { t: b, lang: g } = He(), t = ie("time"), m = ie("picker"), k = cn(Gn), {
|
|
139
139
|
arrowControl: V,
|
|
140
140
|
disabledHours: h,
|
|
141
141
|
disabledMinutes: $,
|
|
@@ -153,7 +153,7 @@ const Na = ye(_a), Ia = ge({
|
|
|
153
153
|
i.value ? "has-seconds" : ""
|
|
154
154
|
]), u = y(() => s.parsedValue[0]), c = y(() => s.parsedValue[1]), T = Wn(s), I = () => {
|
|
155
155
|
const f = T.value;
|
|
156
|
-
d("pick", f, !1),
|
|
156
|
+
d("pick", f, !1), dn(() => {
|
|
157
157
|
T.value = f;
|
|
158
158
|
});
|
|
159
159
|
}, i = y(() => s.format.includes("ss")), w = y(() => s.format.includes("A") ? "A" : s.format.includes("a") ? "a" : ""), J = (f = !1) => {
|
|
@@ -163,63 +163,63 @@ const Na = ye(_a), Ia = ge({
|
|
|
163
163
|
}, Ce = (f) => {
|
|
164
164
|
de(u.value, f.millisecond(0));
|
|
165
165
|
}, ce = (f) => {
|
|
166
|
-
const
|
|
167
|
-
return
|
|
168
|
-
}, de = (f,
|
|
169
|
-
s.visible && d("pick", [f,
|
|
170
|
-
}, Ve = y(() => u.value > c.value), ae = Ne([0, 2]), ke = (f,
|
|
171
|
-
d("select-range", f,
|
|
172
|
-
}, te = y(() => i.value ? 11 : 8), Se = (f,
|
|
173
|
-
d("select-range", f,
|
|
166
|
+
const v = f.map((A) => Q(A).locale(g.value)), E = j(v);
|
|
167
|
+
return v[0].isSame(E[0]) && v[1].isSame(E[1]);
|
|
168
|
+
}, de = (f, v) => {
|
|
169
|
+
s.visible && d("pick", [f, v], !0);
|
|
170
|
+
}, Ve = y(() => u.value > c.value), ae = Ne([0, 2]), ke = (f, v) => {
|
|
171
|
+
d("select-range", f, v, "min"), ae.value = [f, v];
|
|
172
|
+
}, te = y(() => i.value ? 11 : 8), Se = (f, v) => {
|
|
173
|
+
d("select-range", f, v, "max");
|
|
174
174
|
const E = n(te);
|
|
175
|
-
ae.value = [f + E,
|
|
175
|
+
ae.value = [f + E, v + E];
|
|
176
176
|
}, a = (f) => {
|
|
177
|
-
const
|
|
177
|
+
const v = i.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11], E = ["hours", "minutes"].concat(i.value ? ["seconds"] : []), z = (v.indexOf(ae.value[0]) + f + v.length) % v.length, H = v.length / 2;
|
|
178
178
|
z < H ? Re.start_emitSelectRange(E[z]) : Re.end_emitSelectRange(E[z - H]);
|
|
179
179
|
}, e = (f) => {
|
|
180
|
-
const
|
|
181
|
-
if ([E, A].includes(
|
|
182
|
-
a(
|
|
180
|
+
const v = an(f), { left: E, right: A, up: z, down: H } = Be;
|
|
181
|
+
if ([E, A].includes(v)) {
|
|
182
|
+
a(v === E ? -1 : 1), f.preventDefault();
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
if ([z, H].includes(
|
|
186
|
-
const q =
|
|
185
|
+
if ([z, H].includes(v)) {
|
|
186
|
+
const q = v === z ? -1 : 1, me = ae.value[0] < te.value ? "start" : "end";
|
|
187
187
|
Re[`${me}_scrollDown`](q), f.preventDefault();
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
}, r = (f,
|
|
191
|
-
const E = h ? h(f) : [], A = f === "start", H = (
|
|
190
|
+
}, r = (f, v) => {
|
|
191
|
+
const E = h ? h(f) : [], A = f === "start", H = (v || (A ? c.value : u.value)).hour(), q = A ? l(H + 1, 23) : l(0, H - 1);
|
|
192
192
|
return Fe(E, q);
|
|
193
|
-
}, N = (f,
|
|
194
|
-
const A = $ ? $(f,
|
|
193
|
+
}, N = (f, v, E) => {
|
|
194
|
+
const A = $ ? $(f, v) : [], z = v === "start", H = E || (z ? c.value : u.value), q = H.hour();
|
|
195
195
|
if (f !== q)
|
|
196
196
|
return A;
|
|
197
197
|
const me = H.minute(), Ae = z ? l(me + 1, 59) : l(0, me - 1);
|
|
198
198
|
return Fe(A, Ae);
|
|
199
|
-
}, P = (f,
|
|
200
|
-
const z = F ? F(f,
|
|
201
|
-
if (f !== me ||
|
|
199
|
+
}, P = (f, v, E, A) => {
|
|
200
|
+
const z = F ? F(f, v, E) : [], H = E === "start", q = A || (H ? c.value : u.value), me = q.hour(), Ae = q.minute();
|
|
201
|
+
if (f !== me || v !== Ae)
|
|
202
202
|
return z;
|
|
203
|
-
const
|
|
203
|
+
const xe = q.second(), hn = H ? l(xe + 1, 59) : l(0, xe - 1);
|
|
204
204
|
return Fe(z, hn);
|
|
205
|
-
}, j = ([f,
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
}, j = ([f, v]) => [
|
|
206
|
+
We(f, "start", !0, v),
|
|
207
|
+
We(v, "end", !1, f)
|
|
208
208
|
], { getAvailableHours: pe, getAvailableMinutes: fe, getAvailableSeconds: R } = xn(r, N, P), {
|
|
209
209
|
timePickerOptions: Re,
|
|
210
|
-
getAvailableTime:
|
|
211
|
-
onSetOption:
|
|
210
|
+
getAvailableTime: We,
|
|
211
|
+
onSetOption: Ye
|
|
212
212
|
} = Yn({
|
|
213
213
|
getAvailableHours: pe,
|
|
214
214
|
getAvailableMinutes: fe,
|
|
215
215
|
getAvailableSeconds: R
|
|
216
|
-
}),
|
|
217
|
-
if (
|
|
218
|
-
return Y.map((
|
|
216
|
+
}), vn = (f) => f ? Je(f) ? f.map((v) => Q(v, s.format).locale(g.value)) : Q(f, s.format).locale(g.value) : null, gn = () => {
|
|
217
|
+
if (Je(Y))
|
|
218
|
+
return Y.map((v) => Q(v).locale(g.value));
|
|
219
219
|
const f = Q(Y).locale(g.value);
|
|
220
220
|
return [f, f.add(60, "m")];
|
|
221
221
|
};
|
|
222
|
-
return d("set-picker-option", ["parseUserInput",
|
|
222
|
+
return d("set-picker-option", ["parseUserInput", vn]), d("set-picker-option", ["isValidValue", ce]), d("set-picker-option", ["handleKeydownInput", e]), d("set-picker-option", ["getDefaultValue", gn]), d("set-picker-option", ["getRangeAvailableTime", j]), (f, v) => f.actualVisible ? (p(), O("div", {
|
|
223
223
|
key: 0,
|
|
224
224
|
class: S([n(t).b("range-picker"), n(m).b("panel")])
|
|
225
225
|
}, [
|
|
@@ -231,11 +231,11 @@ const Na = ye(_a), Ia = ge({
|
|
|
231
231
|
}, [
|
|
232
232
|
U("div", {
|
|
233
233
|
class: S(n(t).be("range-picker", "header"))
|
|
234
|
-
}, oe(n(
|
|
234
|
+
}, oe(n(b)("el.datepicker.startTime")), 3),
|
|
235
235
|
U("div", {
|
|
236
236
|
class: S(n(K))
|
|
237
237
|
}, [
|
|
238
|
-
G(
|
|
238
|
+
G(Ze, {
|
|
239
239
|
ref: "minSpinner",
|
|
240
240
|
role: "start",
|
|
241
241
|
"show-seconds": n(i),
|
|
@@ -246,7 +246,7 @@ const Na = ye(_a), Ia = ge({
|
|
|
246
246
|
"disabled-minutes": N,
|
|
247
247
|
"disabled-seconds": P,
|
|
248
248
|
onChange: X,
|
|
249
|
-
onSetOption: n(
|
|
249
|
+
onSetOption: n(Ye),
|
|
250
250
|
onSelectRange: ke
|
|
251
251
|
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
252
252
|
], 2)
|
|
@@ -256,11 +256,11 @@ const Na = ye(_a), Ia = ge({
|
|
|
256
256
|
}, [
|
|
257
257
|
U("div", {
|
|
258
258
|
class: S(n(t).be("range-picker", "header"))
|
|
259
|
-
}, oe(n(
|
|
259
|
+
}, oe(n(b)("el.datepicker.endTime")), 3),
|
|
260
260
|
U("div", {
|
|
261
261
|
class: S(n(x))
|
|
262
262
|
}, [
|
|
263
|
-
G(
|
|
263
|
+
G(Ze, {
|
|
264
264
|
ref: "maxSpinner",
|
|
265
265
|
role: "end",
|
|
266
266
|
"show-seconds": n(i),
|
|
@@ -271,7 +271,7 @@ const Na = ye(_a), Ia = ge({
|
|
|
271
271
|
"disabled-minutes": N,
|
|
272
272
|
"disabled-seconds": P,
|
|
273
273
|
onChange: Ce,
|
|
274
|
-
onSetOption: n(
|
|
274
|
+
onSetOption: n(Ye),
|
|
275
275
|
onSelectRange: Se
|
|
276
276
|
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
277
277
|
], 2)
|
|
@@ -284,19 +284,19 @@ const Na = ye(_a), Ia = ge({
|
|
|
284
284
|
type: "button",
|
|
285
285
|
class: S([n(t).be("panel", "btn"), "cancel"]),
|
|
286
286
|
onClick: (E) => I()
|
|
287
|
-
}, oe(n(
|
|
287
|
+
}, oe(n(b)("el.datepicker.cancel")), 11, ["onClick"]),
|
|
288
288
|
U("button", {
|
|
289
289
|
type: "button",
|
|
290
290
|
class: S([n(t).be("panel", "btn"), "confirm"]),
|
|
291
291
|
disabled: n(Ve),
|
|
292
292
|
onClick: (E) => J()
|
|
293
|
-
}, oe(n(
|
|
293
|
+
}, oe(n(b)("el.datepicker.confirm")), 11, ["disabled", "onClick"])
|
|
294
294
|
], 2)
|
|
295
295
|
], 2)) : _("v-if", !0);
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
var Ea = /* @__PURE__ */ he(Pa, [["__file", "panel-time-range.vue"]]);
|
|
299
|
-
Q.extend(
|
|
299
|
+
Q.extend(un);
|
|
300
300
|
var Ta = W({
|
|
301
301
|
name: "ElTimePicker",
|
|
302
302
|
install: null,
|
|
@@ -306,8 +306,8 @@ var Ta = W({
|
|
|
306
306
|
},
|
|
307
307
|
emits: [L],
|
|
308
308
|
setup(o, d) {
|
|
309
|
-
const s = Ne(), [l,
|
|
310
|
-
return
|
|
309
|
+
const s = Ne(), [l, b] = o.isRange ? ["timerange", Ea] : ["time", Xn], g = (t) => d.emit(L, t);
|
|
310
|
+
return pn(qn, o.popperOptions), d.expose({
|
|
311
311
|
focus: () => {
|
|
312
312
|
var t;
|
|
313
313
|
(t = s.value) == null || t.focus();
|
|
@@ -327,13 +327,13 @@ var Ta = W({
|
|
|
327
327
|
}), () => {
|
|
328
328
|
var t;
|
|
329
329
|
const m = (t = o.format) != null ? t : Zn;
|
|
330
|
-
return G(Qn,
|
|
330
|
+
return G(Qn, fn(o, {
|
|
331
331
|
ref: s,
|
|
332
332
|
type: l,
|
|
333
333
|
format: m,
|
|
334
334
|
"onUpdate:modelValue": g
|
|
335
335
|
}), {
|
|
336
|
-
default: (k) => G(
|
|
336
|
+
default: (k) => G(b, k, null)
|
|
337
337
|
});
|
|
338
338
|
};
|
|
339
339
|
}
|
|
@@ -364,7 +364,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
364
364
|
type: Boolean,
|
|
365
365
|
default: void 0
|
|
366
366
|
},
|
|
367
|
-
size:
|
|
367
|
+
size: ln,
|
|
368
368
|
controls: {
|
|
369
369
|
type: Boolean,
|
|
370
370
|
default: !0
|
|
@@ -389,7 +389,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
389
389
|
type: Boolean,
|
|
390
390
|
default: !0
|
|
391
391
|
},
|
|
392
|
-
...
|
|
392
|
+
...tn(["ariaLabel"]),
|
|
393
393
|
inputmode: {
|
|
394
394
|
type: D(String),
|
|
395
395
|
default: void 0
|
|
@@ -412,13 +412,13 @@ const Ma = ye(Ta), $a = ge({
|
|
|
412
412
|
props: $a,
|
|
413
413
|
emits: Oa,
|
|
414
414
|
setup(o, { expose: d, emit: s }) {
|
|
415
|
-
const l = o, { t:
|
|
415
|
+
const l = o, { t: b } = He(), g = ie("input-number"), t = Ne(), m = ia({
|
|
416
416
|
currentValue: l.modelValue,
|
|
417
417
|
userInput: null
|
|
418
|
-
}), { formItem: k } =
|
|
418
|
+
}), { formItem: k } = on(), V = y(() => B(l.modelValue) && l.modelValue <= l.min), h = y(() => B(l.modelValue) && l.modelValue >= l.max), $ = y(() => {
|
|
419
419
|
const a = c(l.step);
|
|
420
420
|
return Ie(l.precision) ? Math.max(c(l.modelValue), a) : (a > l.precision && se("InputNumber", "precision should not be less than the decimal places of step"), l.precision);
|
|
421
|
-
}), F = y(() => l.controls && l.controlsPosition === "right"), Y =
|
|
421
|
+
}), F = y(() => l.controls && l.controlsPosition === "right"), Y = sn(), K = Le(), x = y(() => {
|
|
422
422
|
if (m.userInput !== null)
|
|
423
423
|
return m.userInput;
|
|
424
424
|
let a = m.currentValue;
|
|
@@ -446,7 +446,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
446
446
|
let N = 0;
|
|
447
447
|
return r !== -1 && (N = e.length - r - 1), N;
|
|
448
448
|
}, T = (a, e = 1) => B(a) ? a >= Number.MAX_SAFE_INTEGER && e === 1 ? (se("InputNumber", "The value has reached the maximum safe integer limit."), a) : a <= Number.MIN_SAFE_INTEGER && e === -1 ? (se("InputNumber", "The value has reached the minimum safe integer limit."), a) : u(a + l.step * e) : m.currentValue, I = (a) => {
|
|
449
|
-
const e =
|
|
449
|
+
const e = an(a), r = Mn(a);
|
|
450
450
|
if (l.disabledScientific && ["e", "E"].includes(r)) {
|
|
451
451
|
a.preventDefault();
|
|
452
452
|
return;
|
|
@@ -473,7 +473,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
473
473
|
X(e), s(re, m.currentValue), te();
|
|
474
474
|
}, J = (a, e) => {
|
|
475
475
|
const { max: r, min: N, step: P, precision: j, stepStrictly: pe, valueOnClear: fe } = l;
|
|
476
|
-
r < N &&
|
|
476
|
+
r < N && rn("InputNumber", "min should not be greater than max.");
|
|
477
477
|
let R = Number(a);
|
|
478
478
|
if (_e(a) || Number.isNaN(R))
|
|
479
479
|
return null;
|
|
@@ -519,7 +519,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
519
519
|
m.userInput === null && r !== e && (m.currentValue = r);
|
|
520
520
|
}, { immediate: !0 }), $e(() => l.precision, () => {
|
|
521
521
|
m.currentValue = J(l.modelValue);
|
|
522
|
-
}),
|
|
522
|
+
}), mn(() => {
|
|
523
523
|
var a;
|
|
524
524
|
const { min: e, max: r, modelValue: N } = l, P = (a = t.value) == null ? void 0 : a.input;
|
|
525
525
|
if (P.setAttribute("role", "spinbutton"), Number.isFinite(r) ? P.setAttribute("aria-valuemax", String(r)) : P.removeAttribute("aria-valuemax"), Number.isFinite(e) ? P.setAttribute("aria-valuemin", String(e)) : P.removeAttribute("aria-valuemin"), P.setAttribute("aria-valuenow", m.currentValue || m.currentValue === 0 ? String(m.currentValue) : ""), P.setAttribute("aria-disabled", String(K.value)), !B(N) && N != null) {
|
|
@@ -543,13 +543,13 @@ const Ma = ye(Ta), $a = ge({
|
|
|
543
543
|
n(g).is("controls-right", n(F)),
|
|
544
544
|
n(g).is(a.align, !!a.align)
|
|
545
545
|
]),
|
|
546
|
-
onDragstart:
|
|
546
|
+
onDragstart: Ge(() => {
|
|
547
547
|
}, ["prevent"])
|
|
548
548
|
}, [
|
|
549
549
|
a.controls ? Ke((p(), O("span", {
|
|
550
550
|
key: 0,
|
|
551
551
|
role: "button",
|
|
552
|
-
"aria-label": n(
|
|
552
|
+
"aria-label": n(b)("el.inputNumber.decrease"),
|
|
553
553
|
class: S([n(g).e("decrease"), n(g).is("disabled", n(V))]),
|
|
554
554
|
onKeydown: Oe(w, ["enter"])
|
|
555
555
|
}, [
|
|
@@ -562,12 +562,12 @@ const Ma = ye(Ta), $a = ge({
|
|
|
562
562
|
})
|
|
563
563
|
])
|
|
564
564
|
], 42, ["aria-label", "onKeydown"])), [
|
|
565
|
-
[n(
|
|
565
|
+
[n(Qe), w]
|
|
566
566
|
]) : _("v-if", !0),
|
|
567
567
|
a.controls ? Ke((p(), O("span", {
|
|
568
568
|
key: 1,
|
|
569
569
|
role: "button",
|
|
570
|
-
"aria-label": n(
|
|
570
|
+
"aria-label": n(b)("el.inputNumber.increase"),
|
|
571
571
|
class: S([n(g).e("increase"), n(g).is("disabled", n(h))]),
|
|
572
572
|
onKeydown: Oe(i, ["enter"])
|
|
573
573
|
}, [
|
|
@@ -580,7 +580,7 @@ const Ma = ye(Ta), $a = ge({
|
|
|
580
580
|
})
|
|
581
581
|
])
|
|
582
582
|
], 42, ["aria-label", "onKeydown"])), [
|
|
583
|
-
[n(
|
|
583
|
+
[n(Qe), i]
|
|
584
584
|
]) : _("v-if", !0),
|
|
585
585
|
G(n(Tn), {
|
|
586
586
|
id: a.id,
|
|
@@ -656,10 +656,10 @@ const Fa = ye(Da), Ua = [
|
|
|
656
656
|
props: Ka,
|
|
657
657
|
setup(o) {
|
|
658
658
|
const d = o, s = ie("row"), l = y(() => d.gutter);
|
|
659
|
-
|
|
659
|
+
pn(bn, {
|
|
660
660
|
gutter: l
|
|
661
661
|
});
|
|
662
|
-
const
|
|
662
|
+
const b = y(() => {
|
|
663
663
|
const t = {};
|
|
664
664
|
return d.gutter && (t.marginRight = t.marginLeft = `-${d.gutter / 2}px`), t;
|
|
665
665
|
}), g = y(() => [
|
|
@@ -669,7 +669,7 @@ const Fa = ye(Da), Ua = [
|
|
|
669
669
|
]);
|
|
670
670
|
return (t, m) => (p(), C(le(t.tag), {
|
|
671
671
|
class: S(n(g)),
|
|
672
|
-
style:
|
|
672
|
+
style: ve(n(b))
|
|
673
673
|
}, {
|
|
674
674
|
default: M(() => [
|
|
675
675
|
ne(t.$slots, "default")
|
|
@@ -741,7 +741,7 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
741
741
|
tabindex: {
|
|
742
742
|
type: [String, Number]
|
|
743
743
|
},
|
|
744
|
-
...
|
|
744
|
+
...tn(["ariaLabel"])
|
|
745
745
|
}), Ya = {
|
|
746
746
|
[L]: (o) => Te(o) || Ee(o) || B(o),
|
|
747
747
|
[ue]: (o) => Te(o) || Ee(o) || B(o),
|
|
@@ -753,8 +753,8 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
753
753
|
props: Wa,
|
|
754
754
|
emits: Ya,
|
|
755
755
|
setup(o, { expose: d, emit: s }) {
|
|
756
|
-
const l = o, { formItem:
|
|
757
|
-
formItemContext:
|
|
756
|
+
const l = o, { formItem: b } = on(), g = sn(), t = ie("switch"), { inputId: m } = On(l, {
|
|
757
|
+
formItemContext: b
|
|
758
758
|
}), k = Le(y(() => {
|
|
759
759
|
if (l.loading)
|
|
760
760
|
return !0;
|
|
@@ -780,11 +780,11 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
780
780
|
const x = y(() => V.value ? l.modelValue : !1), u = y(() => x.value === l.activeValue);
|
|
781
781
|
[l.activeValue, l.inactiveValue].includes(x.value) || (s(L, l.inactiveValue), s(ue, l.inactiveValue), s(re, l.inactiveValue)), $e(u, (i) => {
|
|
782
782
|
var w;
|
|
783
|
-
h.value.checked = i, l.validateEvent && ((w =
|
|
783
|
+
h.value.checked = i, l.validateEvent && ((w = b?.validate) == null || w.call(b, "change").catch((J) => se(J)));
|
|
784
784
|
});
|
|
785
785
|
const c = () => {
|
|
786
786
|
const i = u.value ? l.inactiveValue : l.activeValue;
|
|
787
|
-
s(L, i), s(ue, i), s(re, i),
|
|
787
|
+
s(L, i), s(ue, i), s(re, i), dn(() => {
|
|
788
788
|
h.value.checked = u.value;
|
|
789
789
|
});
|
|
790
790
|
}, T = () => {
|
|
@@ -797,9 +797,9 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
797
797
|
}
|
|
798
798
|
const w = i();
|
|
799
799
|
[
|
|
800
|
-
|
|
800
|
+
Xe(w),
|
|
801
801
|
Te(w)
|
|
802
|
-
].includes(!0) ||
|
|
802
|
+
].includes(!0) || rn(ze, "beforeChange must return type `Promise<boolean>` or `boolean`"), Xe(w) ? w.then((X) => {
|
|
803
803
|
X && c();
|
|
804
804
|
}).catch((X) => {
|
|
805
805
|
se(ze, `some error occurred: ${X}`);
|
|
@@ -808,14 +808,14 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
808
808
|
var i, w;
|
|
809
809
|
(w = (i = h.value) == null ? void 0 : i.focus) == null || w.call(i);
|
|
810
810
|
};
|
|
811
|
-
return
|
|
811
|
+
return mn(() => {
|
|
812
812
|
h.value.checked = u.value;
|
|
813
813
|
}), d({
|
|
814
814
|
focus: I,
|
|
815
815
|
checked: u
|
|
816
816
|
}), (i, w) => (p(), O("div", {
|
|
817
817
|
class: S(n($)),
|
|
818
|
-
onClick:
|
|
818
|
+
onClick: Ge(T, ["prevent"])
|
|
819
819
|
}, [
|
|
820
820
|
U("input", {
|
|
821
821
|
id: n(m),
|
|
@@ -852,7 +852,7 @@ const La = ye(Ha), Ga = (o) => ["", ...$n].includes(o), Wa = ge({
|
|
|
852
852
|
], 2)) : _("v-if", !0),
|
|
853
853
|
U("span", {
|
|
854
854
|
class: S(n(t).e("core")),
|
|
855
|
-
style:
|
|
855
|
+
style: ve(n(K))
|
|
856
856
|
}, [
|
|
857
857
|
i.inlinePrompt ? (p(), O("div", {
|
|
858
858
|
key: 0,
|
|
@@ -943,7 +943,7 @@ const qa = ye(Xa), Za = ge({
|
|
|
943
943
|
type: Boolean,
|
|
944
944
|
default: !0
|
|
945
945
|
},
|
|
946
|
-
size:
|
|
946
|
+
size: ln,
|
|
947
947
|
placeholder: String,
|
|
948
948
|
start: {
|
|
949
949
|
type: String,
|
|
@@ -985,8 +985,8 @@ const qa = ye(Xa), Za = ge({
|
|
|
985
985
|
const d = (o || "").split(":");
|
|
986
986
|
if (d.length >= 2) {
|
|
987
987
|
let s = Number.parseInt(d[0], 10);
|
|
988
|
-
const l = Number.parseInt(d[1], 10),
|
|
989
|
-
return
|
|
988
|
+
const l = Number.parseInt(d[1], 10), b = o.toUpperCase();
|
|
989
|
+
return b.includes("AM") && s === 12 ? s = 0 : b.includes("PM") && s !== 12 && (s += 12), {
|
|
990
990
|
hours: s,
|
|
991
991
|
minutes: l
|
|
992
992
|
};
|
|
@@ -999,20 +999,20 @@ const qa = ye(Xa), Za = ge({
|
|
|
999
999
|
const l = ee(d);
|
|
1000
1000
|
if (!l)
|
|
1001
1001
|
return -1;
|
|
1002
|
-
const
|
|
1003
|
-
return
|
|
1004
|
-
},
|
|
1002
|
+
const b = s.minutes + s.hours * 60, g = l.minutes + l.hours * 60;
|
|
1003
|
+
return b === g ? 0 : b > g ? 1 : -1;
|
|
1004
|
+
}, en = (o) => `${o}`.padStart(2, "0"), be = (o) => `${en(o.hours)}:${en(o.minutes)}`, Qa = (o, d) => {
|
|
1005
1005
|
const s = ee(o);
|
|
1006
1006
|
if (!s)
|
|
1007
1007
|
return "";
|
|
1008
1008
|
const l = ee(d);
|
|
1009
1009
|
if (!l)
|
|
1010
1010
|
return "";
|
|
1011
|
-
const
|
|
1011
|
+
const b = {
|
|
1012
1012
|
hours: s.hours,
|
|
1013
1013
|
minutes: s.minutes
|
|
1014
1014
|
};
|
|
1015
|
-
return
|
|
1015
|
+
return b.minutes += l.minutes, b.hours += l.hours, b.hours += Math.floor(b.minutes / 60), b.minutes = b.minutes % 60, be(b);
|
|
1016
1016
|
}, et = W({
|
|
1017
1017
|
name: "ElTimeSelect"
|
|
1018
1018
|
}), nt = /* @__PURE__ */ W({
|
|
@@ -1021,22 +1021,22 @@ const qa = ye(Xa), Za = ge({
|
|
|
1021
1021
|
emits: [ue, "blur", "focus", "clear", L],
|
|
1022
1022
|
setup(o, { expose: d }) {
|
|
1023
1023
|
const s = o;
|
|
1024
|
-
Q.extend(
|
|
1025
|
-
const { Option: l } =
|
|
1024
|
+
Q.extend(un);
|
|
1025
|
+
const { Option: l } = qe, b = ie("input"), g = Ne(), t = Le(), { lang: m } = He(), k = y(() => s.modelValue), V = y(() => {
|
|
1026
1026
|
const c = ee(s.start);
|
|
1027
|
-
return c ?
|
|
1027
|
+
return c ? be(c) : null;
|
|
1028
1028
|
}), h = y(() => {
|
|
1029
1029
|
const c = ee(s.end);
|
|
1030
|
-
return c ?
|
|
1030
|
+
return c ? be(c) : null;
|
|
1031
1031
|
}), $ = y(() => {
|
|
1032
1032
|
const c = ee(s.step);
|
|
1033
|
-
return c ?
|
|
1033
|
+
return c ? be(c) : null;
|
|
1034
1034
|
}), F = y(() => {
|
|
1035
1035
|
const c = ee(s.minTime || "");
|
|
1036
|
-
return c ?
|
|
1036
|
+
return c ? be(c) : null;
|
|
1037
1037
|
}), Y = y(() => {
|
|
1038
1038
|
const c = ee(s.maxTime || "");
|
|
1039
|
-
return c ?
|
|
1039
|
+
return c ? be(c) : null;
|
|
1040
1040
|
}), K = y(() => {
|
|
1041
1041
|
var c;
|
|
1042
1042
|
const T = [], I = (i, w) => {
|
|
@@ -1065,7 +1065,7 @@ const qa = ye(Xa), Za = ge({
|
|
|
1065
1065
|
var c, T;
|
|
1066
1066
|
(T = (c = g.value) == null ? void 0 : c.focus) == null || T.call(c);
|
|
1067
1067
|
}
|
|
1068
|
-
}), (c, T) => (p(), C(n(
|
|
1068
|
+
}), (c, T) => (p(), C(n(qe), {
|
|
1069
1069
|
ref_key: "select",
|
|
1070
1070
|
ref: g,
|
|
1071
1071
|
"model-value": n(k),
|
|
@@ -1090,7 +1090,7 @@ const qa = ye(Xa), Za = ge({
|
|
|
1090
1090
|
prefix: M(() => [
|
|
1091
1091
|
c.prefixIcon ? (p(), C(n(Z), {
|
|
1092
1092
|
key: 0,
|
|
1093
|
-
class: S(n(
|
|
1093
|
+
class: S(n(b).e("prefix-icon"))
|
|
1094
1094
|
}, {
|
|
1095
1095
|
default: M(() => [
|
|
1096
1096
|
(p(), C(le(c.prefixIcon)))
|
|
@@ -1126,7 +1126,7 @@ const tt = ye(at), lt = {
|
|
|
1126
1126
|
setup(o, { expose: d }) {
|
|
1127
1127
|
const s = o, {
|
|
1128
1128
|
formRules: l,
|
|
1129
|
-
dateFormatComputed:
|
|
1129
|
+
dateFormatComputed: b,
|
|
1130
1130
|
timeFormatComputed: g,
|
|
1131
1131
|
selectOptions: t,
|
|
1132
1132
|
cascaderOptions: m,
|
|
@@ -1169,7 +1169,7 @@ const tt = ye(at), lt = {
|
|
|
1169
1169
|
class: S(e.formItemClass || "")
|
|
1170
1170
|
}, {
|
|
1171
1171
|
default: M(() => [
|
|
1172
|
-
e.slot ? ne(u.$slots, typeof e.slot == "string" ? e.slot : e.prop,
|
|
1172
|
+
e.slot ? ne(u.$slots, typeof e.slot == "string" ? e.slot : e.prop, fn({
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
ref_for: !0
|
|
1175
1175
|
}, e), void 0, !0) : (p(), O(Me, { key: 1 }, [
|
|
@@ -1197,7 +1197,7 @@ const tt = ye(at), lt = {
|
|
|
1197
1197
|
"show-password": e.inputConfig.showPassword || !1,
|
|
1198
1198
|
placeholder: e.inputConfig.placeholder || "请输入",
|
|
1199
1199
|
disabled: e.inputConfig.disabled || !1,
|
|
1200
|
-
onInput: (r) => e.inputConfig?.onInput?.(r, e),
|
|
1200
|
+
onInput: Ge((r) => e.inputConfig?.onInput?.(r, e), ["self"]),
|
|
1201
1201
|
onKeyup: Oe((r) => e.inputConfig?.onKeyupEnter?.(r, e), ["enter"])
|
|
1202
1202
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "width", "prefix-icon", "suffix-icon", "prefixContent", "suffixContent", "prependContent", "appendContent", "unit", "clearable", "maxlength", "show-word-limit", "formatter", "parser", "autosize", "rows", "resize", "show-password", "placeholder", "disabled", "onInput", "onKeyup"])), [
|
|
1203
1203
|
[n(jn), e.inputConfig.autoFocus || !1]
|
|
@@ -1229,7 +1229,7 @@ const tt = ye(at), lt = {
|
|
|
1229
1229
|
multiple: e.selectConfig.multiple || !1,
|
|
1230
1230
|
clearable: e.selectConfig.clearable || !1,
|
|
1231
1231
|
placeholder: e.selectConfig.placeholder || "请选择",
|
|
1232
|
-
style:
|
|
1232
|
+
style: ve({ width: e.selectConfig.width ?? "100%" }),
|
|
1233
1233
|
disabled: e.selectConfig.disabled || !1,
|
|
1234
1234
|
"popper-style": "z-index:999999 !important",
|
|
1235
1235
|
onChange: (r) => n(V)(r, e)
|
|
@@ -1241,7 +1241,7 @@ const tt = ye(at), lt = {
|
|
|
1241
1241
|
options: n(m)(e),
|
|
1242
1242
|
props: e.cascaderConfig?.props || {},
|
|
1243
1243
|
disabled: e.cascaderConfig.disabled || !1,
|
|
1244
|
-
style:
|
|
1244
|
+
style: ve({ width: e.cascaderConfig.width ?? "100%" }),
|
|
1245
1245
|
onChange: (r) => n(h)(r, e)
|
|
1246
1246
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "disabled", "style", "onChange"])) : _("", !0),
|
|
1247
1247
|
e.datePickerConfig ? (p(), C(X, {
|
|
@@ -1252,10 +1252,10 @@ const tt = ye(at), lt = {
|
|
|
1252
1252
|
"range-separator": e.datePickerConfig.rangeSeparator || "至",
|
|
1253
1253
|
"start-placeholder": e.datePickerConfig.startPlaceholder || "开始日期",
|
|
1254
1254
|
"end-placeholder": e.datePickerConfig.endPlaceholder || "结束日期",
|
|
1255
|
-
format: n(
|
|
1256
|
-
"value-format": n(
|
|
1255
|
+
format: n(b)(e.datePickerConfig),
|
|
1256
|
+
"value-format": n(b)(e.datePickerConfig),
|
|
1257
1257
|
placeholder: e.datePickerConfig.placeholder || "请选择",
|
|
1258
|
-
style:
|
|
1258
|
+
style: ve({ width: e.datePickerConfig.width ?? "100%" }),
|
|
1259
1259
|
onChange: (r) => n($)(r, e, u.formModel)
|
|
1260
1260
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "range-separator", "start-placeholder", "end-placeholder", "format", "value-format", "placeholder", "style", "onChange"])) : _("", !0),
|
|
1261
1261
|
e.timePickerConfig ? (p(), C(Ce, {
|
|
@@ -1296,6 +1296,7 @@ const tt = ye(at), lt = {
|
|
|
1296
1296
|
key: 7,
|
|
1297
1297
|
modelValue: u.formModel[e.prop],
|
|
1298
1298
|
"onUpdate:modelValue": (r) => u.formModel[e.prop] = r,
|
|
1299
|
+
disabled: e.radioConfig.disabled || !1,
|
|
1299
1300
|
onChange: (r) => n(Y)(r, e)
|
|
1300
1301
|
}, {
|
|
1301
1302
|
default: M(() => [
|
|
@@ -1309,7 +1310,7 @@ const tt = ye(at), lt = {
|
|
|
1309
1310
|
}, 1032, ["value"]))), 256))
|
|
1310
1311
|
]),
|
|
1311
1312
|
_: 2
|
|
1312
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : _("", !0),
|
|
1313
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])) : _("", !0),
|
|
1313
1314
|
e.switchConfig ? (p(), C(ae, {
|
|
1314
1315
|
key: 8,
|
|
1315
1316
|
modelValue: u.formModel[e.prop],
|
|
@@ -1334,7 +1335,7 @@ const tt = ye(at), lt = {
|
|
|
1334
1335
|
}, 8, ["model", "rules", "label-width", "label-suffix", "label-position", "disabled"])) : _("", !0);
|
|
1335
1336
|
};
|
|
1336
1337
|
}
|
|
1337
|
-
}), pt = /* @__PURE__ */ Hn(rt, [["__scopeId", "data-v-
|
|
1338
|
+
}), pt = /* @__PURE__ */ Hn(rt, [["__scopeId", "data-v-c5648b1d"]]);
|
|
1338
1339
|
export {
|
|
1339
1340
|
pt as default
|
|
1340
1341
|
};
|