@gopowerteam/form-render 0.0.71 → 0.0.73
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/es/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import { DatePicker as vt, YearPicker as pt, QuarterPicker as yt, MonthPicker as gt, WeekPicker as bt, Input as kt, InputNumber as Re, Select as wt, Option as xt, Switch as
|
|
1
|
+
import { getCurrentInstance as q, inject as ye, defineComponent as z, computed as O, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as A, ref as _, provide as he, onMounted as W, Fragment as re, renderSlot as Qe, createBlock as ne, Teleport as Ze, createVNode as d, TransitionGroup as et, withCtx as tt, renderList as rt, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as nt, triggerRef as Q, useCssVars as lt, onUnmounted as at, withModifiers as ut, toDisplayString as N, resolveDynamicComponent as De, normalizeProps as ot, guardReactiveProps as ct, watch as Z, unref as it, isRef as ae, toRefs as st, customRef as dt, nextTick as Ie, getCurrentScope as ft, onScopeDispose as mt, pushScopeId as ze, popScopeId as Ee, isVNode as be, createTextVNode as D, h as Ye, onUpdated as ht } from "vue";
|
|
2
|
+
import { DatePicker as vt, YearPicker as pt, QuarterPicker as yt, MonthPicker as gt, WeekPicker as bt, Input as kt, InputNumber as Re, Select as wt, Option as xt, Switch as Ct, RangePicker as St, Textarea as _t, TreeSelect as $t, Cascader as Ot, FormItem as ve, Divider as Fe, Button as I, Tabs as Yt, TabPane as Ft, Form as Mt, Grid as Tt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
|
|
3
3
|
import S from "dayjs";
|
|
4
4
|
import { FormRenderResolver as yn } from "./resolver.mjs";
|
|
5
5
|
const jt = Symbol("ArcoConfigProvider"), Pt = "arco", Dt = "$arco", ke = (e) => {
|
|
6
6
|
var n, r, t;
|
|
7
|
-
const a =
|
|
7
|
+
const a = q(), u = ye(jt, void 0);
|
|
8
8
|
return `${(t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = a == null ? void 0 : a.appContext.config.globalProperties[Dt]) == null ? void 0 : n.classPrefix) != null ? t : Pt}-${e}`;
|
|
9
9
|
}, It = Object.prototype.toString;
|
|
10
10
|
function we(e) {
|
|
@@ -15,7 +15,7 @@ var xe = (e, n) => {
|
|
|
15
15
|
e[r] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const zt =
|
|
18
|
+
const zt = z({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -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,11 +58,11 @@ const zt = E({
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}), Et = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Rt = /* @__PURE__ */
|
|
61
|
+
}), Et = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Rt = /* @__PURE__ */ x("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
-
}, null, -1),
|
|
64
|
-
function
|
|
65
|
-
return
|
|
63
|
+
}, null, -1), Nt = [Rt];
|
|
64
|
+
function At(e, n, r, t, a, u) {
|
|
65
|
+
return $(), T("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
68
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -73,16 +73,16 @@ function Nt(e, n, r, t, a, u) {
|
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
75
|
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
|
-
},
|
|
76
|
+
}, Nt, 14, Et);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(zt, [["render",
|
|
78
|
+
var ie = /* @__PURE__ */ xe(zt, [["render", At]]);
|
|
79
79
|
const Bt = Object.assign(ie, {
|
|
80
80
|
install: (e, n) => {
|
|
81
81
|
var r;
|
|
82
82
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
83
83
|
e.component(t + ie.name, ie);
|
|
84
84
|
}
|
|
85
|
-
}), Vt =
|
|
85
|
+
}), Vt = z({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -111,9 +111,9 @@ const Bt = 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,11 +125,11 @@ const Bt = Object.assign(ie, {
|
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}), Ut = ["stroke-width", "stroke-linecap", "stroke-linejoin"], qt = /* @__PURE__ */
|
|
128
|
+
}), Ut = ["stroke-width", "stroke-linecap", "stroke-linejoin"], qt = /* @__PURE__ */ x("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
130
|
}, null, -1), Wt = [qt];
|
|
131
131
|
function Ht(e, n, r, t, a, u) {
|
|
132
|
-
return
|
|
132
|
+
return $(), T("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
135
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -149,7 +149,7 @@ const Gt = Object.assign(se, {
|
|
|
149
149
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
150
150
|
e.component(t + se.name, se);
|
|
151
151
|
}
|
|
152
|
-
}), Kt =
|
|
152
|
+
}), Kt = z({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -178,9 +178,9 @@ const Gt = Object.assign(se, {
|
|
|
178
178
|
setup(e, {
|
|
179
179
|
emit: n
|
|
180
180
|
}) {
|
|
181
|
-
const r = ke("icon"), t =
|
|
181
|
+
const r = ke("icon"), t = 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,11 +192,11 @@ const Gt = Object.assign(se, {
|
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}), Xt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Jt = /* @__PURE__ */
|
|
195
|
+
}), Xt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Jt = /* @__PURE__ */ x("path", {
|
|
196
196
|
d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485"
|
|
197
197
|
}, null, -1), Qt = [Jt];
|
|
198
198
|
function Zt(e, n, r, t, a, u) {
|
|
199
|
-
return
|
|
199
|
+
return $(), T("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -216,19 +216,19 @@ const er = Object.assign(de, {
|
|
|
216
216
|
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
217
217
|
e.component(t + de.name, de);
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
220
|
-
function
|
|
219
|
+
}), Ce = Symbol("__MODAL__");
|
|
220
|
+
function Ne(e) {
|
|
221
221
|
return ft() ? (mt(e), !0) : !1;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function M(e) {
|
|
224
224
|
return typeof e == "function" ? e() : it(e);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const Ae = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
228
|
const tr = Object.prototype.toString, rr = (e) => tr.call(e) === "[object Object]", nr = () => {
|
|
229
229
|
};
|
|
230
230
|
function lr(e) {
|
|
231
|
-
return
|
|
231
|
+
return q();
|
|
232
232
|
}
|
|
233
233
|
function ar(e, n = {}) {
|
|
234
234
|
if (!ae(e))
|
|
@@ -241,7 +241,7 @@ function ar(e, n = {}) {
|
|
|
241
241
|
},
|
|
242
242
|
set(a) {
|
|
243
243
|
var u;
|
|
244
|
-
if ((u =
|
|
244
|
+
if ((u = M(n.replaceRef)) == null || u)
|
|
245
245
|
if (Array.isArray(e.value)) {
|
|
246
246
|
const l = [...e.value];
|
|
247
247
|
l[t] = a, e.value = l;
|
|
@@ -256,14 +256,14 @@ function ar(e, n = {}) {
|
|
|
256
256
|
return r;
|
|
257
257
|
}
|
|
258
258
|
function ur(e, n = !0, r) {
|
|
259
|
-
lr() ?
|
|
259
|
+
lr() ? W(e, r) : n ? e() : Ie(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function B(e) {
|
|
262
262
|
var n;
|
|
263
|
-
const r =
|
|
263
|
+
const r = M(e);
|
|
264
264
|
return (n = r == null ? void 0 : r.$el) != null ? n : r;
|
|
265
265
|
}
|
|
266
|
-
const ue =
|
|
266
|
+
const ue = Ae ? 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)
|
|
@@ -272,7 +272,7 @@ function fe(...e) {
|
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
274
|
}, h = (o, i, s, f) => (o.addEventListener(i, s, f), () => o.removeEventListener(i, s, f)), v = Z(
|
|
275
|
-
() => [
|
|
275
|
+
() => [B(n), M(a)],
|
|
276
276
|
([o, i]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
@@ -285,17 +285,17 @@ function fe(...e) {
|
|
|
285
285
|
), c = () => {
|
|
286
286
|
v(), l();
|
|
287
287
|
};
|
|
288
|
-
return
|
|
288
|
+
return Ne(c), c;
|
|
289
289
|
}
|
|
290
290
|
function or() {
|
|
291
|
-
const e =
|
|
292
|
-
return n &&
|
|
291
|
+
const e = _(!1), n = q();
|
|
292
|
+
return n && W(() => {
|
|
293
293
|
e.value = !0;
|
|
294
294
|
}, n), e;
|
|
295
295
|
}
|
|
296
296
|
function cr(e) {
|
|
297
297
|
const n = or();
|
|
298
|
-
return
|
|
298
|
+
return O(() => (n.value, !!e()));
|
|
299
299
|
}
|
|
300
300
|
function ir(e, n = {}) {
|
|
301
301
|
var r, t;
|
|
@@ -312,41 +312,41 @@ function ir(e, n = {}) {
|
|
|
312
312
|
draggingElement: f = ue,
|
|
313
313
|
containerElement: m,
|
|
314
314
|
handle: k = e
|
|
315
|
-
} = n,
|
|
316
|
-
(r =
|
|
317
|
-
),
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
var
|
|
321
|
-
if (
|
|
315
|
+
} = n, y = _(
|
|
316
|
+
(r = M(i)) != null ? r : { x: 0, y: 0 }
|
|
317
|
+
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, L = (w) => {
|
|
318
|
+
M(u) && w.preventDefault(), M(l) && w.stopPropagation();
|
|
319
|
+
}, E = (w) => {
|
|
320
|
+
var g;
|
|
321
|
+
if (M(n.disabled) || !j(w) || M(h) && w.target !== M(e))
|
|
322
322
|
return;
|
|
323
|
-
const
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
323
|
+
const b = M(m), Y = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), F = M(e).getBoundingClientRect(), ee = {
|
|
324
|
+
x: w.clientX - (b ? F.left - Y.left + b.scrollLeft : F.left),
|
|
325
|
+
y: w.clientY - (b ? F.top - Y.top + b.scrollTop : F.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee,
|
|
328
|
-
}, H = (
|
|
329
|
-
if (
|
|
327
|
+
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, L(w));
|
|
328
|
+
}, H = (w) => {
|
|
329
|
+
if (M(n.disabled) || !j(w) || !C.value)
|
|
330
330
|
return;
|
|
331
|
-
const
|
|
332
|
-
let { x:
|
|
333
|
-
(s === "x" || s === "both") && (
|
|
334
|
-
x:
|
|
335
|
-
y:
|
|
336
|
-
}, v == null || v(
|
|
337
|
-
},
|
|
338
|
-
|
|
331
|
+
const g = M(m), b = M(e).getBoundingClientRect();
|
|
332
|
+
let { x: Y, y: F } = y.value;
|
|
333
|
+
(s === "x" || s === "both") && (Y = w.clientX - C.value.x, g && (Y = Math.min(Math.max(0, Y), g.scrollWidth - b.width))), (s === "y" || s === "both") && (F = w.clientY - C.value.y, g && (F = Math.min(Math.max(0, F), g.scrollHeight - b.height))), y.value = {
|
|
334
|
+
x: Y,
|
|
335
|
+
y: F
|
|
336
|
+
}, v == null || v(y.value, w), L(w);
|
|
337
|
+
}, V = (w) => {
|
|
338
|
+
M(n.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), L(w));
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
fe(k, "pointerdown",
|
|
340
|
+
if (Ae) {
|
|
341
|
+
const w = { capture: (t = n.capture) != null ? t : !0 };
|
|
342
|
+
fe(k, "pointerdown", E, w), fe(f, "pointermove", H, w), fe(f, "pointerup", V, w);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...ar(
|
|
346
|
-
position:
|
|
347
|
-
isDragging:
|
|
348
|
-
style:
|
|
349
|
-
() => `left:${
|
|
345
|
+
...ar(y),
|
|
346
|
+
position: y,
|
|
347
|
+
isDragging: O(() => !!C.value),
|
|
348
|
+
style: O(
|
|
349
|
+
() => `left:${y.value.x}px;top:${y.value.y}px;`
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
@@ -355,7 +355,7 @@ function sr(e, n, r = {}) {
|
|
|
355
355
|
let u;
|
|
356
356
|
const l = cr(() => t && "ResizeObserver" in t), h = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
}, v =
|
|
358
|
+
}, v = O(() => Array.isArray(e) ? e.map((i) => B(i)) : [B(e)]), c = Z(
|
|
359
359
|
v,
|
|
360
360
|
(i) => {
|
|
361
361
|
if (h(), l.value && t) {
|
|
@@ -368,21 +368,21 @@ function sr(e, n, r = {}) {
|
|
|
368
368
|
), o = () => {
|
|
369
369
|
h(), 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 = O(() => {
|
|
378
378
|
var i, s;
|
|
379
|
-
return (s = (i =
|
|
380
|
-
}), l =
|
|
379
|
+
return (s = (i = B(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : s.includes("svg");
|
|
380
|
+
}), l = _(n.width), h = _(n.height), { stop: v } = sr(
|
|
381
381
|
e,
|
|
382
382
|
([i]) => {
|
|
383
383
|
const s = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
|
-
const f =
|
|
385
|
+
const f = B(e);
|
|
386
386
|
if (f) {
|
|
387
387
|
const m = t.getComputedStyle(f);
|
|
388
388
|
l.value = Number.parseFloat(m.width), h.value = Number.parseFloat(m.height);
|
|
@@ -396,11 +396,11 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
396
396
|
r
|
|
397
397
|
);
|
|
398
398
|
ur(() => {
|
|
399
|
-
const i =
|
|
399
|
+
const i = B(e);
|
|
400
400
|
i && (l.value = "offsetWidth" in i ? i.offsetWidth : n.width, h.value = "offsetHeight" in i ? i.offsetHeight : n.height);
|
|
401
401
|
});
|
|
402
402
|
const c = Z(
|
|
403
|
-
() =>
|
|
403
|
+
() => B(e),
|
|
404
404
|
(i) => {
|
|
405
405
|
l.value = i ? n.width : 0, h.value = i ? n.height : 0;
|
|
406
406
|
}
|
|
@@ -417,17 +417,17 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
417
417
|
const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "title text-16px font-bold" }, mr = { class: "action" }, hr = ["form"], vr = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
}, pr = /* @__PURE__ */ dr(() => /* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */
|
|
420
|
+
}, pr = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
421
|
+
/* @__PURE__ */ x("div"),
|
|
422
|
+
/* @__PURE__ */ x("div"),
|
|
423
|
+
/* @__PURE__ */ x("div"),
|
|
424
|
+
/* @__PURE__ */ x("div")
|
|
425
425
|
], -1)), yr = [
|
|
426
426
|
pr
|
|
427
427
|
], gr = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
430
|
-
}, br = /* @__PURE__ */
|
|
430
|
+
}, br = /* @__PURE__ */ z({
|
|
431
431
|
...gr,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
@@ -463,18 +463,18 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
463
463
|
lt((p) => ({
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a = r, u = ye(
|
|
466
|
+
const t = e, a = r, u = ye(Ce), l = _(!1);
|
|
467
467
|
let h = 0, v = 0;
|
|
468
|
-
const c =
|
|
468
|
+
const c = A(), o = A(), i = A(), s = A(), f = A(), m = A(), { height: k } = G(c), { height: y } = G(i, void 0, { box: "border-box" }), { height: C } = G(s, void 0, { box: "border-box" }), { height: j } = G(f), { height: L } = G(m), { x: E, y: H } = ir(i, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
|
-
function
|
|
471
|
+
function V() {
|
|
472
472
|
u == null || u.close(t.id);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function w(p) {
|
|
475
475
|
return typeof p == "number" ? `${p}px` : p;
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const g = O(() => {
|
|
478
478
|
const p = {};
|
|
479
479
|
return t.mode === "dialog" && (p.justifyContent = "center"), t.mode === "drawer" && (p.justifyContent = {
|
|
480
480
|
left: "flex-start",
|
|
@@ -487,14 +487,14 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
487
487
|
top: "column",
|
|
488
488
|
bottom: "column"
|
|
489
489
|
}[t.position]), p;
|
|
490
|
-
}),
|
|
490
|
+
}), b = O(() => {
|
|
491
491
|
const p = {};
|
|
492
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight =
|
|
493
|
-
}),
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${E.value - h}px, ${H.value - v}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
|
|
493
|
+
}), Y = O(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
496
|
-
}),
|
|
497
|
-
const p = {}, P =
|
|
496
|
+
}), F = O(() => {
|
|
497
|
+
const p = {}, P = j.value + L.value + y.value + C.value, Oe = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
|
|
498
498
|
return t.maxHeight && (p.maxHeight = `${Oe - P}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - P}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${P}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
|
|
499
499
|
});
|
|
500
500
|
function ee() {
|
|
@@ -524,7 +524,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
524
524
|
function Xe() {
|
|
525
525
|
h = o.value.offsetLeft, v = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
|
-
|
|
527
|
+
W(() => {
|
|
528
528
|
Ke(), Ge();
|
|
529
529
|
}), at(() => {
|
|
530
530
|
});
|
|
@@ -537,71 +537,71 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
537
537
|
return n({
|
|
538
538
|
showLoading: Je,
|
|
539
539
|
hideLoading: $e
|
|
540
|
-
}), (p, P) => (
|
|
540
|
+
}), (p, P) => ($(), T("div", {
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: c,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
|
-
style: R(
|
|
545
|
-
onClick: P[0] || (P[0] = ut((Oe) => p.maskClosable &&
|
|
544
|
+
style: R(g.value),
|
|
545
|
+
onClick: P[0] || (P[0] = ut((Oe) => p.maskClosable && V(), ["self"]))
|
|
546
546
|
}, [
|
|
547
|
-
|
|
547
|
+
x("div", {
|
|
548
548
|
ref_key: "contentRef",
|
|
549
549
|
ref: o,
|
|
550
550
|
class: le(["modal-content", { [`${p.mode}-mode`]: !0, [`${p.position}-position`]: !0 }]),
|
|
551
|
-
style: R(
|
|
551
|
+
style: R(b.value)
|
|
552
552
|
}, [
|
|
553
|
-
p.header ? (
|
|
553
|
+
p.header ? ($(), T("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
556
|
ref: i,
|
|
557
557
|
class: "modal-header",
|
|
558
|
-
style: R(
|
|
558
|
+
style: R(Y.value),
|
|
559
559
|
onMousedown: Xe
|
|
560
560
|
}, [
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
p.closeable ? (
|
|
561
|
+
x("div", fr, N(p.title), 1),
|
|
562
|
+
x("div", mr, [
|
|
563
|
+
p.closeable ? ($(), T("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
566
|
-
onClick:
|
|
567
|
-
})) :
|
|
566
|
+
onClick: V
|
|
567
|
+
})) : U("", !0)
|
|
568
568
|
])
|
|
569
|
-
], 36)) :
|
|
570
|
-
|
|
569
|
+
], 36)) : U("", !0),
|
|
570
|
+
x("div", {
|
|
571
571
|
id: "modal-header-slot",
|
|
572
572
|
ref_key: "headerSlotRef",
|
|
573
573
|
ref: f
|
|
574
574
|
}, null, 512),
|
|
575
|
-
|
|
575
|
+
x("div", {
|
|
576
576
|
class: "modal-body",
|
|
577
|
-
style: R(
|
|
577
|
+
style: R(F.value)
|
|
578
578
|
}, [
|
|
579
|
-
(
|
|
579
|
+
($(), ne(De(p.component), ot(ct(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
581
|
-
|
|
581
|
+
x("div", {
|
|
582
582
|
id: "modal-footer-slot",
|
|
583
583
|
ref_key: "footerSlotRef",
|
|
584
584
|
ref: m
|
|
585
585
|
}, null, 512),
|
|
586
|
-
p.footer ? (
|
|
586
|
+
p.footer ? ($(), T("div", {
|
|
587
587
|
key: 1,
|
|
588
588
|
ref_key: "footerRef",
|
|
589
589
|
ref: s,
|
|
590
590
|
class: "modal-footer space-x-2"
|
|
591
591
|
}, [
|
|
592
|
-
|
|
592
|
+
x("button", {
|
|
593
593
|
class: "cancel-button",
|
|
594
594
|
type: "button",
|
|
595
595
|
onClick: He
|
|
596
|
-
},
|
|
597
|
-
|
|
596
|
+
}, N(p.cancelText), 1),
|
|
597
|
+
x("button", {
|
|
598
598
|
class: "submit-button",
|
|
599
599
|
form: p.form,
|
|
600
600
|
type: "submit",
|
|
601
601
|
onClick: ee
|
|
602
|
-
},
|
|
603
|
-
], 512)) :
|
|
604
|
-
l.value ? (
|
|
602
|
+
}, N(p.submitText), 9, hr)
|
|
603
|
+
], 512)) : U("", !0),
|
|
604
|
+
l.value ? ($(), T("div", vr, yr)) : U("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
@@ -610,7 +610,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
610
610
|
for (const [t, a] of n)
|
|
611
611
|
r[t] = a;
|
|
612
612
|
return r;
|
|
613
|
-
}, kr = /* @__PURE__ */ oe(br, [["__scopeId", "data-v-9a7af353"]]), wr = { class: "modal-dialog" }, xr = { class: "dialog-body" },
|
|
613
|
+
}, kr = /* @__PURE__ */ oe(br, [["__scopeId", "data-v-9a7af353"]]), wr = { class: "modal-dialog" }, xr = { class: "dialog-body" }, Cr = { class: "dialog-title" }, Sr = { class: "dialog-content" }, _r = /* @__PURE__ */ z({
|
|
614
614
|
__name: "modal-dialog",
|
|
615
615
|
props: {
|
|
616
616
|
type: {},
|
|
@@ -623,7 +623,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
623
623
|
footer: {}
|
|
624
624
|
},
|
|
625
625
|
setup(e) {
|
|
626
|
-
const n = e, r = Be(), t =
|
|
626
|
+
const n = e, r = Be(), t = O(() => n.title ? n.title : {
|
|
627
627
|
confirm: "提示",
|
|
628
628
|
info: "提示",
|
|
629
629
|
warning: "警告",
|
|
@@ -636,47 +636,47 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
636
636
|
async function u() {
|
|
637
637
|
n.onCancel && await n.onCancel(), r.close();
|
|
638
638
|
}
|
|
639
|
-
return (l, h) => (
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
639
|
+
return (l, h) => ($(), T("section", wr, [
|
|
640
|
+
x("div", xr, [
|
|
641
|
+
x("div", Cr, N(t.value), 1),
|
|
642
|
+
x("div", Sr, N(l.content), 1)
|
|
643
643
|
]),
|
|
644
|
-
|
|
644
|
+
x("div", {
|
|
645
645
|
class: "dialog-footer space-x-2",
|
|
646
646
|
style: R(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
647
647
|
}, [
|
|
648
|
-
l.footer ? (
|
|
649
|
-
|
|
648
|
+
l.footer ? ($(), ne(De(l.footer), { key: 0 })) : ($(), T(re, { key: 1 }, [
|
|
649
|
+
x("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
652
652
|
onClick: a
|
|
653
|
-
},
|
|
654
|
-
l.type === "confirm" ? (
|
|
653
|
+
}, N(l.okText), 1),
|
|
654
|
+
l.type === "confirm" ? ($(), T("button", {
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "cancel-button",
|
|
657
657
|
type: "button",
|
|
658
658
|
onClick: u
|
|
659
|
-
},
|
|
659
|
+
}, N(l.cancelText), 1)) : U("", !0)
|
|
660
660
|
], 64))
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}), $r = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-0c6b8db2"]]), Or = (e) => (ze("data-v-559bdf2e"), e = e(), Ee(), e), Yr = { class: "flex-center" }, Fr = /* @__PURE__ */ Or(() => /* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
664
|
+
}), $r = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-0c6b8db2"]]), Or = (e) => (ze("data-v-559bdf2e"), e = e(), Ee(), e), Yr = { class: "flex-center" }, Fr = /* @__PURE__ */ Or(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
|
|
665
|
+
/* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
666
|
+
/* @__PURE__ */ x("div"),
|
|
667
|
+
/* @__PURE__ */ x("div"),
|
|
668
|
+
/* @__PURE__ */ x("div"),
|
|
669
|
+
/* @__PURE__ */ x("div")
|
|
670
670
|
])
|
|
671
|
-
], -1)), Mr = { class: "modal-loading-text" }, Tr = /* @__PURE__ */
|
|
671
|
+
], -1)), Mr = { class: "modal-loading-text" }, Tr = /* @__PURE__ */ z({
|
|
672
672
|
__name: "modal-loading",
|
|
673
673
|
props: {
|
|
674
674
|
text: { default: "加载中" }
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
|
-
return (n, r) => (
|
|
677
|
+
return (n, r) => ($(), T("section", Yr, [
|
|
678
678
|
Fr,
|
|
679
|
-
|
|
679
|
+
x("div", Mr, N(n.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
682
|
}), Lr = /* @__PURE__ */ oe(Tr, [["__scopeId", "data-v-559bdf2e"]]), jr = {
|
|
@@ -685,7 +685,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
685
685
|
}, Pr = {
|
|
686
686
|
name: "ModalProvider",
|
|
687
687
|
inheritAttrs: !0
|
|
688
|
-
}, Dr = /* @__PURE__ */
|
|
688
|
+
}, Dr = /* @__PURE__ */ z({
|
|
689
689
|
...Pr,
|
|
690
690
|
props: {
|
|
691
691
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
@@ -699,35 +699,35 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
699
699
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
700
700
|
},
|
|
701
701
|
setup(e, { expose: n }) {
|
|
702
|
-
const r =
|
|
702
|
+
const r = A([]), t = _(!1), a = q();
|
|
703
703
|
function u(s, f = {}, m = {}) {
|
|
704
704
|
const k = nt(
|
|
705
705
|
() => Promise.resolve(typeof s == "string" ? $r : s)
|
|
706
706
|
);
|
|
707
707
|
typeof s == "string" && (f.type = s, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
|
|
708
|
-
const
|
|
708
|
+
const y = Math.random().toString(32).slice(2), C = Object.assign({
|
|
709
709
|
zIndex: typeof s == "string" ? 1100 : 1e3
|
|
710
|
-
}, m),
|
|
710
|
+
}, m), j = new Promise((L, E) => {
|
|
711
711
|
r.value.push({
|
|
712
|
-
id:
|
|
712
|
+
id: y,
|
|
713
713
|
component: k,
|
|
714
714
|
props: f || {},
|
|
715
715
|
options: {
|
|
716
|
-
...
|
|
716
|
+
...C,
|
|
717
717
|
type: typeof s == "string" ? s : "component"
|
|
718
718
|
},
|
|
719
719
|
resolve: L,
|
|
720
|
-
reject:
|
|
720
|
+
reject: E,
|
|
721
721
|
listeners: []
|
|
722
722
|
}), Q(r);
|
|
723
723
|
}).catch((L) => L === "CANCEL" ? new Promise(() => {
|
|
724
724
|
}) : Promise.reject(L));
|
|
725
|
-
return Object.assign(
|
|
726
|
-
close: () => l(
|
|
725
|
+
return Object.assign(j, {
|
|
726
|
+
close: () => l(y)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
function l(s, f) {
|
|
730
|
-
const m = r.value.findIndex((
|
|
730
|
+
const m = r.value.findIndex((y) => y.id === s);
|
|
731
731
|
if (m < 0)
|
|
732
732
|
return;
|
|
733
733
|
const k = r.value[m];
|
|
@@ -739,21 +739,21 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
739
739
|
}), r.value = [], Q(r));
|
|
740
740
|
}
|
|
741
741
|
function v(s, f) {
|
|
742
|
-
const m = r.value.find((
|
|
742
|
+
const m = r.value.find((y) => y.id === s);
|
|
743
743
|
if (!m)
|
|
744
744
|
return;
|
|
745
|
-
const k = m.listeners.find((
|
|
745
|
+
const k = m.listeners.find((y) => y.event === f);
|
|
746
746
|
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
|
-
close: (
|
|
748
|
+
close: (y) => l(m.id, y),
|
|
749
749
|
closeAll: h,
|
|
750
750
|
showLoading: () => c(m.id),
|
|
751
751
|
hideLoading: () => o(m.id),
|
|
752
|
-
confirm: (
|
|
753
|
-
success: (
|
|
754
|
-
error: (
|
|
755
|
-
warning: (
|
|
756
|
-
info: (
|
|
752
|
+
confirm: (y) => u("confirm", y),
|
|
753
|
+
success: (y) => u("success", y),
|
|
754
|
+
error: (y) => u("error", y),
|
|
755
|
+
warning: (y) => u("warning", y),
|
|
756
|
+
info: (y) => u("info", y)
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
function c(s, f) {
|
|
@@ -787,13 +787,13 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
787
787
|
return f.hideLoading();
|
|
788
788
|
}
|
|
789
789
|
function i(s, f, m) {
|
|
790
|
-
const k = r.value.find((
|
|
790
|
+
const k = r.value.find((y) => y.id === s);
|
|
791
791
|
k && k.listeners.push({
|
|
792
792
|
event: f,
|
|
793
793
|
callback: m
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
return he(
|
|
796
|
+
return he(Ce, {
|
|
797
797
|
open: u,
|
|
798
798
|
close: l,
|
|
799
799
|
closeAll: h,
|
|
@@ -805,18 +805,18 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
807
|
closeAll: h
|
|
808
|
-
}),
|
|
808
|
+
}), W(() => {
|
|
809
809
|
t.value = !0;
|
|
810
|
-
}), (s, f) => (
|
|
810
|
+
}), (s, f) => ($(), T(re, null, [
|
|
811
811
|
Qe(s.$slots, "default", {}, void 0, !0),
|
|
812
|
-
t.value ? (
|
|
813
|
-
(
|
|
812
|
+
t.value ? ($(), T("div", jr, [
|
|
813
|
+
($(), ne(Ze, {
|
|
814
814
|
disabled: !s.appendToBody,
|
|
815
815
|
to: typeof s.appendToBody == "string" ? s.appendToBody : "body"
|
|
816
816
|
}, [
|
|
817
817
|
d(et, { name: "modal-fade" }, {
|
|
818
818
|
default: tt(() => [
|
|
819
|
-
(
|
|
819
|
+
($(!0), T(re, null, rt(r.value, (m) => ($(), ne(kr, ge({
|
|
820
820
|
id: m.id,
|
|
821
821
|
key: m.id,
|
|
822
822
|
ref_for: !0,
|
|
@@ -834,7 +834,7 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
834
834
|
_: 1
|
|
835
835
|
})
|
|
836
836
|
], 8, ["disabled", "to"]))
|
|
837
|
-
])) :
|
|
837
|
+
])) : U("", !0)
|
|
838
838
|
], 64));
|
|
839
839
|
}
|
|
840
840
|
}), Ir = /* @__PURE__ */ oe(Dr, [["__scopeId", "data-v-60414811"]]);
|
|
@@ -846,7 +846,7 @@ function me(e, n) {
|
|
|
846
846
|
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === n ? a : null;
|
|
847
847
|
}
|
|
848
848
|
function Be() {
|
|
849
|
-
const e = ye(
|
|
849
|
+
const e = ye(Ce), n = q();
|
|
850
850
|
function r(t, a, u) {
|
|
851
851
|
if (!e)
|
|
852
852
|
throw new Error("Not Found Modal Provider Component");
|
|
@@ -904,7 +904,7 @@ const Te = {
|
|
|
904
904
|
source: Symbol("Source")
|
|
905
905
|
};
|
|
906
906
|
function zr(e, n) {
|
|
907
|
-
const r =
|
|
907
|
+
const r = _({});
|
|
908
908
|
return e == null || e.forEach((a) => {
|
|
909
909
|
let u = null;
|
|
910
910
|
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), n && n[a.key] !== void 0 && (u = n[a.key]), r.value[a.key] = u;
|
|
@@ -912,7 +912,7 @@ function zr(e, n) {
|
|
|
912
912
|
r.value = a;
|
|
913
913
|
}];
|
|
914
914
|
}
|
|
915
|
-
var
|
|
915
|
+
var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
916
916
|
function Ve(e) {
|
|
917
917
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
918
918
|
}
|
|
@@ -920,7 +920,7 @@ var Er = { exports: {} };
|
|
|
920
920
|
(function(e, n) {
|
|
921
921
|
(function(r, t) {
|
|
922
922
|
e.exports = t(S);
|
|
923
|
-
})(
|
|
923
|
+
})(Se, function(r) {
|
|
924
924
|
function t(l) {
|
|
925
925
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
926
926
|
default: l
|
|
@@ -977,7 +977,7 @@ var Ue = { exports: {} };
|
|
|
977
977
|
(function(e, n) {
|
|
978
978
|
(function(r, t) {
|
|
979
979
|
e.exports = t();
|
|
980
|
-
})(
|
|
980
|
+
})(Se, function() {
|
|
981
981
|
var r = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
983
|
var h = u.prototype;
|
|
@@ -999,12 +999,12 @@ var Ue = { exports: {} };
|
|
|
999
999
|
});
|
|
1000
1000
|
})(Ue);
|
|
1001
1001
|
var Rr = Ue.exports;
|
|
1002
|
-
const
|
|
1002
|
+
const Nr = /* @__PURE__ */ Ve(Rr);
|
|
1003
1003
|
var qe = { exports: {} };
|
|
1004
1004
|
(function(e, n) {
|
|
1005
1005
|
(function(r, t) {
|
|
1006
1006
|
e.exports = t();
|
|
1007
|
-
})(
|
|
1007
|
+
})(Se, function() {
|
|
1008
1008
|
var r = "month", t = "quarter";
|
|
1009
1009
|
return function(a, u) {
|
|
1010
1010
|
var l = u.prototype;
|
|
@@ -1027,9 +1027,9 @@ var qe = { exports: {} };
|
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
1029
1029
|
})(qe);
|
|
1030
|
-
var
|
|
1031
|
-
const Br = /* @__PURE__ */ Ve(
|
|
1032
|
-
S.extend(
|
|
1030
|
+
var Ar = qe.exports;
|
|
1031
|
+
const Br = /* @__PURE__ */ Ve(Ar);
|
|
1032
|
+
S.extend(Nr);
|
|
1033
1033
|
S.extend(Br);
|
|
1034
1034
|
S.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
@@ -1159,7 +1159,7 @@ function qr(e) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1161
1161
|
function Wr() {
|
|
1162
|
-
const e =
|
|
1162
|
+
const e = _(/* @__PURE__ */ new Map());
|
|
1163
1163
|
return [e, (r) => e.value = r];
|
|
1164
1164
|
}
|
|
1165
1165
|
function Hr(e) {
|
|
@@ -1262,7 +1262,7 @@ function Gr(e) {
|
|
|
1262
1262
|
return d("span", null, [h ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1263
1263
|
}
|
|
1264
1264
|
function l() {
|
|
1265
|
-
return d(
|
|
1265
|
+
return d(Ct, {
|
|
1266
1266
|
ref: (h) => n = h,
|
|
1267
1267
|
modelValue: t[a.key],
|
|
1268
1268
|
"onUpdate:modelValue": (h) => t[a.key] = h,
|
|
@@ -1316,7 +1316,7 @@ function Kr(e) {
|
|
|
1316
1316
|
return d("span", null, [s(o), D(" - "), s(i)]);
|
|
1317
1317
|
}
|
|
1318
1318
|
function v() {
|
|
1319
|
-
return d("div", null, [d(
|
|
1319
|
+
return d("div", null, [d(St, {
|
|
1320
1320
|
"disabled-input": !0,
|
|
1321
1321
|
style: {
|
|
1322
1322
|
width: "300px"
|
|
@@ -1390,7 +1390,7 @@ function Jr(e) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1392
1392
|
function Qr() {
|
|
1393
|
-
const e =
|
|
1393
|
+
const e = _([]);
|
|
1394
1394
|
return [e, (r) => e.value = r];
|
|
1395
1395
|
}
|
|
1396
1396
|
function Zr(e) {
|
|
@@ -1448,21 +1448,21 @@ function Zr(e) {
|
|
|
1448
1448
|
return (o, i) => {
|
|
1449
1449
|
e.default && !r && (o[i.key] = e.default, r = !0);
|
|
1450
1450
|
function s() {
|
|
1451
|
-
const m = o[i.key], k = (
|
|
1452
|
-
const [
|
|
1451
|
+
const m = o[i.key], k = (y) => {
|
|
1452
|
+
const [C] = We({
|
|
1453
1453
|
data: t.value,
|
|
1454
1454
|
labelProp: "title",
|
|
1455
1455
|
valueProp: "key",
|
|
1456
|
-
key:
|
|
1456
|
+
key: y
|
|
1457
1457
|
}).reverse() || [];
|
|
1458
|
-
return
|
|
1458
|
+
return C == null ? void 0 : C.title;
|
|
1459
1459
|
};
|
|
1460
1460
|
if (e.multiple) {
|
|
1461
|
-
const
|
|
1462
|
-
return d("span", null, [
|
|
1461
|
+
const y = m.map((C) => k(C));
|
|
1462
|
+
return d("span", null, [y.join(", ")]);
|
|
1463
1463
|
} else {
|
|
1464
|
-
const
|
|
1465
|
-
return d("span", null, [
|
|
1464
|
+
const y = k(m);
|
|
1465
|
+
return d("span", null, [y]);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
function f() {
|
|
@@ -1495,7 +1495,7 @@ function Zr(e) {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1497
1497
|
function en() {
|
|
1498
|
-
const e =
|
|
1498
|
+
const e = _([]);
|
|
1499
1499
|
return [e, (r) => e.value = r];
|
|
1500
1500
|
}
|
|
1501
1501
|
function tn(e) {
|
|
@@ -1548,33 +1548,33 @@ function tn(e) {
|
|
|
1548
1548
|
return (c, o) => {
|
|
1549
1549
|
e.default && !r && (c[o.key] = e.default, r = !0);
|
|
1550
1550
|
function i() {
|
|
1551
|
-
const f = c[o.key], m = (
|
|
1551
|
+
const f = c[o.key], m = (y) => We({
|
|
1552
1552
|
data: t.value,
|
|
1553
1553
|
labelProp: "label",
|
|
1554
1554
|
valueProp: "value",
|
|
1555
|
-
key:
|
|
1556
|
-
}).map((
|
|
1555
|
+
key: y
|
|
1556
|
+
}).map((j) => j.label).join("/"), k = (y) => Jr({
|
|
1557
1557
|
data: t.value,
|
|
1558
1558
|
labelProp: "label",
|
|
1559
1559
|
valueProp: "value",
|
|
1560
|
-
path:
|
|
1561
|
-
}).map((
|
|
1560
|
+
path: y
|
|
1561
|
+
}).map((j) => j.label).join("/");
|
|
1562
1562
|
switch (!0) {
|
|
1563
1563
|
case (!e.pathMode && !e.multiple): {
|
|
1564
|
-
const
|
|
1565
|
-
return d("span", null, [
|
|
1564
|
+
const y = m(f);
|
|
1565
|
+
return d("span", null, [y]);
|
|
1566
1566
|
}
|
|
1567
1567
|
case (!e.pathMode && e.multiple): {
|
|
1568
|
-
const
|
|
1569
|
-
return d("span", null, [
|
|
1568
|
+
const y = f.map((C) => m(C));
|
|
1569
|
+
return d("span", null, [y.join(", ")]);
|
|
1570
1570
|
}
|
|
1571
1571
|
case (e.pathMode && !e.multiple): {
|
|
1572
|
-
const
|
|
1573
|
-
return d("span", null, [
|
|
1572
|
+
const y = k(f);
|
|
1573
|
+
return d("span", null, [y]);
|
|
1574
1574
|
}
|
|
1575
1575
|
case (e.pathMode && e.multiple): {
|
|
1576
|
-
const
|
|
1577
|
-
return d("span", null, [
|
|
1576
|
+
const y = f.map((C) => k(C));
|
|
1577
|
+
return d("span", null, [y.join(", ")]);
|
|
1578
1578
|
}
|
|
1579
1579
|
default:
|
|
1580
1580
|
return d("span", null, null);
|
|
@@ -1643,7 +1643,7 @@ function ln(e) {
|
|
|
1643
1643
|
return e != null && e.thousands ? t(h) : h;
|
|
1644
1644
|
}, u = (l) => l.replace(/,/g, "");
|
|
1645
1645
|
return (l, h) => {
|
|
1646
|
-
const v =
|
|
1646
|
+
const v = _(n(l[h.key]));
|
|
1647
1647
|
Z(v, (f) => {
|
|
1648
1648
|
l[h.key] = r(f);
|
|
1649
1649
|
});
|
|
@@ -1717,7 +1717,7 @@ function je(e, n) {
|
|
|
1717
1717
|
function un(e) {
|
|
1718
1718
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1719
1719
|
}
|
|
1720
|
-
const on = /* @__PURE__ */
|
|
1720
|
+
const on = /* @__PURE__ */ z({
|
|
1721
1721
|
props: {
|
|
1722
1722
|
form: {
|
|
1723
1723
|
type: Object,
|
|
@@ -1738,7 +1738,7 @@ const on = /* @__PURE__ */ E({
|
|
|
1738
1738
|
instance: void 0,
|
|
1739
1739
|
form: []
|
|
1740
1740
|
}, v.push(i)), i.form.push(c);
|
|
1741
|
-
}), v), []).sort((v, c) => v.group === "默认" ? -1 : c.group === "默认" ? 1 : v.group > c.group ? -1 : 1), u =
|
|
1741
|
+
}), v), []).sort((v, c) => v.group === "默认" ? -1 : c.group === "默认" ? 1 : v.group > c.group ? -1 : 1), u = _("默认");
|
|
1742
1742
|
return {
|
|
1743
1743
|
formItems: r,
|
|
1744
1744
|
groups: t,
|
|
@@ -1819,7 +1819,7 @@ const on = /* @__PURE__ */ E({
|
|
|
1819
1819
|
function Pe(e) {
|
|
1820
1820
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1821
1821
|
}
|
|
1822
|
-
const pe = /* @__PURE__ */
|
|
1822
|
+
const pe = /* @__PURE__ */ z({
|
|
1823
1823
|
props: {
|
|
1824
1824
|
form: {
|
|
1825
1825
|
type: Object,
|
|
@@ -1849,13 +1849,11 @@ const pe = /* @__PURE__ */ E({
|
|
|
1849
1849
|
},
|
|
1850
1850
|
name: {
|
|
1851
1851
|
type: String,
|
|
1852
|
-
required: !1
|
|
1853
|
-
default: `form-${Math.random().toString(32).slice(2)}`
|
|
1852
|
+
required: !1
|
|
1854
1853
|
},
|
|
1855
1854
|
id: {
|
|
1856
1855
|
type: String,
|
|
1857
|
-
required: !1
|
|
1858
|
-
default: `form-${Math.random().toString(32).slice(2)}`
|
|
1856
|
+
required: !1
|
|
1859
1857
|
},
|
|
1860
1858
|
collapsedMode: {
|
|
1861
1859
|
type: String,
|
|
@@ -1888,45 +1886,45 @@ const pe = /* @__PURE__ */ E({
|
|
|
1888
1886
|
setup(e, {
|
|
1889
1887
|
emit: n
|
|
1890
1888
|
}) {
|
|
1891
|
-
const r =
|
|
1892
|
-
he(Te.id,
|
|
1893
|
-
const
|
|
1889
|
+
const r = _(), [t, a] = zr(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), h = _(), v = () => l.value = !l.value, c = _(""), o = _("");
|
|
1890
|
+
he(Te.id, c), he(Te.source, t);
|
|
1891
|
+
const i = () => {
|
|
1894
1892
|
n("submit", t.value), n("update:model-value", t.value);
|
|
1895
|
-
},
|
|
1893
|
+
}, s = O(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1896
1894
|
switch (!0) {
|
|
1897
|
-
case typeof
|
|
1898
|
-
return
|
|
1899
|
-
case typeof
|
|
1900
|
-
return
|
|
1895
|
+
case typeof g.visiable == "boolean":
|
|
1896
|
+
return g.visiable;
|
|
1897
|
+
case typeof g.visiable == "function":
|
|
1898
|
+
return g.visiable(t.value);
|
|
1901
1899
|
default:
|
|
1902
1900
|
return !0;
|
|
1903
1901
|
}
|
|
1904
|
-
})),
|
|
1902
|
+
})), f = O(() => {
|
|
1905
1903
|
if (!u.value)
|
|
1906
1904
|
return 1;
|
|
1907
|
-
const
|
|
1908
|
-
return u.value -
|
|
1909
|
-
}),
|
|
1910
|
-
...
|
|
1911
|
-
validator: (
|
|
1912
|
-
const
|
|
1913
|
-
if (typeof
|
|
1914
|
-
return
|
|
1905
|
+
const g = s.value.reduce((b, Y) => b + ((Y == null ? void 0 : Y.span) || 1), 0);
|
|
1906
|
+
return u.value - g % u.value;
|
|
1907
|
+
}), m = (g) => g != null && g.validator ? {
|
|
1908
|
+
...g,
|
|
1909
|
+
validator: (b, Y) => {
|
|
1910
|
+
const F = g.validator(b, Y);
|
|
1911
|
+
if (typeof F == "function")
|
|
1912
|
+
return F(t.value);
|
|
1915
1913
|
}
|
|
1916
|
-
} :
|
|
1917
|
-
function
|
|
1918
|
-
var
|
|
1914
|
+
} : g, k = O(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(m) : g[b.key] = m(b.rule)), g), {}));
|
|
1915
|
+
function y() {
|
|
1916
|
+
var b;
|
|
1919
1917
|
if (e.columns)
|
|
1920
1918
|
return;
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1919
|
+
const g = (b = r.value) == null ? void 0 : b.$el;
|
|
1920
|
+
g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
|
|
1923
1921
|
}
|
|
1924
|
-
function
|
|
1925
|
-
var
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1922
|
+
function C() {
|
|
1923
|
+
var b;
|
|
1924
|
+
const g = (b = r.value) == null ? void 0 : b.$el;
|
|
1925
|
+
g && (g.id = c.value);
|
|
1928
1926
|
}
|
|
1929
|
-
function
|
|
1927
|
+
function j() {
|
|
1930
1928
|
h.value.open(on, {
|
|
1931
1929
|
form: e.form,
|
|
1932
1930
|
value: t.value
|
|
@@ -1934,54 +1932,55 @@ const pe = /* @__PURE__ */ E({
|
|
|
1934
1932
|
title: "高级搜索",
|
|
1935
1933
|
footer: !1,
|
|
1936
1934
|
submitText: "搜索"
|
|
1937
|
-
}).then((
|
|
1938
|
-
|
|
1935
|
+
}).then((g) => {
|
|
1936
|
+
g && (L(g), i());
|
|
1939
1937
|
});
|
|
1940
1938
|
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1939
|
+
W(() => {
|
|
1940
|
+
const g = Math.random().toString(32).slice(2);
|
|
1941
|
+
c.value = e.id ?? g, o.value = e.name ?? g, y(), C(), window && window.addEventListener("resize", y);
|
|
1943
1942
|
});
|
|
1944
|
-
function
|
|
1943
|
+
function L(g) {
|
|
1945
1944
|
a({
|
|
1946
1945
|
...t.value,
|
|
1947
|
-
...
|
|
1946
|
+
...g || {}
|
|
1948
1947
|
});
|
|
1949
1948
|
}
|
|
1950
|
-
function
|
|
1951
|
-
t.value[
|
|
1949
|
+
function E(g, b) {
|
|
1950
|
+
t.value[g] = b, L({
|
|
1952
1951
|
...t.value
|
|
1953
1952
|
});
|
|
1954
1953
|
}
|
|
1955
|
-
function
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1954
|
+
function H(g) {
|
|
1955
|
+
const b = e.form.find((F) => F.key === g), Y = (typeof b.default == "function" ? b.default() : b.default) || null;
|
|
1956
|
+
E(g, Y);
|
|
1958
1957
|
}
|
|
1959
|
-
function
|
|
1960
|
-
var
|
|
1961
|
-
(
|
|
1958
|
+
function V() {
|
|
1959
|
+
var g;
|
|
1960
|
+
(g = r.value) == null || g.resetFields();
|
|
1962
1961
|
}
|
|
1963
|
-
function
|
|
1964
|
-
var
|
|
1965
|
-
return (
|
|
1962
|
+
function w() {
|
|
1963
|
+
var g;
|
|
1964
|
+
return (g = r.value) == null ? void 0 : g.validate();
|
|
1966
1965
|
}
|
|
1967
|
-
return
|
|
1968
|
-
|
|
1969
|
-
|
|
1966
|
+
return {
|
|
1967
|
+
formId: c,
|
|
1968
|
+
formName: o,
|
|
1970
1969
|
formSource: t,
|
|
1971
1970
|
formInstance: r,
|
|
1972
1971
|
formColumns: u,
|
|
1973
|
-
formRules:
|
|
1972
|
+
formRules: k,
|
|
1974
1973
|
formCollspased: l,
|
|
1975
|
-
formActiosSpan:
|
|
1976
|
-
formItems:
|
|
1974
|
+
formActiosSpan: f,
|
|
1975
|
+
formItems: s,
|
|
1977
1976
|
toggleFormCollapsed: v,
|
|
1978
|
-
updateFormField:
|
|
1979
|
-
resetFormField:
|
|
1980
|
-
updateFormSource:
|
|
1981
|
-
reset:
|
|
1982
|
-
validate:
|
|
1983
|
-
onSubmitSuccess:
|
|
1984
|
-
openCollapsedDialog:
|
|
1977
|
+
updateFormField: E,
|
|
1978
|
+
resetFormField: H,
|
|
1979
|
+
updateFormSource: L,
|
|
1980
|
+
reset: V,
|
|
1981
|
+
validate: w,
|
|
1982
|
+
onSubmitSuccess: i,
|
|
1983
|
+
openCollapsedDialog: j,
|
|
1985
1984
|
modalInstance: h
|
|
1986
1985
|
};
|
|
1987
1986
|
},
|
|
@@ -1991,7 +1990,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
1991
1990
|
return;
|
|
1992
1991
|
const r = this.form.filter((a) => {
|
|
1993
1992
|
const u = this.formSource[a.key];
|
|
1994
|
-
return u != null;
|
|
1993
|
+
return u != null && u !== "";
|
|
1995
1994
|
}), t = (a) => {
|
|
1996
1995
|
var l;
|
|
1997
1996
|
const u = this.formItems.find((h) => h.key === a);
|
|
@@ -2087,7 +2086,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
2087
2086
|
ref: (r) => this.modalInstance = r
|
|
2088
2087
|
}, {
|
|
2089
2088
|
default: () => [d(Mt, ge({
|
|
2090
|
-
name: this.
|
|
2089
|
+
name: this.formName
|
|
2091
2090
|
}, {
|
|
2092
2091
|
labelAlign: "right",
|
|
2093
2092
|
layout: this.$props.layout,
|
|
@@ -2119,13 +2118,13 @@ function fn(e) {
|
|
|
2119
2118
|
return e;
|
|
2120
2119
|
}
|
|
2121
2120
|
function mn(e) {
|
|
2122
|
-
const n =
|
|
2121
|
+
const n = q(), r = _();
|
|
2123
2122
|
function t() {
|
|
2124
2123
|
var u, l;
|
|
2125
2124
|
const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
2126
2125
|
a && (r.value = a);
|
|
2127
2126
|
}
|
|
2128
|
-
return
|
|
2127
|
+
return W(t), ht(t), r;
|
|
2129
2128
|
}
|
|
2130
2129
|
const hn = {
|
|
2131
2130
|
install(e, n) {
|