@gopowerteam/form-render 0.0.86 → 0.0.87
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 +1 -2
- package/dist/cjs/form-render/index.d.ts +192 -3
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-render/form-collapsed-dialog.d.ts +1 -2
- package/dist/es/form-render/index.d.ts +192 -3
- package/dist/es/index.mjs +197 -197
- package/package.json +4 -4
package/dist/es/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getCurrentInstance as q, inject as pe, defineComponent as E, computed as
|
|
2
|
-
import { DatePicker as pt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as
|
|
1
|
+
import { getCurrentInstance as q, inject as pe, defineComponent as E, computed as O, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as z, createElementVNode as x, shallowRef as B, ref as _, provide as he, onMounted as W, Fragment as re, renderSlot as tt, createBlock as ne, Teleport as rt, createVNode as f, TransitionGroup as nt, withCtx as lt, renderList as at, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as ut, triggerRef as Q, useCssVars as ot, onUnmounted as ct, withModifiers as it, toDisplayString as A, resolveDynamicComponent as Ee, normalizeProps as st, guardReactiveProps as dt, watch as Z, unref as Re, isRef as ae, toRefs as ft, customRef as mt, nextTick as ze, getCurrentScope as ht, onScopeDispose as vt, pushScopeId as Ae, popScopeId as Be, isVNode as be, createTextVNode as I, h as Fe, onUpdated as yt } from "vue";
|
|
2
|
+
import { DatePicker as pt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as _t, RangePicker as $t, Textarea as Ot, TreeSelect as Ft, Cascader as Yt, FormItem as ve, Divider as Ye, Button as D, Tabs as Mt, TabPane as Tt, Form as Pt, Grid as Lt, GridItem as ce, Space as Me, Tag as jt } from "@arco-design/web-vue";
|
|
3
3
|
import S from "dayjs";
|
|
4
|
-
import { FormRenderResolver as
|
|
4
|
+
import { FormRenderResolver as Cn } from "./resolver.mjs";
|
|
5
5
|
const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
|
|
6
6
|
var n, r, t;
|
|
7
7
|
const a = q(), u = pe(It, void 0);
|
|
@@ -44,9 +44,9 @@ const zt = E({
|
|
|
44
44
|
setup(e, {
|
|
45
45
|
emit: n
|
|
46
46
|
}) {
|
|
47
|
-
const r = ke("icon"), t =
|
|
47
|
+
const r = ke("icon"), t = O(() => [r, `${r}-down`, {
|
|
48
48
|
[`${r}-spin`]: e.spin
|
|
49
|
-
}]), a =
|
|
49
|
+
}]), a = O(() => {
|
|
50
50
|
const l = {};
|
|
51
51
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
52
52
|
});
|
|
@@ -58,9 +58,11 @@ const zt = E({
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"]
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ x("path", {
|
|
62
|
+
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
+
}, null, -1), Vt = [Bt];
|
|
64
|
+
function Nt(e, n, r, t, a, u) {
|
|
65
|
+
return $(), T("svg", {
|
|
64
66
|
viewBox: "0 0 48 48",
|
|
65
67
|
fill: "none",
|
|
66
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -71,18 +73,16 @@ function Bt(e, n, r, t, a, u) {
|
|
|
71
73
|
"stroke-linecap": e.strokeLinecap,
|
|
72
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
73
75
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
74
|
-
},
|
|
75
|
-
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
76
|
-
}, null, -1)]), 14, At);
|
|
76
|
+
}, Vt, 14, At);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(zt, [["render",
|
|
79
|
-
const
|
|
78
|
+
var ie = /* @__PURE__ */ xe(zt, [["render", Nt]]);
|
|
79
|
+
const Ut = 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
|
+
}), qt = E({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -111,9 +111,9 @@ const Vt = Object.assign(ie, {
|
|
|
111
111
|
setup(e, {
|
|
112
112
|
emit: n
|
|
113
113
|
}) {
|
|
114
|
-
const r = ke("icon"), t =
|
|
114
|
+
const r = ke("icon"), t = O(() => [r, `${r}-up`, {
|
|
115
115
|
[`${r}-spin`]: e.spin
|
|
116
|
-
}]), a =
|
|
116
|
+
}]), a = O(() => {
|
|
117
117
|
const l = {};
|
|
118
118
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
119
119
|
});
|
|
@@ -125,9 +125,11 @@ const Vt = Object.assign(ie, {
|
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
}), Wt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Ht = /* @__PURE__ */ x("path", {
|
|
129
|
+
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
|
+
}, null, -1), Gt = [Ht];
|
|
131
|
+
function Kt(e, n, r, t, a, u) {
|
|
132
|
+
return $(), T("svg", {
|
|
131
133
|
viewBox: "0 0 48 48",
|
|
132
134
|
fill: "none",
|
|
133
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -138,18 +140,16 @@ function qt(e, n, r, t, a, u) {
|
|
|
138
140
|
"stroke-linecap": e.strokeLinecap,
|
|
139
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
140
142
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
141
|
-
},
|
|
142
|
-
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
143
|
-
}, null, -1)]), 14, Ut);
|
|
143
|
+
}, Gt, 14, Wt);
|
|
144
144
|
}
|
|
145
|
-
var se = /* @__PURE__ */ xe(
|
|
146
|
-
const
|
|
145
|
+
var se = /* @__PURE__ */ xe(qt, [["render", Kt]]);
|
|
146
|
+
const Xt = 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
|
-
}),
|
|
152
|
+
}), Jt = E({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -178,9 +178,9 @@ const Wt = Object.assign(se, {
|
|
|
178
178
|
setup(e, {
|
|
179
179
|
emit: n
|
|
180
180
|
}) {
|
|
181
|
-
const r = ke("icon"), t =
|
|
181
|
+
const r = ke("icon"), t = O(() => [r, `${r}-search`, {
|
|
182
182
|
[`${r}-spin`]: e.spin
|
|
183
|
-
}]), a =
|
|
183
|
+
}]), a = O(() => {
|
|
184
184
|
const l = {};
|
|
185
185
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
186
186
|
});
|
|
@@ -192,9 +192,11 @@ const Wt = Object.assign(se, {
|
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
}), Qt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Zt = /* @__PURE__ */ x("path", {
|
|
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
|
+
}, null, -1), er = [Zt];
|
|
198
|
+
function tr(e, n, r, t, a, u) {
|
|
199
|
+
return $(), T("svg", {
|
|
198
200
|
viewBox: "0 0 48 48",
|
|
199
201
|
fill: "none",
|
|
200
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -205,12 +207,10 @@ function Kt(e, n, r, t, a, u) {
|
|
|
205
207
|
"stroke-linecap": e.strokeLinecap,
|
|
206
208
|
"stroke-linejoin": e.strokeLinejoin,
|
|
207
209
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
208
|
-
},
|
|
209
|
-
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"
|
|
210
|
-
}, null, -1)]), 14, Gt);
|
|
210
|
+
}, er, 14, Qt);
|
|
211
211
|
}
|
|
212
|
-
var de = /* @__PURE__ */ xe(
|
|
213
|
-
const
|
|
212
|
+
var de = /* @__PURE__ */ xe(Jt, [["render", tr]]);
|
|
213
|
+
const rr = Object.assign(de, {
|
|
214
214
|
install: (e, n) => {
|
|
215
215
|
var r;
|
|
216
216
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
@@ -225,12 +225,12 @@ function M(e) {
|
|
|
225
225
|
}
|
|
226
226
|
const Ue = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
|
-
const
|
|
228
|
+
const nr = Object.prototype.toString, lr = (e) => nr.call(e) === "[object Object]", ar = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function ur(e) {
|
|
231
231
|
return q();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function or(e, n = {}) {
|
|
234
234
|
if (!ae(e))
|
|
235
235
|
return ft(e);
|
|
236
236
|
const r = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
@@ -255,8 +255,8 @@ function tr(e, n = {}) {
|
|
|
255
255
|
}));
|
|
256
256
|
return r;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
258
|
+
function cr(e, n = !0, r) {
|
|
259
|
+
ur() ? W(e, r) : n ? e() : ze(e);
|
|
260
260
|
}
|
|
261
261
|
function V(e) {
|
|
262
262
|
var n;
|
|
@@ -267,7 +267,7 @@ const ue = Ue ? 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)
|
|
270
|
-
return
|
|
270
|
+
return ar;
|
|
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;
|
|
@@ -276,7 +276,7 @@ function fe(...e) {
|
|
|
276
276
|
([o, s]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const d =
|
|
279
|
+
const d = lr(s) ? { ...s } : s;
|
|
280
280
|
u.push(
|
|
281
281
|
...r.flatMap((m) => t.map((v) => i(o, m, v, d)))
|
|
282
282
|
);
|
|
@@ -287,17 +287,17 @@ function fe(...e) {
|
|
|
287
287
|
};
|
|
288
288
|
return Ne(c), c;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
const e =
|
|
290
|
+
function ir() {
|
|
291
|
+
const e = _(!1), n = q();
|
|
292
292
|
return n && W(() => {
|
|
293
293
|
e.value = !0;
|
|
294
294
|
}, n), e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const n =
|
|
298
|
-
return
|
|
296
|
+
function sr(e) {
|
|
297
|
+
const n = ir();
|
|
298
|
+
return O(() => (n.value, !!e()));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function dr(e, n = {}) {
|
|
301
301
|
var r, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
@@ -312,9 +312,9 @@ function ar(e, n = {}) {
|
|
|
312
312
|
draggingElement: m = ue,
|
|
313
313
|
containerElement: v,
|
|
314
314
|
handle: w = e
|
|
315
|
-
} = n, p =
|
|
315
|
+
} = n, p = _(
|
|
316
316
|
(r = M(s)) != null ? r : { x: 0, y: 0 }
|
|
317
|
-
), C =
|
|
317
|
+
), C = _(), L = (b) => a ? a.includes(b.pointerType) : !0, P = (b) => {
|
|
318
318
|
M(u) && b.preventDefault(), M(l) && b.stopPropagation();
|
|
319
319
|
}, R = (b) => {
|
|
320
320
|
var g;
|
|
@@ -342,20 +342,20 @@ function ar(e, n = {}) {
|
|
|
342
342
|
fe(w, "pointerdown", R, b), fe(m, "pointermove", H, b), fe(m, "pointerup", N, b);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...
|
|
345
|
+
...or(p),
|
|
346
346
|
position: p,
|
|
347
|
-
isDragging:
|
|
348
|
-
style:
|
|
347
|
+
isDragging: O(() => !!C.value),
|
|
348
|
+
style: O(
|
|
349
349
|
() => `left:${p.value.x}px;top:${p.value.y}px;`
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function fr(e, n, r = {}) {
|
|
354
354
|
const { window: t = ue, ...a } = r;
|
|
355
355
|
let u;
|
|
356
|
-
const l =
|
|
356
|
+
const l = sr(() => t && "ResizeObserver" in t), i = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
}, h =
|
|
358
|
+
}, h = O(() => Array.isArray(e) ? e.map((s) => V(s)) : [V(e)]), c = Z(
|
|
359
359
|
h,
|
|
360
360
|
(s) => {
|
|
361
361
|
if (i(), l.value && t) {
|
|
@@ -374,10 +374,10 @@ function ur(e, n, r = {}) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
377
|
-
const { window: t = ue, box: a = "content-box" } = r, u =
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = r, u = O(() => {
|
|
378
378
|
var s, d;
|
|
379
379
|
return (d = (s = V(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
380
|
-
}), l =
|
|
380
|
+
}), l = _(n.width), i = _(n.height), { stop: h } = fr(
|
|
381
381
|
e,
|
|
382
382
|
([s]) => {
|
|
383
383
|
const d = a === "border-box" ? s.borderBoxSize : a === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
@@ -395,7 +395,7 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
395
395
|
},
|
|
396
396
|
r
|
|
397
397
|
);
|
|
398
|
-
|
|
398
|
+
cr(() => {
|
|
399
399
|
const s = V(e);
|
|
400
400
|
s && (l.value = "offsetWidth" in s ? s.offsetWidth : n.width, i.value = "offsetHeight" in s ? s.offsetHeight : n.height);
|
|
401
401
|
});
|
|
@@ -414,21 +414,21 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const mr = (e) => (Ae("data-v-37f80068"), e = e(), Be(), e), hr = { class: "title text-16px font-bold" }, vr = { class: "action" }, yr = ["form"], pr = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, gr = /* @__PURE__ */ mr(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
421
421
|
/* @__PURE__ */ x("div"),
|
|
422
422
|
/* @__PURE__ */ x("div"),
|
|
423
423
|
/* @__PURE__ */ x("div"),
|
|
424
424
|
/* @__PURE__ */ x("div")
|
|
425
|
-
], -1)),
|
|
426
|
-
|
|
427
|
-
],
|
|
425
|
+
], -1)), br = [
|
|
426
|
+
gr
|
|
427
|
+
], kr = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !1
|
|
430
|
-
},
|
|
431
|
-
...
|
|
430
|
+
}, wr = /* @__PURE__ */ E({
|
|
431
|
+
...kr,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
434
434
|
form: {},
|
|
@@ -463,11 +463,11 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
463
463
|
emits: ["submit"],
|
|
464
464
|
setup(e, { expose: n, emit: r }) {
|
|
465
465
|
ot((y) => ({
|
|
466
|
-
|
|
466
|
+
b09c48b4: y.zIndex
|
|
467
467
|
}));
|
|
468
|
-
const t = e, a = r, u = pe(Ce), l =
|
|
468
|
+
const t = e, a = r, u = pe(Ce), l = _(!1);
|
|
469
469
|
let i = 0, h = 0;
|
|
470
|
-
const c = B(), o = B(), s = B(), d = B(), m = B(), v = B(), { height: w } = G(c), { height: p } = G(s, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: L } = G(m), { height: P } = G(v), { x: R, y: H } =
|
|
470
|
+
const c = B(), o = B(), s = B(), d = B(), m = B(), v = B(), { height: w } = G(c), { height: p } = G(s, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: L } = G(m), { height: P } = G(v), { x: R, y: H } = dr(s, {
|
|
471
471
|
initialValue: { x: 0, y: 0 }
|
|
472
472
|
});
|
|
473
473
|
function N() {
|
|
@@ -476,7 +476,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
476
476
|
function b(y) {
|
|
477
477
|
return typeof y == "number" ? `${y}px` : y;
|
|
478
478
|
}
|
|
479
|
-
const g =
|
|
479
|
+
const g = O(() => {
|
|
480
480
|
const y = {};
|
|
481
481
|
return t.mode === "dialog" && (y.justifyContent = "center"), t.mode === "drawer" && (y.justifyContent = {
|
|
482
482
|
left: "flex-start",
|
|
@@ -489,15 +489,15 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
489
489
|
top: "column",
|
|
490
490
|
bottom: "column"
|
|
491
491
|
}[t.position]), y;
|
|
492
|
-
}), k =
|
|
492
|
+
}), k = O(() => {
|
|
493
493
|
const y = {};
|
|
494
494
|
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? y.maxHeight = b(t.maxHeight) : (y.width = b(t.sizes[t.size]), y.maxWidth = b(t.maxWidth)), t.width && (y.width = b(t.width)), t.height && (y.height = b(t.height)), t.fullscreen && (y.maxWidth = "unset", y.width = "100%", y.position = "fixed", y.top = 0, y.left = 0, y.bottom = 0, y.right = 0, y.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (y.transform = `translate3d(${R.value - i}px, ${H.value - h}px, 0px)`), t.mode === "drawer" && (y.borderRadius = 0, ["left", "right"].includes(t.position) ? y.height = "100%" : y.width = "100%"), t.offset && t.mode === "dialog" && (y.marginLeft = `${t.offset.x || 0}px`, y.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (y.backgroundColor = t.backgroundColor), y;
|
|
495
|
-
}), F =
|
|
495
|
+
}), F = O(() => {
|
|
496
496
|
const y = {};
|
|
497
497
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (y.cursor = "move"), y;
|
|
498
|
-
}), Y =
|
|
499
|
-
const y = {}, j = L.value + P.value + p.value + C.value,
|
|
500
|
-
return t.maxHeight && (y.maxHeight = `${
|
|
498
|
+
}), Y = O(() => {
|
|
499
|
+
const y = {}, j = L.value + P.value + p.value + C.value, Oe = Math.floor(w.value * (Number(b(t.maxHeight).replace("%", "")) / 100));
|
|
500
|
+
return t.maxHeight && (y.maxHeight = `${Oe - j}px`), t.mode === "drawer" && (y.maxHeight = "unset", ["left", "right"].includes(t.position) && (y.height = `${w.value - j}px`)), t.fullscreen && (y.maxHeight = "unset", y.height = `calc(100% - ${j}px)`), t.type !== "component" && (y.padding = "0"), t.bodyStyle && Object.assign(y, t.bodyStyle), y;
|
|
501
501
|
});
|
|
502
502
|
function ee() {
|
|
503
503
|
const y = o.value;
|
|
@@ -533,20 +533,20 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
533
533
|
}), ct(() => {
|
|
534
534
|
});
|
|
535
535
|
function et() {
|
|
536
|
-
return l.value = !0, () =>
|
|
536
|
+
return l.value = !0, () => $e();
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function $e() {
|
|
539
539
|
l.value = !1;
|
|
540
540
|
}
|
|
541
541
|
return n({
|
|
542
542
|
showLoading: et,
|
|
543
|
-
hideLoading:
|
|
544
|
-
}), (y, j) => (
|
|
543
|
+
hideLoading: $e
|
|
544
|
+
}), (y, j) => ($(), T("div", {
|
|
545
545
|
ref_key: "wrapperRef",
|
|
546
546
|
ref: c,
|
|
547
547
|
class: "modal-wrapper",
|
|
548
548
|
style: z(g.value),
|
|
549
|
-
onClick: j[0] || (j[0] = it((
|
|
549
|
+
onClick: j[0] || (j[0] = it((Oe) => y.maskClosable && N(), ["self"]))
|
|
550
550
|
}, [
|
|
551
551
|
x("div", {
|
|
552
552
|
ref_key: "contentRef",
|
|
@@ -554,7 +554,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
554
554
|
class: le(["modal-content", { [`${y.mode}-mode`]: !0, [`${y.position}-position`]: !0 }]),
|
|
555
555
|
style: z(k.value)
|
|
556
556
|
}, [
|
|
557
|
-
y.header ? (
|
|
557
|
+
y.header ? ($(), T("div", {
|
|
558
558
|
key: 0,
|
|
559
559
|
ref_key: "headerRef",
|
|
560
560
|
ref: s,
|
|
@@ -562,9 +562,9 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
562
562
|
style: z(F.value),
|
|
563
563
|
onMousedown: Ze
|
|
564
564
|
}, [
|
|
565
|
-
x("div",
|
|
566
|
-
x("div",
|
|
567
|
-
y.closeable ? (
|
|
565
|
+
x("div", hr, A(y.title), 1),
|
|
566
|
+
x("div", vr, [
|
|
567
|
+
y.closeable ? ($(), T("div", {
|
|
568
568
|
key: 0,
|
|
569
569
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
570
570
|
onClick: N
|
|
@@ -580,14 +580,14 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
580
580
|
class: "modal-body",
|
|
581
581
|
style: z(Y.value)
|
|
582
582
|
}, [
|
|
583
|
-
(
|
|
583
|
+
($(), ne(Ee(y.component), st(dt(y.componentProps)), null, 16))
|
|
584
584
|
], 4),
|
|
585
585
|
x("div", {
|
|
586
586
|
id: "modal-footer-slot",
|
|
587
587
|
ref_key: "footerSlotRef",
|
|
588
588
|
ref: v
|
|
589
589
|
}, null, 512),
|
|
590
|
-
y.footer ? (
|
|
590
|
+
y.footer ? ($(), T("div", {
|
|
591
591
|
key: 1,
|
|
592
592
|
ref_key: "footerRef",
|
|
593
593
|
ref: d,
|
|
@@ -601,11 +601,11 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
601
601
|
x("button", {
|
|
602
602
|
class: "submit-button",
|
|
603
603
|
form: y.form,
|
|
604
|
-
type: "
|
|
604
|
+
type: "submit",
|
|
605
605
|
onClick: ee
|
|
606
|
-
}, A(y.submitText), 9,
|
|
606
|
+
}, A(y.submitText), 9, yr)
|
|
607
607
|
], 512)) : U("", !0),
|
|
608
|
-
l.value ? (
|
|
608
|
+
l.value ? ($(), T("div", pr, br)) : U("", !0)
|
|
609
609
|
], 6)
|
|
610
610
|
], 4));
|
|
611
611
|
}
|
|
@@ -614,7 +614,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
614
614
|
for (const [t, a] of n)
|
|
615
615
|
r[t] = a;
|
|
616
616
|
return r;
|
|
617
|
-
},
|
|
617
|
+
}, xr = /* @__PURE__ */ oe(wr, [["__scopeId", "data-v-37f80068"]]), Cr = { class: "modal-dialog" }, Sr = { class: "dialog-body" }, _r = { class: "dialog-title" }, $r = { class: "dialog-content" }, Or = /* @__PURE__ */ E({
|
|
618
618
|
__name: "modal-dialog",
|
|
619
619
|
props: {
|
|
620
620
|
type: {},
|
|
@@ -627,7 +627,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
627
627
|
footer: {}
|
|
628
628
|
},
|
|
629
629
|
setup(e) {
|
|
630
|
-
const n = e, r = qe(), t =
|
|
630
|
+
const n = e, r = qe(), t = O(() => n.title ? n.title : {
|
|
631
631
|
confirm: "提示",
|
|
632
632
|
info: "提示",
|
|
633
633
|
warning: "警告",
|
|
@@ -640,22 +640,22 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
640
640
|
async function u() {
|
|
641
641
|
n.onCancel && await n.onCancel(), r.close();
|
|
642
642
|
}
|
|
643
|
-
return (l, i) => (
|
|
644
|
-
x("div",
|
|
645
|
-
x("div",
|
|
646
|
-
x("div",
|
|
643
|
+
return (l, i) => ($(), T("section", Cr, [
|
|
644
|
+
x("div", Sr, [
|
|
645
|
+
x("div", _r, A(t.value), 1),
|
|
646
|
+
x("div", $r, A(l.content), 1)
|
|
647
647
|
]),
|
|
648
648
|
x("div", {
|
|
649
649
|
class: "dialog-footer space-x-2",
|
|
650
650
|
style: z(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
651
651
|
}, [
|
|
652
|
-
l.footer ? (
|
|
652
|
+
l.footer ? ($(), ne(Ee(l.footer), { key: 0 })) : ($(), T(re, { key: 1 }, [
|
|
653
653
|
x("button", {
|
|
654
654
|
class: "submit-button",
|
|
655
|
-
type: "
|
|
655
|
+
type: "button",
|
|
656
656
|
onClick: a
|
|
657
657
|
}, A(l.okText), 1),
|
|
658
|
-
l.type === "confirm" ? (
|
|
658
|
+
l.type === "confirm" ? ($(), T("button", {
|
|
659
659
|
key: 0,
|
|
660
660
|
class: "cancel-button",
|
|
661
661
|
type: "button",
|
|
@@ -665,32 +665,32 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
665
665
|
], 4)
|
|
666
666
|
]));
|
|
667
667
|
}
|
|
668
|
-
}),
|
|
668
|
+
}), Fr = /* @__PURE__ */ oe(Or, [["__scopeId", "data-v-3efc8aed"]]), Yr = (e) => (Ae("data-v-559bdf2e"), e = e(), Be(), e), Mr = { class: "flex-center" }, Tr = /* @__PURE__ */ Yr(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
|
|
669
669
|
/* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
670
670
|
/* @__PURE__ */ x("div"),
|
|
671
671
|
/* @__PURE__ */ x("div"),
|
|
672
672
|
/* @__PURE__ */ x("div"),
|
|
673
673
|
/* @__PURE__ */ x("div")
|
|
674
674
|
])
|
|
675
|
-
], -1)),
|
|
675
|
+
], -1)), Pr = { class: "modal-loading-text" }, Lr = /* @__PURE__ */ E({
|
|
676
676
|
__name: "modal-loading",
|
|
677
677
|
props: {
|
|
678
678
|
text: { default: "加载中" }
|
|
679
679
|
},
|
|
680
680
|
setup(e) {
|
|
681
|
-
return (n, r) => (
|
|
682
|
-
|
|
683
|
-
x("div",
|
|
681
|
+
return (n, r) => ($(), T("section", Mr, [
|
|
682
|
+
Tr,
|
|
683
|
+
x("div", Pr, A(n.text), 1)
|
|
684
684
|
]));
|
|
685
685
|
}
|
|
686
|
-
}),
|
|
686
|
+
}), jr = /* @__PURE__ */ oe(Lr, [["__scopeId", "data-v-559bdf2e"]]), Ir = {
|
|
687
687
|
key: 0,
|
|
688
688
|
class: "modal-teleport"
|
|
689
|
-
},
|
|
689
|
+
}, Dr = {
|
|
690
690
|
name: "ModalProvider",
|
|
691
691
|
inheritAttrs: !1
|
|
692
|
-
},
|
|
693
|
-
...
|
|
692
|
+
}, Er = /* @__PURE__ */ E({
|
|
693
|
+
...Dr,
|
|
694
694
|
props: {
|
|
695
695
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
696
696
|
sizes: { default: () => ({
|
|
@@ -703,10 +703,10 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
703
703
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
704
704
|
},
|
|
705
705
|
setup(e, { expose: n }) {
|
|
706
|
-
const r = B([]), t =
|
|
706
|
+
const r = B([]), t = _(!1), a = q();
|
|
707
707
|
function u(d, m = {}, v = {}) {
|
|
708
708
|
const w = ut(
|
|
709
|
-
() => Promise.resolve(typeof d == "string" ?
|
|
709
|
+
() => Promise.resolve(typeof d == "string" ? Fr : d)
|
|
710
710
|
);
|
|
711
711
|
typeof d == "string" && (m.type = d, v.size = "small", v.fullscreen = !1, v.mode = "dialog", v.footer = !1, v.header = !1);
|
|
712
712
|
const p = Math.random().toString(32).slice(2), C = Object.assign({
|
|
@@ -767,7 +767,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
767
767
|
if (v)
|
|
768
768
|
return v.showLoading();
|
|
769
769
|
{
|
|
770
|
-
const { close: w } = u(
|
|
770
|
+
const { close: w } = u(jr, {
|
|
771
771
|
text: m == null ? void 0 : m.text
|
|
772
772
|
}, {
|
|
773
773
|
footer: !1,
|
|
@@ -811,16 +811,16 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
811
811
|
closeAll: i
|
|
812
812
|
}), W(() => {
|
|
813
813
|
t.value = !0;
|
|
814
|
-
}), (d, m) => (
|
|
814
|
+
}), (d, m) => ($(), T(re, null, [
|
|
815
815
|
tt(d.$slots, "default", {}, void 0, !0),
|
|
816
|
-
t.value ? (
|
|
817
|
-
(
|
|
816
|
+
t.value ? ($(), T("div", Ir, [
|
|
817
|
+
($(), ne(rt, {
|
|
818
818
|
disabled: !d.appendToBody,
|
|
819
819
|
to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
|
|
820
820
|
}, [
|
|
821
821
|
f(nt, { name: "modal-fade" }, {
|
|
822
822
|
default: lt(() => [
|
|
823
|
-
(
|
|
823
|
+
($(!0), T(re, null, at(r.value, (v) => ($(), ne(xr, ge({
|
|
824
824
|
id: v.id,
|
|
825
825
|
key: v.id,
|
|
826
826
|
ref_for: !0,
|
|
@@ -841,7 +841,7 @@ const or = (e) => (Ae("data-v-e065fedd"), e = e(), Be(), e), cr = { class: "titl
|
|
|
841
841
|
])) : U("", !0)
|
|
842
842
|
], 64));
|
|
843
843
|
}
|
|
844
|
-
}),
|
|
844
|
+
}), Rr = /* @__PURE__ */ oe(Er, [["__scopeId", "data-v-448d3772"]]);
|
|
845
845
|
function me(e, n) {
|
|
846
846
|
var r, t;
|
|
847
847
|
let a = e == null ? void 0 : e.parent;
|
|
@@ -907,8 +907,8 @@ const Te = {
|
|
|
907
907
|
id: Symbol("ID"),
|
|
908
908
|
source: Symbol("Source")
|
|
909
909
|
};
|
|
910
|
-
function
|
|
911
|
-
const r =
|
|
910
|
+
function zr(e, n) {
|
|
911
|
+
const r = _({});
|
|
912
912
|
return e == null || e.forEach((a) => {
|
|
913
913
|
let u = null;
|
|
914
914
|
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), n && n[a.key] !== void 0 && (u = n[a.key]), r.value[a.key] = u;
|
|
@@ -920,7 +920,7 @@ var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
920
920
|
function We(e) {
|
|
921
921
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
922
922
|
}
|
|
923
|
-
var
|
|
923
|
+
var Ar = { exports: {} };
|
|
924
924
|
(function(e, n) {
|
|
925
925
|
(function(r, t) {
|
|
926
926
|
e.exports = t(S);
|
|
@@ -976,7 +976,7 @@ var jr = { exports: {} };
|
|
|
976
976
|
};
|
|
977
977
|
return a.default.locale(u, null, !0), u;
|
|
978
978
|
});
|
|
979
|
-
})(
|
|
979
|
+
})(Ar);
|
|
980
980
|
var He = { exports: {} };
|
|
981
981
|
(function(e, n) {
|
|
982
982
|
(function(r, t) {
|
|
@@ -1002,8 +1002,8 @@ var He = { exports: {} };
|
|
|
1002
1002
|
};
|
|
1003
1003
|
});
|
|
1004
1004
|
})(He);
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
1005
|
+
var Br = He.exports;
|
|
1006
|
+
const Vr = /* @__PURE__ */ We(Br);
|
|
1007
1007
|
var Ge = { exports: {} };
|
|
1008
1008
|
(function(e, n) {
|
|
1009
1009
|
(function(r, t) {
|
|
@@ -1031,14 +1031,14 @@ var Ge = { exports: {} };
|
|
|
1031
1031
|
};
|
|
1032
1032
|
});
|
|
1033
1033
|
})(Ge);
|
|
1034
|
-
var
|
|
1035
|
-
const
|
|
1036
|
-
S.extend(
|
|
1037
|
-
S.extend(
|
|
1034
|
+
var Nr = Ge.exports;
|
|
1035
|
+
const Ur = /* @__PURE__ */ We(Nr);
|
|
1036
|
+
S.extend(Vr);
|
|
1037
|
+
S.extend(Ur);
|
|
1038
1038
|
S.locale("zh-cn", {
|
|
1039
1039
|
weekStart: 1
|
|
1040
1040
|
});
|
|
1041
|
-
function
|
|
1041
|
+
function qr(e) {
|
|
1042
1042
|
function n(r, t) {
|
|
1043
1043
|
return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
|
|
1044
1044
|
}
|
|
@@ -1123,7 +1123,7 @@ function Pe(e) {
|
|
|
1123
1123
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1124
1124
|
const Le = () => {
|
|
1125
1125
|
};
|
|
1126
|
-
function
|
|
1126
|
+
function Wr(e, n) {
|
|
1127
1127
|
function r(...t) {
|
|
1128
1128
|
return new Promise((a, u) => {
|
|
1129
1129
|
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(a).catch(u);
|
|
@@ -1131,7 +1131,7 @@ function Ar(e, n) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
return r;
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function Hr(e, n = {}) {
|
|
1135
1135
|
let r, t, a = Le;
|
|
1136
1136
|
const u = (i) => {
|
|
1137
1137
|
clearTimeout(i), a(), a = Le;
|
|
@@ -1147,20 +1147,20 @@ function Br(e, n = {}) {
|
|
|
1147
1147
|
});
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1152
|
-
|
|
1150
|
+
function Gr(e, n = 200, r = {}) {
|
|
1151
|
+
return Wr(
|
|
1152
|
+
Hr(n, r),
|
|
1153
1153
|
e
|
|
1154
1154
|
);
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function _e(e, n, r) {
|
|
1157
1157
|
const t = Z(e, (...a) => (ze(() => t()), n(...a)), r);
|
|
1158
1158
|
return t;
|
|
1159
1159
|
}
|
|
1160
|
-
const
|
|
1160
|
+
const Kr = Gr((e) => {
|
|
1161
1161
|
e && e.dispatchEvent(new Event("submit"));
|
|
1162
1162
|
}, 1e3);
|
|
1163
|
-
function
|
|
1163
|
+
function Xr(e) {
|
|
1164
1164
|
let n;
|
|
1165
1165
|
return (r, t) => {
|
|
1166
1166
|
function a() {
|
|
@@ -1174,7 +1174,7 @@ function Ur(e) {
|
|
|
1174
1174
|
i = i.$parent;
|
|
1175
1175
|
if (i && i.$el) {
|
|
1176
1176
|
const h = i.$el;
|
|
1177
|
-
|
|
1177
|
+
Kr(h);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
function l() {
|
|
@@ -1214,17 +1214,17 @@ function Ur(e) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Jr(e) {
|
|
1218
1218
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1219
1219
|
}
|
|
1220
1220
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1221
|
-
function
|
|
1222
|
-
const e =
|
|
1221
|
+
function Qr() {
|
|
1222
|
+
const e = _(/* @__PURE__ */ new Map());
|
|
1223
1223
|
return [e, (r) => e.value = r];
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Zr(e) {
|
|
1226
1226
|
let n, r = !1;
|
|
1227
|
-
const [t, a] =
|
|
1227
|
+
const [t, a] = Qr(), u = (c) => {
|
|
1228
1228
|
if (e.onChange && e.onChange(c), !e.autoSubmit || !n)
|
|
1229
1229
|
return;
|
|
1230
1230
|
let o = n;
|
|
@@ -1259,7 +1259,7 @@ function Hr(e) {
|
|
|
1259
1259
|
break;
|
|
1260
1260
|
}
|
|
1261
1261
|
case ae(e.options): {
|
|
1262
|
-
|
|
1262
|
+
_e(() => e.options, () => {
|
|
1263
1263
|
a(e.options.value);
|
|
1264
1264
|
}, {
|
|
1265
1265
|
immediate: !0
|
|
@@ -1288,7 +1288,7 @@ function Hr(e) {
|
|
|
1288
1288
|
"allow-create": e.createable,
|
|
1289
1289
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1290
1290
|
onChange: u
|
|
1291
|
-
},
|
|
1291
|
+
}, Jr(m = Array.from(t.value.entries()).map(([v, w], p) => f(St, {
|
|
1292
1292
|
key: p,
|
|
1293
1293
|
value: v,
|
|
1294
1294
|
label: w
|
|
@@ -1305,7 +1305,7 @@ function Hr(e) {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
};
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function en(e) {
|
|
1309
1309
|
let n;
|
|
1310
1310
|
function r() {
|
|
1311
1311
|
if (!(e != null && e.autoSubmit) || !n)
|
|
@@ -1322,7 +1322,7 @@ function Gr(e) {
|
|
|
1322
1322
|
return f("span", null, [i ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1323
1323
|
}
|
|
1324
1324
|
function l() {
|
|
1325
|
-
return f(
|
|
1325
|
+
return f(_t, {
|
|
1326
1326
|
ref: (i) => n = i,
|
|
1327
1327
|
modelValue: t[a.key],
|
|
1328
1328
|
"onUpdate:modelValue": (i) => t[a.key] = i,
|
|
@@ -1342,7 +1342,7 @@ function Gr(e) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function tn(e) {
|
|
1346
1346
|
return (n, r) => {
|
|
1347
1347
|
let t = [];
|
|
1348
1348
|
function a(c) {
|
|
@@ -1376,7 +1376,7 @@ function Kr(e) {
|
|
|
1376
1376
|
return f("span", null, [d(o), I(" - "), d(s)]);
|
|
1377
1377
|
}
|
|
1378
1378
|
function h() {
|
|
1379
|
-
return f("div", null, [f(
|
|
1379
|
+
return f("div", null, [f($t, {
|
|
1380
1380
|
"disabled-input": !0,
|
|
1381
1381
|
style: {
|
|
1382
1382
|
width: "300px"
|
|
@@ -1402,13 +1402,13 @@ function Kr(e) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function rn(e) {
|
|
1406
1406
|
return (n, r) => {
|
|
1407
1407
|
function t() {
|
|
1408
1408
|
return f("span", null, [n[r.key]]);
|
|
1409
1409
|
}
|
|
1410
1410
|
function a() {
|
|
1411
|
-
return f(
|
|
1411
|
+
return f(Ot, {
|
|
1412
1412
|
modelValue: n[r.key],
|
|
1413
1413
|
"onUpdate:modelValue": (u) => n[r.key] = u,
|
|
1414
1414
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
@@ -1439,7 +1439,7 @@ function Ke(e) {
|
|
|
1439
1439
|
};
|
|
1440
1440
|
return e.data.forEach(t), r;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function nn(e) {
|
|
1443
1443
|
let n = e.data;
|
|
1444
1444
|
const r = [];
|
|
1445
1445
|
return e.path.forEach((t) => {
|
|
@@ -1449,13 +1449,13 @@ function Jr(e) {
|
|
|
1449
1449
|
}), r;
|
|
1450
1450
|
}
|
|
1451
1451
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1452
|
-
function
|
|
1453
|
-
const e =
|
|
1452
|
+
function ln() {
|
|
1453
|
+
const e = _([]);
|
|
1454
1454
|
return [e, (r) => e.value = r];
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function an(e) {
|
|
1457
1457
|
let n, r = !1;
|
|
1458
|
-
const [t, a] =
|
|
1458
|
+
const [t, a] = ln(), u = () => {
|
|
1459
1459
|
if (!e.autoSubmit || !n)
|
|
1460
1460
|
return;
|
|
1461
1461
|
let o = n;
|
|
@@ -1490,7 +1490,7 @@ function Zr(e) {
|
|
|
1490
1490
|
break;
|
|
1491
1491
|
}
|
|
1492
1492
|
case ae(e.options): {
|
|
1493
|
-
|
|
1493
|
+
_e(() => e.options, () => {
|
|
1494
1494
|
a(e.options.value);
|
|
1495
1495
|
}, {
|
|
1496
1496
|
immediate: !0
|
|
@@ -1556,13 +1556,13 @@ function Zr(e) {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
1558
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1559
|
-
function
|
|
1560
|
-
const e =
|
|
1559
|
+
function un() {
|
|
1560
|
+
const e = _([]);
|
|
1561
1561
|
return [e, (r) => e.value = r];
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function on(e) {
|
|
1564
1564
|
let n, r = !1;
|
|
1565
|
-
const [t, a] =
|
|
1565
|
+
const [t, a] = un(), u = () => {
|
|
1566
1566
|
if (!e.autoSubmit || !n)
|
|
1567
1567
|
return;
|
|
1568
1568
|
let c = n;
|
|
@@ -1597,7 +1597,7 @@ function tn(e) {
|
|
|
1597
1597
|
break;
|
|
1598
1598
|
}
|
|
1599
1599
|
case ae(e.options): {
|
|
1600
|
-
|
|
1600
|
+
_e(() => e.options, () => {
|
|
1601
1601
|
a(e.options.value);
|
|
1602
1602
|
}, {
|
|
1603
1603
|
immediate: !0
|
|
@@ -1615,7 +1615,7 @@ function tn(e) {
|
|
|
1615
1615
|
labelProp: "label",
|
|
1616
1616
|
valueProp: "value",
|
|
1617
1617
|
key: p
|
|
1618
|
-
}).map((L) => L.label).join("/"), w = (p) =>
|
|
1618
|
+
}).map((L) => L.label).join("/"), w = (p) => nn({
|
|
1619
1619
|
data: t.value,
|
|
1620
1620
|
labelProp: "label",
|
|
1621
1621
|
valueProp: "value",
|
|
@@ -1668,10 +1668,10 @@ function tn(e) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function cn(e) {
|
|
1672
1672
|
return (n, r) => e(n, r);
|
|
1673
1673
|
}
|
|
1674
|
-
const
|
|
1674
|
+
const sn = {
|
|
1675
1675
|
thousands: !0,
|
|
1676
1676
|
inputUnit: "元",
|
|
1677
1677
|
outputUnit: "元"
|
|
@@ -1680,9 +1680,9 @@ const nn = {
|
|
|
1680
1680
|
元: 10 ** 2,
|
|
1681
1681
|
万: 10 ** 4
|
|
1682
1682
|
};
|
|
1683
|
-
function
|
|
1683
|
+
function dn(e) {
|
|
1684
1684
|
e = {
|
|
1685
|
-
...
|
|
1685
|
+
...sn,
|
|
1686
1686
|
...e || {}
|
|
1687
1687
|
};
|
|
1688
1688
|
const n = (l) => {
|
|
@@ -1707,7 +1707,7 @@ function ln(e) {
|
|
|
1707
1707
|
return e != null && e.thousands ? t(i) : i;
|
|
1708
1708
|
}, u = (l) => l.replace(/,/g, "");
|
|
1709
1709
|
return (l, i) => {
|
|
1710
|
-
const h =
|
|
1710
|
+
const h = _(n(l[i.key]));
|
|
1711
1711
|
Z(h, (m) => {
|
|
1712
1712
|
l[i.key] = r(m);
|
|
1713
1713
|
});
|
|
@@ -1740,24 +1740,24 @@ function ln(e) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function fn() {
|
|
1744
1744
|
return {
|
|
1745
|
-
input:
|
|
1746
|
-
textarea:
|
|
1747
|
-
select:
|
|
1748
|
-
treeSelect:
|
|
1749
|
-
date:
|
|
1750
|
-
switch:
|
|
1751
|
-
dateRange:
|
|
1752
|
-
render:
|
|
1753
|
-
cascader:
|
|
1754
|
-
currency:
|
|
1745
|
+
input: Xr,
|
|
1746
|
+
textarea: rn,
|
|
1747
|
+
select: Zr,
|
|
1748
|
+
treeSelect: an,
|
|
1749
|
+
date: qr,
|
|
1750
|
+
switch: en,
|
|
1751
|
+
dateRange: tn,
|
|
1752
|
+
render: cn,
|
|
1753
|
+
cascader: on,
|
|
1754
|
+
currency: dn
|
|
1755
1755
|
};
|
|
1756
1756
|
}
|
|
1757
1757
|
function je(e, n) {
|
|
1758
1758
|
n.render || (n.render = (t) => t.input());
|
|
1759
1759
|
const r = n.render({
|
|
1760
|
-
...
|
|
1760
|
+
...fn()
|
|
1761
1761
|
});
|
|
1762
1762
|
return {
|
|
1763
1763
|
default: () => r(e, n)
|
|
@@ -1778,10 +1778,10 @@ function Ie(e, n) {
|
|
|
1778
1778
|
}, je(e, n));
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function mn(e) {
|
|
1782
1782
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1783
1783
|
}
|
|
1784
|
-
const
|
|
1784
|
+
const hn = /* @__PURE__ */ E({
|
|
1785
1785
|
props: {
|
|
1786
1786
|
form: {
|
|
1787
1787
|
type: Object,
|
|
@@ -1802,7 +1802,7 @@ const on = /* @__PURE__ */ E({
|
|
|
1802
1802
|
instance: void 0,
|
|
1803
1803
|
form: []
|
|
1804
1804
|
}, h.push(s)), s.form.push(c);
|
|
1805
|
-
}), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), u =
|
|
1805
|
+
}), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), u = _("默认");
|
|
1806
1806
|
return {
|
|
1807
1807
|
formItems: r,
|
|
1808
1808
|
groups: t,
|
|
@@ -1830,7 +1830,7 @@ const on = /* @__PURE__ */ E({
|
|
|
1830
1830
|
return f(Mt, {
|
|
1831
1831
|
"active-key": this.activeTab,
|
|
1832
1832
|
"onUpdate:active-key": (r) => this.activeTab = r
|
|
1833
|
-
},
|
|
1833
|
+
}, mn(n = this.groupForms.map((r) => f(Tt, {
|
|
1834
1834
|
title: r.group,
|
|
1835
1835
|
key: r.group
|
|
1836
1836
|
}, {
|
|
@@ -1955,11 +1955,11 @@ const ye = /* @__PURE__ */ E({
|
|
|
1955
1955
|
setup(e, {
|
|
1956
1956
|
emit: n
|
|
1957
1957
|
}) {
|
|
1958
|
-
const r =
|
|
1958
|
+
const r = _(), [t, a] = zr(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), i = _(), h = () => l.value = !l.value, c = _(""), o = _("");
|
|
1959
1959
|
he(Te.id, c), he(Te.source, t);
|
|
1960
1960
|
const s = () => {
|
|
1961
1961
|
n("submit", t.value), n("update:model-value", t.value);
|
|
1962
|
-
}, d =
|
|
1962
|
+
}, d = O(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1963
1963
|
switch (!0) {
|
|
1964
1964
|
case typeof g.visiable == "boolean":
|
|
1965
1965
|
return g.visiable;
|
|
@@ -1968,7 +1968,7 @@ const ye = /* @__PURE__ */ E({
|
|
|
1968
1968
|
default:
|
|
1969
1969
|
return !0;
|
|
1970
1970
|
}
|
|
1971
|
-
})), m =
|
|
1971
|
+
})), m = O(() => {
|
|
1972
1972
|
if (!u.value)
|
|
1973
1973
|
return 1;
|
|
1974
1974
|
const g = d.value.reduce((k, F) => k + ((F == null ? void 0 : F.span) || 1), 0);
|
|
@@ -1980,7 +1980,7 @@ const ye = /* @__PURE__ */ E({
|
|
|
1980
1980
|
if (typeof Y == "function")
|
|
1981
1981
|
return Y(t.value);
|
|
1982
1982
|
}
|
|
1983
|
-
} : g, w =
|
|
1983
|
+
} : g, w = O(() => e.form.reduce((g, k) => (k.rule && (Array.isArray(k.rule) ? g[k.key] = k.rule.map(v) : g[k.key] = v(k.rule)), g), {}));
|
|
1984
1984
|
function p() {
|
|
1985
1985
|
var k;
|
|
1986
1986
|
if (e.columns)
|
|
@@ -1994,7 +1994,7 @@ const ye = /* @__PURE__ */ E({
|
|
|
1994
1994
|
g && (g.id = c.value);
|
|
1995
1995
|
}
|
|
1996
1996
|
function L() {
|
|
1997
|
-
i.value.open(
|
|
1997
|
+
i.value.open(hn, {
|
|
1998
1998
|
form: e.form,
|
|
1999
1999
|
value: t.value
|
|
2000
2000
|
}, {
|
|
@@ -2140,12 +2140,12 @@ const ye = /* @__PURE__ */ E({
|
|
|
2140
2140
|
onClick: this.toggleFormCollapsed
|
|
2141
2141
|
}, {
|
|
2142
2142
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2143
|
-
icon: () => this.formCollspased ? f(
|
|
2143
|
+
icon: () => this.formCollspased ? f(Ut, null, null) : f(Xt, null, null)
|
|
2144
2144
|
})), this.collapsedMode === "dialog" && r.push(f(D, {
|
|
2145
2145
|
onClick: this.openCollapsedDialog
|
|
2146
2146
|
}, {
|
|
2147
2147
|
default: () => "高级搜索",
|
|
2148
|
-
icon: () => f(
|
|
2148
|
+
icon: () => f(rr, null, null)
|
|
2149
2149
|
}))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
|
|
2150
2150
|
return f(ce, t, {
|
|
2151
2151
|
default: () => [f(ve, {
|
|
@@ -2163,7 +2163,7 @@ const ye = /* @__PURE__ */ E({
|
|
|
2163
2163
|
"form-render": !0,
|
|
2164
2164
|
"no-rules": Object.keys(this.formRules).length === 0
|
|
2165
2165
|
}
|
|
2166
|
-
}, [f(
|
|
2166
|
+
}, [f(Rr, {
|
|
2167
2167
|
ref: (r) => this.modalInstance = r
|
|
2168
2168
|
}, {
|
|
2169
2169
|
default: () => [f(Pt, ge({
|
|
@@ -2195,11 +2195,11 @@ const ye = /* @__PURE__ */ E({
|
|
|
2195
2195
|
})]);
|
|
2196
2196
|
}
|
|
2197
2197
|
});
|
|
2198
|
-
function
|
|
2198
|
+
function gn(e) {
|
|
2199
2199
|
return e;
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
const n = q(), r =
|
|
2201
|
+
function bn(e) {
|
|
2202
|
+
const n = q(), r = _();
|
|
2203
2203
|
function t() {
|
|
2204
2204
|
var u, l;
|
|
2205
2205
|
const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
@@ -2207,15 +2207,15 @@ function mn(e) {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
return W(t), yt(t), r;
|
|
2209
2209
|
}
|
|
2210
|
-
const
|
|
2210
|
+
const kn = {
|
|
2211
2211
|
install(e, n) {
|
|
2212
2212
|
e.component("FormRender", ye);
|
|
2213
2213
|
}
|
|
2214
2214
|
};
|
|
2215
2215
|
export {
|
|
2216
2216
|
ye as FormRender,
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2217
|
+
Cn as FormRenderResolver,
|
|
2218
|
+
kn as default,
|
|
2219
|
+
gn as defineForm,
|
|
2220
|
+
bn as useForm
|
|
2221
2221
|
};
|