@gopowerteam/form-render 0.0.84 → 0.0.85
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/config/provide.config.d.ts +1 -1
- package/dist/cjs/form-items/cascader/index.d.ts +2 -2
- package/dist/cjs/form-items/date/index.d.ts +1 -1
- package/dist/cjs/form-items/date-range/index.d.ts +1 -1
- package/dist/cjs/form-items/index.d.ts +6 -6
- package/dist/cjs/form-items/select/index.d.ts +1 -1
- package/dist/cjs/form-items/tree-select/index.d.ts +3 -3
- package/dist/cjs/form-render/form-collapsed-dialog.d.ts +10 -9
- package/dist/cjs/form-render/index.d.ts +9 -198
- package/dist/cjs/hooks/use-form.d.ts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/interfaces/form-item-options.d.ts +2 -2
- package/dist/cjs/utils/create-form-source.d.ts +1 -1
- package/dist/es/config/provide.config.d.ts +1 -1
- package/dist/es/form-items/cascader/index.d.ts +2 -2
- package/dist/es/form-items/date/index.d.ts +1 -1
- package/dist/es/form-items/date-range/index.d.ts +1 -1
- package/dist/es/form-items/index.d.ts +6 -6
- package/dist/es/form-items/select/index.d.ts +1 -1
- package/dist/es/form-items/tree-select/index.d.ts +3 -3
- package/dist/es/form-render/form-collapsed-dialog.d.ts +10 -9
- package/dist/es/form-render/index.d.ts +9 -198
- package/dist/es/hooks/use-form.d.ts +1 -1
- package/dist/es/index.mjs +268 -268
- package/dist/es/interfaces/form-item-options.d.ts +2 -2
- package/dist/es/utils/create-form-source.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
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
|
|
1
|
+
import { getCurrentInstance as q, inject as pe, defineComponent as E, computed as _, openBlock as O, 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 Ot, Textarea as _t, 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 pn } 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 = _(() => [r, `${r}-down`, {
|
|
48
48
|
[`${r}-spin`]: e.spin
|
|
49
|
-
}]), a =
|
|
49
|
+
}]), a = _(() => {
|
|
50
50
|
const l = {};
|
|
51
51
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
52
52
|
});
|
|
@@ -58,11 +58,9 @@ const zt = E({
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"]
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
function Vt(e, n, r, t, a, u) {
|
|
65
|
-
return $(), T("svg", {
|
|
61
|
+
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
62
|
+
function Bt(e, n, r, t, a, u) {
|
|
63
|
+
return O(), T("svg", {
|
|
66
64
|
viewBox: "0 0 48 48",
|
|
67
65
|
fill: "none",
|
|
68
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -73,16 +71,18 @@ function Vt(e, n, r, t, a, u) {
|
|
|
73
71
|
"stroke-linecap": e.strokeLinecap,
|
|
74
72
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
73
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
|
-
},
|
|
74
|
+
}, n[1] || (n[1] = [x("path", {
|
|
75
|
+
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
76
|
+
}, null, -1)]), 14, At);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(zt, [["render",
|
|
79
|
-
const
|
|
78
|
+
var ie = /* @__PURE__ */ xe(zt, [["render", Bt]]);
|
|
79
|
+
const Vt = 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
|
+
}), Nt = E({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -111,9 +111,9 @@ const Ut = Object.assign(ie, {
|
|
|
111
111
|
setup(e, {
|
|
112
112
|
emit: n
|
|
113
113
|
}) {
|
|
114
|
-
const r = ke("icon"), t =
|
|
114
|
+
const r = ke("icon"), t = _(() => [r, `${r}-up`, {
|
|
115
115
|
[`${r}-spin`]: e.spin
|
|
116
|
-
}]), a =
|
|
116
|
+
}]), a = _(() => {
|
|
117
117
|
const l = {};
|
|
118
118
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
119
119
|
});
|
|
@@ -125,11 +125,9 @@ const Ut = Object.assign(ie, {
|
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
function Kt(e, n, r, t, a, u) {
|
|
132
|
-
return $(), T("svg", {
|
|
128
|
+
}), Ut = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
129
|
+
function qt(e, n, r, t, a, u) {
|
|
130
|
+
return O(), T("svg", {
|
|
133
131
|
viewBox: "0 0 48 48",
|
|
134
132
|
fill: "none",
|
|
135
133
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -140,16 +138,18 @@ function Kt(e, n, r, t, a, u) {
|
|
|
140
138
|
"stroke-linecap": e.strokeLinecap,
|
|
141
139
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
140
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
143
|
-
},
|
|
141
|
+
}, n[1] || (n[1] = [x("path", {
|
|
142
|
+
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
143
|
+
}, null, -1)]), 14, Ut);
|
|
144
144
|
}
|
|
145
|
-
var se = /* @__PURE__ */ xe(
|
|
146
|
-
const
|
|
145
|
+
var se = /* @__PURE__ */ xe(Nt, [["render", qt]]);
|
|
146
|
+
const Wt = 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
|
+
}), Ht = E({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -178,9 +178,9 @@ const Xt = Object.assign(se, {
|
|
|
178
178
|
setup(e, {
|
|
179
179
|
emit: n
|
|
180
180
|
}) {
|
|
181
|
-
const r = ke("icon"), t =
|
|
181
|
+
const r = ke("icon"), t = _(() => [r, `${r}-search`, {
|
|
182
182
|
[`${r}-spin`]: e.spin
|
|
183
|
-
}]), a =
|
|
183
|
+
}]), a = _(() => {
|
|
184
184
|
const l = {};
|
|
185
185
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
186
186
|
});
|
|
@@ -192,11 +192,9 @@ const Xt = Object.assign(se, {
|
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
function tr(e, n, r, t, a, u) {
|
|
199
|
-
return $(), T("svg", {
|
|
195
|
+
}), Gt = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
196
|
+
function Kt(e, n, r, t, a, u) {
|
|
197
|
+
return O(), T("svg", {
|
|
200
198
|
viewBox: "0 0 48 48",
|
|
201
199
|
fill: "none",
|
|
202
200
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -207,17 +205,19 @@ function tr(e, n, r, t, a, u) {
|
|
|
207
205
|
"stroke-linecap": e.strokeLinecap,
|
|
208
206
|
"stroke-linejoin": e.strokeLinejoin,
|
|
209
207
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
210
|
-
},
|
|
208
|
+
}, n[1] || (n[1] = [x("path", {
|
|
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);
|
|
211
211
|
}
|
|
212
|
-
var de = /* @__PURE__ */ xe(
|
|
213
|
-
const
|
|
212
|
+
var de = /* @__PURE__ */ xe(Ht, [["render", Kt]]);
|
|
213
|
+
const Xt = 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 : "";
|
|
217
217
|
e.component(t + de.name, de);
|
|
218
218
|
}
|
|
219
219
|
}), Ce = Symbol("__MODAL__");
|
|
220
|
-
function
|
|
220
|
+
function Ne(e) {
|
|
221
221
|
return ht() ? (vt(e), !0) : !1;
|
|
222
222
|
}
|
|
223
223
|
function M(e) {
|
|
@@ -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 Jt = Object.prototype.toString, Qt = (e) => Jt.call(e) === "[object Object]", Zt = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function er(e) {
|
|
231
231
|
return q();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function tr(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,10 +255,10 @@ function or(e, n = {}) {
|
|
|
255
255
|
}));
|
|
256
256
|
return r;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
258
|
+
function rr(e, n = !0, r) {
|
|
259
|
+
er() ? W(e, r) : n ? e() : ze(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function V(e) {
|
|
262
262
|
var n;
|
|
263
263
|
const r = M(e);
|
|
264
264
|
return (n = r == null ? void 0 : r.$el) != null ? n : r;
|
|
@@ -267,16 +267,16 @@ 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 Zt;
|
|
271
271
|
Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
274
|
}, i = (o, s, d, m) => (o.addEventListener(s, d, m), () => o.removeEventListener(s, d, m)), h = Z(
|
|
275
|
-
() => [
|
|
275
|
+
() => [V(n), M(a)],
|
|
276
276
|
([o, s]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const d =
|
|
279
|
+
const d = Qt(s) ? { ...s } : s;
|
|
280
280
|
u.push(
|
|
281
281
|
...r.flatMap((m) => t.map((v) => i(o, m, v, d)))
|
|
282
282
|
);
|
|
@@ -285,19 +285,19 @@ function fe(...e) {
|
|
|
285
285
|
), c = () => {
|
|
286
286
|
h(), l();
|
|
287
287
|
};
|
|
288
|
-
return
|
|
288
|
+
return Ne(c), c;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
const e =
|
|
290
|
+
function nr() {
|
|
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 lr(e) {
|
|
297
|
+
const n = nr();
|
|
298
|
+
return _(() => (n.value, !!e()));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function ar(e, n = {}) {
|
|
301
301
|
var r, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
@@ -311,51 +311,51 @@ function dr(e, n = {}) {
|
|
|
311
311
|
axis: d = "both",
|
|
312
312
|
draggingElement: m = ue,
|
|
313
313
|
containerElement: v,
|
|
314
|
-
handle:
|
|
315
|
-
} = n, p =
|
|
314
|
+
handle: w = e
|
|
315
|
+
} = n, p = $(
|
|
316
316
|
(r = M(s)) != null ? r : { x: 0, y: 0 }
|
|
317
|
-
), C =
|
|
318
|
-
M(u) &&
|
|
319
|
-
}, R = (
|
|
317
|
+
), C = $(), L = (b) => a ? a.includes(b.pointerType) : !0, P = (b) => {
|
|
318
|
+
M(u) && b.preventDefault(), M(l) && b.stopPropagation();
|
|
319
|
+
}, R = (b) => {
|
|
320
320
|
var g;
|
|
321
|
-
if (M(n.disabled) || !L(
|
|
321
|
+
if (b.button !== 0 || M(n.disabled) || !L(b) || M(i) && b.target !== M(e))
|
|
322
322
|
return;
|
|
323
|
-
const
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
323
|
+
const k = M(v), F = (g = k == null ? void 0 : k.getBoundingClientRect) == null ? void 0 : g.call(k), Y = M(e).getBoundingClientRect(), ee = {
|
|
324
|
+
x: b.clientX - (k ? Y.left - F.left + k.scrollLeft : Y.left),
|
|
325
|
+
y: b.clientY - (k ? Y.top - F.top + k.scrollTop : Y.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee,
|
|
328
|
-
}, H = (
|
|
329
|
-
if (M(n.disabled) || !L(
|
|
327
|
+
(o == null ? void 0 : o(ee, b)) !== !1 && (C.value = ee, P(b));
|
|
328
|
+
}, H = (b) => {
|
|
329
|
+
if (M(n.disabled) || !L(b) || !C.value)
|
|
330
330
|
return;
|
|
331
|
-
const g = M(v),
|
|
332
|
-
let { x:
|
|
333
|
-
(d === "x" || d === "both") && (
|
|
334
|
-
x:
|
|
331
|
+
const g = M(v), k = M(e).getBoundingClientRect();
|
|
332
|
+
let { x: F, y: Y } = p.value;
|
|
333
|
+
(d === "x" || d === "both") && (F = b.clientX - C.value.x, g && (F = Math.min(Math.max(0, F), g.scrollWidth - k.width))), (d === "y" || d === "both") && (Y = b.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - k.height))), p.value = {
|
|
334
|
+
x: F,
|
|
335
335
|
y: Y
|
|
336
|
-
}, h == null || h(p.value,
|
|
337
|
-
},
|
|
338
|
-
M(n.disabled) || !L(
|
|
336
|
+
}, h == null || h(p.value, b), P(b);
|
|
337
|
+
}, N = (b) => {
|
|
338
|
+
M(n.disabled) || !L(b) || C.value && (C.value = void 0, c == null || c(p.value, b), P(b));
|
|
339
339
|
};
|
|
340
340
|
if (Ue) {
|
|
341
|
-
const
|
|
342
|
-
fe(
|
|
341
|
+
const b = { capture: (t = n.capture) != null ? t : !0 };
|
|
342
|
+
fe(w, "pointerdown", R, b), fe(m, "pointermove", H, b), fe(m, "pointerup", N, b);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...
|
|
345
|
+
...tr(p),
|
|
346
346
|
position: p,
|
|
347
|
-
isDragging:
|
|
348
|
-
style:
|
|
347
|
+
isDragging: _(() => !!C.value),
|
|
348
|
+
style: _(
|
|
349
349
|
() => `left:${p.value.x}px;top:${p.value.y}px;`
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function ur(e, n, r = {}) {
|
|
354
354
|
const { window: t = ue, ...a } = r;
|
|
355
355
|
let u;
|
|
356
|
-
const l =
|
|
356
|
+
const l = lr(() => t && "ResizeObserver" in t), i = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
}, h =
|
|
358
|
+
}, h = _(() => 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) {
|
|
@@ -368,39 +368,39 @@ function fr(e, n, r = {}) {
|
|
|
368
368
|
), o = () => {
|
|
369
369
|
i(), c();
|
|
370
370
|
};
|
|
371
|
-
return
|
|
371
|
+
return Ne(o), {
|
|
372
372
|
isSupported: l,
|
|
373
373
|
stop: o
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
377
|
-
const { window: t = ue, box: a = "content-box" } = r, u =
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = r, u = _(() => {
|
|
378
378
|
var s, d;
|
|
379
|
-
return (d = (s =
|
|
380
|
-
}), l =
|
|
379
|
+
return (d = (s = V(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
380
|
+
}), l = $(n.width), i = $(n.height), { stop: h } = ur(
|
|
381
381
|
e,
|
|
382
382
|
([s]) => {
|
|
383
383
|
const d = a === "border-box" ? s.borderBoxSize : a === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
|
-
const m =
|
|
385
|
+
const m = V(e);
|
|
386
386
|
if (m) {
|
|
387
|
-
const v =
|
|
388
|
-
l.value =
|
|
387
|
+
const v = m.getBoundingClientRect();
|
|
388
|
+
l.value = v.width, i.value = v.height;
|
|
389
389
|
}
|
|
390
390
|
} else if (d) {
|
|
391
391
|
const m = Array.isArray(d) ? d : [d];
|
|
392
|
-
l.value = m.reduce((v, { inlineSize:
|
|
392
|
+
l.value = m.reduce((v, { inlineSize: w }) => v + w, 0), i.value = m.reduce((v, { blockSize: w }) => v + w, 0);
|
|
393
393
|
} else
|
|
394
394
|
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
395
395
|
},
|
|
396
396
|
r
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
const s =
|
|
398
|
+
rr(() => {
|
|
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
|
});
|
|
402
402
|
const c = Z(
|
|
403
|
-
() =>
|
|
403
|
+
() => V(e),
|
|
404
404
|
(s) => {
|
|
405
405
|
l.value = s ? n.width : 0, i.value = s ? n.height : 0;
|
|
406
406
|
}
|
|
@@ -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 or = (e) => (Ae("data-v-bd04f7a9"), e = e(), Be(), e), cr = { class: "title text-16px font-bold" }, ir = { class: "action" }, sr = ["form"], dr = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, fr = /* @__PURE__ */ or(() => /* @__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)), mr = [
|
|
426
|
+
fr
|
|
427
|
+
], hr = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !1
|
|
430
|
-
},
|
|
431
|
-
...
|
|
430
|
+
}, vr = /* @__PURE__ */ E({
|
|
431
|
+
...hr,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
434
434
|
form: {},
|
|
@@ -465,18 +465,18 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
465
465
|
ot((y) => ({
|
|
466
466
|
"567c01bd": 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 =
|
|
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 } = ar(s, {
|
|
471
471
|
initialValue: { x: 0, y: 0 }
|
|
472
472
|
});
|
|
473
|
-
function
|
|
473
|
+
function N() {
|
|
474
474
|
u == null || u.close(t.id);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function b(y) {
|
|
477
477
|
return typeof y == "number" ? `${y}px` : y;
|
|
478
478
|
}
|
|
479
|
-
const g =
|
|
479
|
+
const g = _(() => {
|
|
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 mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
489
489
|
top: "column",
|
|
490
490
|
bottom: "column"
|
|
491
491
|
}[t.position]), y;
|
|
492
|
-
}),
|
|
492
|
+
}), k = _(() => {
|
|
493
493
|
const y = {};
|
|
494
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? y.maxHeight =
|
|
495
|
-
}),
|
|
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 = _(() => {
|
|
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 = _(() => {
|
|
499
|
+
const y = {}, j = L.value + P.value + p.value + C.value, _e = Math.floor(w.value * (Number(b(t.maxHeight).replace("%", "")) / 100));
|
|
500
|
+
return t.maxHeight && (y.maxHeight = `${_e - 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,41 +533,41 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
533
533
|
}), ct(() => {
|
|
534
534
|
});
|
|
535
535
|
function et() {
|
|
536
|
-
return l.value = !0, () =>
|
|
536
|
+
return l.value = !0, () => Oe();
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Oe() {
|
|
539
539
|
l.value = !1;
|
|
540
540
|
}
|
|
541
541
|
return n({
|
|
542
542
|
showLoading: et,
|
|
543
|
-
hideLoading:
|
|
544
|
-
}), (y, j) => (
|
|
543
|
+
hideLoading: Oe
|
|
544
|
+
}), (y, j) => (O(), 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((_e) => y.maskClosable && N(), ["self"]))
|
|
550
550
|
}, [
|
|
551
551
|
x("div", {
|
|
552
552
|
ref_key: "contentRef",
|
|
553
553
|
ref: o,
|
|
554
554
|
class: le(["modal-content", { [`${y.mode}-mode`]: !0, [`${y.position}-position`]: !0 }]),
|
|
555
|
-
style: z(
|
|
555
|
+
style: z(k.value)
|
|
556
556
|
}, [
|
|
557
|
-
y.header ? (
|
|
557
|
+
y.header ? (O(), T("div", {
|
|
558
558
|
key: 0,
|
|
559
559
|
ref_key: "headerRef",
|
|
560
560
|
ref: s,
|
|
561
561
|
class: "modal-header",
|
|
562
|
-
style: z(
|
|
562
|
+
style: z(F.value),
|
|
563
563
|
onMousedown: Ze
|
|
564
564
|
}, [
|
|
565
|
-
x("div",
|
|
566
|
-
x("div",
|
|
567
|
-
y.closeable ? (
|
|
565
|
+
x("div", cr, A(y.title), 1),
|
|
566
|
+
x("div", ir, [
|
|
567
|
+
y.closeable ? (O(), T("div", {
|
|
568
568
|
key: 0,
|
|
569
569
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
570
|
-
onClick:
|
|
570
|
+
onClick: N
|
|
571
571
|
})) : U("", !0)
|
|
572
572
|
])
|
|
573
573
|
], 36)) : U("", !0),
|
|
@@ -580,14 +580,14 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
580
580
|
class: "modal-body",
|
|
581
581
|
style: z(Y.value)
|
|
582
582
|
}, [
|
|
583
|
-
(
|
|
583
|
+
(O(), 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 ? (O(), T("div", {
|
|
591
591
|
key: 1,
|
|
592
592
|
ref_key: "footerRef",
|
|
593
593
|
ref: d,
|
|
@@ -603,9 +603,9 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
603
603
|
form: y.form,
|
|
604
604
|
type: "submit",
|
|
605
605
|
onClick: ee
|
|
606
|
-
}, A(y.submitText), 9,
|
|
606
|
+
}, A(y.submitText), 9, sr)
|
|
607
607
|
], 512)) : U("", !0),
|
|
608
|
-
l.value ? (
|
|
608
|
+
l.value ? (O(), T("div", dr, mr)) : U("", !0)
|
|
609
609
|
], 6)
|
|
610
610
|
], 4));
|
|
611
611
|
}
|
|
@@ -614,7 +614,7 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
614
614
|
for (const [t, a] of n)
|
|
615
615
|
r[t] = a;
|
|
616
616
|
return r;
|
|
617
|
-
},
|
|
617
|
+
}, yr = /* @__PURE__ */ oe(vr, [["__scopeId", "data-v-bd04f7a9"]]), pr = { class: "modal-dialog" }, gr = { class: "dialog-body" }, br = { class: "dialog-title" }, kr = { class: "dialog-content" }, wr = /* @__PURE__ */ E({
|
|
618
618
|
__name: "modal-dialog",
|
|
619
619
|
props: {
|
|
620
620
|
type: {},
|
|
@@ -627,7 +627,7 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { 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 = _(() => n.title ? n.title : {
|
|
631
631
|
confirm: "提示",
|
|
632
632
|
info: "提示",
|
|
633
633
|
warning: "警告",
|
|
@@ -640,22 +640,22 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { 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) => (O(), T("section", pr, [
|
|
644
|
+
x("div", gr, [
|
|
645
|
+
x("div", br, A(t.value), 1),
|
|
646
|
+
x("div", kr, 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 ? (O(), ne(Ee(l.footer), { key: 0 })) : (O(), T(re, { key: 1 }, [
|
|
653
653
|
x("button", {
|
|
654
654
|
class: "submit-button",
|
|
655
655
|
type: "submit",
|
|
656
656
|
onClick: a
|
|
657
657
|
}, A(l.okText), 1),
|
|
658
|
-
l.type === "confirm" ? (
|
|
658
|
+
l.type === "confirm" ? (O(), T("button", {
|
|
659
659
|
key: 0,
|
|
660
660
|
class: "cancel-button",
|
|
661
661
|
type: "button",
|
|
@@ -665,32 +665,32 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
665
665
|
], 4)
|
|
666
666
|
]));
|
|
667
667
|
}
|
|
668
|
-
}),
|
|
668
|
+
}), xr = /* @__PURE__ */ oe(wr, [["__scopeId", "data-v-0c6b8db2"]]), Cr = (e) => (Ae("data-v-559bdf2e"), e = e(), Be(), e), Sr = { class: "flex-center" }, $r = /* @__PURE__ */ Cr(() => /* @__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)), Or = { class: "modal-loading-text" }, _r = /* @__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) => (O(), T("section", Sr, [
|
|
682
|
+
$r,
|
|
683
|
+
x("div", Or, A(n.text), 1)
|
|
684
684
|
]));
|
|
685
685
|
}
|
|
686
|
-
}),
|
|
686
|
+
}), Fr = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-559bdf2e"]]), Yr = {
|
|
687
687
|
key: 0,
|
|
688
688
|
class: "modal-teleport"
|
|
689
|
-
},
|
|
689
|
+
}, Mr = {
|
|
690
690
|
name: "ModalProvider",
|
|
691
691
|
inheritAttrs: !1
|
|
692
|
-
},
|
|
693
|
-
...
|
|
692
|
+
}, Tr = /* @__PURE__ */ E({
|
|
693
|
+
...Mr,
|
|
694
694
|
props: {
|
|
695
695
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
696
696
|
sizes: { default: () => ({
|
|
@@ -703,10 +703,10 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
703
703
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
704
704
|
},
|
|
705
705
|
setup(e, { expose: n }) {
|
|
706
|
-
const r =
|
|
706
|
+
const r = B([]), t = $(!1), a = q();
|
|
707
707
|
function u(d, m = {}, v = {}) {
|
|
708
|
-
const
|
|
709
|
-
() => Promise.resolve(typeof d == "string" ?
|
|
708
|
+
const w = ut(
|
|
709
|
+
() => Promise.resolve(typeof d == "string" ? xr : 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({
|
|
@@ -714,7 +714,7 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
714
714
|
}, v), L = new Promise((P, R) => {
|
|
715
715
|
r.value.push({
|
|
716
716
|
id: p,
|
|
717
|
-
component:
|
|
717
|
+
component: w,
|
|
718
718
|
props: m || {},
|
|
719
719
|
options: {
|
|
720
720
|
...C,
|
|
@@ -734,8 +734,8 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
734
734
|
const v = r.value.findIndex((p) => p.id === d);
|
|
735
735
|
if (v < 0)
|
|
736
736
|
return;
|
|
737
|
-
const
|
|
738
|
-
m === void 0 ?
|
|
737
|
+
const w = r.value[v];
|
|
738
|
+
m === void 0 ? w == null || w.reject("CANCEL") : w == null || w.resolve(m), r.value.splice(v, 1), Q(r);
|
|
739
739
|
}
|
|
740
740
|
function i() {
|
|
741
741
|
!r.value || r.value.length === 0 || (r.value.forEach((d) => {
|
|
@@ -746,8 +746,8 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
746
746
|
const v = r.value.find((p) => p.id === d);
|
|
747
747
|
if (!v)
|
|
748
748
|
return;
|
|
749
|
-
const
|
|
750
|
-
|
|
749
|
+
const w = v.listeners.find((p) => p.event === m);
|
|
750
|
+
w && w.callback({
|
|
751
751
|
open: u,
|
|
752
752
|
close: (p) => l(v.id, p),
|
|
753
753
|
closeAll: i,
|
|
@@ -767,7 +767,7 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
767
767
|
if (v)
|
|
768
768
|
return v.showLoading();
|
|
769
769
|
{
|
|
770
|
-
const { close:
|
|
770
|
+
const { close: w } = u(Fr, {
|
|
771
771
|
text: m == null ? void 0 : m.text
|
|
772
772
|
}, {
|
|
773
773
|
footer: !1,
|
|
@@ -777,10 +777,10 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
777
777
|
});
|
|
778
778
|
return m != null && m.duration && setTimeout(
|
|
779
779
|
() => {
|
|
780
|
-
|
|
780
|
+
w();
|
|
781
781
|
},
|
|
782
782
|
m == null ? void 0 : m.duration
|
|
783
|
-
),
|
|
783
|
+
), w;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
function o(d) {
|
|
@@ -791,8 +791,8 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
791
791
|
return m.hideLoading();
|
|
792
792
|
}
|
|
793
793
|
function s(d, m, v) {
|
|
794
|
-
const
|
|
795
|
-
|
|
794
|
+
const w = r.value.find((p) => p.id === d);
|
|
795
|
+
w && w.listeners.push({
|
|
796
796
|
event: m,
|
|
797
797
|
callback: v
|
|
798
798
|
});
|
|
@@ -811,16 +811,16 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
811
811
|
closeAll: i
|
|
812
812
|
}), W(() => {
|
|
813
813
|
t.value = !0;
|
|
814
|
-
}), (d, m) => (
|
|
814
|
+
}), (d, m) => (O(), T(re, null, [
|
|
815
815
|
tt(d.$slots, "default", {}, void 0, !0),
|
|
816
|
-
t.value ? (
|
|
817
|
-
(
|
|
816
|
+
t.value ? (O(), T("div", Yr, [
|
|
817
|
+
(O(), 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
|
+
(O(!0), T(re, null, at(r.value, (v) => (O(), ne(yr, ge({
|
|
824
824
|
id: v.id,
|
|
825
825
|
key: v.id,
|
|
826
826
|
ref_for: !0,
|
|
@@ -841,7 +841,7 @@ const mr = (e) => (Ae("data-v-bd04f7a9"), e = e(), Ne(), e), hr = { class: "titl
|
|
|
841
841
|
])) : U("", !0)
|
|
842
842
|
], 64));
|
|
843
843
|
}
|
|
844
|
-
}),
|
|
844
|
+
}), Pr = /* @__PURE__ */ oe(Tr, [["__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 Lr(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 jr = { exports: {} };
|
|
924
924
|
(function(e, n) {
|
|
925
925
|
(function(r, t) {
|
|
926
926
|
e.exports = t(S);
|
|
@@ -976,7 +976,7 @@ var Ar = { exports: {} };
|
|
|
976
976
|
};
|
|
977
977
|
return a.default.locale(u, null, !0), u;
|
|
978
978
|
});
|
|
979
|
-
})(
|
|
979
|
+
})(jr);
|
|
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 Ir = He.exports;
|
|
1006
|
+
const Dr = /* @__PURE__ */ We(Ir);
|
|
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 Er = Ge.exports;
|
|
1035
|
+
const Rr = /* @__PURE__ */ We(Er);
|
|
1036
|
+
S.extend(Dr);
|
|
1037
|
+
S.extend(Rr);
|
|
1038
1038
|
S.locale("zh-cn", {
|
|
1039
1039
|
weekStart: 1
|
|
1040
1040
|
});
|
|
1041
|
-
function
|
|
1041
|
+
function zr(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 Ar(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 Wr(e, n) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
return r;
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function Br(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 Hr(e, n = {}) {
|
|
|
1147
1147
|
});
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1152
|
-
|
|
1150
|
+
function Vr(e, n = 200, r = {}) {
|
|
1151
|
+
return Ar(
|
|
1152
|
+
Br(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 Nr = Vr((e) => {
|
|
1161
1161
|
e && e.dispatchEvent(new Event("submit"));
|
|
1162
1162
|
}, 1e3);
|
|
1163
|
-
function
|
|
1163
|
+
function Ur(e) {
|
|
1164
1164
|
let n;
|
|
1165
1165
|
return (r, t) => {
|
|
1166
1166
|
function a() {
|
|
@@ -1174,13 +1174,13 @@ function Xr(e) {
|
|
|
1174
1174
|
i = i.$parent;
|
|
1175
1175
|
if (i && i.$el) {
|
|
1176
1176
|
const h = i.$el;
|
|
1177
|
-
|
|
1177
|
+
Nr(h);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
function l() {
|
|
1181
1181
|
switch (e == null ? void 0 : e.type) {
|
|
1182
1182
|
case "number":
|
|
1183
|
-
return f(
|
|
1183
|
+
return f(Ve, {
|
|
1184
1184
|
ref: (i) => n = i,
|
|
1185
1185
|
modelValue: r[t.key],
|
|
1186
1186
|
"onUpdate:modelValue": (i) => r[t.key] = i,
|
|
@@ -1214,17 +1214,17 @@ function Xr(e) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function qr(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 Wr() {
|
|
1222
|
+
const e = $(/* @__PURE__ */ new Map());
|
|
1223
1223
|
return [e, (r) => e.value = r];
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Hr(e) {
|
|
1226
1226
|
let n, r = !1;
|
|
1227
|
-
const [t, a] =
|
|
1227
|
+
const [t, a] = Wr(), 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 Zr(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,10 +1288,10 @@ function Zr(e) {
|
|
|
1288
1288
|
"allow-create": e.createable,
|
|
1289
1289
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1290
1290
|
onChange: u
|
|
1291
|
-
},
|
|
1291
|
+
}, qr(m = Array.from(t.value.entries()).map(([v, w], p) => f(St, {
|
|
1292
1292
|
key: p,
|
|
1293
1293
|
value: v,
|
|
1294
|
-
label:
|
|
1294
|
+
label: w
|
|
1295
1295
|
}, null))) ? m : {
|
|
1296
1296
|
default: () => [m]
|
|
1297
1297
|
});
|
|
@@ -1305,7 +1305,7 @@ function Zr(e) {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
};
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Gr(e) {
|
|
1309
1309
|
let n;
|
|
1310
1310
|
function r() {
|
|
1311
1311
|
if (!(e != null && e.autoSubmit) || !n)
|
|
@@ -1322,7 +1322,7 @@ function en(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 en(e) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Kr(e) {
|
|
1346
1346
|
return (n, r) => {
|
|
1347
1347
|
let t = [];
|
|
1348
1348
|
function a(c) {
|
|
@@ -1376,7 +1376,7 @@ function tn(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(Ot, {
|
|
1380
1380
|
"disabled-input": !0,
|
|
1381
1381
|
style: {
|
|
1382
1382
|
width: "300px"
|
|
@@ -1402,13 +1402,13 @@ function tn(e) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function Xr(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(_t, {
|
|
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 Jr(e) {
|
|
1443
1443
|
let n = e.data;
|
|
1444
1444
|
const r = [];
|
|
1445
1445
|
return e.path.forEach((t) => {
|
|
@@ -1449,13 +1449,13 @@ function nn(e) {
|
|
|
1449
1449
|
}), r;
|
|
1450
1450
|
}
|
|
1451
1451
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1452
|
-
function
|
|
1453
|
-
const e =
|
|
1452
|
+
function Qr() {
|
|
1453
|
+
const e = $([]);
|
|
1454
1454
|
return [e, (r) => e.value = r];
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function Zr(e) {
|
|
1457
1457
|
let n, r = !1;
|
|
1458
|
-
const [t, a] =
|
|
1458
|
+
const [t, a] = Qr(), u = () => {
|
|
1459
1459
|
if (!e.autoSubmit || !n)
|
|
1460
1460
|
return;
|
|
1461
1461
|
let o = n;
|
|
@@ -1490,7 +1490,7 @@ function an(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
|
|
@@ -1508,7 +1508,7 @@ function an(e) {
|
|
|
1508
1508
|
return (o, s) => {
|
|
1509
1509
|
e.default && !r && (o[s.key] = e.default, r = !0);
|
|
1510
1510
|
function d() {
|
|
1511
|
-
const v = o[s.key],
|
|
1511
|
+
const v = o[s.key], w = (p) => {
|
|
1512
1512
|
const [C] = Ke({
|
|
1513
1513
|
data: t.value,
|
|
1514
1514
|
labelProp: "title",
|
|
@@ -1518,15 +1518,15 @@ function an(e) {
|
|
|
1518
1518
|
return C == null ? void 0 : C.title;
|
|
1519
1519
|
};
|
|
1520
1520
|
if (e.multiple) {
|
|
1521
|
-
const p = v.map((C) =>
|
|
1521
|
+
const p = v.map((C) => w(C));
|
|
1522
1522
|
return f("span", null, [p.join(", ")]);
|
|
1523
1523
|
} else {
|
|
1524
|
-
const p =
|
|
1524
|
+
const p = w(v);
|
|
1525
1525
|
return f("span", null, [p]);
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
1528
|
function m() {
|
|
1529
|
-
return f(
|
|
1529
|
+
return f(Ft, {
|
|
1530
1530
|
ref: (v) => n = v,
|
|
1531
1531
|
multiple: e.multiple,
|
|
1532
1532
|
modelValue: o[s.key],
|
|
@@ -1556,13 +1556,13 @@ function an(e) {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
1558
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1559
|
-
function
|
|
1560
|
-
const e =
|
|
1559
|
+
function en() {
|
|
1560
|
+
const e = $([]);
|
|
1561
1561
|
return [e, (r) => e.value = r];
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function tn(e) {
|
|
1564
1564
|
let n, r = !1;
|
|
1565
|
-
const [t, a] =
|
|
1565
|
+
const [t, a] = en(), u = () => {
|
|
1566
1566
|
if (!e.autoSubmit || !n)
|
|
1567
1567
|
return;
|
|
1568
1568
|
let c = n;
|
|
@@ -1597,7 +1597,7 @@ function on(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 on(e) {
|
|
|
1615
1615
|
labelProp: "label",
|
|
1616
1616
|
valueProp: "value",
|
|
1617
1617
|
key: p
|
|
1618
|
-
}).map((L) => L.label).join("/"),
|
|
1618
|
+
}).map((L) => L.label).join("/"), w = (p) => Jr({
|
|
1619
1619
|
data: t.value,
|
|
1620
1620
|
labelProp: "label",
|
|
1621
1621
|
valueProp: "value",
|
|
@@ -1631,11 +1631,11 @@ function on(e) {
|
|
|
1631
1631
|
return f("span", null, [p.join(", ")]);
|
|
1632
1632
|
}
|
|
1633
1633
|
case (e.pathMode && !e.multiple): {
|
|
1634
|
-
const p =
|
|
1634
|
+
const p = w(m);
|
|
1635
1635
|
return f("span", null, [p]);
|
|
1636
1636
|
}
|
|
1637
1637
|
case (e.pathMode && e.multiple): {
|
|
1638
|
-
const p = m.map((C) =>
|
|
1638
|
+
const p = m.map((C) => w(C));
|
|
1639
1639
|
return f("span", null, [p.join(", ")]);
|
|
1640
1640
|
}
|
|
1641
1641
|
default:
|
|
@@ -1668,10 +1668,10 @@ function on(e) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function rn(e) {
|
|
1672
1672
|
return (n, r) => e(n, r);
|
|
1673
1673
|
}
|
|
1674
|
-
const
|
|
1674
|
+
const nn = {
|
|
1675
1675
|
thousands: !0,
|
|
1676
1676
|
inputUnit: "元",
|
|
1677
1677
|
outputUnit: "元"
|
|
@@ -1680,9 +1680,9 @@ const sn = {
|
|
|
1680
1680
|
元: 10 ** 2,
|
|
1681
1681
|
万: 10 ** 4
|
|
1682
1682
|
};
|
|
1683
|
-
function
|
|
1683
|
+
function ln(e) {
|
|
1684
1684
|
e = {
|
|
1685
|
-
...
|
|
1685
|
+
...nn,
|
|
1686
1686
|
...e || {}
|
|
1687
1687
|
};
|
|
1688
1688
|
const n = (l) => {
|
|
@@ -1707,7 +1707,7 @@ function dn(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
|
});
|
|
@@ -1716,7 +1716,7 @@ function dn(e) {
|
|
|
1716
1716
|
return f("span", null, [a(h.value.toString()), o()]);
|
|
1717
1717
|
}
|
|
1718
1718
|
function d() {
|
|
1719
|
-
return f(
|
|
1719
|
+
return f(Ve, {
|
|
1720
1720
|
modelValue: h.value,
|
|
1721
1721
|
"onUpdate:modelValue": (m) => h.value = m,
|
|
1722
1722
|
formatter: a,
|
|
@@ -1740,24 +1740,24 @@ function dn(e) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function an() {
|
|
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: Ur,
|
|
1746
|
+
textarea: Xr,
|
|
1747
|
+
select: Hr,
|
|
1748
|
+
treeSelect: Zr,
|
|
1749
|
+
date: zr,
|
|
1750
|
+
switch: Gr,
|
|
1751
|
+
dateRange: Kr,
|
|
1752
|
+
render: rn,
|
|
1753
|
+
cascader: tn,
|
|
1754
|
+
currency: ln
|
|
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
|
+
...an()
|
|
1761
1761
|
});
|
|
1762
1762
|
return {
|
|
1763
1763
|
default: () => r(e, n)
|
|
@@ -1766,10 +1766,10 @@ function je(e, n) {
|
|
|
1766
1766
|
function Ie(e, n) {
|
|
1767
1767
|
switch (n.mode) {
|
|
1768
1768
|
case "text":
|
|
1769
|
-
return
|
|
1769
|
+
return Fe(je(e, n).default);
|
|
1770
1770
|
case "component":
|
|
1771
1771
|
default:
|
|
1772
|
-
return
|
|
1772
|
+
return Fe(ve, {
|
|
1773
1773
|
field: n.key,
|
|
1774
1774
|
label: n.title,
|
|
1775
1775
|
hideLabel: n.hideLabel,
|
|
@@ -1778,10 +1778,10 @@ function Ie(e, n) {
|
|
|
1778
1778
|
}, je(e, n));
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function un(e) {
|
|
1782
1782
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1783
1783
|
}
|
|
1784
|
-
const
|
|
1784
|
+
const on = /* @__PURE__ */ E({
|
|
1785
1785
|
props: {
|
|
1786
1786
|
form: {
|
|
1787
1787
|
type: Object,
|
|
@@ -1802,7 +1802,7 @@ const hn = /* @__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 hn = /* @__PURE__ */ E({
|
|
|
1830
1830
|
return f(Mt, {
|
|
1831
1831
|
"active-key": this.activeTab,
|
|
1832
1832
|
"onUpdate:active-key": (r) => this.activeTab = r
|
|
1833
|
-
},
|
|
1833
|
+
}, un(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] = Lr(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 = _(() => 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,33 +1968,33 @@ const ye = /* @__PURE__ */ E({
|
|
|
1968
1968
|
default:
|
|
1969
1969
|
return !0;
|
|
1970
1970
|
}
|
|
1971
|
-
})), m =
|
|
1971
|
+
})), m = _(() => {
|
|
1972
1972
|
if (!u.value)
|
|
1973
1973
|
return 1;
|
|
1974
|
-
const g = d.value.reduce((
|
|
1974
|
+
const g = d.value.reduce((k, F) => k + ((F == null ? void 0 : F.span) || 1), 0);
|
|
1975
1975
|
return u.value - g % u.value;
|
|
1976
1976
|
}), v = (g) => g != null && g.validator ? {
|
|
1977
1977
|
...g,
|
|
1978
|
-
validator: (
|
|
1979
|
-
const Y = g.validator(
|
|
1978
|
+
validator: (k, F) => {
|
|
1979
|
+
const Y = g.validator(k, F);
|
|
1980
1980
|
if (typeof Y == "function")
|
|
1981
1981
|
return Y(t.value);
|
|
1982
1982
|
}
|
|
1983
|
-
} : g,
|
|
1983
|
+
} : g, w = _(() => 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
|
-
var
|
|
1985
|
+
var k;
|
|
1986
1986
|
if (e.columns)
|
|
1987
1987
|
return;
|
|
1988
|
-
const g = (
|
|
1988
|
+
const g = (k = r.value) == null ? void 0 : k.$el;
|
|
1989
1989
|
g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
|
|
1990
1990
|
}
|
|
1991
1991
|
function C() {
|
|
1992
|
-
var
|
|
1993
|
-
const g = (
|
|
1992
|
+
var k;
|
|
1993
|
+
const g = (k = r.value) == null ? void 0 : k.$el;
|
|
1994
1994
|
g && (g.id = c.value);
|
|
1995
1995
|
}
|
|
1996
1996
|
function L() {
|
|
1997
|
-
i.value.open(
|
|
1997
|
+
i.value.open(on, {
|
|
1998
1998
|
form: e.form,
|
|
1999
1999
|
value: t.value
|
|
2000
2000
|
}, {
|
|
@@ -2015,20 +2015,20 @@ const ye = /* @__PURE__ */ E({
|
|
|
2015
2015
|
...g || {}
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
|
-
function R(g,
|
|
2019
|
-
t.value[g] =
|
|
2018
|
+
function R(g, k) {
|
|
2019
|
+
t.value[g] = k, P({
|
|
2020
2020
|
...t.value
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
2023
2023
|
function H(g) {
|
|
2024
|
-
const
|
|
2025
|
-
R(g,
|
|
2024
|
+
const k = e.form.find((Y) => Y.key === g), F = (typeof k.default == "function" ? k.default() : k.default) || null;
|
|
2025
|
+
R(g, F);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function N() {
|
|
2028
2028
|
var g;
|
|
2029
2029
|
(g = r.value) == null || g.resetFields();
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function b() {
|
|
2032
2032
|
var g;
|
|
2033
2033
|
return (g = r.value) == null ? void 0 : g.validate();
|
|
2034
2034
|
}
|
|
@@ -2038,7 +2038,7 @@ const ye = /* @__PURE__ */ E({
|
|
|
2038
2038
|
formSource: t,
|
|
2039
2039
|
formInstance: r,
|
|
2040
2040
|
formColumns: u,
|
|
2041
|
-
formRules:
|
|
2041
|
+
formRules: w,
|
|
2042
2042
|
formCollspased: l,
|
|
2043
2043
|
formActiosSpan: m,
|
|
2044
2044
|
formItems: d,
|
|
@@ -2046,8 +2046,8 @@ const ye = /* @__PURE__ */ E({
|
|
|
2046
2046
|
updateFormField: R,
|
|
2047
2047
|
resetFormField: H,
|
|
2048
2048
|
updateFormSource: P,
|
|
2049
|
-
reset:
|
|
2050
|
-
validate:
|
|
2049
|
+
reset: N,
|
|
2050
|
+
validate: b,
|
|
2051
2051
|
onSubmitSuccess: s,
|
|
2052
2052
|
openCollapsedDialog: L,
|
|
2053
2053
|
modalInstance: i
|
|
@@ -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(Vt, null, null) : f(Wt, 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(Xt, 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(Pr, {
|
|
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 fn(e) {
|
|
2199
2199
|
return e;
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
const n = q(), r =
|
|
2201
|
+
function mn(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 bn(e) {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
return W(t), yt(t), r;
|
|
2209
2209
|
}
|
|
2210
|
-
const
|
|
2210
|
+
const hn = {
|
|
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
|
+
pn as FormRenderResolver,
|
|
2218
|
+
hn as default,
|
|
2219
|
+
fn as defineForm,
|
|
2220
|
+
mn as useForm
|
|
2221
2221
|
};
|