@gopowerteam/form-render 0.0.63 → 0.0.65
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/form-collapsed-dialog.d.ts +3 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/interfaces/form-item-options.d.ts +4 -0
- package/dist/es/form-render/form-collapsed-dialog.d.ts +3 -0
- package/dist/es/index.mjs +215 -211
- package/dist/es/interfaces/form-item-options.d.ts +4 -0
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { getCurrentInstance as U, inject as le, defineComponent as V, computed as C, openBlock as S, createElementBlock as O, normalizeClass as ne, normalizeStyle as A, createElementVNode as k, shallowRef as R, ref as x, provide as me, onMounted as B, Fragment as he, renderSlot as Be, createBlock as re, Teleport as Ue, createVNode as v, TransitionGroup as We, withCtx as qe, renderList as Ge, mergeProps as
|
|
2
|
-
import { DatePicker as
|
|
3
|
-
import
|
|
1
|
+
import { getCurrentInstance as U, inject as le, defineComponent as V, computed as C, openBlock as S, createElementBlock as O, normalizeClass as ne, normalizeStyle as A, createElementVNode as k, shallowRef as R, ref as x, provide as me, onMounted as B, Fragment as he, renderSlot as Be, createBlock as re, Teleport as Ue, createVNode as v, TransitionGroup as We, withCtx as qe, renderList as Ge, mergeProps as ge, createCommentVNode as q, defineAsyncComponent as He, triggerRef as J, useCssVars as Ye, onUnmounted as Xe, withModifiers as Je, toDisplayString as E, resolveDynamicComponent as _e, normalizeProps as Qe, guardReactiveProps as Ke, watch as Q, unref as Ze, isRef as ae, toRefs as et, customRef as tt, nextTick as Ie, getCurrentScope as rt, onScopeDispose as lt, pushScopeId as Me, popScopeId as Le, isVNode as ye, h as nt, createTextVNode as Z, onUpdated as at } from "vue";
|
|
2
|
+
import { DatePicker as ut, YearPicker as ot, QuarterPicker as ct, MonthPicker as it, WeekPicker as dt, Input as st, InputNumber as Te, Select as ft, Option as mt, Switch as ht, RangePicker as vt, Textarea as gt, TreeSelect as yt, Cascader as bt, FormItem as je, Tabs as pt, TabPane as kt, Form as wt, Grid as St, GridItem as xe, Button as W, Space as Ct } from "@arco-design/web-vue";
|
|
3
|
+
import $e from "dayjs";
|
|
4
4
|
import { FormRenderResolver as nl } from "./resolver.mjs";
|
|
5
|
-
const xt = Symbol("ArcoConfigProvider"), $t = "arco", Ft = "$arco",
|
|
5
|
+
const xt = Symbol("ArcoConfigProvider"), $t = "arco", Ft = "$arco", be = (e) => {
|
|
6
6
|
var r, l, t;
|
|
7
|
-
const a = U(),
|
|
8
|
-
return `${(t = (l =
|
|
7
|
+
const a = U(), o = le(xt, void 0);
|
|
8
|
+
return `${(t = (l = o == null ? void 0 : o.prefixCls) != null ? l : (r = a == null ? void 0 : a.appContext.config.globalProperties[Ft]) == null ? void 0 : r.classPrefix) != null ? t : $t}-${e}`;
|
|
9
9
|
}, Ot = Object.prototype.toString;
|
|
10
|
-
function
|
|
10
|
+
function pe(e) {
|
|
11
11
|
return Ot.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var
|
|
13
|
+
var ke = (e, r) => {
|
|
14
14
|
for (const [l, t] of r)
|
|
15
15
|
e[l] = t;
|
|
16
16
|
return e;
|
|
@@ -44,11 +44,11 @@ const _t = V({
|
|
|
44
44
|
setup(e, {
|
|
45
45
|
emit: r
|
|
46
46
|
}) {
|
|
47
|
-
const l =
|
|
47
|
+
const l = be("icon"), t = C(() => [l, `${l}-down`, {
|
|
48
48
|
[`${l}-spin`]: e.spin
|
|
49
49
|
}]), a = C(() => {
|
|
50
50
|
const n = {};
|
|
51
|
-
return e.size && (n.fontSize =
|
|
51
|
+
return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
|
|
52
52
|
});
|
|
53
53
|
return {
|
|
54
54
|
cls: t,
|
|
@@ -60,8 +60,8 @@ const _t = V({
|
|
|
60
60
|
}
|
|
61
61
|
}), It = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Mt = /* @__PURE__ */ k("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
-
}, null, -1),
|
|
64
|
-
function
|
|
63
|
+
}, null, -1), Lt = [Mt];
|
|
64
|
+
function Tt(e, r, l, t, a, o) {
|
|
65
65
|
return S(), O("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
@@ -73,10 +73,10 @@ function jt(e, r, l, t, a, u) {
|
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
75
|
onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
|
|
76
|
-
},
|
|
76
|
+
}, Lt, 14, It);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */
|
|
79
|
-
const
|
|
78
|
+
var ie = /* @__PURE__ */ ke(_t, [["render", Tt]]);
|
|
79
|
+
const jt = Object.assign(ie, {
|
|
80
80
|
install: (e, r) => {
|
|
81
81
|
var l;
|
|
82
82
|
const t = (l = r == null ? void 0 : r.iconPrefix) != null ? l : "";
|
|
@@ -111,11 +111,11 @@ const Lt = Object.assign(ie, {
|
|
|
111
111
|
setup(e, {
|
|
112
112
|
emit: r
|
|
113
113
|
}) {
|
|
114
|
-
const l =
|
|
114
|
+
const l = be("icon"), t = C(() => [l, `${l}-up`, {
|
|
115
115
|
[`${l}-spin`]: e.spin
|
|
116
116
|
}]), a = C(() => {
|
|
117
117
|
const n = {};
|
|
118
|
-
return e.size && (n.fontSize =
|
|
118
|
+
return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
|
|
119
119
|
});
|
|
120
120
|
return {
|
|
121
121
|
cls: t,
|
|
@@ -128,7 +128,7 @@ const Lt = Object.assign(ie, {
|
|
|
128
128
|
}), Pt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Vt = /* @__PURE__ */ k("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
130
|
}, null, -1), Nt = [Vt];
|
|
131
|
-
function At(e, r, l, t, a,
|
|
131
|
+
function At(e, r, l, t, a, o) {
|
|
132
132
|
return S(), O("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
@@ -142,7 +142,7 @@ function At(e, r, l, t, a, u) {
|
|
|
142
142
|
onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
|
|
143
143
|
}, Nt, 14, Pt);
|
|
144
144
|
}
|
|
145
|
-
var de = /* @__PURE__ */
|
|
145
|
+
var de = /* @__PURE__ */ ke(zt, [["render", At]]);
|
|
146
146
|
const Et = Object.assign(de, {
|
|
147
147
|
install: (e, r) => {
|
|
148
148
|
var l;
|
|
@@ -178,11 +178,11 @@ const Et = Object.assign(de, {
|
|
|
178
178
|
setup(e, {
|
|
179
179
|
emit: r
|
|
180
180
|
}) {
|
|
181
|
-
const l =
|
|
181
|
+
const l = be("icon"), t = C(() => [l, `${l}-search`, {
|
|
182
182
|
[`${l}-spin`]: e.spin
|
|
183
183
|
}]), a = C(() => {
|
|
184
184
|
const n = {};
|
|
185
|
-
return e.size && (n.fontSize =
|
|
185
|
+
return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
|
|
186
186
|
});
|
|
187
187
|
return {
|
|
188
188
|
cls: t,
|
|
@@ -195,7 +195,7 @@ const Et = Object.assign(de, {
|
|
|
195
195
|
}), Dt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ k("path", {
|
|
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), Ut = [Bt];
|
|
198
|
-
function Wt(e, r, l, t, a,
|
|
198
|
+
function Wt(e, r, l, t, a, o) {
|
|
199
199
|
return S(), O("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
@@ -209,14 +209,14 @@ function Wt(e, r, l, t, a, u) {
|
|
|
209
209
|
onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
|
|
210
210
|
}, Ut, 14, Dt);
|
|
211
211
|
}
|
|
212
|
-
var se = /* @__PURE__ */
|
|
212
|
+
var se = /* @__PURE__ */ ke(Rt, [["render", Wt]]);
|
|
213
213
|
const qt = Object.assign(se, {
|
|
214
214
|
install: (e, r) => {
|
|
215
215
|
var l;
|
|
216
216
|
const t = (l = r == null ? void 0 : r.iconPrefix) != null ? l : "";
|
|
217
217
|
e.component(t + se.name, se);
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
219
|
+
}), ue = Symbol("__MODAL__");
|
|
220
220
|
function ze(e) {
|
|
221
221
|
return rt() ? (lt(e), !0) : !1;
|
|
222
222
|
}
|
|
@@ -240,8 +240,8 @@ function Jt(e, r = {}) {
|
|
|
240
240
|
return e.value[t];
|
|
241
241
|
},
|
|
242
242
|
set(a) {
|
|
243
|
-
var
|
|
244
|
-
if ((
|
|
243
|
+
var o;
|
|
244
|
+
if ((o = F(r.replaceRef)) == null || o)
|
|
245
245
|
if (Array.isArray(e.value)) {
|
|
246
246
|
const n = [...e.value];
|
|
247
247
|
n[t] = a, e.value = n;
|
|
@@ -263,22 +263,22 @@ function D(e) {
|
|
|
263
263
|
const l = F(e);
|
|
264
264
|
return (r = l == null ? void 0 : l.$el) != null ? r : l;
|
|
265
265
|
}
|
|
266
|
-
const
|
|
266
|
+
const oe = Pe ? window : void 0;
|
|
267
267
|
function fe(...e) {
|
|
268
268
|
let r, l, t, a;
|
|
269
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, t, a] = e, r =
|
|
269
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, t, a] = e, r = oe) : [r, l, t, a] = e, !r)
|
|
270
270
|
return Yt;
|
|
271
271
|
Array.isArray(l) || (l = [l]), Array.isArray(t) || (t = [t]);
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
}, d = (
|
|
272
|
+
const o = [], n = () => {
|
|
273
|
+
o.forEach((u) => u()), o.length = 0;
|
|
274
|
+
}, d = (u, c, i, h) => (u.addEventListener(c, i, h), () => u.removeEventListener(c, i, h)), p = Q(
|
|
275
275
|
() => [D(r), F(a)],
|
|
276
|
-
([
|
|
277
|
-
if (n(), !
|
|
276
|
+
([u, c]) => {
|
|
277
|
+
if (n(), !u)
|
|
278
278
|
return;
|
|
279
279
|
const i = Ht(c) ? { ...c } : c;
|
|
280
|
-
|
|
281
|
-
...l.flatMap((h) => t.map((m) => d(
|
|
280
|
+
o.push(
|
|
281
|
+
...l.flatMap((h) => t.map((m) => d(u, h, m, i)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
@@ -301,41 +301,41 @@ function er(e, r = {}) {
|
|
|
301
301
|
var l, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
304
|
-
preventDefault:
|
|
304
|
+
preventDefault: o,
|
|
305
305
|
stopPropagation: n,
|
|
306
306
|
exact: d,
|
|
307
307
|
onMove: p,
|
|
308
308
|
onEnd: s,
|
|
309
|
-
onStart:
|
|
309
|
+
onStart: u,
|
|
310
310
|
initialValue: c,
|
|
311
311
|
axis: i = "both",
|
|
312
|
-
draggingElement: h =
|
|
312
|
+
draggingElement: h = oe,
|
|
313
313
|
containerElement: m,
|
|
314
314
|
handle: w = e
|
|
315
315
|
} = r, g = x(
|
|
316
316
|
(l = F(c)) != null ? l : { x: 0, y: 0 }
|
|
317
|
-
), _ = x(),
|
|
318
|
-
F(
|
|
317
|
+
), _ = x(), j = (b) => a ? a.includes(b.pointerType) : !0, I = (b) => {
|
|
318
|
+
F(o) && b.preventDefault(), F(n) && b.stopPropagation();
|
|
319
319
|
}, y = (b) => {
|
|
320
320
|
var z;
|
|
321
|
-
if (F(r.disabled) || !
|
|
321
|
+
if (F(r.disabled) || !j(b) || F(d) && b.target !== F(e))
|
|
322
322
|
return;
|
|
323
|
-
const M = F(m), P = (z = M == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : z.call(M),
|
|
324
|
-
x: b.clientX - (M ?
|
|
325
|
-
y: b.clientY - (M ?
|
|
323
|
+
const M = F(m), P = (z = M == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : z.call(M), L = F(e).getBoundingClientRect(), K = {
|
|
324
|
+
x: b.clientX - (M ? L.left - P.left + M.scrollLeft : L.left),
|
|
325
|
+
y: b.clientY - (M ? L.top - P.top + M.scrollTop : L.top)
|
|
326
326
|
};
|
|
327
|
-
(
|
|
327
|
+
(u == null ? void 0 : u(K, b)) !== !1 && (_.value = K, I(b));
|
|
328
328
|
}, $ = (b) => {
|
|
329
|
-
if (F(r.disabled) || !
|
|
329
|
+
if (F(r.disabled) || !j(b) || !_.value)
|
|
330
330
|
return;
|
|
331
331
|
const z = F(m), M = F(e).getBoundingClientRect();
|
|
332
|
-
let { x: P, y:
|
|
333
|
-
(i === "x" || i === "both") && (P = b.clientX - _.value.x, z && (P = Math.min(Math.max(0, P), z.scrollWidth - M.width))), (i === "y" || i === "both") && (
|
|
332
|
+
let { x: P, y: L } = g.value;
|
|
333
|
+
(i === "x" || i === "both") && (P = b.clientX - _.value.x, z && (P = Math.min(Math.max(0, P), z.scrollWidth - M.width))), (i === "y" || i === "both") && (L = b.clientY - _.value.y, z && (L = Math.min(Math.max(0, L), z.scrollHeight - M.height))), g.value = {
|
|
334
334
|
x: P,
|
|
335
|
-
y:
|
|
335
|
+
y: L
|
|
336
336
|
}, p == null || p(g.value, b), I(b);
|
|
337
337
|
}, N = (b) => {
|
|
338
|
-
F(r.disabled) || !
|
|
338
|
+
F(r.disabled) || !j(b) || _.value && (_.value = void 0, s == null || s(g.value, b), I(b));
|
|
339
339
|
};
|
|
340
340
|
if (Pe) {
|
|
341
341
|
const b = { capture: (t = r.capture) != null ? t : !0 };
|
|
@@ -351,37 +351,37 @@ function er(e, r = {}) {
|
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
function tr(e, r, l = {}) {
|
|
354
|
-
const { window: t =
|
|
355
|
-
let
|
|
354
|
+
const { window: t = oe, ...a } = l;
|
|
355
|
+
let o;
|
|
356
356
|
const n = Zt(() => t && "ResizeObserver" in t), d = () => {
|
|
357
|
-
|
|
357
|
+
o && (o.disconnect(), o = void 0);
|
|
358
358
|
}, p = C(() => Array.isArray(e) ? e.map((c) => D(c)) : [D(e)]), s = Q(
|
|
359
359
|
p,
|
|
360
360
|
(c) => {
|
|
361
361
|
if (d(), n.value && t) {
|
|
362
|
-
|
|
362
|
+
o = new ResizeObserver(r);
|
|
363
363
|
for (const i of c)
|
|
364
|
-
i &&
|
|
364
|
+
i && o.observe(i, a);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
|
-
),
|
|
368
|
+
), u = () => {
|
|
369
369
|
d(), s();
|
|
370
370
|
};
|
|
371
|
-
return ze(
|
|
371
|
+
return ze(u), {
|
|
372
372
|
isSupported: n,
|
|
373
|
-
stop:
|
|
373
|
+
stop: u
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function G(e, r = { width: 0, height: 0 }, l = {}) {
|
|
377
|
-
const { window: t =
|
|
377
|
+
const { window: t = oe, box: a = "content-box" } = l, o = C(() => {
|
|
378
378
|
var c, i;
|
|
379
379
|
return (i = (c = D(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : i.includes("svg");
|
|
380
380
|
}), n = x(r.width), d = x(r.height), { stop: p } = tr(
|
|
381
381
|
e,
|
|
382
382
|
([c]) => {
|
|
383
383
|
const i = a === "border-box" ? c.borderBoxSize : a === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
384
|
-
if (t &&
|
|
384
|
+
if (t && o.value) {
|
|
385
385
|
const h = D(e);
|
|
386
386
|
if (h) {
|
|
387
387
|
const m = t.getComputedStyle(h);
|
|
@@ -405,25 +405,25 @@ function G(e, r = { width: 0, height: 0 }, l = {}) {
|
|
|
405
405
|
n.value = c ? r.width : 0, d.value = c ? r.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
|
-
function
|
|
408
|
+
function u() {
|
|
409
409
|
p(), s();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: n,
|
|
413
413
|
height: d,
|
|
414
|
-
stop:
|
|
414
|
+
stop: u
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const rr = (e) => (Me("data-v-9a7af353"), e = e(),
|
|
417
|
+
const rr = (e) => (Me("data-v-9a7af353"), e = e(), Le(), e), lr = { class: "title text-16px font-bold" }, nr = { class: "action" }, ar = ["form"], ur = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, or = /* @__PURE__ */ rr(() => /* @__PURE__ */ k("div", { class: "lds-ring" }, [
|
|
421
421
|
/* @__PURE__ */ k("div"),
|
|
422
422
|
/* @__PURE__ */ k("div"),
|
|
423
423
|
/* @__PURE__ */ k("div"),
|
|
424
424
|
/* @__PURE__ */ k("div")
|
|
425
425
|
], -1)), cr = [
|
|
426
|
-
|
|
426
|
+
or
|
|
427
427
|
], ir = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
@@ -463,13 +463,13 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
463
463
|
Ye((f) => ({
|
|
464
464
|
"5751bf6b": f.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a = l,
|
|
466
|
+
const t = e, a = l, o = le(ue), n = x(!1);
|
|
467
467
|
let d = 0, p = 0;
|
|
468
|
-
const s = R(),
|
|
468
|
+
const s = R(), u = R(), c = R(), i = R(), h = R(), m = R(), { height: w } = G(s), { height: g } = G(c, void 0, { box: "border-box" }), { height: _ } = G(i, void 0, { box: "border-box" }), { height: j } = G(h), { height: I } = G(m), { x: y, y: $ } = er(c, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
471
|
function N() {
|
|
472
|
-
|
|
472
|
+
o == null || o.close(t.id);
|
|
473
473
|
}
|
|
474
474
|
function b(f) {
|
|
475
475
|
return typeof f == "number" ? `${f}px` : f;
|
|
@@ -493,60 +493,60 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
493
493
|
}), P = C(() => {
|
|
494
494
|
const f = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (f.cursor = "move"), f;
|
|
496
|
-
}),
|
|
497
|
-
const f = {},
|
|
498
|
-
return t.maxHeight && (f.maxHeight = `${
|
|
496
|
+
}), L = C(() => {
|
|
497
|
+
const f = {}, T = j.value + I.value + g.value + _.value, Ce = Math.floor(w.value * (Number(b(t.maxHeight).replace("%", "")) / 100));
|
|
498
|
+
return t.maxHeight && (f.maxHeight = `${Ce - T}px`), t.mode === "drawer" && (f.maxHeight = "unset", ["left", "right"].includes(t.position) && (f.height = `${w.value - T}px`)), t.fullscreen && (f.maxHeight = "unset", f.height = `calc(100% - ${T}px)`), t.type !== "component" && (f.padding = "0"), t.bodyStyle && Object.assign(f, t.bodyStyle), f;
|
|
499
499
|
});
|
|
500
500
|
function K() {
|
|
501
|
-
const f =
|
|
501
|
+
const f = u.value;
|
|
502
502
|
if (t.form && f) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const T = f.querySelector(`form[name="${t.form}"]`);
|
|
504
|
+
T && T.dispatchEvent(new Event("submit"));
|
|
505
505
|
}
|
|
506
506
|
a("submit");
|
|
507
507
|
}
|
|
508
508
|
function Ne() {
|
|
509
|
-
|
|
509
|
+
o == null || o.close(t.id);
|
|
510
510
|
}
|
|
511
511
|
function Ae() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
J(s), J(
|
|
513
|
+
J(s), J(u), u.value && (d = u.value.offsetLeft, p = u.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
function Ee() {
|
|
517
517
|
if (t.closeable && t.esc) {
|
|
518
|
-
const f = ({ key:
|
|
519
|
-
|
|
518
|
+
const f = ({ key: T }) => {
|
|
519
|
+
T === "Escape" && (o == null || o.close(t.id), window.removeEventListener("keydown", f));
|
|
520
520
|
};
|
|
521
521
|
window.addEventListener("keydown", f);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Re() {
|
|
525
|
-
d =
|
|
525
|
+
d = u.value.offsetLeft, p = u.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
B(() => {
|
|
528
528
|
Ee(), Ae();
|
|
529
529
|
}), Xe(() => {
|
|
530
530
|
});
|
|
531
531
|
function De() {
|
|
532
|
-
return n.value = !0, () =>
|
|
532
|
+
return n.value = !0, () => Se();
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Se() {
|
|
535
535
|
n.value = !1;
|
|
536
536
|
}
|
|
537
537
|
return r({
|
|
538
538
|
showLoading: De,
|
|
539
|
-
hideLoading:
|
|
540
|
-
}), (f,
|
|
539
|
+
hideLoading: Se
|
|
540
|
+
}), (f, T) => (S(), O("div", {
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: s,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
544
|
style: A(z.value),
|
|
545
|
-
onClick:
|
|
545
|
+
onClick: T[0] || (T[0] = Je((Ce) => f.maskClosable && N(), ["self"]))
|
|
546
546
|
}, [
|
|
547
547
|
k("div", {
|
|
548
548
|
ref_key: "contentRef",
|
|
549
|
-
ref:
|
|
549
|
+
ref: u,
|
|
550
550
|
class: ne(["modal-content", { [`${f.mode}-mode`]: !0, [`${f.position}-position`]: !0 }]),
|
|
551
551
|
style: A(M.value)
|
|
552
552
|
}, [
|
|
@@ -574,7 +574,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
574
574
|
}, null, 512),
|
|
575
575
|
k("div", {
|
|
576
576
|
class: "modal-body",
|
|
577
|
-
style: A(
|
|
577
|
+
style: A(L.value)
|
|
578
578
|
}, [
|
|
579
579
|
(S(), re(_e(f.component), Qe(Ke(f.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
@@ -601,7 +601,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
601
601
|
onClick: K
|
|
602
602
|
}, E(f.submitText), 9, ar)
|
|
603
603
|
], 512)) : q("", !0),
|
|
604
|
-
n.value ? (S(), O("div",
|
|
604
|
+
n.value ? (S(), O("div", ur, cr)) : q("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
@@ -633,7 +633,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
633
633
|
async function a() {
|
|
634
634
|
r.onOk && await r.onOk(), l.close();
|
|
635
635
|
}
|
|
636
|
-
async function
|
|
636
|
+
async function o() {
|
|
637
637
|
r.onCancel && await r.onCancel(), l.close();
|
|
638
638
|
}
|
|
639
639
|
return (n, d) => (S(), O("section", fr, [
|
|
@@ -655,13 +655,13 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "cancel-button",
|
|
657
657
|
type: "button",
|
|
658
|
-
onClick:
|
|
658
|
+
onClick: o
|
|
659
659
|
}, E(n.cancelText), 1)) : q("", !0)
|
|
660
660
|
], 64))
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}), yr = /* @__PURE__ */ ce(gr, [["__scopeId", "data-v-0c6b8db2"]]), br = (e) => (Me("data-v-559bdf2e"), e = e(),
|
|
664
|
+
}), yr = /* @__PURE__ */ ce(gr, [["__scopeId", "data-v-0c6b8db2"]]), br = (e) => (Me("data-v-559bdf2e"), e = e(), Le(), e), pr = { class: "flex-center" }, kr = /* @__PURE__ */ br(() => /* @__PURE__ */ k("div", { class: "modal-loading" }, [
|
|
665
665
|
/* @__PURE__ */ k("div", { class: "lds-ring" }, [
|
|
666
666
|
/* @__PURE__ */ k("div"),
|
|
667
667
|
/* @__PURE__ */ k("div"),
|
|
@@ -700,14 +700,14 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
700
700
|
},
|
|
701
701
|
setup(e, { expose: r }) {
|
|
702
702
|
const l = R([]), t = x(!1), a = U();
|
|
703
|
-
function
|
|
703
|
+
function o(i, h = {}, m = {}) {
|
|
704
704
|
const w = He(
|
|
705
705
|
() => Promise.resolve(typeof i == "string" ? yr : i)
|
|
706
706
|
);
|
|
707
707
|
typeof i == "string" && (h.type = i, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
|
|
708
708
|
const g = Math.random().toString(32).slice(2), _ = Object.assign({
|
|
709
709
|
zIndex: typeof i == "string" ? 1100 : 1e3
|
|
710
|
-
}, m),
|
|
710
|
+
}, m), j = new Promise((I, y) => {
|
|
711
711
|
l.value.push({
|
|
712
712
|
id: g,
|
|
713
713
|
component: w,
|
|
@@ -722,7 +722,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
722
722
|
}), J(l);
|
|
723
723
|
}).catch((I) => I === "CANCEL" ? new Promise(() => {
|
|
724
724
|
}) : Promise.reject(I));
|
|
725
|
-
return Object.assign(
|
|
725
|
+
return Object.assign(j, {
|
|
726
726
|
close: () => n(g)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
@@ -744,16 +744,16 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
744
744
|
return;
|
|
745
745
|
const w = m.listeners.find((g) => g.event === h);
|
|
746
746
|
w && w.callback({
|
|
747
|
-
open:
|
|
747
|
+
open: o,
|
|
748
748
|
close: (g) => n(m.id, g),
|
|
749
749
|
closeAll: d,
|
|
750
750
|
showLoading: () => s(m.id),
|
|
751
|
-
hideLoading: () =>
|
|
752
|
-
confirm: (g) =>
|
|
753
|
-
success: (g) =>
|
|
754
|
-
error: (g) =>
|
|
755
|
-
warning: (g) =>
|
|
756
|
-
info: (g) =>
|
|
751
|
+
hideLoading: () => u(m.id),
|
|
752
|
+
confirm: (g) => o("confirm", g),
|
|
753
|
+
success: (g) => o("success", g),
|
|
754
|
+
error: (g) => o("error", g),
|
|
755
|
+
warning: (g) => o("warning", g),
|
|
756
|
+
info: (g) => o("info", g)
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
function s(i, h) {
|
|
@@ -763,7 +763,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
763
763
|
if (m)
|
|
764
764
|
return m.showLoading();
|
|
765
765
|
{
|
|
766
|
-
const { close: w } =
|
|
766
|
+
const { close: w } = o(Cr, {
|
|
767
767
|
text: h == null ? void 0 : h.text
|
|
768
768
|
}, {
|
|
769
769
|
footer: !1,
|
|
@@ -779,7 +779,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
779
779
|
), w;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function u(i) {
|
|
783
783
|
if (!a)
|
|
784
784
|
return;
|
|
785
785
|
const [h] = a.refs[`modal-container_${i}`];
|
|
@@ -793,16 +793,16 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
793
793
|
callback: m
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
return me(
|
|
797
|
-
open:
|
|
796
|
+
return me(ue, {
|
|
797
|
+
open: o,
|
|
798
798
|
close: n,
|
|
799
799
|
closeAll: d,
|
|
800
800
|
addEventListener: c,
|
|
801
801
|
showLoading: s,
|
|
802
|
-
hideLoading:
|
|
802
|
+
hideLoading: u
|
|
803
803
|
}), r({
|
|
804
804
|
elements: l,
|
|
805
|
-
open:
|
|
805
|
+
open: o,
|
|
806
806
|
close: n,
|
|
807
807
|
closeAll: d
|
|
808
808
|
}), B(() => {
|
|
@@ -816,7 +816,7 @@ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "titl
|
|
|
816
816
|
}, [
|
|
817
817
|
v(We, { name: "modal-fade" }, {
|
|
818
818
|
default: qe(() => [
|
|
819
|
-
(S(!0), O(he, null, Ge(l.value, (m) => (S(), re(sr,
|
|
819
|
+
(S(!0), O(he, null, Ge(l.value, (m) => (S(), re(sr, ge({
|
|
820
820
|
id: m.id,
|
|
821
821
|
key: m.id,
|
|
822
822
|
ref_for: !0,
|
|
@@ -846,11 +846,11 @@ function te(e, r) {
|
|
|
846
846
|
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === r ? a : null;
|
|
847
847
|
}
|
|
848
848
|
function Ve() {
|
|
849
|
-
const e = le(
|
|
850
|
-
function l(t, a,
|
|
849
|
+
const e = le(ue), r = U();
|
|
850
|
+
function l(t, a, o) {
|
|
851
851
|
if (!e)
|
|
852
852
|
throw new Error("Not Found Modal Provider Component");
|
|
853
|
-
return e.open(t, a,
|
|
853
|
+
return e.open(t, a, o);
|
|
854
854
|
}
|
|
855
855
|
return {
|
|
856
856
|
open: l,
|
|
@@ -858,7 +858,7 @@ function Ve() {
|
|
|
858
858
|
var a;
|
|
859
859
|
if (!e)
|
|
860
860
|
throw new Error("Not Found Modal Provider Component");
|
|
861
|
-
const
|
|
861
|
+
const o = te(r, "ModalContainer"), n = (a = o == null ? void 0 : o.props) == null ? void 0 : a.id;
|
|
862
862
|
if (!n)
|
|
863
863
|
throw new Error("Not Found Current Modal Container");
|
|
864
864
|
e.close(n, t);
|
|
@@ -872,15 +872,15 @@ function Ve() {
|
|
|
872
872
|
var a;
|
|
873
873
|
if (!e)
|
|
874
874
|
throw new Error("Not Found Modal Provider Component");
|
|
875
|
-
const
|
|
875
|
+
const o = te(r, "ModalContainer"), n = (a = o == null ? void 0 : o.props) == null ? void 0 : a.id;
|
|
876
876
|
return e.showLoading(n, t);
|
|
877
877
|
},
|
|
878
878
|
hideLoading() {
|
|
879
879
|
var t;
|
|
880
880
|
if (!e)
|
|
881
881
|
throw new Error("Not Found Modal Provider Component");
|
|
882
|
-
const a = te(r, "ModalContainer"),
|
|
883
|
-
return e.hideLoading(
|
|
882
|
+
const a = te(r, "ModalContainer"), o = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
|
|
883
|
+
return e.hideLoading(o);
|
|
884
884
|
},
|
|
885
885
|
confirm(t) {
|
|
886
886
|
return this.open("confirm", t);
|
|
@@ -901,18 +901,18 @@ function Ve() {
|
|
|
901
901
|
}
|
|
902
902
|
function _r(e) {
|
|
903
903
|
var r;
|
|
904
|
-
const l = le(
|
|
905
|
-
l &&
|
|
904
|
+
const l = le(ue), t = U(), a = te(t, "ModalContainer"), o = (r = a == null ? void 0 : a.props) == null ? void 0 : r.id;
|
|
905
|
+
l && o && l.addEventListener(o, "submit", e);
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const Fe = {
|
|
908
908
|
id: Symbol("ID"),
|
|
909
909
|
source: Symbol("Source")
|
|
910
910
|
};
|
|
911
911
|
function Ir(e, r) {
|
|
912
912
|
const l = x({});
|
|
913
913
|
return e == null || e.forEach((a) => {
|
|
914
|
-
let
|
|
915
|
-
a.default && (
|
|
914
|
+
let o = null;
|
|
915
|
+
a.default && (o = (typeof a.default == "function" ? a.default() : a.default) || null), r && r[a.key] !== void 0 && (o = r[a.key]), l.value[a.key] = o;
|
|
916
916
|
}), [l, (a) => {
|
|
917
917
|
l.value = a;
|
|
918
918
|
}];
|
|
@@ -948,7 +948,7 @@ function Mr(e) {
|
|
|
948
948
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
949
949
|
}, null);
|
|
950
950
|
case "year":
|
|
951
|
-
return v(
|
|
951
|
+
return v(ot, {
|
|
952
952
|
modelValue: l[t.key],
|
|
953
953
|
"onUpdate:modelValue": (a) => l[t.key] = a,
|
|
954
954
|
"disabled-date": r,
|
|
@@ -957,23 +957,24 @@ function Mr(e) {
|
|
|
957
957
|
}, null);
|
|
958
958
|
case "date":
|
|
959
959
|
default:
|
|
960
|
-
return v(
|
|
960
|
+
return v(ut, ge({
|
|
961
961
|
"disabled-input": !0,
|
|
962
962
|
modelValue: l[t.key],
|
|
963
963
|
"onUpdate:modelValue": (a) => l[t.key] = a,
|
|
964
964
|
"disabled-date": r,
|
|
965
965
|
format: e == null ? void 0 : e.labelFormat,
|
|
966
|
-
shortcuts: e == null ? void 0 : e.shortcuts,
|
|
967
966
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
968
|
-
},
|
|
967
|
+
}, {
|
|
968
|
+
shortcuts: e == null ? void 0 : e.shortcuts
|
|
969
|
+
}), null);
|
|
969
970
|
}
|
|
970
971
|
};
|
|
971
972
|
}
|
|
972
|
-
function
|
|
973
|
+
function Lr(e) {
|
|
973
974
|
return (r, l) => {
|
|
974
975
|
switch (e == null ? void 0 : e.type) {
|
|
975
976
|
case "number":
|
|
976
|
-
return v(
|
|
977
|
+
return v(Te, {
|
|
977
978
|
modelValue: r[l.key],
|
|
978
979
|
"onUpdate:modelValue": (t) => r[l.key] = t,
|
|
979
980
|
hideButton: !0,
|
|
@@ -994,30 +995,30 @@ function Tr(e) {
|
|
|
994
995
|
};
|
|
995
996
|
}
|
|
996
997
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
997
|
-
function
|
|
998
|
+
function we(e, r, l) {
|
|
998
999
|
const t = Q(e, (...a) => (Ie(() => t()), r(...a)), l);
|
|
999
1000
|
return t;
|
|
1000
1001
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1002
|
+
function Tr(e) {
|
|
1003
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
|
|
1003
1004
|
}
|
|
1004
1005
|
const H = /* @__PURE__ */ new WeakMap();
|
|
1005
|
-
function
|
|
1006
|
+
function jr() {
|
|
1006
1007
|
const e = x(/* @__PURE__ */ new Map());
|
|
1007
1008
|
return [e, (l) => e.value = l];
|
|
1008
1009
|
}
|
|
1009
1010
|
function zr(e) {
|
|
1010
1011
|
let r, l = !1;
|
|
1011
|
-
const [t, a] =
|
|
1012
|
+
const [t, a] = jr(), o = (s) => {
|
|
1012
1013
|
if (e.onChange && e.onChange(s), !e.autoSumbit || !r)
|
|
1013
1014
|
return;
|
|
1014
|
-
let
|
|
1015
|
-
for (;
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
}, n = (s,
|
|
1015
|
+
let u = r;
|
|
1016
|
+
for (; u && u.$el.tagName !== "FORM"; )
|
|
1017
|
+
u = u.$parent;
|
|
1018
|
+
u && u.$el && u.$el.dispatchEvent(new Event("submit"));
|
|
1019
|
+
}, n = (s, u) => {
|
|
1019
1020
|
const c = s();
|
|
1020
|
-
c instanceof Promise ? c.then(
|
|
1021
|
+
c instanceof Promise ? c.then(u) : u(c);
|
|
1021
1022
|
}, d = async () => {
|
|
1022
1023
|
const s = H.get(e.options);
|
|
1023
1024
|
switch (typeof s) {
|
|
@@ -1028,9 +1029,9 @@ function zr(e) {
|
|
|
1028
1029
|
a(s);
|
|
1029
1030
|
return;
|
|
1030
1031
|
}
|
|
1031
|
-
H.set(e.options, a), n(e.options, (
|
|
1032
|
+
H.set(e.options, a), n(e.options, (u) => {
|
|
1032
1033
|
const c = H.get(e.options);
|
|
1033
|
-
H.set(e.options,
|
|
1034
|
+
H.set(e.options, u), c(u);
|
|
1034
1035
|
});
|
|
1035
1036
|
}, p = () => {
|
|
1036
1037
|
n(e.options, (s) => {
|
|
@@ -1043,7 +1044,7 @@ function zr(e) {
|
|
|
1043
1044
|
break;
|
|
1044
1045
|
}
|
|
1045
1046
|
case ae(e.options): {
|
|
1046
|
-
|
|
1047
|
+
we(() => e.options, () => {
|
|
1047
1048
|
a(e.options.value);
|
|
1048
1049
|
}, {
|
|
1049
1050
|
immediate: !0
|
|
@@ -1053,20 +1054,20 @@ function zr(e) {
|
|
|
1053
1054
|
default:
|
|
1054
1055
|
t.value = e.options;
|
|
1055
1056
|
}
|
|
1056
|
-
return (s,
|
|
1057
|
+
return (s, u) => {
|
|
1057
1058
|
let c;
|
|
1058
|
-
return e.default && !l && (s[
|
|
1059
|
+
return e.default && !l && (s[u.key] = e.default, l = !0), v(ft, {
|
|
1059
1060
|
ref: (i) => r = i,
|
|
1060
1061
|
multiple: e.multiple,
|
|
1061
|
-
modelValue: s[
|
|
1062
|
-
"onUpdate:modelValue": (i) => s[
|
|
1062
|
+
modelValue: s[u.key],
|
|
1063
|
+
"onUpdate:modelValue": (i) => s[u.key] = i,
|
|
1063
1064
|
placeholder: e.placeholder,
|
|
1064
1065
|
allowClear: e.clearable,
|
|
1065
1066
|
allowSearch: e.searchable,
|
|
1066
1067
|
"allow-create": e.createable,
|
|
1067
1068
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1068
|
-
onChange:
|
|
1069
|
-
},
|
|
1069
|
+
onChange: o
|
|
1070
|
+
}, Tr(c = Array.from(t.value.entries()).map(([i, h]) => v(mt, {
|
|
1070
1071
|
key: i,
|
|
1071
1072
|
value: i,
|
|
1072
1073
|
label: h
|
|
@@ -1095,10 +1096,10 @@ function Vr(e) {
|
|
|
1095
1096
|
function a(d) {
|
|
1096
1097
|
t = d;
|
|
1097
1098
|
}
|
|
1098
|
-
function
|
|
1099
|
+
function o(d) {
|
|
1099
1100
|
if (d && d.length === 2) {
|
|
1100
|
-
const [p, s] = d.sort(),
|
|
1101
|
-
r[l.key] = [
|
|
1101
|
+
const [p, s] = d.sort(), u = $e(p).startOf("days"), c = $e(s).endOf("days");
|
|
1102
|
+
r[l.key] = [u.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), c.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1102
1103
|
}
|
|
1103
1104
|
}
|
|
1104
1105
|
function n(d) {
|
|
@@ -1112,7 +1113,7 @@ function Vr(e) {
|
|
|
1112
1113
|
modelValue: r[l.key],
|
|
1113
1114
|
"onUpdate:modelValue": (d) => r[l.key] = d,
|
|
1114
1115
|
onSelect: a,
|
|
1115
|
-
onChange:
|
|
1116
|
+
onChange: o,
|
|
1116
1117
|
mode: e == null ? void 0 : e.type,
|
|
1117
1118
|
shortcuts: e == null ? void 0 : e.shortcuts,
|
|
1118
1119
|
allowClear: e == null ? void 0 : e.clearable,
|
|
@@ -1138,24 +1139,24 @@ function Ar() {
|
|
|
1138
1139
|
}
|
|
1139
1140
|
function Er(e) {
|
|
1140
1141
|
let r, l = !1;
|
|
1141
|
-
const [t, a] = Ar(),
|
|
1142
|
+
const [t, a] = Ar(), o = () => {
|
|
1142
1143
|
if (!e.autoSumbit || !r)
|
|
1143
1144
|
return;
|
|
1144
|
-
let
|
|
1145
|
-
for (;
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}, n = (
|
|
1149
|
-
const i =
|
|
1145
|
+
let u = r;
|
|
1146
|
+
for (; u && u.$el.tagName !== "FORM"; )
|
|
1147
|
+
u = u.$parent;
|
|
1148
|
+
u && u.$el && u.$el.dispatchEvent(new Event("submit"));
|
|
1149
|
+
}, n = (u, c) => {
|
|
1150
|
+
const i = u();
|
|
1150
1151
|
i instanceof Promise ? i.then(c) : c(i);
|
|
1151
1152
|
}, d = async () => {
|
|
1152
|
-
const
|
|
1153
|
-
switch (typeof
|
|
1153
|
+
const u = Y.get(e.options);
|
|
1154
|
+
switch (typeof u) {
|
|
1154
1155
|
case "function":
|
|
1155
1156
|
Y.set(e.options, a);
|
|
1156
1157
|
return;
|
|
1157
1158
|
case "object":
|
|
1158
|
-
a(
|
|
1159
|
+
a(u);
|
|
1159
1160
|
return;
|
|
1160
1161
|
}
|
|
1161
1162
|
Y.set(e.options, a), n(e.options, (c) => {
|
|
@@ -1163,8 +1164,8 @@ function Er(e) {
|
|
|
1163
1164
|
Y.set(e.options, c), i(c);
|
|
1164
1165
|
});
|
|
1165
1166
|
}, p = () => {
|
|
1166
|
-
n(e.options, (
|
|
1167
|
-
a(
|
|
1167
|
+
n(e.options, (u) => {
|
|
1168
|
+
a(u);
|
|
1168
1169
|
});
|
|
1169
1170
|
};
|
|
1170
1171
|
switch (!0) {
|
|
@@ -1173,7 +1174,7 @@ function Er(e) {
|
|
|
1173
1174
|
break;
|
|
1174
1175
|
}
|
|
1175
1176
|
case ae(e.options): {
|
|
1176
|
-
|
|
1177
|
+
we(e.options, () => {
|
|
1177
1178
|
a(e.options.value);
|
|
1178
1179
|
}, {
|
|
1179
1180
|
immediate: !0
|
|
@@ -1183,21 +1184,21 @@ function Er(e) {
|
|
|
1183
1184
|
default:
|
|
1184
1185
|
t.value = e.options;
|
|
1185
1186
|
}
|
|
1186
|
-
function s(
|
|
1187
|
+
function s(u, c) {
|
|
1187
1188
|
var m;
|
|
1188
1189
|
const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
|
|
1189
|
-
return h ? h.toLowerCase().includes(
|
|
1190
|
+
return h ? h.toLowerCase().includes(u.toLowerCase()) : !1;
|
|
1190
1191
|
}
|
|
1191
|
-
return (
|
|
1192
|
+
return (u, c) => (e.default && !l && (u[c.key] = e.default, l = !0), v(yt, {
|
|
1192
1193
|
ref: (i) => r = i,
|
|
1193
1194
|
multiple: e.multiple,
|
|
1194
|
-
modelValue:
|
|
1195
|
-
"onUpdate:modelValue": (i) =>
|
|
1195
|
+
modelValue: u[c.key],
|
|
1196
|
+
"onUpdate:modelValue": (i) => u[c.key] = i,
|
|
1196
1197
|
placeholder: e.placeholder,
|
|
1197
1198
|
allowClear: e.clearable,
|
|
1198
1199
|
allowSearch: e.searchable,
|
|
1199
1200
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1200
|
-
onChange:
|
|
1201
|
+
onChange: o,
|
|
1201
1202
|
filterTreeNode: s,
|
|
1202
1203
|
data: t.value,
|
|
1203
1204
|
fieldNames: e.fieldNames,
|
|
@@ -1213,16 +1214,16 @@ function Rr() {
|
|
|
1213
1214
|
}
|
|
1214
1215
|
function Dr(e) {
|
|
1215
1216
|
let r, l = !1;
|
|
1216
|
-
const [t, a] = Rr(),
|
|
1217
|
+
const [t, a] = Rr(), o = () => {
|
|
1217
1218
|
if (!e.autoSumbit || !r)
|
|
1218
1219
|
return;
|
|
1219
1220
|
let s = r;
|
|
1220
1221
|
for (; s && s.$el.tagName !== "FORM"; )
|
|
1221
1222
|
s = s.$parent;
|
|
1222
1223
|
s && s.$el && s.$el.dispatchEvent(new Event("submit"));
|
|
1223
|
-
}, n = (s,
|
|
1224
|
+
}, n = (s, u) => {
|
|
1224
1225
|
const c = s();
|
|
1225
|
-
c instanceof Promise ? c.then(
|
|
1226
|
+
c instanceof Promise ? c.then(u) : u(c);
|
|
1226
1227
|
}, d = async () => {
|
|
1227
1228
|
const s = X.get(e.options);
|
|
1228
1229
|
switch (typeof s) {
|
|
@@ -1233,9 +1234,9 @@ function Dr(e) {
|
|
|
1233
1234
|
a(s);
|
|
1234
1235
|
return;
|
|
1235
1236
|
}
|
|
1236
|
-
X.set(e.options, a), n(e.options, (
|
|
1237
|
+
X.set(e.options, a), n(e.options, (u) => {
|
|
1237
1238
|
const c = X.get(e.options);
|
|
1238
|
-
X.set(e.options,
|
|
1239
|
+
X.set(e.options, u), c(u);
|
|
1239
1240
|
});
|
|
1240
1241
|
}, p = () => {
|
|
1241
1242
|
n(e.options, (s) => {
|
|
@@ -1248,7 +1249,7 @@ function Dr(e) {
|
|
|
1248
1249
|
break;
|
|
1249
1250
|
}
|
|
1250
1251
|
case ae(e.options): {
|
|
1251
|
-
|
|
1252
|
+
we(e.options, () => {
|
|
1252
1253
|
a(e.options.value);
|
|
1253
1254
|
}, {
|
|
1254
1255
|
immediate: !0
|
|
@@ -1258,17 +1259,17 @@ function Dr(e) {
|
|
|
1258
1259
|
default:
|
|
1259
1260
|
t.value = e.options;
|
|
1260
1261
|
}
|
|
1261
|
-
return (s,
|
|
1262
|
+
return (s, u) => (e.default && !l && (s[u.key] = e.default, l = !0), v(bt, {
|
|
1262
1263
|
pathMode: e.pathMode,
|
|
1263
1264
|
ref: (c) => r = c,
|
|
1264
1265
|
multiple: e.multiple,
|
|
1265
|
-
modelValue: s[
|
|
1266
|
-
"onUpdate:modelValue": (c) => s[
|
|
1266
|
+
modelValue: s[u.key],
|
|
1267
|
+
"onUpdate:modelValue": (c) => s[u.key] = c,
|
|
1267
1268
|
placeholder: e.placeholder,
|
|
1268
1269
|
allowClear: e.clearable,
|
|
1269
1270
|
allowSearch: e.searchable,
|
|
1270
1271
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1271
|
-
onChange:
|
|
1272
|
+
onChange: o,
|
|
1272
1273
|
options: t.value
|
|
1273
1274
|
}, null));
|
|
1274
1275
|
}
|
|
@@ -1309,16 +1310,16 @@ function Wr(e) {
|
|
|
1309
1310
|
}, a = (n) => {
|
|
1310
1311
|
const d = n;
|
|
1311
1312
|
return e != null && e.thousands ? t(d) : d;
|
|
1312
|
-
},
|
|
1313
|
+
}, o = (n) => n.replace(/,/g, "");
|
|
1313
1314
|
return (n, d) => {
|
|
1314
1315
|
const p = x(r(n[d.key]));
|
|
1315
1316
|
return Q(p, (s) => {
|
|
1316
1317
|
n[d.key] = l(s);
|
|
1317
|
-
}), v(
|
|
1318
|
+
}), v(Te, {
|
|
1318
1319
|
modelValue: p.value,
|
|
1319
1320
|
"onUpdate:modelValue": (s) => p.value = s,
|
|
1320
1321
|
formatter: a,
|
|
1321
|
-
parser:
|
|
1322
|
+
parser: o,
|
|
1322
1323
|
precision: e == null ? void 0 : e.precision,
|
|
1323
1324
|
hideButton: !0,
|
|
1324
1325
|
"read-only": e == null ? void 0 : e.readonly,
|
|
@@ -1332,7 +1333,7 @@ function Wr(e) {
|
|
|
1332
1333
|
}
|
|
1333
1334
|
function qr() {
|
|
1334
1335
|
return {
|
|
1335
|
-
input:
|
|
1336
|
+
input: Lr,
|
|
1336
1337
|
textarea: Nr,
|
|
1337
1338
|
select: zr,
|
|
1338
1339
|
treeSelect: Er,
|
|
@@ -1354,13 +1355,16 @@ function Gr(e, r) {
|
|
|
1354
1355
|
};
|
|
1355
1356
|
}
|
|
1356
1357
|
function Hr(e, r) {
|
|
1357
|
-
return nt(
|
|
1358
|
+
return nt(je, {
|
|
1358
1359
|
field: r.key,
|
|
1359
|
-
label: r.title
|
|
1360
|
+
label: r.title,
|
|
1361
|
+
hideLabel: r.hideLabel,
|
|
1362
|
+
labelColStyle: r.labelStyle,
|
|
1363
|
+
wrapperColStyle: r.contentStyle
|
|
1360
1364
|
}, Gr(e, r));
|
|
1361
1365
|
}
|
|
1362
1366
|
function Yr(e) {
|
|
1363
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1367
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
|
|
1364
1368
|
}
|
|
1365
1369
|
const Xr = /* @__PURE__ */ V({
|
|
1366
1370
|
props: {
|
|
@@ -1374,15 +1378,15 @@ const Xr = /* @__PURE__ */ V({
|
|
|
1374
1378
|
...n,
|
|
1375
1379
|
collapsed: !1
|
|
1376
1380
|
})), t = Array.from(new Set(l.map((n) => n.group).flat().filter(Boolean))), a = l.reduce((n, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((p) => {
|
|
1377
|
-
let s = n.find((
|
|
1381
|
+
let s = n.find((u) => u.group === p);
|
|
1378
1382
|
s || (s = {
|
|
1379
1383
|
group: p,
|
|
1380
1384
|
instance: void 0,
|
|
1381
1385
|
form: []
|
|
1382
1386
|
}, n.push(s)), s.form.push(d);
|
|
1383
|
-
}), n), []).sort((n, d) => n.group === "默认" ? -1 : d.group === "默认" ? 1 : n.group > d.group ? -1 : 1),
|
|
1387
|
+
}), n), []).sort((n, d) => n.group === "默认" ? -1 : d.group === "默认" ? 1 : n.group > d.group ? -1 : 1), o = x("默认");
|
|
1384
1388
|
return _r(() => {
|
|
1385
|
-
const n = a.find((d) => d.group ===
|
|
1389
|
+
const n = a.find((d) => d.group === o.value);
|
|
1386
1390
|
if (n && n.instance) {
|
|
1387
1391
|
const d = n.instance.formSource;
|
|
1388
1392
|
n.instance.validate().then(() => {
|
|
@@ -1393,7 +1397,7 @@ const Xr = /* @__PURE__ */ V({
|
|
|
1393
1397
|
formItems: l,
|
|
1394
1398
|
groups: t,
|
|
1395
1399
|
groupForms: a,
|
|
1396
|
-
activeTab:
|
|
1400
|
+
activeTab: o
|
|
1397
1401
|
};
|
|
1398
1402
|
},
|
|
1399
1403
|
render() {
|
|
@@ -1421,8 +1425,8 @@ const Xr = /* @__PURE__ */ V({
|
|
|
1421
1425
|
}, null);
|
|
1422
1426
|
}
|
|
1423
1427
|
});
|
|
1424
|
-
function
|
|
1425
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1428
|
+
function Oe(e) {
|
|
1429
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
|
|
1426
1430
|
}
|
|
1427
1431
|
const ve = /* @__PURE__ */ V({
|
|
1428
1432
|
props: {
|
|
@@ -1488,11 +1492,11 @@ const ve = /* @__PURE__ */ V({
|
|
|
1488
1492
|
setup(e, {
|
|
1489
1493
|
emit: r
|
|
1490
1494
|
}) {
|
|
1491
|
-
const l = x(), [t, a] = Ir(e.form, e.modelValue || e.value),
|
|
1492
|
-
me(
|
|
1495
|
+
const l = x(), [t, a] = Ir(e.form, e.modelValue || e.value), o = x(e.columns || 0), n = x(!0), d = x(), p = () => n.value = !n.value;
|
|
1496
|
+
me(Fe.id, e.id), me(Fe.source, t);
|
|
1493
1497
|
const s = () => {
|
|
1494
1498
|
r("submit", t.value), r("update:model-value", t.value);
|
|
1495
|
-
},
|
|
1499
|
+
}, u = C(() => e.form.filter((y) => n.value ? !y.collapsed : !0).filter((y) => {
|
|
1496
1500
|
switch (!0) {
|
|
1497
1501
|
case typeof y.visiable == "boolean":
|
|
1498
1502
|
return y.visiable;
|
|
@@ -1502,17 +1506,17 @@ const ve = /* @__PURE__ */ V({
|
|
|
1502
1506
|
return !0;
|
|
1503
1507
|
}
|
|
1504
1508
|
})), c = C(() => {
|
|
1505
|
-
if (!
|
|
1509
|
+
if (!o.value)
|
|
1506
1510
|
return 1;
|
|
1507
|
-
const y =
|
|
1508
|
-
return
|
|
1511
|
+
const y = u.value.reduce(($, N) => $ + ((N == null ? void 0 : N.span) || 1), 0);
|
|
1512
|
+
return o.value - y % o.value;
|
|
1509
1513
|
}), i = C(() => e.form.reduce((y, $) => ($.rule && (y[$.key] = $.rule), y), {}));
|
|
1510
1514
|
function h() {
|
|
1511
1515
|
var $;
|
|
1512
1516
|
if (e.columns)
|
|
1513
1517
|
return;
|
|
1514
1518
|
const y = ($ = l.value) == null ? void 0 : $.$el;
|
|
1515
|
-
y && (
|
|
1519
|
+
y && (o.value = Math.max(Math.floor(y.offsetWidth / e.minWidth), 1));
|
|
1516
1520
|
}
|
|
1517
1521
|
function m() {
|
|
1518
1522
|
var $;
|
|
@@ -1544,7 +1548,7 @@ const ve = /* @__PURE__ */ V({
|
|
|
1544
1548
|
...t.value
|
|
1545
1549
|
});
|
|
1546
1550
|
}
|
|
1547
|
-
function
|
|
1551
|
+
function j() {
|
|
1548
1552
|
var y;
|
|
1549
1553
|
(y = l.value) == null || y.resetFields();
|
|
1550
1554
|
}
|
|
@@ -1557,15 +1561,15 @@ const ve = /* @__PURE__ */ V({
|
|
|
1557
1561
|
}), {
|
|
1558
1562
|
formSource: t,
|
|
1559
1563
|
formInstance: l,
|
|
1560
|
-
formColumns:
|
|
1564
|
+
formColumns: o,
|
|
1561
1565
|
formRules: i,
|
|
1562
1566
|
formCollspased: n,
|
|
1563
1567
|
formActiosSpan: c,
|
|
1564
|
-
formItems:
|
|
1568
|
+
formItems: u,
|
|
1565
1569
|
toggleFormCollapsed: p,
|
|
1566
1570
|
updateFormField: _,
|
|
1567
1571
|
updateFormSource: g,
|
|
1568
|
-
reset:
|
|
1572
|
+
reset: j,
|
|
1569
1573
|
validate: I,
|
|
1570
1574
|
onSubmitSuccess: s,
|
|
1571
1575
|
openCollapsedDialog: w,
|
|
@@ -1606,18 +1610,18 @@ const ve = /* @__PURE__ */ V({
|
|
|
1606
1610
|
onClick: this.toggleFormCollapsed
|
|
1607
1611
|
}, {
|
|
1608
1612
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
1609
|
-
icon: () => this.formCollspased ? v(
|
|
1613
|
+
icon: () => this.formCollspased ? v(jt, null, null) : v(Et, null, null)
|
|
1610
1614
|
})), this.collapsedMode === "dialog" && r.push(v(W, {
|
|
1611
1615
|
onClick: this.openCollapsedDialog
|
|
1612
1616
|
}, {
|
|
1613
1617
|
default: () => "高级搜索",
|
|
1614
1618
|
icon: () => v(qt, null, null)
|
|
1615
1619
|
}))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
|
|
1616
|
-
return v(
|
|
1617
|
-
default: () => [v(
|
|
1620
|
+
return v(xe, l, {
|
|
1621
|
+
default: () => [v(je, {
|
|
1618
1622
|
contentClass: this.footer ? "form-footer" : ""
|
|
1619
1623
|
}, {
|
|
1620
|
-
default: () => [v(Ct, null,
|
|
1624
|
+
default: () => [v(Ct, null, Oe(r) ? r : {
|
|
1621
1625
|
default: () => [r]
|
|
1622
1626
|
})]
|
|
1623
1627
|
})]
|
|
@@ -1628,7 +1632,7 @@ const ve = /* @__PURE__ */ V({
|
|
|
1628
1632
|
}, [v(Or, {
|
|
1629
1633
|
ref: (r) => this.modalInstance = r
|
|
1630
1634
|
}, {
|
|
1631
|
-
default: () => [v(wt,
|
|
1635
|
+
default: () => [v(wt, ge({
|
|
1632
1636
|
name: this.name
|
|
1633
1637
|
}, {
|
|
1634
1638
|
labelAlign: "right",
|
|
@@ -1646,9 +1650,9 @@ const ve = /* @__PURE__ */ V({
|
|
|
1646
1650
|
}, {
|
|
1647
1651
|
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
|
|
1648
1652
|
let l;
|
|
1649
|
-
return v(
|
|
1653
|
+
return v(xe, {
|
|
1650
1654
|
span: r.span
|
|
1651
|
-
},
|
|
1655
|
+
}, Oe(l = Hr(this.formSource, r)) ? l : {
|
|
1652
1656
|
default: () => [l]
|
|
1653
1657
|
});
|
|
1654
1658
|
}), e()]
|
|
@@ -1663,8 +1667,8 @@ function Zr(e) {
|
|
|
1663
1667
|
function el(e) {
|
|
1664
1668
|
const r = U(), l = x();
|
|
1665
1669
|
function t() {
|
|
1666
|
-
var
|
|
1667
|
-
const a = (n = (
|
|
1670
|
+
var o, n;
|
|
1671
|
+
const a = (n = (o = r == null ? void 0 : r.proxy) == null ? void 0 : o.$refs) == null ? void 0 : n[e];
|
|
1668
1672
|
a && (l.value = a);
|
|
1669
1673
|
}
|
|
1670
1674
|
return B(t), at(t), l;
|