@gopowerteam/form-render 0.0.68 → 0.0.70
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-render/index.d.ts +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-render/index.d.ts +1 -0
- package/dist/es/index.mjs +303 -296
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getCurrentInstance as H, inject as ye, defineComponent as R, computed as
|
|
2
|
-
import { DatePicker as vt, YearPicker as pt, QuarterPicker as yt, MonthPicker as gt, WeekPicker as bt, Input as kt, InputNumber as Re, Select as wt, Option as xt, Switch as St, RangePicker as Ct, Textarea as _t, TreeSelect as $t, Cascader as Ot, FormItem as ve, Divider as
|
|
3
|
-
import
|
|
1
|
+
import { getCurrentInstance as H, inject as ye, defineComponent as R, computed as $, openBlock as _, createElementBlock as F, normalizeClass as le, normalizeStyle as N, createElementVNode as w, shallowRef as A, ref as O, provide as he, onMounted as q, Fragment as re, renderSlot as Qe, createBlock as ne, Teleport as Ze, createVNode as d, TransitionGroup as et, withCtx as tt, renderList as rt, mergeProps as ge, createCommentVNode as W, defineAsyncComponent as nt, triggerRef as Q, useCssVars as lt, onUnmounted as at, withModifiers as ut, toDisplayString as B, resolveDynamicComponent as De, normalizeProps as ot, guardReactiveProps as ct, watch as Z, unref as it, isRef as ae, toRefs as st, customRef as dt, nextTick as Ie, getCurrentScope as ft, onScopeDispose as mt, pushScopeId as ze, popScopeId as Ee, isVNode as be, createTextVNode as I, h as Ye, onUpdated as ht } from "vue";
|
|
2
|
+
import { DatePicker as vt, YearPicker as pt, QuarterPicker as yt, MonthPicker as gt, WeekPicker as bt, Input as kt, InputNumber as Re, Select as wt, Option as xt, Switch as St, RangePicker as Ct, Textarea as _t, TreeSelect as $t, Cascader as Ot, FormItem as ve, Divider as Fe, Button as z, Tabs as Yt, TabPane as Ft, Form as Mt, Grid as Tt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
|
|
3
|
+
import C from "dayjs";
|
|
4
4
|
import { FormRenderResolver as yn } from "./resolver.mjs";
|
|
5
5
|
const jt = Symbol("ArcoConfigProvider"), Pt = "arco", Dt = "$arco", ke = (e) => {
|
|
6
6
|
var n, r, t;
|
|
@@ -44,9 +44,9 @@ const zt = R({
|
|
|
44
44
|
setup(e, {
|
|
45
45
|
emit: n
|
|
46
46
|
}) {
|
|
47
|
-
const r = ke("icon"), t =
|
|
47
|
+
const r = ke("icon"), t = $(() => [r, `${r}-down`, {
|
|
48
48
|
[`${r}-spin`]: e.spin
|
|
49
|
-
}]), a =
|
|
49
|
+
}]), a = $(() => {
|
|
50
50
|
const l = {};
|
|
51
51
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
52
52
|
});
|
|
@@ -62,13 +62,13 @@ const zt = R({
|
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
63
|
}, null, -1), Nt = [Rt];
|
|
64
64
|
function Bt(e, n, r, t, a, u) {
|
|
65
|
-
return
|
|
65
|
+
return _(), F("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
68
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
69
69
|
stroke: "currentColor",
|
|
70
70
|
class: le(e.cls),
|
|
71
|
-
style:
|
|
71
|
+
style: N(e.innerStyle),
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
@@ -111,9 +111,9 @@ const Vt = Object.assign(ie, {
|
|
|
111
111
|
setup(e, {
|
|
112
112
|
emit: n
|
|
113
113
|
}) {
|
|
114
|
-
const r = ke("icon"), t =
|
|
114
|
+
const r = ke("icon"), t = $(() => [r, `${r}-up`, {
|
|
115
115
|
[`${r}-spin`]: e.spin
|
|
116
|
-
}]), a =
|
|
116
|
+
}]), a = $(() => {
|
|
117
117
|
const l = {};
|
|
118
118
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
119
119
|
});
|
|
@@ -129,13 +129,13 @@ const Vt = Object.assign(ie, {
|
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
130
|
}, null, -1), Wt = [qt];
|
|
131
131
|
function Ht(e, n, r, t, a, u) {
|
|
132
|
-
return
|
|
132
|
+
return _(), F("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
135
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
136
136
|
stroke: "currentColor",
|
|
137
137
|
class: le(e.cls),
|
|
138
|
-
style:
|
|
138
|
+
style: N(e.innerStyle),
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
@@ -178,9 +178,9 @@ const Gt = Object.assign(se, {
|
|
|
178
178
|
setup(e, {
|
|
179
179
|
emit: n
|
|
180
180
|
}) {
|
|
181
|
-
const r = ke("icon"), t =
|
|
181
|
+
const r = ke("icon"), t = $(() => [r, `${r}-search`, {
|
|
182
182
|
[`${r}-spin`]: e.spin
|
|
183
|
-
}]), a =
|
|
183
|
+
}]), a = $(() => {
|
|
184
184
|
const l = {};
|
|
185
185
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
186
186
|
});
|
|
@@ -196,13 +196,13 @@ const Gt = Object.assign(se, {
|
|
|
196
196
|
d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485"
|
|
197
197
|
}, null, -1), Qt = [Jt];
|
|
198
198
|
function Zt(e, n, r, t, a, u) {
|
|
199
|
-
return
|
|
199
|
+
return _(), F("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
203
203
|
stroke: "currentColor",
|
|
204
204
|
class: le(e.cls),
|
|
205
|
-
style:
|
|
205
|
+
style: N(e.innerStyle),
|
|
206
206
|
"stroke-width": e.strokeWidth,
|
|
207
207
|
"stroke-linecap": e.strokeLinecap,
|
|
208
208
|
"stroke-linejoin": e.strokeLinejoin,
|
|
@@ -271,31 +271,31 @@ function fe(...e) {
|
|
|
271
271
|
Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
|
-
},
|
|
274
|
+
}, h = (o, i, s, f) => (o.addEventListener(i, s, f), () => o.removeEventListener(i, s, f)), v = Z(
|
|
275
275
|
() => [U(n), Y(a)],
|
|
276
276
|
([o, i]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
279
|
const s = rr(i) ? { ...i } : i;
|
|
280
280
|
u.push(
|
|
281
|
-
...r.flatMap((f) => t.map((m) =>
|
|
281
|
+
...r.flatMap((f) => t.map((m) => h(o, f, m, s)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
285
285
|
), c = () => {
|
|
286
|
-
|
|
286
|
+
v(), l();
|
|
287
287
|
};
|
|
288
288
|
return Ne(c), c;
|
|
289
289
|
}
|
|
290
290
|
function or() {
|
|
291
|
-
const e =
|
|
291
|
+
const e = O(!1), n = H();
|
|
292
292
|
return n && q(() => {
|
|
293
293
|
e.value = !0;
|
|
294
294
|
}, n), e;
|
|
295
295
|
}
|
|
296
296
|
function cr(e) {
|
|
297
297
|
const n = or();
|
|
298
|
-
return
|
|
298
|
+
return $(() => (n.value, !!e()));
|
|
299
299
|
}
|
|
300
300
|
function ir(e, n = {}) {
|
|
301
301
|
var r, t;
|
|
@@ -303,49 +303,49 @@ function ir(e, n = {}) {
|
|
|
303
303
|
pointerTypes: a,
|
|
304
304
|
preventDefault: u,
|
|
305
305
|
stopPropagation: l,
|
|
306
|
-
exact:
|
|
307
|
-
onMove:
|
|
306
|
+
exact: h,
|
|
307
|
+
onMove: v,
|
|
308
308
|
onEnd: c,
|
|
309
309
|
onStart: o,
|
|
310
310
|
initialValue: i,
|
|
311
311
|
axis: s = "both",
|
|
312
312
|
draggingElement: f = ue,
|
|
313
313
|
containerElement: m,
|
|
314
|
-
handle:
|
|
315
|
-
} = n, y =
|
|
314
|
+
handle: k = e
|
|
315
|
+
} = n, y = O(
|
|
316
316
|
(r = Y(i)) != null ? r : { x: 0, y: 0 }
|
|
317
|
-
), x =
|
|
318
|
-
Y(u) &&
|
|
319
|
-
},
|
|
320
|
-
var
|
|
321
|
-
if (Y(n.disabled) || !
|
|
317
|
+
), x = O(), M = (g) => a ? a.includes(g.pointerType) : !0, T = (g) => {
|
|
318
|
+
Y(u) && g.preventDefault(), Y(l) && g.stopPropagation();
|
|
319
|
+
}, V = (g) => {
|
|
320
|
+
var j;
|
|
321
|
+
if (Y(n.disabled) || !M(g) || Y(h) && g.target !== Y(e))
|
|
322
322
|
return;
|
|
323
|
-
const L = Y(m), E = (
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
323
|
+
const L = Y(m), E = (j = L == null ? void 0 : L.getBoundingClientRect) == null ? void 0 : j.call(L), P = Y(e).getBoundingClientRect(), ee = {
|
|
324
|
+
x: g.clientX - (L ? P.left - E.left + L.scrollLeft : P.left),
|
|
325
|
+
y: g.clientY - (L ? P.top - E.top + L.scrollTop : P.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee,
|
|
328
|
-
},
|
|
329
|
-
if (Y(n.disabled) || !
|
|
327
|
+
(o == null ? void 0 : o(ee, g)) !== !1 && (x.value = ee, T(g));
|
|
328
|
+
}, b = (g) => {
|
|
329
|
+
if (Y(n.disabled) || !M(g) || !x.value)
|
|
330
330
|
return;
|
|
331
|
-
const
|
|
332
|
-
let { x: E, y:
|
|
333
|
-
(s === "x" || s === "both") && (E =
|
|
331
|
+
const j = Y(m), L = Y(e).getBoundingClientRect();
|
|
332
|
+
let { x: E, y: P } = y.value;
|
|
333
|
+
(s === "x" || s === "both") && (E = g.clientX - x.value.x, j && (E = Math.min(Math.max(0, E), j.scrollWidth - L.width))), (s === "y" || s === "both") && (P = g.clientY - x.value.y, j && (P = Math.min(Math.max(0, P), j.scrollHeight - L.height))), y.value = {
|
|
334
334
|
x: E,
|
|
335
|
-
y:
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
Y(n.disabled) || !
|
|
335
|
+
y: P
|
|
336
|
+
}, v == null || v(y.value, g), T(g);
|
|
337
|
+
}, S = (g) => {
|
|
338
|
+
Y(n.disabled) || !M(g) || x.value && (x.value = void 0, c == null || c(y.value, g), T(g));
|
|
339
339
|
};
|
|
340
340
|
if (Be) {
|
|
341
|
-
const
|
|
342
|
-
fe(
|
|
341
|
+
const g = { capture: (t = n.capture) != null ? t : !0 };
|
|
342
|
+
fe(k, "pointerdown", V, g), fe(f, "pointermove", b, g), fe(f, "pointerup", S, g);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
345
|
...ar(y),
|
|
346
346
|
position: y,
|
|
347
|
-
isDragging:
|
|
348
|
-
style:
|
|
347
|
+
isDragging: $(() => !!x.value),
|
|
348
|
+
style: $(
|
|
349
349
|
() => `left:${y.value.x}px;top:${y.value.y}px;`
|
|
350
350
|
)
|
|
351
351
|
};
|
|
@@ -353,12 +353,12 @@ function ir(e, n = {}) {
|
|
|
353
353
|
function sr(e, n, r = {}) {
|
|
354
354
|
const { window: t = ue, ...a } = r;
|
|
355
355
|
let u;
|
|
356
|
-
const l = cr(() => t && "ResizeObserver" in t),
|
|
356
|
+
const l = cr(() => t && "ResizeObserver" in t), h = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
},
|
|
359
|
-
|
|
358
|
+
}, v = $(() => Array.isArray(e) ? e.map((i) => U(i)) : [U(e)]), c = Z(
|
|
359
|
+
v,
|
|
360
360
|
(i) => {
|
|
361
|
-
if (
|
|
361
|
+
if (h(), l.value && t) {
|
|
362
362
|
u = new ResizeObserver(n);
|
|
363
363
|
for (const s of i)
|
|
364
364
|
s && u.observe(s, a);
|
|
@@ -366,7 +366,7 @@ function sr(e, n, r = {}) {
|
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
|
-
|
|
369
|
+
h(), c();
|
|
370
370
|
};
|
|
371
371
|
return Ne(o), {
|
|
372
372
|
isSupported: l,
|
|
@@ -374,10 +374,10 @@ function sr(e, n, r = {}) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
377
|
-
const { window: t = ue, box: a = "content-box" } = r, u =
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = r, u = $(() => {
|
|
378
378
|
var i, s;
|
|
379
379
|
return (s = (i = U(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : s.includes("svg");
|
|
380
|
-
}), l =
|
|
380
|
+
}), l = O(n.width), h = O(n.height), { stop: v } = sr(
|
|
381
381
|
e,
|
|
382
382
|
([i]) => {
|
|
383
383
|
const s = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
@@ -385,32 +385,32 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
385
385
|
const f = U(e);
|
|
386
386
|
if (f) {
|
|
387
387
|
const m = t.getComputedStyle(f);
|
|
388
|
-
l.value = Number.parseFloat(m.width),
|
|
388
|
+
l.value = Number.parseFloat(m.width), h.value = Number.parseFloat(m.height);
|
|
389
389
|
}
|
|
390
390
|
} else if (s) {
|
|
391
391
|
const f = Array.isArray(s) ? s : [s];
|
|
392
|
-
l.value = f.reduce((m, { inlineSize:
|
|
392
|
+
l.value = f.reduce((m, { inlineSize: k }) => m + k, 0), h.value = f.reduce((m, { blockSize: k }) => m + k, 0);
|
|
393
393
|
} else
|
|
394
|
-
l.value = i.contentRect.width,
|
|
394
|
+
l.value = i.contentRect.width, h.value = i.contentRect.height;
|
|
395
395
|
},
|
|
396
396
|
r
|
|
397
397
|
);
|
|
398
398
|
ur(() => {
|
|
399
399
|
const i = U(e);
|
|
400
|
-
i && (l.value = "offsetWidth" in i ? i.offsetWidth : n.width,
|
|
400
|
+
i && (l.value = "offsetWidth" in i ? i.offsetWidth : n.width, h.value = "offsetHeight" in i ? i.offsetHeight : n.height);
|
|
401
401
|
});
|
|
402
402
|
const c = Z(
|
|
403
403
|
() => U(e),
|
|
404
404
|
(i) => {
|
|
405
|
-
l.value = i ? n.width : 0,
|
|
405
|
+
l.value = i ? n.width : 0, h.value = i ? n.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
function o() {
|
|
409
|
-
|
|
409
|
+
v(), c();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: l,
|
|
413
|
-
height:
|
|
413
|
+
height: h,
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
@@ -463,18 +463,18 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
463
463
|
lt((p) => ({
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a = r, u = ye(Se), l =
|
|
467
|
-
let
|
|
468
|
-
const c = A(), o = A(), i = A(), s = A(), f = A(), m = A(), { height:
|
|
466
|
+
const t = e, a = r, u = ye(Se), l = O(!1);
|
|
467
|
+
let h = 0, v = 0;
|
|
468
|
+
const c = A(), o = A(), i = A(), s = A(), f = A(), m = A(), { height: k } = G(c), { height: y } = G(i, void 0, { box: "border-box" }), { height: x } = G(s, void 0, { box: "border-box" }), { height: M } = G(f), { height: T } = G(m), { x: V, y: b } = ir(i, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
|
-
function
|
|
471
|
+
function S() {
|
|
472
472
|
u == null || u.close(t.id);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function g(p) {
|
|
475
475
|
return typeof p == "number" ? `${p}px` : p;
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const j = $(() => {
|
|
478
478
|
const p = {};
|
|
479
479
|
return t.mode === "dialog" && (p.justifyContent = "center"), t.mode === "drawer" && (p.justifyContent = {
|
|
480
480
|
left: "flex-start",
|
|
@@ -487,21 +487,21 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
487
487
|
top: "column",
|
|
488
488
|
bottom: "column"
|
|
489
489
|
}[t.position]), p;
|
|
490
|
-
}), L =
|
|
490
|
+
}), L = $(() => {
|
|
491
491
|
const p = {};
|
|
492
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight =
|
|
493
|
-
}), E =
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = g(t.maxHeight) : (p.width = g(t.sizes[t.size]), p.maxWidth = g(t.maxWidth)), t.width && (p.width = g(t.width)), t.height && (p.height = g(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(${V.value - h}px, ${b.value - v}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
|
+
}), E = $(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
496
|
-
}),
|
|
497
|
-
const p = {},
|
|
498
|
-
return t.maxHeight && (p.maxHeight = `${Oe -
|
|
496
|
+
}), P = $(() => {
|
|
497
|
+
const p = {}, D = M.value + T.value + y.value + x.value, Oe = Math.floor(k.value * (Number(g(t.maxHeight).replace("%", "")) / 100));
|
|
498
|
+
return t.maxHeight && (p.maxHeight = `${Oe - D}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - D}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${D}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
|
|
499
499
|
});
|
|
500
500
|
function ee() {
|
|
501
501
|
const p = o.value;
|
|
502
502
|
if (t.form && p) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const D = p.querySelector(`form[name="${t.form}"]`);
|
|
504
|
+
D && D.dispatchEvent(new Event("submit"));
|
|
505
505
|
}
|
|
506
506
|
a("submit");
|
|
507
507
|
}
|
|
@@ -510,19 +510,19 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
510
510
|
}
|
|
511
511
|
function Ge() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
Q(c), Q(o), o.value && (
|
|
513
|
+
Q(c), Q(o), o.value && (h = o.value.offsetLeft, v = o.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
function Ke() {
|
|
517
517
|
if (t.closeable && t.esc) {
|
|
518
|
-
const p = ({ key:
|
|
519
|
-
|
|
518
|
+
const p = ({ key: D }) => {
|
|
519
|
+
D === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
|
|
520
520
|
};
|
|
521
521
|
window.addEventListener("keydown", p);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Xe() {
|
|
525
|
-
|
|
525
|
+
h = o.value.offsetLeft, v = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
q(() => {
|
|
528
528
|
Ke(), Ge();
|
|
@@ -537,33 +537,33 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
537
537
|
return n({
|
|
538
538
|
showLoading: Je,
|
|
539
539
|
hideLoading: $e
|
|
540
|
-
}), (p,
|
|
540
|
+
}), (p, D) => (_(), F("div", {
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: c,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
|
-
style:
|
|
545
|
-
onClick:
|
|
544
|
+
style: N(j.value),
|
|
545
|
+
onClick: D[0] || (D[0] = ut((Oe) => p.maskClosable && S(), ["self"]))
|
|
546
546
|
}, [
|
|
547
547
|
w("div", {
|
|
548
548
|
ref_key: "contentRef",
|
|
549
549
|
ref: o,
|
|
550
550
|
class: le(["modal-content", { [`${p.mode}-mode`]: !0, [`${p.position}-position`]: !0 }]),
|
|
551
|
-
style:
|
|
551
|
+
style: N(L.value)
|
|
552
552
|
}, [
|
|
553
|
-
p.header ? (
|
|
553
|
+
p.header ? (_(), F("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
556
|
ref: i,
|
|
557
557
|
class: "modal-header",
|
|
558
|
-
style:
|
|
558
|
+
style: N(E.value),
|
|
559
559
|
onMousedown: Xe
|
|
560
560
|
}, [
|
|
561
|
-
w("div", fr,
|
|
561
|
+
w("div", fr, B(p.title), 1),
|
|
562
562
|
w("div", mr, [
|
|
563
|
-
p.closeable ? (
|
|
563
|
+
p.closeable ? (_(), F("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
566
|
-
onClick:
|
|
566
|
+
onClick: S
|
|
567
567
|
})) : W("", !0)
|
|
568
568
|
])
|
|
569
569
|
], 36)) : W("", !0),
|
|
@@ -574,16 +574,16 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
574
574
|
}, null, 512),
|
|
575
575
|
w("div", {
|
|
576
576
|
class: "modal-body",
|
|
577
|
-
style:
|
|
577
|
+
style: N(P.value)
|
|
578
578
|
}, [
|
|
579
|
-
(
|
|
579
|
+
(_(), ne(De(p.component), ot(ct(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
581
581
|
w("div", {
|
|
582
582
|
id: "modal-footer-slot",
|
|
583
583
|
ref_key: "footerSlotRef",
|
|
584
584
|
ref: m
|
|
585
585
|
}, null, 512),
|
|
586
|
-
p.footer ? (
|
|
586
|
+
p.footer ? (_(), F("div", {
|
|
587
587
|
key: 1,
|
|
588
588
|
ref_key: "footerRef",
|
|
589
589
|
ref: s,
|
|
@@ -593,15 +593,15 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
593
593
|
class: "cancel-button",
|
|
594
594
|
type: "button",
|
|
595
595
|
onClick: He
|
|
596
|
-
},
|
|
596
|
+
}, B(p.cancelText), 1),
|
|
597
597
|
w("button", {
|
|
598
598
|
class: "submit-button",
|
|
599
599
|
form: p.form,
|
|
600
600
|
type: "submit",
|
|
601
601
|
onClick: ee
|
|
602
|
-
},
|
|
602
|
+
}, B(p.submitText), 9, hr)
|
|
603
603
|
], 512)) : W("", !0),
|
|
604
|
-
l.value ? (
|
|
604
|
+
l.value ? (_(), F("div", vr, yr)) : W("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
@@ -623,7 +623,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
623
623
|
footer: {}
|
|
624
624
|
},
|
|
625
625
|
setup(e) {
|
|
626
|
-
const n = e, r = Ve(), t =
|
|
626
|
+
const n = e, r = Ve(), t = $(() => n.title ? n.title : {
|
|
627
627
|
confirm: "提示",
|
|
628
628
|
info: "提示",
|
|
629
629
|
warning: "警告",
|
|
@@ -636,47 +636,47 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
636
636
|
async function u() {
|
|
637
637
|
n.onCancel && await n.onCancel(), r.close();
|
|
638
638
|
}
|
|
639
|
-
return (l,
|
|
639
|
+
return (l, h) => (_(), F("section", wr, [
|
|
640
640
|
w("div", xr, [
|
|
641
|
-
w("div", Sr,
|
|
642
|
-
w("div", Cr,
|
|
641
|
+
w("div", Sr, B(t.value), 1),
|
|
642
|
+
w("div", Cr, B(l.content), 1)
|
|
643
643
|
]),
|
|
644
644
|
w("div", {
|
|
645
645
|
class: "dialog-footer space-x-2",
|
|
646
|
-
style:
|
|
646
|
+
style: N(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
647
647
|
}, [
|
|
648
|
-
l.footer ? (
|
|
648
|
+
l.footer ? (_(), ne(De(l.footer), { key: 0 })) : (_(), F(re, { key: 1 }, [
|
|
649
649
|
w("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
652
652
|
onClick: a
|
|
653
|
-
},
|
|
654
|
-
l.type === "confirm" ? (
|
|
653
|
+
}, B(l.okText), 1),
|
|
654
|
+
l.type === "confirm" ? (_(), F("button", {
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "cancel-button",
|
|
657
657
|
type: "button",
|
|
658
658
|
onClick: u
|
|
659
|
-
},
|
|
659
|
+
}, B(l.cancelText), 1)) : W("", !0)
|
|
660
660
|
], 64))
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}), $r = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-0c6b8db2"]]), Or = (e) => (ze("data-v-559bdf2e"), e = e(), Ee(), e), Yr = { class: "flex-center" },
|
|
664
|
+
}), $r = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-0c6b8db2"]]), Or = (e) => (ze("data-v-559bdf2e"), e = e(), Ee(), e), Yr = { class: "flex-center" }, Fr = /* @__PURE__ */ Or(() => /* @__PURE__ */ w("div", { class: "modal-loading" }, [
|
|
665
665
|
/* @__PURE__ */ w("div", { class: "lds-ring" }, [
|
|
666
666
|
/* @__PURE__ */ w("div"),
|
|
667
667
|
/* @__PURE__ */ w("div"),
|
|
668
668
|
/* @__PURE__ */ w("div"),
|
|
669
669
|
/* @__PURE__ */ w("div")
|
|
670
670
|
])
|
|
671
|
-
], -1)),
|
|
671
|
+
], -1)), Mr = { class: "modal-loading-text" }, Tr = /* @__PURE__ */ R({
|
|
672
672
|
__name: "modal-loading",
|
|
673
673
|
props: {
|
|
674
674
|
text: { default: "加载中" }
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
|
-
return (n, r) => (
|
|
678
|
-
|
|
679
|
-
w("div",
|
|
677
|
+
return (n, r) => (_(), F("section", Yr, [
|
|
678
|
+
Fr,
|
|
679
|
+
w("div", Mr, B(n.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
682
|
}), Lr = /* @__PURE__ */ oe(Tr, [["__scopeId", "data-v-559bdf2e"]]), jr = {
|
|
@@ -699,30 +699,30 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
699
699
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
700
700
|
},
|
|
701
701
|
setup(e, { expose: n }) {
|
|
702
|
-
const r = A([]), t =
|
|
702
|
+
const r = A([]), t = O(!1), a = H();
|
|
703
703
|
function u(s, f = {}, m = {}) {
|
|
704
|
-
const
|
|
704
|
+
const k = nt(
|
|
705
705
|
() => Promise.resolve(typeof s == "string" ? $r : s)
|
|
706
706
|
);
|
|
707
707
|
typeof s == "string" && (f.type = s, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
|
|
708
708
|
const y = Math.random().toString(32).slice(2), x = Object.assign({
|
|
709
709
|
zIndex: typeof s == "string" ? 1100 : 1e3
|
|
710
|
-
}, m),
|
|
710
|
+
}, m), M = new Promise((T, V) => {
|
|
711
711
|
r.value.push({
|
|
712
712
|
id: y,
|
|
713
|
-
component:
|
|
713
|
+
component: k,
|
|
714
714
|
props: f || {},
|
|
715
715
|
options: {
|
|
716
716
|
...x,
|
|
717
717
|
type: typeof s == "string" ? s : "component"
|
|
718
718
|
},
|
|
719
719
|
resolve: T,
|
|
720
|
-
reject:
|
|
720
|
+
reject: V,
|
|
721
721
|
listeners: []
|
|
722
722
|
}), Q(r);
|
|
723
723
|
}).catch((T) => T === "CANCEL" ? new Promise(() => {
|
|
724
724
|
}) : Promise.reject(T));
|
|
725
|
-
return Object.assign(
|
|
725
|
+
return Object.assign(M, {
|
|
726
726
|
close: () => l(y)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
@@ -730,23 +730,23 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
730
730
|
const m = r.value.findIndex((y) => y.id === s);
|
|
731
731
|
if (m < 0)
|
|
732
732
|
return;
|
|
733
|
-
const
|
|
734
|
-
f === void 0 ?
|
|
733
|
+
const k = r.value[m];
|
|
734
|
+
f === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(f), r.value.splice(m, 1), Q(r);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function h() {
|
|
737
737
|
!r.value || r.value.length === 0 || (r.value.forEach((s) => {
|
|
738
738
|
s == null || s.reject("CANCEL");
|
|
739
739
|
}), r.value = [], Q(r));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function v(s, f) {
|
|
742
742
|
const m = r.value.find((y) => y.id === s);
|
|
743
743
|
if (!m)
|
|
744
744
|
return;
|
|
745
|
-
const
|
|
746
|
-
|
|
745
|
+
const k = m.listeners.find((y) => y.event === f);
|
|
746
|
+
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
748
|
close: (y) => l(m.id, y),
|
|
749
|
-
closeAll:
|
|
749
|
+
closeAll: h,
|
|
750
750
|
showLoading: () => c(m.id),
|
|
751
751
|
hideLoading: () => o(m.id),
|
|
752
752
|
confirm: (y) => u("confirm", y),
|
|
@@ -763,7 +763,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
763
763
|
if (m)
|
|
764
764
|
return m.showLoading();
|
|
765
765
|
{
|
|
766
|
-
const { close:
|
|
766
|
+
const { close: k } = u(Lr, {
|
|
767
767
|
text: f == null ? void 0 : f.text
|
|
768
768
|
}, {
|
|
769
769
|
footer: !1,
|
|
@@ -773,10 +773,10 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
773
773
|
});
|
|
774
774
|
return f != null && f.duration && setTimeout(
|
|
775
775
|
() => {
|
|
776
|
-
|
|
776
|
+
k();
|
|
777
777
|
},
|
|
778
778
|
f == null ? void 0 : f.duration
|
|
779
|
-
),
|
|
779
|
+
), k;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
function o(s) {
|
|
@@ -787,8 +787,8 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
787
787
|
return f.hideLoading();
|
|
788
788
|
}
|
|
789
789
|
function i(s, f, m) {
|
|
790
|
-
const
|
|
791
|
-
|
|
790
|
+
const k = r.value.find((y) => y.id === s);
|
|
791
|
+
k && k.listeners.push({
|
|
792
792
|
event: f,
|
|
793
793
|
callback: m
|
|
794
794
|
});
|
|
@@ -796,7 +796,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
796
796
|
return he(Se, {
|
|
797
797
|
open: u,
|
|
798
798
|
close: l,
|
|
799
|
-
closeAll:
|
|
799
|
+
closeAll: h,
|
|
800
800
|
addEventListener: i,
|
|
801
801
|
showLoading: c,
|
|
802
802
|
hideLoading: o
|
|
@@ -804,19 +804,19 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
804
804
|
elements: r,
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
|
-
closeAll:
|
|
807
|
+
closeAll: h
|
|
808
808
|
}), q(() => {
|
|
809
809
|
t.value = !0;
|
|
810
|
-
}), (s, f) => (
|
|
810
|
+
}), (s, f) => (_(), F(re, null, [
|
|
811
811
|
Qe(s.$slots, "default", {}, void 0, !0),
|
|
812
|
-
t.value ? (
|
|
813
|
-
(
|
|
812
|
+
t.value ? (_(), F("div", jr, [
|
|
813
|
+
(_(), ne(Ze, {
|
|
814
814
|
disabled: !s.appendToBody,
|
|
815
815
|
to: typeof s.appendToBody == "string" ? s.appendToBody : "body"
|
|
816
816
|
}, [
|
|
817
817
|
d(et, { name: "modal-fade" }, {
|
|
818
818
|
default: tt(() => [
|
|
819
|
-
(
|
|
819
|
+
(_(!0), F(re, null, rt(r.value, (m) => (_(), ne(kr, ge({
|
|
820
820
|
id: m.id,
|
|
821
821
|
key: m.id,
|
|
822
822
|
ref_for: !0,
|
|
@@ -828,7 +828,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
828
828
|
offset: s.offset,
|
|
829
829
|
sizes: s.sizes
|
|
830
830
|
}, m.options, {
|
|
831
|
-
onSubmit: () =>
|
|
831
|
+
onSubmit: () => v(m.id, "submit")
|
|
832
832
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
833
833
|
]),
|
|
834
834
|
_: 1
|
|
@@ -904,7 +904,7 @@ const Te = {
|
|
|
904
904
|
source: Symbol("Source")
|
|
905
905
|
};
|
|
906
906
|
function zr(e, n) {
|
|
907
|
-
const r =
|
|
907
|
+
const r = O({});
|
|
908
908
|
return e == null || e.forEach((a) => {
|
|
909
909
|
let u = null;
|
|
910
910
|
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), n && n[a.key] !== void 0 && (u = n[a.key]), r.value[a.key] = u;
|
|
@@ -919,7 +919,7 @@ function Ae(e) {
|
|
|
919
919
|
var Er = { exports: {} };
|
|
920
920
|
(function(e, n) {
|
|
921
921
|
(function(r, t) {
|
|
922
|
-
e.exports = t(
|
|
922
|
+
e.exports = t(C);
|
|
923
923
|
})(Ce, function(r) {
|
|
924
924
|
function t(l) {
|
|
925
925
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
@@ -933,8 +933,8 @@ var Er = { 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, h) {
|
|
937
|
+
return h === "W" ? l + "周" : l + "日";
|
|
938
938
|
},
|
|
939
939
|
weekStart: 1,
|
|
940
940
|
yearStart: 4,
|
|
@@ -965,9 +965,9 @@ var Er = { exports: {} };
|
|
|
965
965
|
y: "1 年",
|
|
966
966
|
yy: "%d 年"
|
|
967
967
|
},
|
|
968
|
-
meridiem: function(l,
|
|
969
|
-
var
|
|
970
|
-
return
|
|
968
|
+
meridiem: function(l, h) {
|
|
969
|
+
var v = 100 * l + h;
|
|
970
|
+
return v < 600 ? "凌晨" : v < 900 ? "早上" : v < 1100 ? "上午" : v < 1300 ? "中午" : v < 1800 ? "下午" : "晚上";
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
return a.default.locale(u, null, !0), u;
|
|
@@ -980,10 +980,10 @@ var Ue = { exports: {} };
|
|
|
980
980
|
})(Ce, function() {
|
|
981
981
|
var r = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
return this.add(7 * (
|
|
983
|
+
var h = u.prototype;
|
|
984
|
+
h.week = function(v) {
|
|
985
|
+
if (v === void 0 && (v = null), v !== null)
|
|
986
|
+
return this.add(7 * (v - this.week()), "day");
|
|
987
987
|
var c = this.$locale().yearStart || 1;
|
|
988
988
|
if (this.month() === 11 && this.date() > 25) {
|
|
989
989
|
var o = l(this).startOf(t).add(1, t).date(c), i = l(this).endOf(r);
|
|
@@ -992,8 +992,8 @@ var Ue = { exports: {} };
|
|
|
992
992
|
}
|
|
993
993
|
var s = l(this).startOf(t).date(c).startOf(r).subtract(1, "millisecond"), f = this.diff(s, r, !0);
|
|
994
994
|
return f < 0 ? l(this).startOf("week").week() : Math.ceil(f);
|
|
995
|
-
},
|
|
996
|
-
return
|
|
995
|
+
}, h.weeks = function(v) {
|
|
996
|
+
return v === void 0 && (v = null), this.week(v);
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
999
|
});
|
|
@@ -1011,27 +1011,27 @@ var qe = { 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 h = l.add;
|
|
1015
1015
|
l.add = function(c, o) {
|
|
1016
|
-
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, r) :
|
|
1016
|
+
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, r) : h.bind(this)(c, o);
|
|
1017
1017
|
};
|
|
1018
|
-
var
|
|
1018
|
+
var v = l.startOf;
|
|
1019
1019
|
l.startOf = function(c, o) {
|
|
1020
1020
|
var i = this.$utils(), s = !!i.u(o) || o;
|
|
1021
1021
|
if (i.p(c) === t) {
|
|
1022
1022
|
var f = this.quarter() - 1;
|
|
1023
1023
|
return s ? this.month(3 * f).startOf(r).startOf("day") : this.month(3 * f + 2).endOf(r).endOf("day");
|
|
1024
1024
|
}
|
|
1025
|
-
return
|
|
1025
|
+
return v.bind(this)(c, o);
|
|
1026
1026
|
};
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
1029
1029
|
})(qe);
|
|
1030
1030
|
var Br = qe.exports;
|
|
1031
1031
|
const Vr = /* @__PURE__ */ Ae(Br);
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1032
|
+
C.extend(Nr);
|
|
1033
|
+
C.extend(Vr);
|
|
1034
|
+
C.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
1036
1036
|
});
|
|
1037
1037
|
function Ar(e) {
|
|
@@ -1043,16 +1043,16 @@ function Ar(e) {
|
|
|
1043
1043
|
const l = r[t.key];
|
|
1044
1044
|
switch (e == null ? void 0 : e.type) {
|
|
1045
1045
|
case "week":
|
|
1046
|
-
return d("span", null, [`${
|
|
1046
|
+
return d("span", null, [`${C(l).format("YYYY年")}${C(l).week()}周`]);
|
|
1047
1047
|
case "month":
|
|
1048
|
-
return d("span", null, [
|
|
1048
|
+
return d("span", null, [C(l).format("YYYY年MM月")]);
|
|
1049
1049
|
case "quarter":
|
|
1050
|
-
return d("span", null, [`${
|
|
1050
|
+
return d("span", null, [`${C(l).format("YYYY年")}${C(l).quarter()}季度`]);
|
|
1051
1051
|
case "year":
|
|
1052
|
-
return d("span", null, [
|
|
1052
|
+
return d("span", null, [C(l).format("YYYY年")]);
|
|
1053
1053
|
case "date":
|
|
1054
1054
|
default:
|
|
1055
|
-
return d("span", null, [
|
|
1055
|
+
return d("span", null, [C(l).format("YYYY年MM月DD日")]);
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
function u() {
|
|
@@ -1159,7 +1159,7 @@ function qr(e) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1161
1161
|
function Wr() {
|
|
1162
|
-
const e =
|
|
1162
|
+
const e = O(/* @__PURE__ */ new Map());
|
|
1163
1163
|
return [e, (r) => e.value = r];
|
|
1164
1164
|
}
|
|
1165
1165
|
function Hr(e) {
|
|
@@ -1174,7 +1174,7 @@ function Hr(e) {
|
|
|
1174
1174
|
}, l = (c, o) => {
|
|
1175
1175
|
const i = c();
|
|
1176
1176
|
i instanceof Promise ? i.then(o) : o(i);
|
|
1177
|
-
},
|
|
1177
|
+
}, h = async () => {
|
|
1178
1178
|
const c = K.get(e.options);
|
|
1179
1179
|
switch (typeof c) {
|
|
1180
1180
|
case "function":
|
|
@@ -1188,14 +1188,14 @@ function Hr(e) {
|
|
|
1188
1188
|
const i = K.get(e.options);
|
|
1189
1189
|
K.set(e.options, o), i(o);
|
|
1190
1190
|
});
|
|
1191
|
-
},
|
|
1191
|
+
}, v = () => {
|
|
1192
1192
|
l(e.options, (c) => {
|
|
1193
1193
|
a(c);
|
|
1194
1194
|
});
|
|
1195
1195
|
};
|
|
1196
1196
|
switch (!0) {
|
|
1197
1197
|
case e.options instanceof Function: {
|
|
1198
|
-
e.cache !== !1 ?
|
|
1198
|
+
e.cache !== !1 ? h() : v();
|
|
1199
1199
|
break;
|
|
1200
1200
|
}
|
|
1201
1201
|
case ae(e.options): {
|
|
@@ -1228,10 +1228,10 @@ function Hr(e) {
|
|
|
1228
1228
|
"allow-create": e.createable,
|
|
1229
1229
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1230
1230
|
onChange: u
|
|
1231
|
-
}, qr(f = Array.from(t.value.entries()).map(([m,
|
|
1231
|
+
}, qr(f = Array.from(t.value.entries()).map(([m, k]) => d(xt, {
|
|
1232
1232
|
key: m,
|
|
1233
1233
|
value: m,
|
|
1234
|
-
label:
|
|
1234
|
+
label: k
|
|
1235
1235
|
}, null))) ? f : {
|
|
1236
1236
|
default: () => [f]
|
|
1237
1237
|
});
|
|
@@ -1258,14 +1258,14 @@ function Gr(e) {
|
|
|
1258
1258
|
return (t, a) => {
|
|
1259
1259
|
e != null && e.default && (t[a.key] = e.default);
|
|
1260
1260
|
function u() {
|
|
1261
|
-
const
|
|
1262
|
-
return d("span", null, [
|
|
1261
|
+
const h = t[a.key];
|
|
1262
|
+
return d("span", null, [h ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1263
1263
|
}
|
|
1264
1264
|
function l() {
|
|
1265
1265
|
return d(St, {
|
|
1266
|
-
ref: (
|
|
1266
|
+
ref: (h) => n = h,
|
|
1267
1267
|
modelValue: t[a.key],
|
|
1268
|
-
"onUpdate:modelValue": (
|
|
1268
|
+
"onUpdate:modelValue": (h) => t[a.key] = h,
|
|
1269
1269
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1270
1270
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1271
1271
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
@@ -1290,32 +1290,32 @@ function Kr(e) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
function u(c) {
|
|
1292
1292
|
if (c && c.length === 2) {
|
|
1293
|
-
const [o, i] = c.sort(), s =
|
|
1293
|
+
const [o, i] = c.sort(), s = C(o).startOf("days"), f = C(i).endOf("days");
|
|
1294
1294
|
n[r.key] = [s.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), f.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
1297
|
function l(c) {
|
|
1298
1298
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function h() {
|
|
1301
1301
|
const c = n[r.key], [o, i] = c, s = (f) => {
|
|
1302
1302
|
switch (e == null ? void 0 : e.type) {
|
|
1303
1303
|
case "week":
|
|
1304
|
-
return d("span", null, [`${
|
|
1304
|
+
return d("span", null, [`${C(f).format("YYYY年")}${C(f).week()}周`]);
|
|
1305
1305
|
case "month":
|
|
1306
|
-
return d("span", null, [
|
|
1306
|
+
return d("span", null, [C(f).format("YYYY年MM月")]);
|
|
1307
1307
|
case "quarter":
|
|
1308
|
-
return d("span", null, [`${
|
|
1308
|
+
return d("span", null, [`${C(f).format("YYYY年")}${C(f).quarter()}季度`]);
|
|
1309
1309
|
case "year":
|
|
1310
|
-
return d("span", null, [
|
|
1310
|
+
return d("span", null, [C(f).format("YYYY年")]);
|
|
1311
1311
|
case "date":
|
|
1312
1312
|
default:
|
|
1313
|
-
return d("span", null, [
|
|
1313
|
+
return d("span", null, [C(f).format("YYYY年MM月DD日")]);
|
|
1314
1314
|
}
|
|
1315
1315
|
};
|
|
1316
|
-
return d("span", null, [s(o),
|
|
1316
|
+
return d("span", null, [s(o), I(" - "), s(i)]);
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function v() {
|
|
1319
1319
|
return d("div", null, [d(Ct, {
|
|
1320
1320
|
"disabled-input": !0,
|
|
1321
1321
|
style: {
|
|
@@ -1335,10 +1335,10 @@ function Kr(e) {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
switch (r.mode) {
|
|
1337
1337
|
case "text":
|
|
1338
|
-
return
|
|
1338
|
+
return h();
|
|
1339
1339
|
case "component":
|
|
1340
1340
|
default:
|
|
1341
|
-
return
|
|
1341
|
+
return v();
|
|
1342
1342
|
}
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
@@ -1390,7 +1390,7 @@ function Jr(e) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1392
1392
|
function Qr() {
|
|
1393
|
-
const e =
|
|
1393
|
+
const e = O([]);
|
|
1394
1394
|
return [e, (r) => e.value = r];
|
|
1395
1395
|
}
|
|
1396
1396
|
function Zr(e) {
|
|
@@ -1405,7 +1405,7 @@ function Zr(e) {
|
|
|
1405
1405
|
}, l = (o, i) => {
|
|
1406
1406
|
const s = o();
|
|
1407
1407
|
s instanceof Promise ? s.then(i) : i(s);
|
|
1408
|
-
},
|
|
1408
|
+
}, h = async () => {
|
|
1409
1409
|
const o = X.get(e.options);
|
|
1410
1410
|
switch (typeof o) {
|
|
1411
1411
|
case "function":
|
|
@@ -1419,14 +1419,14 @@ function Zr(e) {
|
|
|
1419
1419
|
const s = X.get(e.options);
|
|
1420
1420
|
X.set(e.options, i), s(i);
|
|
1421
1421
|
});
|
|
1422
|
-
},
|
|
1422
|
+
}, v = () => {
|
|
1423
1423
|
l(e.options, (o) => {
|
|
1424
1424
|
a(o);
|
|
1425
1425
|
});
|
|
1426
1426
|
};
|
|
1427
1427
|
switch (!0) {
|
|
1428
1428
|
case e.options instanceof Function: {
|
|
1429
|
-
e.cache !== !1 ?
|
|
1429
|
+
e.cache !== !1 ? h() : v();
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
1432
|
case ae(e.options): {
|
|
@@ -1448,7 +1448,7 @@ function Zr(e) {
|
|
|
1448
1448
|
return (o, i) => {
|
|
1449
1449
|
e.default && !r && (o[i.key] = e.default, r = !0);
|
|
1450
1450
|
function s() {
|
|
1451
|
-
const m = o[i.key],
|
|
1451
|
+
const m = o[i.key], k = (y) => {
|
|
1452
1452
|
const [x] = We({
|
|
1453
1453
|
data: t.value,
|
|
1454
1454
|
labelProp: "title",
|
|
@@ -1458,10 +1458,10 @@ function Zr(e) {
|
|
|
1458
1458
|
return x == null ? void 0 : x.title;
|
|
1459
1459
|
};
|
|
1460
1460
|
if (e.multiple) {
|
|
1461
|
-
const y = m.map((x) =>
|
|
1461
|
+
const y = m.map((x) => k(x));
|
|
1462
1462
|
return d("span", null, [y.join(", ")]);
|
|
1463
1463
|
} else {
|
|
1464
|
-
const y =
|
|
1464
|
+
const y = k(m);
|
|
1465
1465
|
return d("span", null, [y]);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
@@ -1495,7 +1495,7 @@ function Zr(e) {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1497
1497
|
function en() {
|
|
1498
|
-
const e =
|
|
1498
|
+
const e = O([]);
|
|
1499
1499
|
return [e, (r) => e.value = r];
|
|
1500
1500
|
}
|
|
1501
1501
|
function tn(e) {
|
|
@@ -1510,7 +1510,7 @@ function tn(e) {
|
|
|
1510
1510
|
}, l = (c, o) => {
|
|
1511
1511
|
const i = c();
|
|
1512
1512
|
i instanceof Promise ? i.then(o) : o(i);
|
|
1513
|
-
},
|
|
1513
|
+
}, h = async () => {
|
|
1514
1514
|
const c = J.get(e.options);
|
|
1515
1515
|
switch (typeof c) {
|
|
1516
1516
|
case "function":
|
|
@@ -1524,14 +1524,14 @@ function tn(e) {
|
|
|
1524
1524
|
const i = J.get(e.options);
|
|
1525
1525
|
J.set(e.options, o), i(o);
|
|
1526
1526
|
});
|
|
1527
|
-
},
|
|
1527
|
+
}, v = () => {
|
|
1528
1528
|
l(e.options, (c) => {
|
|
1529
1529
|
a(c);
|
|
1530
1530
|
});
|
|
1531
1531
|
};
|
|
1532
1532
|
switch (!0) {
|
|
1533
1533
|
case e.options instanceof Function: {
|
|
1534
|
-
e.cache !== !1 ?
|
|
1534
|
+
e.cache !== !1 ? h() : v();
|
|
1535
1535
|
break;
|
|
1536
1536
|
}
|
|
1537
1537
|
case ae(e.options): {
|
|
@@ -1553,12 +1553,12 @@ function tn(e) {
|
|
|
1553
1553
|
labelProp: "label",
|
|
1554
1554
|
valueProp: "value",
|
|
1555
1555
|
key: y
|
|
1556
|
-
}).map((
|
|
1556
|
+
}).map((M) => M.label).join("/"), k = (y) => Jr({
|
|
1557
1557
|
data: t.value,
|
|
1558
1558
|
labelProp: "label",
|
|
1559
1559
|
valueProp: "value",
|
|
1560
1560
|
path: y
|
|
1561
|
-
}).map((
|
|
1561
|
+
}).map((M) => M.label).join("/");
|
|
1562
1562
|
switch (!0) {
|
|
1563
1563
|
case (!e.pathMode && !e.multiple): {
|
|
1564
1564
|
const y = m(f);
|
|
@@ -1569,11 +1569,11 @@ function tn(e) {
|
|
|
1569
1569
|
return d("span", null, [y.join(", ")]);
|
|
1570
1570
|
}
|
|
1571
1571
|
case (e.pathMode && !e.multiple): {
|
|
1572
|
-
const y =
|
|
1572
|
+
const y = k(f);
|
|
1573
1573
|
return d("span", null, [y]);
|
|
1574
1574
|
}
|
|
1575
1575
|
case (e.pathMode && e.multiple): {
|
|
1576
|
-
const y = f.map((x) =>
|
|
1576
|
+
const y = f.map((x) => k(x));
|
|
1577
1577
|
return d("span", null, [y.join(", ")]);
|
|
1578
1578
|
}
|
|
1579
1579
|
default:
|
|
@@ -1626,35 +1626,35 @@ function ln(e) {
|
|
|
1626
1626
|
return;
|
|
1627
1627
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1628
1628
|
return l;
|
|
1629
|
-
const
|
|
1630
|
-
return l *
|
|
1629
|
+
const h = te[e.outputUnit] / te[e.inputUnit];
|
|
1630
|
+
return l * h;
|
|
1631
1631
|
}, r = (l) => {
|
|
1632
1632
|
if (l == null)
|
|
1633
1633
|
return;
|
|
1634
1634
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1635
1635
|
return l;
|
|
1636
|
-
const
|
|
1637
|
-
return l *
|
|
1636
|
+
const h = te[e.inputUnit] / te[e.outputUnit];
|
|
1637
|
+
return l * h;
|
|
1638
1638
|
}, t = (l) => {
|
|
1639
|
-
const
|
|
1640
|
-
return
|
|
1639
|
+
const h = l.split(".");
|
|
1640
|
+
return h[0] = h[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), h.join(".");
|
|
1641
1641
|
}, a = (l) => {
|
|
1642
|
-
const
|
|
1643
|
-
return e != null && e.thousands ? t(
|
|
1642
|
+
const h = l;
|
|
1643
|
+
return e != null && e.thousands ? t(h) : h;
|
|
1644
1644
|
}, u = (l) => l.replace(/,/g, "");
|
|
1645
|
-
return (l,
|
|
1646
|
-
const
|
|
1647
|
-
Z(
|
|
1648
|
-
l[
|
|
1645
|
+
return (l, h) => {
|
|
1646
|
+
const v = O(n(l[h.key]));
|
|
1647
|
+
Z(v, (f) => {
|
|
1648
|
+
l[h.key] = r(f);
|
|
1649
1649
|
});
|
|
1650
1650
|
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? d("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? d("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
|
|
1651
1651
|
function i() {
|
|
1652
|
-
return d("span", null, [a(
|
|
1652
|
+
return d("span", null, [a(v.value.toString()), o()]);
|
|
1653
1653
|
}
|
|
1654
1654
|
function s() {
|
|
1655
1655
|
return d(Re, {
|
|
1656
|
-
modelValue:
|
|
1657
|
-
"onUpdate:modelValue": (f) =>
|
|
1656
|
+
modelValue: v.value,
|
|
1657
|
+
"onUpdate:modelValue": (f) => v.value = f,
|
|
1658
1658
|
formatter: a,
|
|
1659
1659
|
parser: u,
|
|
1660
1660
|
precision: e == null ? void 0 : e.precision,
|
|
@@ -1667,7 +1667,7 @@ function ln(e) {
|
|
|
1667
1667
|
suffix: o
|
|
1668
1668
|
});
|
|
1669
1669
|
}
|
|
1670
|
-
switch (
|
|
1670
|
+
switch (h.mode) {
|
|
1671
1671
|
case "text":
|
|
1672
1672
|
return i();
|
|
1673
1673
|
case "component":
|
|
@@ -1728,34 +1728,34 @@ const on = /* @__PURE__ */ R({
|
|
|
1728
1728
|
}
|
|
1729
1729
|
},
|
|
1730
1730
|
setup(e) {
|
|
1731
|
-
const n = Ve(), r = e.form.map((
|
|
1732
|
-
...
|
|
1731
|
+
const n = Ve(), r = e.form.map((v) => ({
|
|
1732
|
+
...v,
|
|
1733
1733
|
collapsed: !1
|
|
1734
|
-
})), t = Array.from(new Set(r.map((
|
|
1735
|
-
let i =
|
|
1734
|
+
})), t = Array.from(new Set(r.map((v) => v.group).flat().filter(Boolean))), a = r.reduce((v, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
|
|
1735
|
+
let i = v.find((s) => s.group === o);
|
|
1736
1736
|
i || (i = {
|
|
1737
1737
|
group: o,
|
|
1738
1738
|
instance: void 0,
|
|
1739
1739
|
form: []
|
|
1740
|
-
},
|
|
1741
|
-
}),
|
|
1740
|
+
}, v.push(i)), i.form.push(c);
|
|
1741
|
+
}), v), []).sort((v, c) => v.group === "默认" ? -1 : c.group === "默认" ? 1 : v.group > c.group ? -1 : 1), u = O("默认");
|
|
1742
1742
|
return {
|
|
1743
1743
|
formItems: r,
|
|
1744
1744
|
groups: t,
|
|
1745
1745
|
groupForms: a,
|
|
1746
1746
|
activeTab: u,
|
|
1747
1747
|
onSubmit: () => {
|
|
1748
|
-
const
|
|
1749
|
-
if (
|
|
1750
|
-
const c =
|
|
1751
|
-
|
|
1752
|
-
n.close(c);
|
|
1748
|
+
const v = a.find((c) => c.group === u.value);
|
|
1749
|
+
if (v && v.instance) {
|
|
1750
|
+
const c = v.instance.formSource;
|
|
1751
|
+
v.instance.validate().then((o) => {
|
|
1752
|
+
o || n.close(c);
|
|
1753
1753
|
});
|
|
1754
1754
|
}
|
|
1755
1755
|
},
|
|
1756
1756
|
onReset: () => {
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1757
|
+
const v = a.find((c) => c.group === u.value);
|
|
1758
|
+
v && v.instance && v.instance.reset();
|
|
1759
1759
|
}
|
|
1760
1760
|
};
|
|
1761
1761
|
},
|
|
@@ -1766,7 +1766,7 @@ const on = /* @__PURE__ */ R({
|
|
|
1766
1766
|
return d(Yt, {
|
|
1767
1767
|
"active-key": this.activeTab,
|
|
1768
1768
|
"onUpdate:active-key": (r) => this.activeTab = r
|
|
1769
|
-
}, un(n = this.groupForms.map((r) => d(
|
|
1769
|
+
}, un(n = this.groupForms.map((r) => d(Ft, {
|
|
1770
1770
|
title: r.group,
|
|
1771
1771
|
key: r.group
|
|
1772
1772
|
}, {
|
|
@@ -1774,21 +1774,21 @@ const on = /* @__PURE__ */ R({
|
|
|
1774
1774
|
form: r.form,
|
|
1775
1775
|
value: this.value,
|
|
1776
1776
|
ref: (t) => r.instance = t
|
|
1777
|
-
}, null), d(
|
|
1777
|
+
}, null), d(Fe, null, null), d("div", {
|
|
1778
1778
|
class: "flex items-center justify-between space-x-2"
|
|
1779
|
-
}, [d(
|
|
1779
|
+
}, [d(z, {
|
|
1780
1780
|
type: "secondary",
|
|
1781
1781
|
size: "large",
|
|
1782
1782
|
onClick: this.onReset
|
|
1783
1783
|
}, {
|
|
1784
|
-
default: () => [
|
|
1785
|
-
}), d(
|
|
1784
|
+
default: () => [I("重置")]
|
|
1785
|
+
}), d(z, {
|
|
1786
1786
|
class: "w-100px",
|
|
1787
1787
|
type: "primary",
|
|
1788
1788
|
size: "large",
|
|
1789
1789
|
onClick: this.onSubmit
|
|
1790
1790
|
}, {
|
|
1791
|
-
default: () => [
|
|
1791
|
+
default: () => [I("搜索")]
|
|
1792
1792
|
})])]
|
|
1793
1793
|
}))) ? n : {
|
|
1794
1794
|
default: () => [n]
|
|
@@ -1796,22 +1796,23 @@ const on = /* @__PURE__ */ R({
|
|
|
1796
1796
|
} else
|
|
1797
1797
|
return d(re, null, [d(pe, {
|
|
1798
1798
|
form: this.formItems,
|
|
1799
|
+
value: this.value,
|
|
1799
1800
|
ref: (n) => e.instance = n
|
|
1800
|
-
}, null), d(
|
|
1801
|
+
}, null), d(Fe, null, null), d("div", {
|
|
1801
1802
|
class: "flex items-center justify-between space-x-2"
|
|
1802
|
-
}, [d(
|
|
1803
|
+
}, [d(z, {
|
|
1803
1804
|
type: "secondary",
|
|
1804
1805
|
size: "large",
|
|
1805
1806
|
onClick: this.onReset
|
|
1806
1807
|
}, {
|
|
1807
|
-
default: () => [
|
|
1808
|
-
}), d(
|
|
1808
|
+
default: () => [I("重置")]
|
|
1809
|
+
}), d(z, {
|
|
1809
1810
|
class: "w-100px",
|
|
1810
1811
|
type: "primary",
|
|
1811
1812
|
size: "large",
|
|
1812
1813
|
onClick: this.onSubmit
|
|
1813
1814
|
}, {
|
|
1814
|
-
default: () => [
|
|
1815
|
+
default: () => [I("搜索")]
|
|
1815
1816
|
})])]);
|
|
1816
1817
|
}
|
|
1817
1818
|
});
|
|
@@ -1887,70 +1888,74 @@ const pe = /* @__PURE__ */ R({
|
|
|
1887
1888
|
setup(e, {
|
|
1888
1889
|
emit: n
|
|
1889
1890
|
}) {
|
|
1890
|
-
const r =
|
|
1891
|
+
const r = O(), [t, a] = zr(e.form, e.modelValue || e.value), u = O(e.columns || 0), l = O(!0), h = O(), v = () => l.value = !l.value;
|
|
1891
1892
|
he(Te.id, e.id), he(Te.source, t);
|
|
1892
1893
|
const c = () => {
|
|
1893
1894
|
n("submit", t.value), n("update:model-value", t.value);
|
|
1894
|
-
}, o =
|
|
1895
|
+
}, o = $(() => e.form.filter((b) => l.value ? !b.collapsed : !0).filter((b) => {
|
|
1895
1896
|
switch (!0) {
|
|
1896
|
-
case typeof
|
|
1897
|
-
return
|
|
1898
|
-
case typeof
|
|
1899
|
-
return
|
|
1897
|
+
case typeof b.visiable == "boolean":
|
|
1898
|
+
return b.visiable;
|
|
1899
|
+
case typeof b.visiable == "function":
|
|
1900
|
+
return b.visiable(t.value);
|
|
1900
1901
|
default:
|
|
1901
1902
|
return !0;
|
|
1902
1903
|
}
|
|
1903
|
-
})), i =
|
|
1904
|
+
})), i = $(() => {
|
|
1904
1905
|
if (!u.value)
|
|
1905
1906
|
return 1;
|
|
1906
|
-
const
|
|
1907
|
-
return u.value -
|
|
1908
|
-
}), s =
|
|
1907
|
+
const b = o.value.reduce((S, g) => S + ((g == null ? void 0 : g.span) || 1), 0);
|
|
1908
|
+
return u.value - b % u.value;
|
|
1909
|
+
}), s = $(() => e.form.reduce((b, S) => (S.rule && (b[S.key] = S.rule), b), {}));
|
|
1909
1910
|
function f() {
|
|
1910
|
-
var
|
|
1911
|
+
var S;
|
|
1911
1912
|
if (e.columns)
|
|
1912
1913
|
return;
|
|
1913
|
-
const
|
|
1914
|
-
|
|
1914
|
+
const b = (S = r.value) == null ? void 0 : S.$el;
|
|
1915
|
+
b && (u.value = Math.max(Math.floor(b.offsetWidth / e.minWidth), 1));
|
|
1915
1916
|
}
|
|
1916
1917
|
function m() {
|
|
1917
|
-
var
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1918
|
+
var S;
|
|
1919
|
+
const b = (S = r.value) == null ? void 0 : S.$el;
|
|
1920
|
+
b && (b.id = e.id);
|
|
1920
1921
|
}
|
|
1921
|
-
function
|
|
1922
|
-
|
|
1922
|
+
function k() {
|
|
1923
|
+
h.value.open(on, {
|
|
1923
1924
|
form: e.form,
|
|
1924
1925
|
value: t.value
|
|
1925
1926
|
}, {
|
|
1926
1927
|
title: "高级搜索",
|
|
1927
1928
|
footer: !1,
|
|
1928
1929
|
submitText: "搜索"
|
|
1929
|
-
}).then((
|
|
1930
|
-
|
|
1930
|
+
}).then((b) => {
|
|
1931
|
+
b && (y(b), c());
|
|
1931
1932
|
});
|
|
1932
1933
|
}
|
|
1933
1934
|
q(() => {
|
|
1934
1935
|
f(), m();
|
|
1935
1936
|
});
|
|
1936
|
-
function y(
|
|
1937
|
+
function y(b) {
|
|
1937
1938
|
a({
|
|
1938
1939
|
...t.value,
|
|
1939
|
-
...
|
|
1940
|
+
...b || {}
|
|
1940
1941
|
});
|
|
1941
1942
|
}
|
|
1942
|
-
function x(
|
|
1943
|
-
t.value[
|
|
1943
|
+
function x(b, S) {
|
|
1944
|
+
t.value[b] = S, y({
|
|
1944
1945
|
...t.value
|
|
1945
1946
|
});
|
|
1946
1947
|
}
|
|
1947
|
-
function
|
|
1948
|
-
|
|
1949
|
-
(
|
|
1948
|
+
function M(b) {
|
|
1949
|
+
const S = e.form.find((j) => j.key === b), g = (typeof S.default == "function" ? S.default() : S.default) || null;
|
|
1950
|
+
x(b, g);
|
|
1950
1951
|
}
|
|
1951
1952
|
function T() {
|
|
1952
|
-
var
|
|
1953
|
-
|
|
1953
|
+
var b;
|
|
1954
|
+
(b = r.value) == null || b.resetFields();
|
|
1955
|
+
}
|
|
1956
|
+
function V() {
|
|
1957
|
+
var b;
|
|
1958
|
+
return (b = r.value) == null ? void 0 : b.validate();
|
|
1954
1959
|
}
|
|
1955
1960
|
return q(() => {
|
|
1956
1961
|
window && window.addEventListener("resize", f);
|
|
@@ -1962,24 +1967,29 @@ const pe = /* @__PURE__ */ R({
|
|
|
1962
1967
|
formCollspased: l,
|
|
1963
1968
|
formActiosSpan: i,
|
|
1964
1969
|
formItems: o,
|
|
1965
|
-
toggleFormCollapsed:
|
|
1970
|
+
toggleFormCollapsed: v,
|
|
1966
1971
|
updateFormField: x,
|
|
1972
|
+
resetFormField: M,
|
|
1967
1973
|
updateFormSource: y,
|
|
1968
|
-
reset:
|
|
1969
|
-
validate:
|
|
1974
|
+
reset: T,
|
|
1975
|
+
validate: V,
|
|
1970
1976
|
onSubmitSuccess: c,
|
|
1971
|
-
openCollapsedDialog:
|
|
1972
|
-
modalInstance:
|
|
1977
|
+
openCollapsedDialog: k,
|
|
1978
|
+
modalInstance: h
|
|
1973
1979
|
};
|
|
1974
1980
|
},
|
|
1975
1981
|
render() {
|
|
1976
1982
|
const e = () => {
|
|
1977
1983
|
if (!this.showFormResult)
|
|
1978
1984
|
return;
|
|
1979
|
-
const r = this.form.filter((
|
|
1980
|
-
const
|
|
1981
|
-
return
|
|
1982
|
-
})
|
|
1985
|
+
const r = this.form.filter((a) => {
|
|
1986
|
+
const u = this.formSource[a.key];
|
|
1987
|
+
return u != null ? !0 : typeof a.visiable == "boolean" ? a.visiable : typeof a.visiable == "function" ? a.visiable(this.formSource) : !1;
|
|
1988
|
+
}), t = (a) => {
|
|
1989
|
+
var l;
|
|
1990
|
+
const u = this.formItems.find((h) => h.key === a);
|
|
1991
|
+
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
1992
|
+
};
|
|
1983
1993
|
return d(ce, {
|
|
1984
1994
|
span: this.formColumns
|
|
1985
1995
|
}, {
|
|
@@ -1988,32 +1998,29 @@ const pe = /* @__PURE__ */ R({
|
|
|
1988
1998
|
}, {
|
|
1989
1999
|
default: () => [d("div", {
|
|
1990
2000
|
class: "w-full mt-5px text-left"
|
|
1991
|
-
}, [d(
|
|
2001
|
+
}, [d(Me, {
|
|
1992
2002
|
wrap: !0,
|
|
1993
2003
|
align: "center"
|
|
1994
2004
|
}, {
|
|
1995
|
-
default: () => [r.length > 0 ? r.map((
|
|
1996
|
-
key:
|
|
2005
|
+
default: () => [r.length > 0 ? r.map((a) => d(Lt, {
|
|
2006
|
+
key: a.key,
|
|
1997
2007
|
closable: !0,
|
|
1998
|
-
onClose: () =>
|
|
1999
|
-
var a;
|
|
2000
|
-
return (a = this.formInstance) == null ? void 0 : a.resetFields(t.key);
|
|
2001
|
-
}
|
|
2008
|
+
onClose: () => t(a.key)
|
|
2002
2009
|
}, {
|
|
2003
2010
|
default: () => [d("div", {
|
|
2004
2011
|
class: "flex space-x-2"
|
|
2005
2012
|
}, [d("div", {
|
|
2006
2013
|
class: "text-#999"
|
|
2007
|
-
}, [
|
|
2014
|
+
}, [a.title, I(":")]), d("div", {
|
|
2008
2015
|
class: "text-#333"
|
|
2009
2016
|
}, [je(this.formSource, {
|
|
2010
|
-
...
|
|
2011
|
-
key:
|
|
2017
|
+
...a,
|
|
2018
|
+
key: a.key,
|
|
2012
2019
|
mode: "text"
|
|
2013
2020
|
})])])]
|
|
2014
2021
|
})) : d("div", {
|
|
2015
2022
|
class: "text-#999"
|
|
2016
|
-
}, [
|
|
2023
|
+
}, [I("暂无搜索条件")])]
|
|
2017
2024
|
})])]
|
|
2018
2025
|
})]
|
|
2019
2026
|
});
|
|
@@ -2023,35 +2030,35 @@ const pe = /* @__PURE__ */ R({
|
|
|
2023
2030
|
} : {
|
|
2024
2031
|
span: this.formActiosSpan
|
|
2025
2032
|
};
|
|
2026
|
-
if (this.searchable && (r.push(d(
|
|
2033
|
+
if (this.searchable && (r.push(d(z, {
|
|
2027
2034
|
type: "primary",
|
|
2028
2035
|
htmlType: "submit"
|
|
2029
2036
|
}, {
|
|
2030
|
-
default: () => [
|
|
2031
|
-
})), r.push(d(
|
|
2037
|
+
default: () => [I("搜索")]
|
|
2038
|
+
})), r.push(d(z, {
|
|
2032
2039
|
type: "secondary",
|
|
2033
2040
|
onClick: () => {
|
|
2034
2041
|
var a;
|
|
2035
2042
|
return (a = this.formInstance) == null ? void 0 : a.resetFields();
|
|
2036
2043
|
}
|
|
2037
2044
|
}, {
|
|
2038
|
-
default: () => [
|
|
2039
|
-
}))), this.submitable && (r.push(d(
|
|
2045
|
+
default: () => [I("重置")]
|
|
2046
|
+
}))), this.submitable && (r.push(d(z, {
|
|
2040
2047
|
type: "primary",
|
|
2041
2048
|
htmlType: "submit"
|
|
2042
2049
|
}, {
|
|
2043
|
-
default: () => [
|
|
2044
|
-
})), r.push(d(
|
|
2050
|
+
default: () => [I("提交")]
|
|
2051
|
+
})), r.push(d(z, {
|
|
2045
2052
|
type: "secondary",
|
|
2046
2053
|
onClick: () => this.$emit("cancel")
|
|
2047
2054
|
}, {
|
|
2048
|
-
default: () => [
|
|
2049
|
-
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && r.push(d(
|
|
2055
|
+
default: () => [I("取消")]
|
|
2056
|
+
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && r.push(d(z, {
|
|
2050
2057
|
onClick: this.toggleFormCollapsed
|
|
2051
2058
|
}, {
|
|
2052
2059
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2053
2060
|
icon: () => this.formCollspased ? d(Vt, null, null) : d(Gt, null, null)
|
|
2054
|
-
})), this.collapsedMode === "dialog" && r.push(d(
|
|
2061
|
+
})), this.collapsedMode === "dialog" && r.push(d(z, {
|
|
2055
2062
|
onClick: this.openCollapsedDialog
|
|
2056
2063
|
}, {
|
|
2057
2064
|
default: () => "高级搜索",
|
|
@@ -2061,7 +2068,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2061
2068
|
default: () => [d(ve, {
|
|
2062
2069
|
contentClass: this.footer ? "form-footer" : ""
|
|
2063
2070
|
}, {
|
|
2064
|
-
default: () => [d(
|
|
2071
|
+
default: () => [d(Me, null, Pe(r) ? r : {
|
|
2065
2072
|
default: () => [r]
|
|
2066
2073
|
})]
|
|
2067
2074
|
})]
|
|
@@ -2072,7 +2079,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2072
2079
|
}, [d(Ir, {
|
|
2073
2080
|
ref: (r) => this.modalInstance = r
|
|
2074
2081
|
}, {
|
|
2075
|
-
default: () => [d(
|
|
2082
|
+
default: () => [d(Mt, ge({
|
|
2076
2083
|
name: this.name
|
|
2077
2084
|
}, {
|
|
2078
2085
|
labelAlign: "right",
|
|
@@ -2095,7 +2102,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2095
2102
|
}, Pe(t = je(this.formSource, r)) ? t : {
|
|
2096
2103
|
default: () => [t]
|
|
2097
2104
|
});
|
|
2098
|
-
}),
|
|
2105
|
+
}), n(), e()]
|
|
2099
2106
|
})]
|
|
2100
2107
|
})]
|
|
2101
2108
|
})]);
|
|
@@ -2105,7 +2112,7 @@ function fn(e) {
|
|
|
2105
2112
|
return e;
|
|
2106
2113
|
}
|
|
2107
2114
|
function mn(e) {
|
|
2108
|
-
const n = H(), r =
|
|
2115
|
+
const n = H(), r = O();
|
|
2109
2116
|
function t() {
|
|
2110
2117
|
var u, l;
|
|
2111
2118
|
const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|