@gopowerteam/form-render 0.0.76 → 0.0.77
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/cjs/form-items/cascader/index.d.ts +1 -1
- package/dist/cjs/form-items/input/index.d.ts +1 -1
- package/dist/cjs/form-items/select/index.d.ts +1 -1
- package/dist/cjs/form-items/switch/index.d.ts +1 -1
- package/dist/cjs/form-items/tree-select/index.d.ts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-items/cascader/index.d.ts +1 -1
- package/dist/es/form-items/input/index.d.ts +1 -1
- package/dist/es/form-items/select/index.d.ts +1 -1
- package/dist/es/form-items/switch/index.d.ts +1 -1
- package/dist/es/form-items/tree-select/index.d.ts +1 -1
- package/dist/es/index.mjs +226 -224
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance as q, inject as ye, defineComponent as E, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, ref as _, provide as he, onMounted as W, Fragment as ne, renderSlot as tt, createBlock as re, Teleport as nt, createVNode as f, TransitionGroup as rt, withCtx as lt, renderList as at, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as ut, triggerRef as Q, useCssVars as ot, onUnmounted as ct, withModifiers as it, toDisplayString as A, resolveDynamicComponent as Ee, normalizeProps as st, guardReactiveProps as dt, watch as Z, unref as ze, isRef as ae, toRefs as ft, customRef as mt, nextTick as Re, getCurrentScope as ht, onScopeDispose as vt, pushScopeId as Ae, popScopeId as Ne, isVNode as be, createTextVNode as I, h as Oe, onUpdated as pt } from "vue";
|
|
2
2
|
import { DatePicker as yt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as _t, RangePicker as $t, Textarea as Ft, TreeSelect as Ot, Cascader as Yt, FormItem as ve, Divider as Ye, Button as D, Tabs as Mt, TabPane as Tt, Form as Pt, Grid as jt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
|
|
3
3
|
import S from "dayjs";
|
|
4
|
-
import { FormRenderResolver as
|
|
4
|
+
import { FormRenderResolver as Cr } from "./resolver.mjs";
|
|
5
5
|
const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
|
|
6
6
|
var r, n, t;
|
|
7
7
|
const a = q(), u = ye(It, void 0);
|
|
@@ -271,19 +271,19 @@ function fe(...e) {
|
|
|
271
271
|
Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
|
-
},
|
|
274
|
+
}, i = (o, s, d, m) => (o.addEventListener(s, d, m), () => o.removeEventListener(s, d, m)), h = Z(
|
|
275
275
|
() => [V(r), M(a)],
|
|
276
|
-
([o,
|
|
276
|
+
([o, s]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const d = ln(
|
|
279
|
+
const d = ln(s) ? { ...s } : s;
|
|
280
280
|
u.push(
|
|
281
|
-
...n.flatMap((m) => t.map((v) =>
|
|
281
|
+
...n.flatMap((m) => t.map((v) => i(o, m, v, d)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
285
285
|
), c = () => {
|
|
286
|
-
|
|
286
|
+
h(), l();
|
|
287
287
|
};
|
|
288
288
|
return Be(c), c;
|
|
289
289
|
}
|
|
@@ -303,22 +303,22 @@ function fn(e, r = {}) {
|
|
|
303
303
|
pointerTypes: a,
|
|
304
304
|
preventDefault: u,
|
|
305
305
|
stopPropagation: l,
|
|
306
|
-
exact:
|
|
307
|
-
onMove:
|
|
306
|
+
exact: i,
|
|
307
|
+
onMove: h,
|
|
308
308
|
onEnd: c,
|
|
309
309
|
onStart: o,
|
|
310
|
-
initialValue:
|
|
310
|
+
initialValue: s,
|
|
311
311
|
axis: d = "both",
|
|
312
312
|
draggingElement: m = ue,
|
|
313
313
|
containerElement: v,
|
|
314
314
|
handle: k = e
|
|
315
315
|
} = r, y = _(
|
|
316
|
-
(n = M(
|
|
316
|
+
(n = M(s)) != null ? n : { x: 0, y: 0 }
|
|
317
317
|
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, P = (w) => {
|
|
318
318
|
M(u) && w.preventDefault(), M(l) && w.stopPropagation();
|
|
319
319
|
}, z = (w) => {
|
|
320
320
|
var g;
|
|
321
|
-
if (M(r.disabled) || !j(w) || M(
|
|
321
|
+
if (M(r.disabled) || !j(w) || M(i) && w.target !== M(e))
|
|
322
322
|
return;
|
|
323
323
|
const b = M(v), O = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), Y = M(e).getBoundingClientRect(), ee = {
|
|
324
324
|
x: w.clientX - (b ? Y.left - O.left + b.scrollLeft : Y.left),
|
|
@@ -333,7 +333,7 @@ function fn(e, r = {}) {
|
|
|
333
333
|
(d === "x" || d === "both") && (O = w.clientX - C.value.x, g && (O = Math.min(Math.max(0, O), g.scrollWidth - b.width))), (d === "y" || d === "both") && (Y = w.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - b.height))), y.value = {
|
|
334
334
|
x: O,
|
|
335
335
|
y: Y
|
|
336
|
-
},
|
|
336
|
+
}, h == null || h(y.value, w), P(w);
|
|
337
337
|
}, B = (w) => {
|
|
338
338
|
M(r.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), P(w));
|
|
339
339
|
};
|
|
@@ -353,20 +353,20 @@ function fn(e, r = {}) {
|
|
|
353
353
|
function mn(e, r, n = {}) {
|
|
354
354
|
const { window: t = ue, ...a } = n;
|
|
355
355
|
let u;
|
|
356
|
-
const l = dn(() => t && "ResizeObserver" in t),
|
|
356
|
+
const l = dn(() => t && "ResizeObserver" in t), i = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
(
|
|
361
|
-
if (
|
|
358
|
+
}, h = F(() => Array.isArray(e) ? e.map((s) => V(s)) : [V(e)]), c = Z(
|
|
359
|
+
h,
|
|
360
|
+
(s) => {
|
|
361
|
+
if (i(), l.value && t) {
|
|
362
362
|
u = new ResizeObserver(r);
|
|
363
|
-
for (const d of
|
|
363
|
+
for (const d of s)
|
|
364
364
|
d && u.observe(d, a);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
|
-
|
|
369
|
+
i(), c();
|
|
370
370
|
};
|
|
371
371
|
return Be(o), {
|
|
372
372
|
isSupported: l,
|
|
@@ -375,42 +375,42 @@ function mn(e, r, n = {}) {
|
|
|
375
375
|
}
|
|
376
376
|
function G(e, r = { width: 0, height: 0 }, n = {}) {
|
|
377
377
|
const { window: t = ue, box: a = "content-box" } = n, u = F(() => {
|
|
378
|
-
var
|
|
379
|
-
return (d = (
|
|
380
|
-
}), l = _(r.width),
|
|
378
|
+
var s, d;
|
|
379
|
+
return (d = (s = V(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
380
|
+
}), l = _(r.width), i = _(r.height), { stop: h } = mn(
|
|
381
381
|
e,
|
|
382
|
-
([
|
|
383
|
-
const d = a === "border-box" ?
|
|
382
|
+
([s]) => {
|
|
383
|
+
const d = a === "border-box" ? s.borderBoxSize : a === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
385
|
const m = V(e);
|
|
386
386
|
if (m) {
|
|
387
387
|
const v = t.getComputedStyle(m);
|
|
388
|
-
l.value = Number.parseFloat(v.width),
|
|
388
|
+
l.value = Number.parseFloat(v.width), i.value = Number.parseFloat(v.height);
|
|
389
389
|
}
|
|
390
390
|
} else if (d) {
|
|
391
391
|
const m = Array.isArray(d) ? d : [d];
|
|
392
|
-
l.value = m.reduce((v, { inlineSize: k }) => v + k, 0),
|
|
392
|
+
l.value = m.reduce((v, { inlineSize: k }) => v + k, 0), i.value = m.reduce((v, { blockSize: k }) => v + k, 0);
|
|
393
393
|
} else
|
|
394
|
-
l.value =
|
|
394
|
+
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
395
395
|
},
|
|
396
396
|
n
|
|
397
397
|
);
|
|
398
398
|
cn(() => {
|
|
399
|
-
const
|
|
400
|
-
|
|
399
|
+
const s = V(e);
|
|
400
|
+
s && (l.value = "offsetWidth" in s ? s.offsetWidth : r.width, i.value = "offsetHeight" in s ? s.offsetHeight : r.height);
|
|
401
401
|
});
|
|
402
402
|
const c = Z(
|
|
403
403
|
() => V(e),
|
|
404
|
-
(
|
|
405
|
-
l.value =
|
|
404
|
+
(s) => {
|
|
405
|
+
l.value = s ? r.width : 0, i.value = s ? r.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
function o() {
|
|
409
|
-
|
|
409
|
+
h(), c();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: l,
|
|
413
|
-
height:
|
|
413
|
+
height: i,
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
@@ -464,8 +464,8 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
466
|
const t = e, a = n, u = ye(Ce), l = _(!1);
|
|
467
|
-
let
|
|
468
|
-
const c = N(), o = N(),
|
|
467
|
+
let i = 0, h = 0;
|
|
468
|
+
const c = N(), o = N(), s = N(), d = N(), m = N(), v = N(), { height: k } = G(c), { height: y } = G(s, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: j } = G(m), { height: P } = G(v), { x: z, y: H } = fn(s, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
471
|
function B() {
|
|
@@ -489,7 +489,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
489
489
|
}[t.position]), p;
|
|
490
490
|
}), b = F(() => {
|
|
491
491
|
const p = {};
|
|
492
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${z.value -
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${z.value - i}px, ${H.value - h}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
|
|
493
493
|
}), O = F(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
@@ -510,7 +510,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
510
510
|
}
|
|
511
511
|
function Je() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
Q(c), Q(o), o.value && (
|
|
513
|
+
Q(c), Q(o), o.value && (i = o.value.offsetLeft, h = o.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
function Qe() {
|
|
@@ -522,7 +522,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Ze() {
|
|
525
|
-
|
|
525
|
+
i = o.value.offsetLeft, h = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
W(() => {
|
|
528
528
|
Qe(), Je();
|
|
@@ -553,7 +553,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
553
553
|
p.header ? ($(), T("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
|
-
ref:
|
|
556
|
+
ref: s,
|
|
557
557
|
class: "modal-header",
|
|
558
558
|
style: R(O.value),
|
|
559
559
|
onMousedown: Ze
|
|
@@ -636,7 +636,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
636
636
|
async function u() {
|
|
637
637
|
r.onCancel && await r.onCancel(), n.close();
|
|
638
638
|
}
|
|
639
|
-
return (l,
|
|
639
|
+
return (l, i) => ($(), T("section", Sn, [
|
|
640
640
|
x("div", _n, [
|
|
641
641
|
x("div", $n, A(t.value), 1),
|
|
642
642
|
x("div", Fn, A(l.content), 1)
|
|
@@ -733,12 +733,12 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
733
733
|
const k = n.value[v];
|
|
734
734
|
m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), n.value.splice(v, 1), Q(n);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function i() {
|
|
737
737
|
!n.value || n.value.length === 0 || (n.value.forEach((d) => {
|
|
738
738
|
d == null || d.reject("CANCEL");
|
|
739
739
|
}), n.value = [], Q(n));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function h(d, m) {
|
|
742
742
|
const v = n.value.find((y) => y.id === d);
|
|
743
743
|
if (!v)
|
|
744
744
|
return;
|
|
@@ -746,7 +746,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
746
746
|
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
748
|
close: (y) => l(v.id, y),
|
|
749
|
-
closeAll:
|
|
749
|
+
closeAll: i,
|
|
750
750
|
showLoading: () => c(v.id),
|
|
751
751
|
hideLoading: () => o(v.id),
|
|
752
752
|
confirm: (y) => u("confirm", y),
|
|
@@ -786,7 +786,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
786
786
|
if (m)
|
|
787
787
|
return m.hideLoading();
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function s(d, m, v) {
|
|
790
790
|
const k = n.value.find((y) => y.id === d);
|
|
791
791
|
k && k.listeners.push({
|
|
792
792
|
event: m,
|
|
@@ -796,15 +796,15 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
796
796
|
return he(Ce, {
|
|
797
797
|
open: u,
|
|
798
798
|
close: l,
|
|
799
|
-
closeAll:
|
|
800
|
-
addEventListener:
|
|
799
|
+
closeAll: i,
|
|
800
|
+
addEventListener: s,
|
|
801
801
|
showLoading: c,
|
|
802
802
|
hideLoading: o
|
|
803
803
|
}), r({
|
|
804
804
|
elements: n,
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
|
-
closeAll:
|
|
807
|
+
closeAll: i
|
|
808
808
|
}), W(() => {
|
|
809
809
|
t.value = !0;
|
|
810
810
|
}), (d, m) => ($(), T(ne, null, [
|
|
@@ -828,7 +828,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
828
828
|
offset: d.offset,
|
|
829
829
|
sizes: d.sizes
|
|
830
830
|
}, v.options, {
|
|
831
|
-
onSubmit: () =>
|
|
831
|
+
onSubmit: () => h(v.id, "submit")
|
|
832
832
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
833
833
|
]),
|
|
834
834
|
_: 1
|
|
@@ -933,8 +933,8 @@ var Nn = { exports: {} };
|
|
|
933
933
|
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
934
934
|
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
935
935
|
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
936
|
-
ordinal: function(l,
|
|
937
|
-
return
|
|
936
|
+
ordinal: function(l, i) {
|
|
937
|
+
return i === "W" ? l + "周" : l + "日";
|
|
938
938
|
},
|
|
939
939
|
weekStart: 1,
|
|
940
940
|
yearStart: 4,
|
|
@@ -965,9 +965,9 @@ var Nn = { exports: {} };
|
|
|
965
965
|
y: "1 年",
|
|
966
966
|
yy: "%d 年"
|
|
967
967
|
},
|
|
968
|
-
meridiem: function(l,
|
|
969
|
-
var
|
|
970
|
-
return
|
|
968
|
+
meridiem: function(l, i) {
|
|
969
|
+
var h = 100 * l + i;
|
|
970
|
+
return h < 600 ? "凌晨" : h < 900 ? "早上" : h < 1100 ? "上午" : h < 1300 ? "中午" : h < 1800 ? "下午" : "晚上";
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
return a.default.locale(u, null, !0), u;
|
|
@@ -980,20 +980,20 @@ var He = { exports: {} };
|
|
|
980
980
|
})(Se, function() {
|
|
981
981
|
var n = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
return this.add(7 * (
|
|
983
|
+
var i = u.prototype;
|
|
984
|
+
i.week = function(h) {
|
|
985
|
+
if (h === void 0 && (h = null), h !== null)
|
|
986
|
+
return this.add(7 * (h - this.week()), "day");
|
|
987
987
|
var c = this.$locale().yearStart || 1;
|
|
988
988
|
if (this.month() === 11 && this.date() > 25) {
|
|
989
|
-
var o = l(this).startOf(t).add(1, t).date(c),
|
|
990
|
-
if (o.isBefore(
|
|
989
|
+
var o = l(this).startOf(t).add(1, t).date(c), s = l(this).endOf(n);
|
|
990
|
+
if (o.isBefore(s))
|
|
991
991
|
return 1;
|
|
992
992
|
}
|
|
993
993
|
var d = l(this).startOf(t).date(c).startOf(n).subtract(1, "millisecond"), m = this.diff(d, n, !0);
|
|
994
994
|
return m < 0 ? l(this).startOf("week").week() : Math.ceil(m);
|
|
995
|
-
},
|
|
996
|
-
return
|
|
995
|
+
}, i.weeks = function(h) {
|
|
996
|
+
return h === void 0 && (h = null), this.week(h);
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
999
|
});
|
|
@@ -1011,18 +1011,18 @@ var Ge = { exports: {} };
|
|
|
1011
1011
|
l.quarter = function(c) {
|
|
1012
1012
|
return this.$utils().u(c) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (c - 1));
|
|
1013
1013
|
};
|
|
1014
|
-
var
|
|
1014
|
+
var i = l.add;
|
|
1015
1015
|
l.add = function(c, o) {
|
|
1016
|
-
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, n) :
|
|
1016
|
+
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, n) : i.bind(this)(c, o);
|
|
1017
1017
|
};
|
|
1018
|
-
var
|
|
1018
|
+
var h = l.startOf;
|
|
1019
1019
|
l.startOf = function(c, o) {
|
|
1020
|
-
var
|
|
1021
|
-
if (
|
|
1020
|
+
var s = this.$utils(), d = !!s.u(o) || o;
|
|
1021
|
+
if (s.p(c) === t) {
|
|
1022
1022
|
var m = this.quarter() - 1;
|
|
1023
1023
|
return d ? this.month(3 * m).startOf(n).startOf("day") : this.month(3 * m + 2).endOf(n).endOf("day");
|
|
1024
1024
|
}
|
|
1025
|
-
return
|
|
1025
|
+
return h.bind(this)(c, o);
|
|
1026
1026
|
};
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
@@ -1129,17 +1129,17 @@ function Hn(e, r) {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
function Gn(e, r = {}) {
|
|
1131
1131
|
let n, t, a = je;
|
|
1132
|
-
const u = (
|
|
1133
|
-
clearTimeout(
|
|
1132
|
+
const u = (i) => {
|
|
1133
|
+
clearTimeout(i), a(), a = je;
|
|
1134
1134
|
};
|
|
1135
|
-
return (
|
|
1136
|
-
const
|
|
1137
|
-
return n && u(n),
|
|
1138
|
-
a = r.rejectOnCancel ?
|
|
1139
|
-
n && u(n), t = null, o(
|
|
1135
|
+
return (i) => {
|
|
1136
|
+
const h = Pe(e), c = Pe(r.maxWait);
|
|
1137
|
+
return n && u(n), h <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(i())) : new Promise((o, s) => {
|
|
1138
|
+
a = r.rejectOnCancel ? s : o, c && !t && (t = setTimeout(() => {
|
|
1139
|
+
n && u(n), t = null, o(i());
|
|
1140
1140
|
}, c)), n = setTimeout(() => {
|
|
1141
|
-
t && u(t), t = null, o(
|
|
1142
|
-
},
|
|
1141
|
+
t && u(t), t = null, o(i());
|
|
1142
|
+
}, h);
|
|
1143
1143
|
});
|
|
1144
1144
|
};
|
|
1145
1145
|
}
|
|
@@ -1153,48 +1153,50 @@ function _e(e, r, n) {
|
|
|
1153
1153
|
const t = Z(e, (...a) => (Re(() => t()), r(...a)), n);
|
|
1154
1154
|
return t;
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1156
|
+
const Xn = Kn((e) => {
|
|
1157
|
+
e && e.dispatchEvent(new Event("submit"));
|
|
1158
|
+
}, 1e3);
|
|
1159
|
+
function Jn(e) {
|
|
1157
1160
|
let r;
|
|
1158
1161
|
return (n, t) => {
|
|
1159
1162
|
function a() {
|
|
1160
1163
|
return f("span", null, [n[t.key]]);
|
|
1161
1164
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
}, 1e3);
|
|
1165
|
-
function l() {
|
|
1166
|
-
if (!(e != null && e.autoSumbit))
|
|
1165
|
+
function u() {
|
|
1166
|
+
if (!(e != null && e.autoSubmit))
|
|
1167
1167
|
return;
|
|
1168
|
-
let
|
|
1169
|
-
for (;
|
|
1170
|
-
|
|
1171
|
-
if (
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1168
|
+
let i = r;
|
|
1169
|
+
for (; i && i.$el.tagName !== "FORM"; )
|
|
1170
|
+
i = i.$parent;
|
|
1171
|
+
if (i && i.$el) {
|
|
1172
|
+
const h = i.$el;
|
|
1173
|
+
Xn(h);
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function l() {
|
|
1177
1177
|
switch (e == null ? void 0 : e.type) {
|
|
1178
1178
|
case "number":
|
|
1179
1179
|
return f(Ve, {
|
|
1180
|
-
ref: (
|
|
1180
|
+
ref: (i) => r = i,
|
|
1181
1181
|
modelValue: n[t.key],
|
|
1182
|
-
"onUpdate:modelValue": (
|
|
1182
|
+
"onUpdate:modelValue": (i) => n[t.key] = i,
|
|
1183
1183
|
hideButton: !0,
|
|
1184
1184
|
"read-only": e == null ? void 0 : e.readonly,
|
|
1185
1185
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1186
|
-
onInput:
|
|
1186
|
+
onInput: u,
|
|
1187
|
+
onClear: () => u(),
|
|
1187
1188
|
allowClear: e == null ? void 0 : e.clearable
|
|
1188
1189
|
}, null);
|
|
1189
1190
|
case "string":
|
|
1190
1191
|
default:
|
|
1191
1192
|
return f(xt, {
|
|
1192
|
-
ref: (
|
|
1193
|
+
ref: (i) => r = i,
|
|
1193
1194
|
modelValue: n[t.key],
|
|
1194
|
-
"onUpdate:modelValue": (
|
|
1195
|
+
"onUpdate:modelValue": (i) => n[t.key] = i,
|
|
1195
1196
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1196
1197
|
readonly: e == null ? void 0 : e.readonly,
|
|
1197
|
-
onInput:
|
|
1198
|
+
onInput: u,
|
|
1199
|
+
onClear: () => u(),
|
|
1198
1200
|
allowClear: e == null ? void 0 : e.clearable
|
|
1199
1201
|
}, null);
|
|
1200
1202
|
}
|
|
@@ -1204,31 +1206,31 @@ function Xn(e) {
|
|
|
1204
1206
|
return a();
|
|
1205
1207
|
case "component":
|
|
1206
1208
|
default:
|
|
1207
|
-
return
|
|
1209
|
+
return l();
|
|
1208
1210
|
}
|
|
1209
1211
|
};
|
|
1210
1212
|
}
|
|
1211
|
-
function
|
|
1213
|
+
function Qn(e) {
|
|
1212
1214
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1213
1215
|
}
|
|
1214
1216
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1215
|
-
function
|
|
1217
|
+
function Zn() {
|
|
1216
1218
|
const e = _(/* @__PURE__ */ new Map());
|
|
1217
1219
|
return [e, (n) => e.value = n];
|
|
1218
1220
|
}
|
|
1219
|
-
function
|
|
1221
|
+
function er(e) {
|
|
1220
1222
|
let r, n = !1;
|
|
1221
|
-
const [t, a] =
|
|
1222
|
-
if (e.onChange && e.onChange(c), !e.
|
|
1223
|
+
const [t, a] = Zn(), u = (c) => {
|
|
1224
|
+
if (e.onChange && e.onChange(c), !e.autoSubmit || !r)
|
|
1223
1225
|
return;
|
|
1224
1226
|
let o = r;
|
|
1225
1227
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1226
1228
|
o = o.$parent;
|
|
1227
1229
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1228
1230
|
}, l = (c, o) => {
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
},
|
|
1231
|
+
const s = c();
|
|
1232
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1233
|
+
}, i = async () => {
|
|
1232
1234
|
const c = K.get(e.options);
|
|
1233
1235
|
switch (typeof c) {
|
|
1234
1236
|
case "function":
|
|
@@ -1239,17 +1241,17 @@ function Zn(e) {
|
|
|
1239
1241
|
return;
|
|
1240
1242
|
}
|
|
1241
1243
|
K.set(e.options, a), l(e.options, (o) => {
|
|
1242
|
-
const
|
|
1243
|
-
K.set(e.options, o),
|
|
1244
|
+
const s = K.get(e.options);
|
|
1245
|
+
K.set(e.options, o), s(o);
|
|
1244
1246
|
});
|
|
1245
|
-
},
|
|
1247
|
+
}, h = () => {
|
|
1246
1248
|
l(e.options, (c) => {
|
|
1247
1249
|
a(c);
|
|
1248
1250
|
});
|
|
1249
1251
|
};
|
|
1250
1252
|
switch (!0) {
|
|
1251
1253
|
case e.options instanceof Function: {
|
|
1252
|
-
e.cache !== !1 ?
|
|
1254
|
+
e.cache !== !1 ? i() : h();
|
|
1253
1255
|
break;
|
|
1254
1256
|
}
|
|
1255
1257
|
case ae(e.options): {
|
|
@@ -1265,7 +1267,7 @@ function Zn(e) {
|
|
|
1265
1267
|
}
|
|
1266
1268
|
return (c, o) => {
|
|
1267
1269
|
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1268
|
-
function
|
|
1270
|
+
function s() {
|
|
1269
1271
|
const m = c[o.key];
|
|
1270
1272
|
return e.multiple ? f("span", null, [m.map((v) => t.value.get(v)).join(" ,")]) : f("span", null, [t.value.get(m)]);
|
|
1271
1273
|
}
|
|
@@ -1282,7 +1284,7 @@ function Zn(e) {
|
|
|
1282
1284
|
"allow-create": e.createable,
|
|
1283
1285
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1284
1286
|
onChange: u
|
|
1285
|
-
},
|
|
1287
|
+
}, Qn(m = Array.from(t.value.entries()).map(([v, k]) => f(St, {
|
|
1286
1288
|
key: v,
|
|
1287
1289
|
value: v,
|
|
1288
1290
|
label: k
|
|
@@ -1292,17 +1294,17 @@ function Zn(e) {
|
|
|
1292
1294
|
}
|
|
1293
1295
|
switch (o.mode) {
|
|
1294
1296
|
case "text":
|
|
1295
|
-
return
|
|
1297
|
+
return s();
|
|
1296
1298
|
case "component":
|
|
1297
1299
|
default:
|
|
1298
1300
|
return d();
|
|
1299
1301
|
}
|
|
1300
1302
|
};
|
|
1301
1303
|
}
|
|
1302
|
-
function
|
|
1304
|
+
function tr(e) {
|
|
1303
1305
|
let r;
|
|
1304
1306
|
function n() {
|
|
1305
|
-
if (!(e != null && e.
|
|
1307
|
+
if (!(e != null && e.autoSubmit) || !r)
|
|
1306
1308
|
return;
|
|
1307
1309
|
let t = r;
|
|
1308
1310
|
for (; t && t.$el.tagName !== "FORM"; )
|
|
@@ -1312,14 +1314,14 @@ function er(e) {
|
|
|
1312
1314
|
return (t, a) => {
|
|
1313
1315
|
e != null && e.default && (t[a.key] = e.default);
|
|
1314
1316
|
function u() {
|
|
1315
|
-
const
|
|
1316
|
-
return f("span", null, [
|
|
1317
|
+
const i = t[a.key];
|
|
1318
|
+
return f("span", null, [i ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1317
1319
|
}
|
|
1318
1320
|
function l() {
|
|
1319
1321
|
return f(_t, {
|
|
1320
|
-
ref: (
|
|
1322
|
+
ref: (i) => r = i,
|
|
1321
1323
|
modelValue: t[a.key],
|
|
1322
|
-
"onUpdate:modelValue": (
|
|
1324
|
+
"onUpdate:modelValue": (i) => t[a.key] = i,
|
|
1323
1325
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1324
1326
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1325
1327
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
@@ -1336,7 +1338,7 @@ function er(e) {
|
|
|
1336
1338
|
}
|
|
1337
1339
|
};
|
|
1338
1340
|
}
|
|
1339
|
-
function
|
|
1341
|
+
function nr(e) {
|
|
1340
1342
|
return (r, n) => {
|
|
1341
1343
|
let t = [];
|
|
1342
1344
|
function a(c) {
|
|
@@ -1344,15 +1346,15 @@ function tr(e) {
|
|
|
1344
1346
|
}
|
|
1345
1347
|
function u(c) {
|
|
1346
1348
|
if (c && c.length === 2) {
|
|
1347
|
-
const [o,
|
|
1349
|
+
const [o, s] = c.sort(), d = S(o).startOf("days"), m = S(s).endOf("days");
|
|
1348
1350
|
r[n.key] = [d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), m.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1349
1351
|
}
|
|
1350
1352
|
}
|
|
1351
1353
|
function l(c) {
|
|
1352
1354
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
|
|
1353
1355
|
}
|
|
1354
|
-
function
|
|
1355
|
-
const c = r[n.key], [o,
|
|
1356
|
+
function i() {
|
|
1357
|
+
const c = r[n.key], [o, s] = c, d = (m) => {
|
|
1356
1358
|
switch (e == null ? void 0 : e.type) {
|
|
1357
1359
|
case "week":
|
|
1358
1360
|
return f("span", null, [`${S(m).format("YYYY年")}${S(m).week()}周`]);
|
|
@@ -1367,9 +1369,9 @@ function tr(e) {
|
|
|
1367
1369
|
return f("span", null, [S(m).format("YYYY年MM月DD日")]);
|
|
1368
1370
|
}
|
|
1369
1371
|
};
|
|
1370
|
-
return f("span", null, [d(o), I(" - "), d(
|
|
1372
|
+
return f("span", null, [d(o), I(" - "), d(s)]);
|
|
1371
1373
|
}
|
|
1372
|
-
function
|
|
1374
|
+
function h() {
|
|
1373
1375
|
return f("div", null, [f($t, {
|
|
1374
1376
|
"disabled-input": !0,
|
|
1375
1377
|
style: {
|
|
@@ -1389,14 +1391,14 @@ function tr(e) {
|
|
|
1389
1391
|
}
|
|
1390
1392
|
switch (n.mode) {
|
|
1391
1393
|
case "text":
|
|
1392
|
-
return
|
|
1394
|
+
return i();
|
|
1393
1395
|
case "component":
|
|
1394
1396
|
default:
|
|
1395
|
-
return
|
|
1397
|
+
return h();
|
|
1396
1398
|
}
|
|
1397
1399
|
};
|
|
1398
1400
|
}
|
|
1399
|
-
function
|
|
1401
|
+
function rr(e) {
|
|
1400
1402
|
return (r, n) => {
|
|
1401
1403
|
function t() {
|
|
1402
1404
|
return f("span", null, [r[n.key]]);
|
|
@@ -1433,7 +1435,7 @@ function Ke(e) {
|
|
|
1433
1435
|
};
|
|
1434
1436
|
return e.data.forEach(t), n;
|
|
1435
1437
|
}
|
|
1436
|
-
function
|
|
1438
|
+
function lr(e) {
|
|
1437
1439
|
let r = e.data;
|
|
1438
1440
|
const n = [];
|
|
1439
1441
|
return e.path.forEach((t) => {
|
|
@@ -1443,23 +1445,23 @@ function rr(e) {
|
|
|
1443
1445
|
}), n;
|
|
1444
1446
|
}
|
|
1445
1447
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1446
|
-
function
|
|
1448
|
+
function ar() {
|
|
1447
1449
|
const e = _([]);
|
|
1448
1450
|
return [e, (n) => e.value = n];
|
|
1449
1451
|
}
|
|
1450
|
-
function
|
|
1452
|
+
function ur(e) {
|
|
1451
1453
|
let r, n = !1;
|
|
1452
|
-
const [t, a] =
|
|
1453
|
-
if (!e.
|
|
1454
|
+
const [t, a] = ar(), u = () => {
|
|
1455
|
+
if (!e.autoSubmit || !r)
|
|
1454
1456
|
return;
|
|
1455
1457
|
let o = r;
|
|
1456
1458
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1457
1459
|
o = o.$parent;
|
|
1458
1460
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1459
|
-
}, l = (o,
|
|
1461
|
+
}, l = (o, s) => {
|
|
1460
1462
|
const d = o();
|
|
1461
|
-
d instanceof Promise ? d.then(
|
|
1462
|
-
},
|
|
1463
|
+
d instanceof Promise ? d.then(s) : s(d);
|
|
1464
|
+
}, i = async () => {
|
|
1463
1465
|
const o = X.get(e.options);
|
|
1464
1466
|
switch (typeof o) {
|
|
1465
1467
|
case "function":
|
|
@@ -1469,18 +1471,18 @@ function ar(e) {
|
|
|
1469
1471
|
a(o);
|
|
1470
1472
|
return;
|
|
1471
1473
|
}
|
|
1472
|
-
X.set(e.options, a), l(e.options, (
|
|
1474
|
+
X.set(e.options, a), l(e.options, (s) => {
|
|
1473
1475
|
const d = X.get(e.options);
|
|
1474
|
-
X.set(e.options,
|
|
1476
|
+
X.set(e.options, s), d(s);
|
|
1475
1477
|
});
|
|
1476
|
-
},
|
|
1478
|
+
}, h = () => {
|
|
1477
1479
|
l(e.options, (o) => {
|
|
1478
1480
|
a(o);
|
|
1479
1481
|
});
|
|
1480
1482
|
};
|
|
1481
1483
|
switch (!0) {
|
|
1482
1484
|
case e.options instanceof Function: {
|
|
1483
|
-
e.cache !== !1 ?
|
|
1485
|
+
e.cache !== !1 ? i() : h();
|
|
1484
1486
|
break;
|
|
1485
1487
|
}
|
|
1486
1488
|
case ae(e.options): {
|
|
@@ -1494,15 +1496,15 @@ function ar(e) {
|
|
|
1494
1496
|
default:
|
|
1495
1497
|
t.value = e.options;
|
|
1496
1498
|
}
|
|
1497
|
-
function c(o,
|
|
1499
|
+
function c(o, s) {
|
|
1498
1500
|
var v;
|
|
1499
|
-
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m =
|
|
1501
|
+
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m = s[d];
|
|
1500
1502
|
return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
|
|
1501
1503
|
}
|
|
1502
|
-
return (o,
|
|
1503
|
-
e.default && !n && (o[
|
|
1504
|
+
return (o, s) => {
|
|
1505
|
+
e.default && !n && (o[s.key] = e.default, n = !0);
|
|
1504
1506
|
function d() {
|
|
1505
|
-
const v = o[
|
|
1507
|
+
const v = o[s.key], k = (y) => {
|
|
1506
1508
|
const [C] = Ke({
|
|
1507
1509
|
data: t.value,
|
|
1508
1510
|
labelProp: "title",
|
|
@@ -1523,8 +1525,8 @@ function ar(e) {
|
|
|
1523
1525
|
return f(Ot, {
|
|
1524
1526
|
ref: (v) => r = v,
|
|
1525
1527
|
multiple: e.multiple,
|
|
1526
|
-
modelValue: o[
|
|
1527
|
-
"onUpdate:modelValue": (v) => o[
|
|
1528
|
+
modelValue: o[s.key],
|
|
1529
|
+
"onUpdate:modelValue": (v) => o[s.key] = v,
|
|
1528
1530
|
placeholder: e.placeholder,
|
|
1529
1531
|
allowClear: e.clearable,
|
|
1530
1532
|
allowSearch: e.searchable,
|
|
@@ -1538,7 +1540,7 @@ function ar(e) {
|
|
|
1538
1540
|
...e.slots
|
|
1539
1541
|
});
|
|
1540
1542
|
}
|
|
1541
|
-
switch (
|
|
1543
|
+
switch (s.mode) {
|
|
1542
1544
|
case "text":
|
|
1543
1545
|
return d();
|
|
1544
1546
|
case "component":
|
|
@@ -1548,23 +1550,23 @@ function ar(e) {
|
|
|
1548
1550
|
};
|
|
1549
1551
|
}
|
|
1550
1552
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1551
|
-
function
|
|
1553
|
+
function or() {
|
|
1552
1554
|
const e = _([]);
|
|
1553
1555
|
return [e, (n) => e.value = n];
|
|
1554
1556
|
}
|
|
1555
|
-
function
|
|
1557
|
+
function cr(e) {
|
|
1556
1558
|
let r, n = !1;
|
|
1557
|
-
const [t, a] =
|
|
1558
|
-
if (!e.
|
|
1559
|
+
const [t, a] = or(), u = () => {
|
|
1560
|
+
if (!e.autoSubmit || !r)
|
|
1559
1561
|
return;
|
|
1560
1562
|
let c = r;
|
|
1561
1563
|
for (; c && c.$el.tagName !== "FORM"; )
|
|
1562
1564
|
c = c.$parent;
|
|
1563
1565
|
c && c.$el && c.$el.dispatchEvent(new Event("submit"));
|
|
1564
1566
|
}, l = (c, o) => {
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1567
|
+
const s = c();
|
|
1568
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1569
|
+
}, i = async () => {
|
|
1568
1570
|
const c = J.get(e.options);
|
|
1569
1571
|
switch (typeof c) {
|
|
1570
1572
|
case "function":
|
|
@@ -1575,17 +1577,17 @@ function or(e) {
|
|
|
1575
1577
|
return;
|
|
1576
1578
|
}
|
|
1577
1579
|
J.set(e.options, a), l(e.options, (o) => {
|
|
1578
|
-
const
|
|
1579
|
-
J.set(e.options, o),
|
|
1580
|
+
const s = J.get(e.options);
|
|
1581
|
+
J.set(e.options, o), s(o);
|
|
1580
1582
|
});
|
|
1581
|
-
},
|
|
1583
|
+
}, h = () => {
|
|
1582
1584
|
l(e.options, (c) => {
|
|
1583
1585
|
a(c);
|
|
1584
1586
|
});
|
|
1585
1587
|
};
|
|
1586
1588
|
switch (!0) {
|
|
1587
1589
|
case e.options instanceof Function: {
|
|
1588
|
-
e.cache !== !1 ?
|
|
1590
|
+
e.cache !== !1 ? i() : h();
|
|
1589
1591
|
break;
|
|
1590
1592
|
}
|
|
1591
1593
|
case ae(e.options): {
|
|
@@ -1601,13 +1603,13 @@ function or(e) {
|
|
|
1601
1603
|
}
|
|
1602
1604
|
return (c, o) => {
|
|
1603
1605
|
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1604
|
-
function
|
|
1606
|
+
function s() {
|
|
1605
1607
|
const m = c[o.key], v = (y) => Ke({
|
|
1606
1608
|
data: t.value,
|
|
1607
1609
|
labelProp: "label",
|
|
1608
1610
|
valueProp: "value",
|
|
1609
1611
|
key: y
|
|
1610
|
-
}).map((j) => j.label).join("/"), k = (y) =>
|
|
1612
|
+
}).map((j) => j.label).join("/"), k = (y) => lr({
|
|
1611
1613
|
data: t.value,
|
|
1612
1614
|
labelProp: "label",
|
|
1613
1615
|
valueProp: "value",
|
|
@@ -1651,17 +1653,17 @@ function or(e) {
|
|
|
1651
1653
|
}
|
|
1652
1654
|
switch (o.mode) {
|
|
1653
1655
|
case "text":
|
|
1654
|
-
return
|
|
1656
|
+
return s();
|
|
1655
1657
|
case "component":
|
|
1656
1658
|
default:
|
|
1657
1659
|
return d();
|
|
1658
1660
|
}
|
|
1659
1661
|
};
|
|
1660
1662
|
}
|
|
1661
|
-
function
|
|
1663
|
+
function ir(e) {
|
|
1662
1664
|
return (r, n) => e(r, n);
|
|
1663
1665
|
}
|
|
1664
|
-
const
|
|
1666
|
+
const sr = {
|
|
1665
1667
|
thousands: !0,
|
|
1666
1668
|
inputUnit: "元",
|
|
1667
1669
|
outputUnit: "元"
|
|
@@ -1670,9 +1672,9 @@ const ir = {
|
|
|
1670
1672
|
元: 10 ** 2,
|
|
1671
1673
|
万: 10 ** 4
|
|
1672
1674
|
};
|
|
1673
|
-
function
|
|
1675
|
+
function dr(e) {
|
|
1674
1676
|
e = {
|
|
1675
|
-
...
|
|
1677
|
+
...sr,
|
|
1676
1678
|
...e || {}
|
|
1677
1679
|
};
|
|
1678
1680
|
const r = (l) => {
|
|
@@ -1680,35 +1682,35 @@ function sr(e) {
|
|
|
1680
1682
|
return;
|
|
1681
1683
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1682
1684
|
return l;
|
|
1683
|
-
const
|
|
1684
|
-
return parseFloat((l *
|
|
1685
|
+
const i = te[e.outputUnit] / te[e.inputUnit];
|
|
1686
|
+
return parseFloat((l * i).toFixed(10));
|
|
1685
1687
|
}, n = (l) => {
|
|
1686
1688
|
if (l == null)
|
|
1687
1689
|
return;
|
|
1688
1690
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1689
1691
|
return l;
|
|
1690
|
-
const
|
|
1691
|
-
return parseFloat((l *
|
|
1692
|
+
const i = te[e.inputUnit] / te[e.outputUnit];
|
|
1693
|
+
return parseFloat((l * i).toFixed(10));
|
|
1692
1694
|
}, t = (l) => {
|
|
1693
|
-
const
|
|
1694
|
-
return
|
|
1695
|
+
const i = l.split(".");
|
|
1696
|
+
return i[0] = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), i.join(".");
|
|
1695
1697
|
}, a = (l) => {
|
|
1696
|
-
const
|
|
1697
|
-
return e != null && e.thousands ? t(
|
|
1698
|
+
const i = l;
|
|
1699
|
+
return e != null && e.thousands ? t(i) : i;
|
|
1698
1700
|
}, u = (l) => l.replace(/,/g, "");
|
|
1699
|
-
return (l,
|
|
1700
|
-
const
|
|
1701
|
-
Z(
|
|
1702
|
-
l[
|
|
1701
|
+
return (l, i) => {
|
|
1702
|
+
const h = _(r(l[i.key]));
|
|
1703
|
+
Z(h, (m) => {
|
|
1704
|
+
l[i.key] = n(m);
|
|
1703
1705
|
});
|
|
1704
1706
|
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
|
|
1705
|
-
function
|
|
1706
|
-
return f("span", null, [a(
|
|
1707
|
+
function s() {
|
|
1708
|
+
return f("span", null, [a(h.value.toString()), o()]);
|
|
1707
1709
|
}
|
|
1708
1710
|
function d() {
|
|
1709
1711
|
return f(Ve, {
|
|
1710
|
-
modelValue:
|
|
1711
|
-
"onUpdate:modelValue": (m) =>
|
|
1712
|
+
modelValue: h.value,
|
|
1713
|
+
"onUpdate:modelValue": (m) => h.value = m,
|
|
1712
1714
|
formatter: a,
|
|
1713
1715
|
parser: u,
|
|
1714
1716
|
precision: e == null ? void 0 : e.precision,
|
|
@@ -1721,33 +1723,33 @@ function sr(e) {
|
|
|
1721
1723
|
suffix: o
|
|
1722
1724
|
});
|
|
1723
1725
|
}
|
|
1724
|
-
switch (
|
|
1726
|
+
switch (i.mode) {
|
|
1725
1727
|
case "text":
|
|
1726
|
-
return
|
|
1728
|
+
return s();
|
|
1727
1729
|
case "component":
|
|
1728
1730
|
default:
|
|
1729
1731
|
return d();
|
|
1730
1732
|
}
|
|
1731
1733
|
};
|
|
1732
1734
|
}
|
|
1733
|
-
function
|
|
1735
|
+
function fr() {
|
|
1734
1736
|
return {
|
|
1735
|
-
input:
|
|
1736
|
-
textarea:
|
|
1737
|
-
select:
|
|
1738
|
-
treeSelect:
|
|
1737
|
+
input: Jn,
|
|
1738
|
+
textarea: rr,
|
|
1739
|
+
select: er,
|
|
1740
|
+
treeSelect: ur,
|
|
1739
1741
|
date: Wn,
|
|
1740
|
-
switch:
|
|
1741
|
-
dateRange:
|
|
1742
|
-
render:
|
|
1743
|
-
cascader:
|
|
1744
|
-
currency:
|
|
1742
|
+
switch: tr,
|
|
1743
|
+
dateRange: nr,
|
|
1744
|
+
render: ir,
|
|
1745
|
+
cascader: cr,
|
|
1746
|
+
currency: dr
|
|
1745
1747
|
};
|
|
1746
1748
|
}
|
|
1747
1749
|
function Le(e, r) {
|
|
1748
1750
|
r.render || (r.render = (t) => t.input());
|
|
1749
1751
|
const n = r.render({
|
|
1750
|
-
...
|
|
1752
|
+
...fr()
|
|
1751
1753
|
});
|
|
1752
1754
|
return {
|
|
1753
1755
|
default: () => n(e, r)
|
|
@@ -1768,10 +1770,10 @@ function Ie(e, r) {
|
|
|
1768
1770
|
}, Le(e, r));
|
|
1769
1771
|
}
|
|
1770
1772
|
}
|
|
1771
|
-
function
|
|
1773
|
+
function mr(e) {
|
|
1772
1774
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1773
1775
|
}
|
|
1774
|
-
const
|
|
1776
|
+
const hr = /* @__PURE__ */ E({
|
|
1775
1777
|
props: {
|
|
1776
1778
|
form: {
|
|
1777
1779
|
type: Object,
|
|
@@ -1782,34 +1784,34 @@ const mr = /* @__PURE__ */ E({
|
|
|
1782
1784
|
}
|
|
1783
1785
|
},
|
|
1784
1786
|
setup(e) {
|
|
1785
|
-
const r = qe(), n = e.form.map((
|
|
1786
|
-
...
|
|
1787
|
+
const r = qe(), n = e.form.map((h) => ({
|
|
1788
|
+
...h,
|
|
1787
1789
|
collapsed: !1
|
|
1788
|
-
})), t = Array.from(new Set(n.map((
|
|
1789
|
-
let
|
|
1790
|
-
|
|
1790
|
+
})), t = Array.from(new Set(n.map((h) => h.group).flat().filter(Boolean))), a = n.reduce((h, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
|
|
1791
|
+
let s = h.find((d) => d.group === o);
|
|
1792
|
+
s || (s = {
|
|
1791
1793
|
group: o,
|
|
1792
1794
|
instance: void 0,
|
|
1793
1795
|
form: []
|
|
1794
|
-
},
|
|
1795
|
-
}),
|
|
1796
|
+
}, h.push(s)), s.form.push(c);
|
|
1797
|
+
}), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), u = _("默认");
|
|
1796
1798
|
return {
|
|
1797
1799
|
formItems: n,
|
|
1798
1800
|
groups: t,
|
|
1799
1801
|
groupForms: a,
|
|
1800
1802
|
activeTab: u,
|
|
1801
1803
|
onSubmit: () => {
|
|
1802
|
-
const
|
|
1803
|
-
if (
|
|
1804
|
-
const c =
|
|
1805
|
-
|
|
1804
|
+
const h = a.find((c) => c.group === u.value);
|
|
1805
|
+
if (h && h.instance) {
|
|
1806
|
+
const c = h.instance.formSource;
|
|
1807
|
+
h.instance.validate().then((o) => {
|
|
1806
1808
|
o || r.close(c);
|
|
1807
1809
|
});
|
|
1808
1810
|
}
|
|
1809
1811
|
},
|
|
1810
1812
|
onReset: () => {
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1813
|
+
const h = a.find((c) => c.group === u.value);
|
|
1814
|
+
h && h.instance && h.instance.reset();
|
|
1813
1815
|
}
|
|
1814
1816
|
};
|
|
1815
1817
|
},
|
|
@@ -1820,7 +1822,7 @@ const mr = /* @__PURE__ */ E({
|
|
|
1820
1822
|
return f(Mt, {
|
|
1821
1823
|
"active-key": this.activeTab,
|
|
1822
1824
|
"onUpdate:active-key": (n) => this.activeTab = n
|
|
1823
|
-
},
|
|
1825
|
+
}, mr(r = this.groupForms.map((n) => f(Tt, {
|
|
1824
1826
|
title: n.group,
|
|
1825
1827
|
key: n.group
|
|
1826
1828
|
}, {
|
|
@@ -1940,9 +1942,9 @@ const pe = /* @__PURE__ */ E({
|
|
|
1940
1942
|
setup(e, {
|
|
1941
1943
|
emit: r
|
|
1942
1944
|
}) {
|
|
1943
|
-
const n = _(), [t, a] = An(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0),
|
|
1945
|
+
const n = _(), [t, a] = An(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), i = _(), h = () => l.value = !l.value, c = _(""), o = _("");
|
|
1944
1946
|
he(Te.id, c), he(Te.source, t);
|
|
1945
|
-
const
|
|
1947
|
+
const s = () => {
|
|
1946
1948
|
r("submit", t.value), r("update:model-value", t.value);
|
|
1947
1949
|
}, d = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1948
1950
|
switch (!0) {
|
|
@@ -1979,7 +1981,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
1979
1981
|
g && (g.id = c.value);
|
|
1980
1982
|
}
|
|
1981
1983
|
function j() {
|
|
1982
|
-
|
|
1984
|
+
i.value.open(hr, {
|
|
1983
1985
|
form: e.form,
|
|
1984
1986
|
value: t.value
|
|
1985
1987
|
}, {
|
|
@@ -1987,7 +1989,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
1987
1989
|
footer: !1,
|
|
1988
1990
|
submitText: "搜索"
|
|
1989
1991
|
}).then((g) => {
|
|
1990
|
-
g && (P(g),
|
|
1992
|
+
g && (P(g), s());
|
|
1991
1993
|
});
|
|
1992
1994
|
}
|
|
1993
1995
|
W(() => {
|
|
@@ -2027,15 +2029,15 @@ const pe = /* @__PURE__ */ E({
|
|
|
2027
2029
|
formCollspased: l,
|
|
2028
2030
|
formActiosSpan: m,
|
|
2029
2031
|
formItems: d,
|
|
2030
|
-
toggleFormCollapsed:
|
|
2032
|
+
toggleFormCollapsed: h,
|
|
2031
2033
|
updateFormField: z,
|
|
2032
2034
|
resetFormField: H,
|
|
2033
2035
|
updateFormSource: P,
|
|
2034
2036
|
reset: B,
|
|
2035
2037
|
validate: w,
|
|
2036
|
-
onSubmitSuccess:
|
|
2038
|
+
onSubmitSuccess: s,
|
|
2037
2039
|
openCollapsedDialog: j,
|
|
2038
|
-
modalInstance:
|
|
2040
|
+
modalInstance: i
|
|
2039
2041
|
};
|
|
2040
2042
|
},
|
|
2041
2043
|
render() {
|
|
@@ -2054,7 +2056,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
2054
2056
|
}
|
|
2055
2057
|
}), t = (a) => {
|
|
2056
2058
|
var l;
|
|
2057
|
-
const u = this.formItems.find((
|
|
2059
|
+
const u = this.formItems.find((i) => i.key === a);
|
|
2058
2060
|
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
2059
2061
|
};
|
|
2060
2062
|
return f(ce, {
|
|
@@ -2175,10 +2177,10 @@ const pe = /* @__PURE__ */ E({
|
|
|
2175
2177
|
})]);
|
|
2176
2178
|
}
|
|
2177
2179
|
});
|
|
2178
|
-
function
|
|
2180
|
+
function gr(e) {
|
|
2179
2181
|
return e;
|
|
2180
2182
|
}
|
|
2181
|
-
function
|
|
2183
|
+
function br(e) {
|
|
2182
2184
|
const r = q(), n = _();
|
|
2183
2185
|
function t() {
|
|
2184
2186
|
var u, l;
|
|
@@ -2187,15 +2189,15 @@ function gr(e) {
|
|
|
2187
2189
|
}
|
|
2188
2190
|
return W(t), pt(t), n;
|
|
2189
2191
|
}
|
|
2190
|
-
const
|
|
2192
|
+
const kr = {
|
|
2191
2193
|
install(e, r) {
|
|
2192
2194
|
e.component("FormRender", pe);
|
|
2193
2195
|
}
|
|
2194
2196
|
};
|
|
2195
2197
|
export {
|
|
2196
2198
|
pe as FormRender,
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2199
|
+
Cr as FormRenderResolver,
|
|
2200
|
+
kr as default,
|
|
2201
|
+
gr as defineForm,
|
|
2202
|
+
br as useForm
|
|
2201
2203
|
};
|