@gopowerteam/form-render 0.0.69 → 0.0.71
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 +328 -315
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getCurrentInstance 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
|
|
1
|
+
import { getCurrentInstance as W, inject as ye, defineComponent as E, computed as _, openBlock as C, createElementBlock as M, normalizeClass as le, normalizeStyle as R, createElementVNode as w, shallowRef as B, ref as $, provide as he, onMounted as U, 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 q, defineAsyncComponent as nt, triggerRef as Q, useCssVars as lt, onUnmounted as at, withModifiers as ut, toDisplayString as A, 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 D, 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 I, 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
3
|
import S 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;
|
|
7
|
-
const a =
|
|
7
|
+
const a = W(), u = ye(jt, void 0);
|
|
8
8
|
return `${(t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = a == null ? void 0 : a.appContext.config.globalProperties[Dt]) == null ? void 0 : n.classPrefix) != null ? t : Pt}-${e}`;
|
|
9
9
|
}, It = Object.prototype.toString;
|
|
10
10
|
function we(e) {
|
|
@@ -15,7 +15,7 @@ var xe = (e, n) => {
|
|
|
15
15
|
e[r] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const zt =
|
|
18
|
+
const zt = E({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -60,29 +60,29 @@ const zt = R({
|
|
|
60
60
|
}
|
|
61
61
|
}), Et = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Rt = /* @__PURE__ */ w("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
-
}, null, -1),
|
|
64
|
-
function
|
|
63
|
+
}, null, -1), At = [Rt];
|
|
64
|
+
function Nt(e, n, r, t, a, u) {
|
|
65
65
|
return C(), M("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: R(e.innerStyle),
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
75
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
|
-
},
|
|
76
|
+
}, At, 14, Et);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(zt, [["render",
|
|
79
|
-
const
|
|
78
|
+
var ie = /* @__PURE__ */ xe(zt, [["render", Nt]]);
|
|
79
|
+
const Bt = Object.assign(ie, {
|
|
80
80
|
install: (e, n) => {
|
|
81
81
|
var r;
|
|
82
82
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
83
83
|
e.component(t + ie.name, ie);
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), Vt = E({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -135,21 +135,21 @@ function Ht(e, n, r, t, a, u) {
|
|
|
135
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
136
136
|
stroke: "currentColor",
|
|
137
137
|
class: le(e.cls),
|
|
138
|
-
style:
|
|
138
|
+
style: R(e.innerStyle),
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
142
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
143
143
|
}, Wt, 14, Ut);
|
|
144
144
|
}
|
|
145
|
-
var se = /* @__PURE__ */ xe(
|
|
145
|
+
var se = /* @__PURE__ */ xe(Vt, [["render", Ht]]);
|
|
146
146
|
const Gt = Object.assign(se, {
|
|
147
147
|
install: (e, n) => {
|
|
148
148
|
var r;
|
|
149
149
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
150
150
|
e.component(t + se.name, se);
|
|
151
151
|
}
|
|
152
|
-
}), Kt =
|
|
152
|
+
}), Kt = E({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -202,7 +202,7 @@ function Zt(e, n, r, t, a, u) {
|
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
203
203
|
stroke: "currentColor",
|
|
204
204
|
class: le(e.cls),
|
|
205
|
-
style:
|
|
205
|
+
style: R(e.innerStyle),
|
|
206
206
|
"stroke-width": e.strokeWidth,
|
|
207
207
|
"stroke-linecap": e.strokeLinecap,
|
|
208
208
|
"stroke-linejoin": e.strokeLinejoin,
|
|
@@ -217,18 +217,18 @@ const er = Object.assign(de, {
|
|
|
217
217
|
e.component(t + de.name, de);
|
|
218
218
|
}
|
|
219
219
|
}), Se = Symbol("__MODAL__");
|
|
220
|
-
function
|
|
220
|
+
function Ae(e) {
|
|
221
221
|
return ft() ? (mt(e), !0) : !1;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function F(e) {
|
|
224
224
|
return typeof e == "function" ? e() : it(e);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const Ne = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
228
|
const tr = Object.prototype.toString, rr = (e) => tr.call(e) === "[object Object]", nr = () => {
|
|
229
229
|
};
|
|
230
230
|
function lr(e) {
|
|
231
|
-
return
|
|
231
|
+
return W();
|
|
232
232
|
}
|
|
233
233
|
function ar(e, n = {}) {
|
|
234
234
|
if (!ae(e))
|
|
@@ -241,7 +241,7 @@ function ar(e, n = {}) {
|
|
|
241
241
|
},
|
|
242
242
|
set(a) {
|
|
243
243
|
var u;
|
|
244
|
-
if ((u =
|
|
244
|
+
if ((u = F(n.replaceRef)) == null || u)
|
|
245
245
|
if (Array.isArray(e.value)) {
|
|
246
246
|
const l = [...e.value];
|
|
247
247
|
l[t] = a, e.value = l;
|
|
@@ -256,14 +256,14 @@ function ar(e, n = {}) {
|
|
|
256
256
|
return r;
|
|
257
257
|
}
|
|
258
258
|
function ur(e, n = !0, r) {
|
|
259
|
-
lr() ?
|
|
259
|
+
lr() ? U(e, r) : n ? e() : Ie(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function V(e) {
|
|
262
262
|
var n;
|
|
263
|
-
const r =
|
|
263
|
+
const r = F(e);
|
|
264
264
|
return (n = r == null ? void 0 : r.$el) != null ? n : r;
|
|
265
265
|
}
|
|
266
|
-
const ue =
|
|
266
|
+
const ue = Ne ? window : void 0;
|
|
267
267
|
function fe(...e) {
|
|
268
268
|
let n, r, t, a;
|
|
269
269
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, t, a] = e, n = ue) : [n, r, t, a] = e, !n)
|
|
@@ -271,25 +271,25 @@ 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
|
-
},
|
|
275
|
-
() => [
|
|
274
|
+
}, h = (o, i, s, f) => (o.addEventListener(i, s, f), () => o.removeEventListener(i, s, f)), v = Z(
|
|
275
|
+
() => [V(n), F(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
|
-
return
|
|
288
|
+
return Ae(c), c;
|
|
289
289
|
}
|
|
290
290
|
function or() {
|
|
291
|
-
const e = $(!1), n =
|
|
292
|
-
return n &&
|
|
291
|
+
const e = $(!1), n = W();
|
|
292
|
+
return n && U(() => {
|
|
293
293
|
e.value = !0;
|
|
294
294
|
}, n), e;
|
|
295
295
|
}
|
|
@@ -303,62 +303,62 @@ 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,
|
|
316
|
-
(r =
|
|
317
|
-
), x = $(),
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
var
|
|
321
|
-
if (
|
|
314
|
+
handle: k = e
|
|
315
|
+
} = n, g = $(
|
|
316
|
+
(r = F(i)) != null ? r : { x: 0, y: 0 }
|
|
317
|
+
), x = $(), T = (y) => a ? a.includes(y.pointerType) : !0, L = (y) => {
|
|
318
|
+
F(u) && y.preventDefault(), F(l) && y.stopPropagation();
|
|
319
|
+
}, N = (y) => {
|
|
320
|
+
var O;
|
|
321
|
+
if (F(n.disabled) || !T(y) || F(h) && y.target !== F(e))
|
|
322
322
|
return;
|
|
323
|
-
const
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
323
|
+
const Y = F(m), z = (O = Y == null ? void 0 : Y.getBoundingClientRect) == null ? void 0 : O.call(Y), j = F(e).getBoundingClientRect(), ee = {
|
|
324
|
+
x: y.clientX - (Y ? j.left - z.left + Y.scrollLeft : j.left),
|
|
325
|
+
y: y.clientY - (Y ? j.top - z.top + Y.scrollTop : j.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee,
|
|
328
|
-
},
|
|
329
|
-
if (
|
|
327
|
+
(o == null ? void 0 : o(ee, y)) !== !1 && (x.value = ee, L(y));
|
|
328
|
+
}, H = (y) => {
|
|
329
|
+
if (F(n.disabled) || !T(y) || !x.value)
|
|
330
330
|
return;
|
|
331
|
-
const
|
|
332
|
-
let { x:
|
|
333
|
-
(s === "x" || s === "both") && (
|
|
334
|
-
x:
|
|
331
|
+
const O = F(m), Y = F(e).getBoundingClientRect();
|
|
332
|
+
let { x: z, y: j } = g.value;
|
|
333
|
+
(s === "x" || s === "both") && (z = y.clientX - x.value.x, O && (z = Math.min(Math.max(0, z), O.scrollWidth - Y.width))), (s === "y" || s === "both") && (j = y.clientY - x.value.y, O && (j = Math.min(Math.max(0, j), O.scrollHeight - Y.height))), g.value = {
|
|
334
|
+
x: z,
|
|
335
335
|
y: j
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
|
|
336
|
+
}, v == null || v(g.value, y), L(y);
|
|
337
|
+
}, b = (y) => {
|
|
338
|
+
F(n.disabled) || !T(y) || x.value && (x.value = void 0, c == null || c(g.value, y), L(y));
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
fe(
|
|
340
|
+
if (Ne) {
|
|
341
|
+
const y = { capture: (t = n.capture) != null ? t : !0 };
|
|
342
|
+
fe(k, "pointerdown", N, y), fe(f, "pointermove", H, y), fe(f, "pointerup", b, y);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...ar(
|
|
346
|
-
position:
|
|
345
|
+
...ar(g),
|
|
346
|
+
position: g,
|
|
347
347
|
isDragging: _(() => !!x.value),
|
|
348
348
|
style: _(
|
|
349
|
-
() => `left:${
|
|
349
|
+
() => `left:${g.value.x}px;top:${g.value.y}px;`
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
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) => V(i)) : [V(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,9 +366,9 @@ function sr(e, n, r = {}) {
|
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
|
-
|
|
369
|
+
h(), c();
|
|
370
370
|
};
|
|
371
|
-
return
|
|
371
|
+
return Ae(o), {
|
|
372
372
|
isSupported: l,
|
|
373
373
|
stop: o
|
|
374
374
|
};
|
|
@@ -376,41 +376,41 @@ function sr(e, n, r = {}) {
|
|
|
376
376
|
function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
377
377
|
const { window: t = ue, box: a = "content-box" } = r, u = _(() => {
|
|
378
378
|
var i, s;
|
|
379
|
-
return (s = (i =
|
|
380
|
-
}), l = $(n.width),
|
|
379
|
+
return (s = (i = V(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : s.includes("svg");
|
|
380
|
+
}), l = $(n.width), h = $(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;
|
|
384
384
|
if (t && u.value) {
|
|
385
|
-
const f =
|
|
385
|
+
const f = V(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
|
-
const i =
|
|
400
|
-
i && (l.value = "offsetWidth" in i ? i.offsetWidth : n.width,
|
|
399
|
+
const i = V(e);
|
|
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
|
+
() => V(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
|
}
|
|
@@ -427,7 +427,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
427
427
|
], gr = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
430
|
-
}, br = /* @__PURE__ */
|
|
430
|
+
}, br = /* @__PURE__ */ E({
|
|
431
431
|
...gr,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
@@ -464,17 +464,17 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
466
|
const t = e, a = r, u = ye(Se), l = $(!1);
|
|
467
|
-
let
|
|
468
|
-
const c =
|
|
467
|
+
let h = 0, v = 0;
|
|
468
|
+
const c = B(), o = B(), i = B(), s = B(), f = B(), m = B(), { height: k } = G(c), { height: g } = G(i, void 0, { box: "border-box" }), { height: x } = G(s, void 0, { box: "border-box" }), { height: T } = G(f), { height: L } = G(m), { x: N, y: H } = ir(i, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
|
-
function
|
|
471
|
+
function b() {
|
|
472
472
|
u == null || u.close(t.id);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function y(p) {
|
|
475
475
|
return typeof p == "number" ? `${p}px` : p;
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const O = _(() => {
|
|
478
478
|
const p = {};
|
|
479
479
|
return t.mode === "dialog" && (p.justifyContent = "center"), t.mode === "drawer" && (p.justifyContent = {
|
|
480
480
|
left: "flex-start",
|
|
@@ -487,15 +487,15 @@ 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
|
-
}),
|
|
490
|
+
}), Y = _(() => {
|
|
491
491
|
const p = {};
|
|
492
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight =
|
|
493
|
-
}),
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = y(t.maxHeight) : (p.width = y(t.sizes[t.size]), p.maxWidth = y(t.maxWidth)), t.width && (p.width = y(t.width)), t.height && (p.height = y(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(${N.value - h}px, ${H.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
|
+
}), z = _(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
496
496
|
}), j = _(() => {
|
|
497
|
-
const p = {}, P =
|
|
498
|
-
return t.maxHeight && (p.maxHeight = `${Oe - P}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${
|
|
497
|
+
const p = {}, P = T.value + L.value + g.value + x.value, Oe = Math.floor(k.value * (Number(y(t.maxHeight).replace("%", "")) / 100));
|
|
498
|
+
return t.maxHeight && (p.maxHeight = `${Oe - P}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - P}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${P}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;
|
|
@@ -510,7 +510,7 @@ 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() {
|
|
@@ -522,9 +522,9 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Xe() {
|
|
525
|
-
|
|
525
|
+
h = o.value.offsetLeft, v = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
|
-
|
|
527
|
+
U(() => {
|
|
528
528
|
Ke(), Ge();
|
|
529
529
|
}), at(() => {
|
|
530
530
|
});
|
|
@@ -541,32 +541,32 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: c,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
|
-
style:
|
|
545
|
-
onClick: P[0] || (P[0] = ut((Oe) => p.maskClosable &&
|
|
544
|
+
style: R(O.value),
|
|
545
|
+
onClick: P[0] || (P[0] = ut((Oe) => p.maskClosable && b(), ["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: R(Y.value)
|
|
552
552
|
}, [
|
|
553
553
|
p.header ? (C(), M("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
556
|
ref: i,
|
|
557
557
|
class: "modal-header",
|
|
558
|
-
style:
|
|
558
|
+
style: R(z.value),
|
|
559
559
|
onMousedown: Xe
|
|
560
560
|
}, [
|
|
561
|
-
w("div", fr,
|
|
561
|
+
w("div", fr, A(p.title), 1),
|
|
562
562
|
w("div", mr, [
|
|
563
563
|
p.closeable ? (C(), M("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
566
|
-
onClick:
|
|
567
|
-
})) :
|
|
566
|
+
onClick: b
|
|
567
|
+
})) : q("", !0)
|
|
568
568
|
])
|
|
569
|
-
], 36)) :
|
|
569
|
+
], 36)) : q("", !0),
|
|
570
570
|
w("div", {
|
|
571
571
|
id: "modal-header-slot",
|
|
572
572
|
ref_key: "headerSlotRef",
|
|
@@ -574,7 +574,7 @@ 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: R(j.value)
|
|
578
578
|
}, [
|
|
579
579
|
(C(), ne(De(p.component), ot(ct(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
@@ -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
|
+
}, A(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
|
-
},
|
|
603
|
-
], 512)) :
|
|
604
|
-
l.value ? (C(), M("div", vr, yr)) :
|
|
602
|
+
}, A(p.submitText), 9, hr)
|
|
603
|
+
], 512)) : q("", !0),
|
|
604
|
+
l.value ? (C(), M("div", vr, yr)) : q("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
@@ -610,7 +610,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
610
610
|
for (const [t, a] of n)
|
|
611
611
|
r[t] = a;
|
|
612
612
|
return r;
|
|
613
|
-
}, kr = /* @__PURE__ */ oe(br, [["__scopeId", "data-v-9a7af353"]]), wr = { class: "modal-dialog" }, xr = { class: "dialog-body" }, Sr = { class: "dialog-title" }, Cr = { class: "dialog-content" }, _r = /* @__PURE__ */
|
|
613
|
+
}, kr = /* @__PURE__ */ oe(br, [["__scopeId", "data-v-9a7af353"]]), wr = { class: "modal-dialog" }, xr = { class: "dialog-body" }, Sr = { class: "dialog-title" }, Cr = { class: "dialog-content" }, _r = /* @__PURE__ */ E({
|
|
614
614
|
__name: "modal-dialog",
|
|
615
615
|
props: {
|
|
616
616
|
type: {},
|
|
@@ -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 =
|
|
626
|
+
const n = e, r = Be(), 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) => (C(), M("section", wr, [
|
|
640
640
|
w("div", xr, [
|
|
641
|
-
w("div", Sr,
|
|
642
|
-
w("div", Cr,
|
|
641
|
+
w("div", Sr, A(t.value), 1),
|
|
642
|
+
w("div", Cr, A(l.content), 1)
|
|
643
643
|
]),
|
|
644
644
|
w("div", {
|
|
645
645
|
class: "dialog-footer space-x-2",
|
|
646
|
-
style:
|
|
646
|
+
style: R(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
647
647
|
}, [
|
|
648
648
|
l.footer ? (C(), ne(De(l.footer), { key: 0 })) : (C(), M(re, { key: 1 }, [
|
|
649
649
|
w("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
652
652
|
onClick: a
|
|
653
|
-
},
|
|
653
|
+
}, A(l.okText), 1),
|
|
654
654
|
l.type === "confirm" ? (C(), M("button", {
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "cancel-button",
|
|
657
657
|
type: "button",
|
|
658
658
|
onClick: u
|
|
659
|
-
},
|
|
659
|
+
}, A(l.cancelText), 1)) : q("", !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__ */ E({
|
|
672
672
|
__name: "modal-loading",
|
|
673
673
|
props: {
|
|
674
674
|
text: { default: "加载中" }
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
677
|
return (n, r) => (C(), M("section", Yr, [
|
|
678
|
-
|
|
679
|
-
w("div",
|
|
678
|
+
Fr,
|
|
679
|
+
w("div", Mr, A(n.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
682
|
}), Lr = /* @__PURE__ */ oe(Tr, [["__scopeId", "data-v-559bdf2e"]]), jr = {
|
|
@@ -685,7 +685,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
685
685
|
}, Pr = {
|
|
686
686
|
name: "ModalProvider",
|
|
687
687
|
inheritAttrs: !0
|
|
688
|
-
}, Dr = /* @__PURE__ */
|
|
688
|
+
}, Dr = /* @__PURE__ */ E({
|
|
689
689
|
...Pr,
|
|
690
690
|
props: {
|
|
691
691
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
@@ -699,61 +699,61 @@ 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 =
|
|
702
|
+
const r = B([]), t = $(!1), a = W();
|
|
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
|
-
const
|
|
708
|
+
const g = Math.random().toString(32).slice(2), x = Object.assign({
|
|
709
709
|
zIndex: typeof s == "string" ? 1100 : 1e3
|
|
710
|
-
}, m),
|
|
710
|
+
}, m), T = new Promise((L, N) => {
|
|
711
711
|
r.value.push({
|
|
712
|
-
id:
|
|
713
|
-
component:
|
|
712
|
+
id: g,
|
|
713
|
+
component: k,
|
|
714
714
|
props: f || {},
|
|
715
715
|
options: {
|
|
716
716
|
...x,
|
|
717
717
|
type: typeof s == "string" ? s : "component"
|
|
718
718
|
},
|
|
719
|
-
resolve:
|
|
720
|
-
reject:
|
|
719
|
+
resolve: L,
|
|
720
|
+
reject: N,
|
|
721
721
|
listeners: []
|
|
722
722
|
}), Q(r);
|
|
723
|
-
}).catch((
|
|
724
|
-
}) : Promise.reject(
|
|
725
|
-
return Object.assign(
|
|
726
|
-
close: () => l(
|
|
723
|
+
}).catch((L) => L === "CANCEL" ? new Promise(() => {
|
|
724
|
+
}) : Promise.reject(L));
|
|
725
|
+
return Object.assign(T, {
|
|
726
|
+
close: () => l(g)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
function l(s, f) {
|
|
730
|
-
const m = r.value.findIndex((
|
|
730
|
+
const m = r.value.findIndex((g) => g.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
|
|
742
|
-
const m = r.value.find((
|
|
741
|
+
function v(s, f) {
|
|
742
|
+
const m = r.value.find((g) => g.id === s);
|
|
743
743
|
if (!m)
|
|
744
744
|
return;
|
|
745
|
-
const
|
|
746
|
-
|
|
745
|
+
const k = m.listeners.find((g) => g.event === f);
|
|
746
|
+
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
|
-
close: (
|
|
749
|
-
closeAll:
|
|
748
|
+
close: (g) => l(m.id, g),
|
|
749
|
+
closeAll: h,
|
|
750
750
|
showLoading: () => c(m.id),
|
|
751
751
|
hideLoading: () => o(m.id),
|
|
752
|
-
confirm: (
|
|
753
|
-
success: (
|
|
754
|
-
error: (
|
|
755
|
-
warning: (
|
|
756
|
-
info: (
|
|
752
|
+
confirm: (g) => u("confirm", g),
|
|
753
|
+
success: (g) => u("success", g),
|
|
754
|
+
error: (g) => u("error", g),
|
|
755
|
+
warning: (g) => u("warning", g),
|
|
756
|
+
info: (g) => u("info", g)
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
function c(s, f) {
|
|
@@ -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((g) => g.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,8 +804,8 @@ 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:
|
|
808
|
-
}),
|
|
807
|
+
closeAll: h
|
|
808
|
+
}), U(() => {
|
|
809
809
|
t.value = !0;
|
|
810
810
|
}), (s, f) => (C(), M(re, null, [
|
|
811
811
|
Qe(s.$slots, "default", {}, void 0, !0),
|
|
@@ -828,13 +828,13 @@ 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
|
|
835
835
|
})
|
|
836
836
|
], 8, ["disabled", "to"]))
|
|
837
|
-
])) :
|
|
837
|
+
])) : q("", !0)
|
|
838
838
|
], 64));
|
|
839
839
|
}
|
|
840
840
|
}), Ir = /* @__PURE__ */ oe(Dr, [["__scopeId", "data-v-60414811"]]);
|
|
@@ -845,8 +845,8 @@ function me(e, n) {
|
|
|
845
845
|
a = a.parent;
|
|
846
846
|
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === n ? a : null;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
const e = ye(Se), n =
|
|
848
|
+
function Be() {
|
|
849
|
+
const e = ye(Se), n = W();
|
|
850
850
|
function r(t, a, u) {
|
|
851
851
|
if (!e)
|
|
852
852
|
throw new Error("Not Found Modal Provider Component");
|
|
@@ -913,7 +913,7 @@ function zr(e, n) {
|
|
|
913
913
|
}];
|
|
914
914
|
}
|
|
915
915
|
var Ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
916
|
-
function
|
|
916
|
+
function Ve(e) {
|
|
917
917
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
918
918
|
}
|
|
919
919
|
var Er = { exports: {} };
|
|
@@ -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,14 +992,14 @@ 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
|
});
|
|
1000
1000
|
})(Ue);
|
|
1001
1001
|
var Rr = Ue.exports;
|
|
1002
|
-
const
|
|
1002
|
+
const Ar = /* @__PURE__ */ Ve(Rr);
|
|
1003
1003
|
var qe = { exports: {} };
|
|
1004
1004
|
(function(e, n) {
|
|
1005
1005
|
(function(r, t) {
|
|
@@ -1011,30 +1011,30 @@ 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
|
-
var
|
|
1031
|
-
const
|
|
1032
|
-
S.extend(
|
|
1033
|
-
S.extend(
|
|
1030
|
+
var Nr = qe.exports;
|
|
1031
|
+
const Br = /* @__PURE__ */ Ve(Nr);
|
|
1032
|
+
S.extend(Ar);
|
|
1033
|
+
S.extend(Br);
|
|
1034
1034
|
S.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
1036
1036
|
});
|
|
1037
|
-
function
|
|
1037
|
+
function Vr(e) {
|
|
1038
1038
|
function n(r, t) {
|
|
1039
1039
|
return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
|
|
1040
1040
|
}
|
|
@@ -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,
|
|
@@ -1297,7 +1297,7 @@ function Kr(e) {
|
|
|
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":
|
|
@@ -1315,7 +1315,7 @@ function Kr(e) {
|
|
|
1315
1315
|
};
|
|
1316
1316
|
return d("span", null, [s(o), D(" - "), 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
|
}
|
|
@@ -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,21 +1448,21 @@ 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 = (g) => {
|
|
1452
1452
|
const [x] = We({
|
|
1453
1453
|
data: t.value,
|
|
1454
1454
|
labelProp: "title",
|
|
1455
1455
|
valueProp: "key",
|
|
1456
|
-
key:
|
|
1456
|
+
key: g
|
|
1457
1457
|
}).reverse() || [];
|
|
1458
1458
|
return x == null ? void 0 : x.title;
|
|
1459
1459
|
};
|
|
1460
1460
|
if (e.multiple) {
|
|
1461
|
-
const
|
|
1462
|
-
return d("span", null, [
|
|
1461
|
+
const g = m.map((x) => k(x));
|
|
1462
|
+
return d("span", null, [g.join(", ")]);
|
|
1463
1463
|
} else {
|
|
1464
|
-
const
|
|
1465
|
-
return d("span", null, [
|
|
1464
|
+
const g = k(m);
|
|
1465
|
+
return d("span", null, [g]);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
function f() {
|
|
@@ -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): {
|
|
@@ -1548,33 +1548,33 @@ function tn(e) {
|
|
|
1548
1548
|
return (c, o) => {
|
|
1549
1549
|
e.default && !r && (c[o.key] = e.default, r = !0);
|
|
1550
1550
|
function i() {
|
|
1551
|
-
const f = c[o.key], m = (
|
|
1551
|
+
const f = c[o.key], m = (g) => We({
|
|
1552
1552
|
data: t.value,
|
|
1553
1553
|
labelProp: "label",
|
|
1554
1554
|
valueProp: "value",
|
|
1555
|
-
key:
|
|
1556
|
-
}).map((
|
|
1555
|
+
key: g
|
|
1556
|
+
}).map((T) => T.label).join("/"), k = (g) => Jr({
|
|
1557
1557
|
data: t.value,
|
|
1558
1558
|
labelProp: "label",
|
|
1559
1559
|
valueProp: "value",
|
|
1560
|
-
path:
|
|
1561
|
-
}).map((
|
|
1560
|
+
path: g
|
|
1561
|
+
}).map((T) => T.label).join("/");
|
|
1562
1562
|
switch (!0) {
|
|
1563
1563
|
case (!e.pathMode && !e.multiple): {
|
|
1564
|
-
const
|
|
1565
|
-
return d("span", null, [
|
|
1564
|
+
const g = m(f);
|
|
1565
|
+
return d("span", null, [g]);
|
|
1566
1566
|
}
|
|
1567
1567
|
case (!e.pathMode && e.multiple): {
|
|
1568
|
-
const
|
|
1569
|
-
return d("span", null, [
|
|
1568
|
+
const g = f.map((x) => m(x));
|
|
1569
|
+
return d("span", null, [g.join(", ")]);
|
|
1570
1570
|
}
|
|
1571
1571
|
case (e.pathMode && !e.multiple): {
|
|
1572
|
-
const
|
|
1573
|
-
return d("span", null, [
|
|
1572
|
+
const g = k(f);
|
|
1573
|
+
return d("span", null, [g]);
|
|
1574
1574
|
}
|
|
1575
1575
|
case (e.pathMode && e.multiple): {
|
|
1576
|
-
const
|
|
1577
|
-
return d("span", null, [
|
|
1576
|
+
const g = f.map((x) => k(x));
|
|
1577
|
+
return d("span", null, [g.join(", ")]);
|
|
1578
1578
|
}
|
|
1579
1579
|
default:
|
|
1580
1580
|
return d("span", null, null);
|
|
@@ -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 = $(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":
|
|
@@ -1682,7 +1682,7 @@ function an() {
|
|
|
1682
1682
|
textarea: Xr,
|
|
1683
1683
|
select: Hr,
|
|
1684
1684
|
treeSelect: Zr,
|
|
1685
|
-
date:
|
|
1685
|
+
date: Vr,
|
|
1686
1686
|
switch: Gr,
|
|
1687
1687
|
dateRange: Kr,
|
|
1688
1688
|
render: rn,
|
|
@@ -1717,7 +1717,7 @@ function je(e, n) {
|
|
|
1717
1717
|
function un(e) {
|
|
1718
1718
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1719
1719
|
}
|
|
1720
|
-
const on = /* @__PURE__ */
|
|
1720
|
+
const on = /* @__PURE__ */ E({
|
|
1721
1721
|
props: {
|
|
1722
1722
|
form: {
|
|
1723
1723
|
type: Object,
|
|
@@ -1728,34 +1728,34 @@ const on = /* @__PURE__ */ R({
|
|
|
1728
1728
|
}
|
|
1729
1729
|
},
|
|
1730
1730
|
setup(e) {
|
|
1731
|
-
const n =
|
|
1732
|
-
...
|
|
1731
|
+
const n = Be(), 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 = $("默认");
|
|
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,7 +1774,7 @@ 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
1779
|
}, [d(I, {
|
|
1780
1780
|
type: "secondary",
|
|
@@ -1798,7 +1798,7 @@ const on = /* @__PURE__ */ R({
|
|
|
1798
1798
|
form: this.formItems,
|
|
1799
1799
|
value: this.value,
|
|
1800
1800
|
ref: (n) => e.instance = n
|
|
1801
|
-
}, null), d(
|
|
1801
|
+
}, null), d(Fe, null, null), d("div", {
|
|
1802
1802
|
class: "flex items-center justify-between space-x-2"
|
|
1803
1803
|
}, [d(I, {
|
|
1804
1804
|
type: "secondary",
|
|
@@ -1819,7 +1819,7 @@ const on = /* @__PURE__ */ R({
|
|
|
1819
1819
|
function Pe(e) {
|
|
1820
1820
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1821
1821
|
}
|
|
1822
|
-
const pe = /* @__PURE__ */
|
|
1822
|
+
const pe = /* @__PURE__ */ E({
|
|
1823
1823
|
props: {
|
|
1824
1824
|
form: {
|
|
1825
1825
|
type: Object,
|
|
@@ -1888,99 +1888,115 @@ const pe = /* @__PURE__ */ R({
|
|
|
1888
1888
|
setup(e, {
|
|
1889
1889
|
emit: n
|
|
1890
1890
|
}) {
|
|
1891
|
-
const r = $(), [t, a] = zr(e.form, e.modelValue || e.value), u = $(e.columns || 0), l = $(!0),
|
|
1891
|
+
const r = $(), [t, a] = zr(e.form, e.modelValue || e.value), u = $(e.columns || 0), l = $(!0), h = $(), v = () => l.value = !l.value;
|
|
1892
1892
|
he(Te.id, e.id), he(Te.source, t);
|
|
1893
1893
|
const c = () => {
|
|
1894
1894
|
n("submit", t.value), n("update:model-value", t.value);
|
|
1895
|
-
}, o = _(() => e.form.filter((
|
|
1895
|
+
}, o = _(() => e.form.filter((b) => l.value ? !b.collapsed : !0).filter((b) => {
|
|
1896
1896
|
switch (!0) {
|
|
1897
|
-
case typeof
|
|
1898
|
-
return
|
|
1899
|
-
case typeof
|
|
1900
|
-
return
|
|
1897
|
+
case typeof b.visiable == "boolean":
|
|
1898
|
+
return b.visiable;
|
|
1899
|
+
case typeof b.visiable == "function":
|
|
1900
|
+
return b.visiable(t.value);
|
|
1901
1901
|
default:
|
|
1902
1902
|
return !0;
|
|
1903
1903
|
}
|
|
1904
1904
|
})), i = _(() => {
|
|
1905
1905
|
if (!u.value)
|
|
1906
1906
|
return 1;
|
|
1907
|
-
const
|
|
1908
|
-
return u.value -
|
|
1909
|
-
}), s =
|
|
1910
|
-
|
|
1911
|
-
|
|
1907
|
+
const b = o.value.reduce((y, O) => y + ((O == null ? void 0 : O.span) || 1), 0);
|
|
1908
|
+
return u.value - b % u.value;
|
|
1909
|
+
}), s = (b) => b != null && b.validator ? {
|
|
1910
|
+
...b,
|
|
1911
|
+
validator: (y, O) => {
|
|
1912
|
+
const Y = b.validator(y, O);
|
|
1913
|
+
if (typeof Y == "function")
|
|
1914
|
+
return Y(t.value);
|
|
1915
|
+
}
|
|
1916
|
+
} : b, f = _(() => e.form.reduce((b, y) => (y.rule && (Array.isArray(y.rule) ? b[y.key] = y.rule.map(s) : b[y.key] = s(y.rule)), b), {}));
|
|
1917
|
+
function m() {
|
|
1918
|
+
var y;
|
|
1912
1919
|
if (e.columns)
|
|
1913
1920
|
return;
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1921
|
+
const b = (y = r.value) == null ? void 0 : y.$el;
|
|
1922
|
+
b && (u.value = Math.max(Math.floor(b.offsetWidth / e.minWidth), 1));
|
|
1916
1923
|
}
|
|
1917
|
-
function
|
|
1918
|
-
var
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1924
|
+
function k() {
|
|
1925
|
+
var y;
|
|
1926
|
+
const b = (y = r.value) == null ? void 0 : y.$el;
|
|
1927
|
+
b && (b.id = e.id);
|
|
1921
1928
|
}
|
|
1922
|
-
function
|
|
1923
|
-
|
|
1929
|
+
function g() {
|
|
1930
|
+
h.value.open(on, {
|
|
1924
1931
|
form: e.form,
|
|
1925
1932
|
value: t.value
|
|
1926
1933
|
}, {
|
|
1927
1934
|
title: "高级搜索",
|
|
1928
1935
|
footer: !1,
|
|
1929
1936
|
submitText: "搜索"
|
|
1930
|
-
}).then((
|
|
1931
|
-
|
|
1937
|
+
}).then((b) => {
|
|
1938
|
+
b && (x(b), c());
|
|
1932
1939
|
});
|
|
1933
1940
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1941
|
+
U(() => {
|
|
1942
|
+
m(), k();
|
|
1936
1943
|
});
|
|
1937
|
-
function
|
|
1944
|
+
function x(b) {
|
|
1938
1945
|
a({
|
|
1939
1946
|
...t.value,
|
|
1940
|
-
...
|
|
1947
|
+
...b || {}
|
|
1941
1948
|
});
|
|
1942
1949
|
}
|
|
1943
|
-
function
|
|
1944
|
-
t.value[
|
|
1950
|
+
function T(b, y) {
|
|
1951
|
+
t.value[b] = y, x({
|
|
1945
1952
|
...t.value
|
|
1946
1953
|
});
|
|
1947
1954
|
}
|
|
1948
|
-
function
|
|
1949
|
-
|
|
1950
|
-
(
|
|
1955
|
+
function L(b) {
|
|
1956
|
+
const y = e.form.find((Y) => Y.key === b), O = (typeof y.default == "function" ? y.default() : y.default) || null;
|
|
1957
|
+
T(b, O);
|
|
1958
|
+
}
|
|
1959
|
+
function N() {
|
|
1960
|
+
var b;
|
|
1961
|
+
(b = r.value) == null || b.resetFields();
|
|
1951
1962
|
}
|
|
1952
|
-
function
|
|
1953
|
-
var
|
|
1954
|
-
return (
|
|
1963
|
+
function H() {
|
|
1964
|
+
var b;
|
|
1965
|
+
return (b = r.value) == null ? void 0 : b.validate();
|
|
1955
1966
|
}
|
|
1956
|
-
return
|
|
1957
|
-
window && window.addEventListener("resize",
|
|
1967
|
+
return U(() => {
|
|
1968
|
+
window && window.addEventListener("resize", m);
|
|
1958
1969
|
}), {
|
|
1959
1970
|
formSource: t,
|
|
1960
1971
|
formInstance: r,
|
|
1961
1972
|
formColumns: u,
|
|
1962
|
-
formRules:
|
|
1973
|
+
formRules: f,
|
|
1963
1974
|
formCollspased: l,
|
|
1964
1975
|
formActiosSpan: i,
|
|
1965
1976
|
formItems: o,
|
|
1966
|
-
toggleFormCollapsed:
|
|
1967
|
-
updateFormField:
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1977
|
+
toggleFormCollapsed: v,
|
|
1978
|
+
updateFormField: T,
|
|
1979
|
+
resetFormField: L,
|
|
1980
|
+
updateFormSource: x,
|
|
1981
|
+
reset: N,
|
|
1982
|
+
validate: H,
|
|
1971
1983
|
onSubmitSuccess: c,
|
|
1972
|
-
openCollapsedDialog:
|
|
1973
|
-
modalInstance:
|
|
1984
|
+
openCollapsedDialog: g,
|
|
1985
|
+
modalInstance: h
|
|
1974
1986
|
};
|
|
1975
1987
|
},
|
|
1976
1988
|
render() {
|
|
1977
1989
|
const e = () => {
|
|
1978
1990
|
if (!this.showFormResult)
|
|
1979
1991
|
return;
|
|
1980
|
-
const r = this.form.filter((
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
})
|
|
1992
|
+
const r = this.form.filter((a) => {
|
|
1993
|
+
const u = this.formSource[a.key];
|
|
1994
|
+
return u != null;
|
|
1995
|
+
}), t = (a) => {
|
|
1996
|
+
var l;
|
|
1997
|
+
const u = this.formItems.find((h) => h.key === a);
|
|
1998
|
+
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
1999
|
+
};
|
|
1984
2000
|
return d(ce, {
|
|
1985
2001
|
span: this.formColumns
|
|
1986
2002
|
}, {
|
|
@@ -1989,27 +2005,24 @@ const pe = /* @__PURE__ */ R({
|
|
|
1989
2005
|
}, {
|
|
1990
2006
|
default: () => [d("div", {
|
|
1991
2007
|
class: "w-full mt-5px text-left"
|
|
1992
|
-
}, [d(
|
|
2008
|
+
}, [d(Me, {
|
|
1993
2009
|
wrap: !0,
|
|
1994
2010
|
align: "center"
|
|
1995
2011
|
}, {
|
|
1996
|
-
default: () => [r.length > 0 ? r.map((
|
|
1997
|
-
key:
|
|
2012
|
+
default: () => [r.length > 0 ? r.map((a) => d(Lt, {
|
|
2013
|
+
key: a.key,
|
|
1998
2014
|
closable: !0,
|
|
1999
|
-
onClose: () =>
|
|
2000
|
-
var a;
|
|
2001
|
-
return (a = this.formInstance) == null ? void 0 : a.resetFields(t.key);
|
|
2002
|
-
}
|
|
2015
|
+
onClose: () => t(a.key)
|
|
2003
2016
|
}, {
|
|
2004
2017
|
default: () => [d("div", {
|
|
2005
2018
|
class: "flex space-x-2"
|
|
2006
2019
|
}, [d("div", {
|
|
2007
2020
|
class: "text-#999"
|
|
2008
|
-
}, [
|
|
2021
|
+
}, [a.title, D(":")]), d("div", {
|
|
2009
2022
|
class: "text-#333"
|
|
2010
2023
|
}, [je(this.formSource, {
|
|
2011
|
-
...
|
|
2012
|
-
key:
|
|
2024
|
+
...a,
|
|
2025
|
+
key: a.key,
|
|
2013
2026
|
mode: "text"
|
|
2014
2027
|
})])])]
|
|
2015
2028
|
})) : d("div", {
|
|
@@ -2051,7 +2064,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2051
2064
|
onClick: this.toggleFormCollapsed
|
|
2052
2065
|
}, {
|
|
2053
2066
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2054
|
-
icon: () => this.formCollspased ? d(
|
|
2067
|
+
icon: () => this.formCollspased ? d(Bt, null, null) : d(Gt, null, null)
|
|
2055
2068
|
})), this.collapsedMode === "dialog" && r.push(d(I, {
|
|
2056
2069
|
onClick: this.openCollapsedDialog
|
|
2057
2070
|
}, {
|
|
@@ -2062,7 +2075,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2062
2075
|
default: () => [d(ve, {
|
|
2063
2076
|
contentClass: this.footer ? "form-footer" : ""
|
|
2064
2077
|
}, {
|
|
2065
|
-
default: () => [d(
|
|
2078
|
+
default: () => [d(Me, null, Pe(r) ? r : {
|
|
2066
2079
|
default: () => [r]
|
|
2067
2080
|
})]
|
|
2068
2081
|
})]
|
|
@@ -2073,7 +2086,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2073
2086
|
}, [d(Ir, {
|
|
2074
2087
|
ref: (r) => this.modalInstance = r
|
|
2075
2088
|
}, {
|
|
2076
|
-
default: () => [d(
|
|
2089
|
+
default: () => [d(Mt, ge({
|
|
2077
2090
|
name: this.name
|
|
2078
2091
|
}, {
|
|
2079
2092
|
labelAlign: "right",
|
|
@@ -2096,7 +2109,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
2096
2109
|
}, Pe(t = je(this.formSource, r)) ? t : {
|
|
2097
2110
|
default: () => [t]
|
|
2098
2111
|
});
|
|
2099
|
-
}),
|
|
2112
|
+
}), n(), e()]
|
|
2100
2113
|
})]
|
|
2101
2114
|
})]
|
|
2102
2115
|
})]);
|
|
@@ -2106,13 +2119,13 @@ function fn(e) {
|
|
|
2106
2119
|
return e;
|
|
2107
2120
|
}
|
|
2108
2121
|
function mn(e) {
|
|
2109
|
-
const n =
|
|
2122
|
+
const n = W(), r = $();
|
|
2110
2123
|
function t() {
|
|
2111
2124
|
var u, l;
|
|
2112
2125
|
const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
2113
2126
|
a && (r.value = a);
|
|
2114
2127
|
}
|
|
2115
|
-
return
|
|
2128
|
+
return U(t), ht(t), r;
|
|
2116
2129
|
}
|
|
2117
2130
|
const hn = {
|
|
2118
2131
|
install(e, n) {
|