@gopowerteam/form-render 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/form-items/cascader/index.d.ts +4 -2
- package/dist/cjs/form-items/input/index.d.ts +1 -1
- package/dist/cjs/form-items/select/index.d.ts +1 -1
- package/dist/cjs/form-items/switch/index.d.ts +1 -1
- package/dist/cjs/form-items/tree-select/index.d.ts +3 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-items/cascader/index.d.ts +4 -2
- package/dist/es/form-items/input/index.d.ts +1 -1
- package/dist/es/form-items/select/index.d.ts +1 -1
- package/dist/es/form-items/switch/index.d.ts +1 -1
- package/dist/es/form-items/tree-select/index.d.ts +3 -1
- package/dist/es/index.mjs +540 -534
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { getCurrentInstance as q, inject as ye, defineComponent as E, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, ref as _, provide as he, onMounted as W, Fragment as
|
|
1
|
+
import { getCurrentInstance as q, inject as ye, defineComponent as E, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, 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 ze, isRef as ae, toRefs as ft, customRef as mt, nextTick as Re, getCurrentScope as ht, onScopeDispose as vt, pushScopeId as Ae, popScopeId as Ne, isVNode as be, createTextVNode as I, h as Oe, onUpdated as pt } from "vue";
|
|
2
2
|
import { DatePicker as yt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as _t, RangePicker as $t, Textarea as Ft, TreeSelect as Ot, Cascader as Yt, FormItem as ve, Divider as Ye, Button as D, Tabs as Mt, TabPane as Tt, Form as Pt, Grid as jt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
|
|
3
3
|
import S from "dayjs";
|
|
4
|
-
import { FormRenderResolver as
|
|
4
|
+
import { FormRenderResolver as Cn } from "./resolver.mjs";
|
|
5
5
|
const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
|
|
6
|
-
var
|
|
6
|
+
var n, r, t;
|
|
7
7
|
const a = q(), u = ye(It, void 0);
|
|
8
|
-
return `${(t = (
|
|
8
|
+
return `${(t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = a == null ? void 0 : a.appContext.config.globalProperties[Et]) == null ? void 0 : n.classPrefix) != null ? t : Dt}-${e}`;
|
|
9
9
|
}, zt = Object.prototype.toString;
|
|
10
10
|
function we(e) {
|
|
11
11
|
return zt.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var xe = (e,
|
|
14
|
-
for (const [
|
|
15
|
-
e[
|
|
13
|
+
var xe = (e, n) => {
|
|
14
|
+
for (const [r, t] of n)
|
|
15
|
+
e[r] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
18
|
const Rt = E({
|
|
@@ -42,10 +42,10 @@ const Rt = E({
|
|
|
42
42
|
click: (e) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(e, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: n
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
[`${
|
|
47
|
+
const r = ke("icon"), t = F(() => [r, `${r}-down`, {
|
|
48
|
+
[`${r}-spin`]: e.spin
|
|
49
49
|
}]), a = F(() => {
|
|
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;
|
|
@@ -54,14 +54,14 @@ const Rt = E({
|
|
|
54
54
|
cls: t,
|
|
55
55
|
innerStyle: a,
|
|
56
56
|
onClick: (l) => {
|
|
57
|
-
|
|
57
|
+
n("click", l);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Nt = /* @__PURE__ */ x("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
63
|
}, null, -1), Vt = [Nt];
|
|
64
|
-
function Bt(e,
|
|
64
|
+
function Bt(e, n, r, t, a, u) {
|
|
65
65
|
return $(), T("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
@@ -72,14 +72,14 @@ function Bt(e, r, n, t, a, u) {
|
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
76
|
}, Vt, 14, At);
|
|
77
77
|
}
|
|
78
78
|
var ie = /* @__PURE__ */ xe(Rt, [["render", Bt]]);
|
|
79
79
|
const Ut = Object.assign(ie, {
|
|
80
|
-
install: (e,
|
|
81
|
-
var
|
|
82
|
-
const t = (
|
|
80
|
+
install: (e, n) => {
|
|
81
|
+
var r;
|
|
82
|
+
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
83
83
|
e.component(t + ie.name, ie);
|
|
84
84
|
}
|
|
85
85
|
}), qt = E({
|
|
@@ -109,10 +109,10 @@ const Ut = Object.assign(ie, {
|
|
|
109
109
|
click: (e) => !0
|
|
110
110
|
},
|
|
111
111
|
setup(e, {
|
|
112
|
-
emit:
|
|
112
|
+
emit: n
|
|
113
113
|
}) {
|
|
114
|
-
const
|
|
115
|
-
[`${
|
|
114
|
+
const r = ke("icon"), t = F(() => [r, `${r}-up`, {
|
|
115
|
+
[`${r}-spin`]: e.spin
|
|
116
116
|
}]), a = F(() => {
|
|
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;
|
|
@@ -121,14 +121,14 @@ const Ut = Object.assign(ie, {
|
|
|
121
121
|
cls: t,
|
|
122
122
|
innerStyle: a,
|
|
123
123
|
onClick: (l) => {
|
|
124
|
-
|
|
124
|
+
n("click", l);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
}), Wt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Ht = /* @__PURE__ */ x("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
130
|
}, null, -1), Gt = [Ht];
|
|
131
|
-
function Kt(e,
|
|
131
|
+
function Kt(e, n, r, t, a, u) {
|
|
132
132
|
return $(), T("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
@@ -139,14 +139,14 @@ function Kt(e, r, n, t, a, u) {
|
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
|
-
onClick:
|
|
142
|
+
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
143
143
|
}, Gt, 14, Wt);
|
|
144
144
|
}
|
|
145
145
|
var se = /* @__PURE__ */ xe(qt, [["render", Kt]]);
|
|
146
146
|
const Xt = Object.assign(se, {
|
|
147
|
-
install: (e,
|
|
148
|
-
var
|
|
149
|
-
const t = (
|
|
147
|
+
install: (e, n) => {
|
|
148
|
+
var r;
|
|
149
|
+
const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
|
|
150
150
|
e.component(t + se.name, se);
|
|
151
151
|
}
|
|
152
152
|
}), Jt = E({
|
|
@@ -176,10 +176,10 @@ const Xt = Object.assign(se, {
|
|
|
176
176
|
click: (e) => !0
|
|
177
177
|
},
|
|
178
178
|
setup(e, {
|
|
179
|
-
emit:
|
|
179
|
+
emit: n
|
|
180
180
|
}) {
|
|
181
|
-
const
|
|
182
|
-
[`${
|
|
181
|
+
const r = ke("icon"), t = F(() => [r, `${r}-search`, {
|
|
182
|
+
[`${r}-spin`]: e.spin
|
|
183
183
|
}]), a = F(() => {
|
|
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;
|
|
@@ -188,14 +188,14 @@ const Xt = Object.assign(se, {
|
|
|
188
188
|
cls: t,
|
|
189
189
|
innerStyle: a,
|
|
190
190
|
onClick: (l) => {
|
|
191
|
-
|
|
191
|
+
n("click", l);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
}), Qt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Zt = /* @__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
|
-
}, null, -1),
|
|
198
|
-
function
|
|
197
|
+
}, null, -1), er = [Zt];
|
|
198
|
+
function tr(e, n, r, t, a, u) {
|
|
199
199
|
return $(), T("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
@@ -206,14 +206,14 @@ function tn(e, r, n, t, a, u) {
|
|
|
206
206
|
"stroke-width": e.strokeWidth,
|
|
207
207
|
"stroke-linecap": e.strokeLinecap,
|
|
208
208
|
"stroke-linejoin": e.strokeLinejoin,
|
|
209
|
-
onClick:
|
|
210
|
-
},
|
|
209
|
+
onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
|
|
210
|
+
}, er, 14, Qt);
|
|
211
211
|
}
|
|
212
|
-
var de = /* @__PURE__ */ xe(Jt, [["render",
|
|
213
|
-
const
|
|
214
|
-
install: (e,
|
|
215
|
-
var
|
|
216
|
-
const t = (
|
|
212
|
+
var de = /* @__PURE__ */ xe(Jt, [["render", tr]]);
|
|
213
|
+
const rr = Object.assign(de, {
|
|
214
|
+
install: (e, n) => {
|
|
215
|
+
var r;
|
|
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__");
|
|
@@ -225,23 +225,23 @@ function M(e) {
|
|
|
225
225
|
}
|
|
226
226
|
const Ue = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
|
-
const
|
|
228
|
+
const nr = Object.prototype.toString, lr = (e) => nr.call(e) === "[object Object]", ar = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function ur(e) {
|
|
231
231
|
return q();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function or(e, n = {}) {
|
|
234
234
|
if (!ae(e))
|
|
235
235
|
return ft(e);
|
|
236
|
-
const
|
|
236
|
+
const r = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
237
237
|
for (const t in e.value)
|
|
238
|
-
|
|
238
|
+
r[t] = mt(() => ({
|
|
239
239
|
get() {
|
|
240
240
|
return e.value[t];
|
|
241
241
|
},
|
|
242
242
|
set(a) {
|
|
243
243
|
var u;
|
|
244
|
-
if ((u = M(
|
|
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;
|
|
@@ -253,72 +253,72 @@ function on(e, r = {}) {
|
|
|
253
253
|
e.value[t] = a;
|
|
254
254
|
}
|
|
255
255
|
}));
|
|
256
|
-
return
|
|
256
|
+
return r;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
258
|
+
function cr(e, n = !0, r) {
|
|
259
|
+
ur() ? W(e, r) : n ? e() : Re(e);
|
|
260
260
|
}
|
|
261
261
|
function V(e) {
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return (
|
|
262
|
+
var n;
|
|
263
|
+
const r = M(e);
|
|
264
|
+
return (n = r == null ? void 0 : r.$el) != null ? n : r;
|
|
265
265
|
}
|
|
266
266
|
const ue = Ue ? window : void 0;
|
|
267
267
|
function fe(...e) {
|
|
268
|
-
let
|
|
269
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
270
|
-
return
|
|
271
|
-
Array.isArray(
|
|
268
|
+
let n, r, t, a;
|
|
269
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, t, a] = e, n = ue) : [n, r, t, a] = e, !n)
|
|
270
|
+
return ar;
|
|
271
|
+
Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
|
-
},
|
|
275
|
-
() => [V(
|
|
276
|
-
([o,
|
|
274
|
+
}, i = (o, s, d, m) => (o.addEventListener(s, d, m), () => o.removeEventListener(s, d, m)), h = Z(
|
|
275
|
+
() => [V(n), M(a)],
|
|
276
|
+
([o, s]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const d =
|
|
279
|
+
const d = lr(s) ? { ...s } : s;
|
|
280
280
|
u.push(
|
|
281
|
-
...
|
|
281
|
+
...r.flatMap((m) => t.map((v) => i(o, m, v, d)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
285
285
|
), c = () => {
|
|
286
|
-
|
|
286
|
+
h(), l();
|
|
287
287
|
};
|
|
288
288
|
return Be(c), c;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
const e = _(!1),
|
|
292
|
-
return
|
|
290
|
+
function ir() {
|
|
291
|
+
const e = _(!1), n = q();
|
|
292
|
+
return n && W(() => {
|
|
293
293
|
e.value = !0;
|
|
294
|
-
},
|
|
294
|
+
}, n), e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
return F(() => (
|
|
296
|
+
function sr(e) {
|
|
297
|
+
const n = ir();
|
|
298
|
+
return F(() => (n.value, !!e()));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
var
|
|
300
|
+
function dr(e, n = {}) {
|
|
301
|
+
var r, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
304
304
|
preventDefault: u,
|
|
305
305
|
stopPropagation: l,
|
|
306
|
-
exact:
|
|
307
|
-
onMove:
|
|
306
|
+
exact: i,
|
|
307
|
+
onMove: h,
|
|
308
308
|
onEnd: c,
|
|
309
309
|
onStart: o,
|
|
310
|
-
initialValue:
|
|
310
|
+
initialValue: s,
|
|
311
311
|
axis: d = "both",
|
|
312
312
|
draggingElement: m = ue,
|
|
313
313
|
containerElement: v,
|
|
314
314
|
handle: k = e
|
|
315
|
-
} =
|
|
316
|
-
(
|
|
315
|
+
} = n, y = _(
|
|
316
|
+
(r = M(s)) != null ? r : { x: 0, y: 0 }
|
|
317
317
|
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, P = (w) => {
|
|
318
318
|
M(u) && w.preventDefault(), M(l) && w.stopPropagation();
|
|
319
319
|
}, z = (w) => {
|
|
320
320
|
var g;
|
|
321
|
-
if (M(
|
|
321
|
+
if (M(n.disabled) || !j(w) || M(i) && w.target !== M(e))
|
|
322
322
|
return;
|
|
323
323
|
const b = M(v), O = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), Y = M(e).getBoundingClientRect(), ee = {
|
|
324
324
|
x: w.clientX - (b ? Y.left - O.left + b.scrollLeft : Y.left),
|
|
@@ -326,23 +326,23 @@ function fn(e, r = {}) {
|
|
|
326
326
|
};
|
|
327
327
|
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, P(w));
|
|
328
328
|
}, H = (w) => {
|
|
329
|
-
if (M(
|
|
329
|
+
if (M(n.disabled) || !j(w) || !C.value)
|
|
330
330
|
return;
|
|
331
331
|
const g = M(v), b = M(e).getBoundingClientRect();
|
|
332
332
|
let { x: O, y: Y } = y.value;
|
|
333
333
|
(d === "x" || d === "both") && (O = w.clientX - C.value.x, g && (O = Math.min(Math.max(0, O), g.scrollWidth - b.width))), (d === "y" || d === "both") && (Y = w.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - b.height))), y.value = {
|
|
334
334
|
x: O,
|
|
335
335
|
y: Y
|
|
336
|
-
},
|
|
336
|
+
}, h == null || h(y.value, w), P(w);
|
|
337
337
|
}, B = (w) => {
|
|
338
|
-
M(
|
|
338
|
+
M(n.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), P(w));
|
|
339
339
|
};
|
|
340
340
|
if (Ue) {
|
|
341
|
-
const w = { capture: (t =
|
|
341
|
+
const w = { capture: (t = n.capture) != null ? t : !0 };
|
|
342
342
|
fe(k, "pointerdown", z, w), fe(m, "pointermove", H, w), fe(m, "pointerup", B, w);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...
|
|
345
|
+
...or(y),
|
|
346
346
|
position: y,
|
|
347
347
|
isDragging: F(() => !!C.value),
|
|
348
348
|
style: F(
|
|
@@ -350,85 +350,85 @@ function fn(e, r = {}) {
|
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const { window: t = ue, ...a } =
|
|
353
|
+
function fr(e, n, r = {}) {
|
|
354
|
+
const { window: t = ue, ...a } = r;
|
|
355
355
|
let u;
|
|
356
|
-
const l =
|
|
356
|
+
const l = sr(() => t && "ResizeObserver" in t), i = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
(
|
|
361
|
-
if (
|
|
362
|
-
u = new ResizeObserver(
|
|
363
|
-
for (const d of
|
|
358
|
+
}, h = F(() => Array.isArray(e) ? e.map((s) => V(s)) : [V(e)]), c = Z(
|
|
359
|
+
h,
|
|
360
|
+
(s) => {
|
|
361
|
+
if (i(), l.value && t) {
|
|
362
|
+
u = new ResizeObserver(n);
|
|
363
|
+
for (const d of s)
|
|
364
364
|
d && u.observe(d, a);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
|
-
|
|
369
|
+
i(), c();
|
|
370
370
|
};
|
|
371
371
|
return Be(o), {
|
|
372
372
|
isSupported: l,
|
|
373
373
|
stop: o
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function G(e,
|
|
377
|
-
const { window: t = ue, box: a = "content-box" } =
|
|
378
|
-
var
|
|
379
|
-
return (d = (
|
|
380
|
-
}), l = _(
|
|
376
|
+
function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = r, u = F(() => {
|
|
378
|
+
var s, d;
|
|
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 } = fr(
|
|
381
381
|
e,
|
|
382
|
-
([
|
|
383
|
-
const d = a === "border-box" ?
|
|
382
|
+
([s]) => {
|
|
383
|
+
const d = a === "border-box" ? s.borderBoxSize : a === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
385
|
const m = V(e);
|
|
386
386
|
if (m) {
|
|
387
387
|
const v = t.getComputedStyle(m);
|
|
388
|
-
l.value = Number.parseFloat(v.width),
|
|
388
|
+
l.value = Number.parseFloat(v.width), i.value = Number.parseFloat(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: k }) => v + k, 0),
|
|
392
|
+
l.value = m.reduce((v, { inlineSize: k }) => v + k, 0), i.value = m.reduce((v, { blockSize: k }) => v + k, 0);
|
|
393
393
|
} else
|
|
394
|
-
l.value =
|
|
394
|
+
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
395
395
|
},
|
|
396
|
-
|
|
396
|
+
r
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
|
|
398
|
+
cr(() => {
|
|
399
|
+
const s = V(e);
|
|
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
|
-
(
|
|
405
|
-
l.value =
|
|
404
|
+
(s) => {
|
|
405
|
+
l.value = s ? n.width : 0, i.value = s ? n.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
function o() {
|
|
409
|
-
|
|
409
|
+
h(), c();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: l,
|
|
413
|
-
height:
|
|
413
|
+
height: i,
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const mr = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), hr = { class: "title text-16px font-bold" }, vr = { class: "action" }, pr = ["form"], yr = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, gr = /* @__PURE__ */ mr(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
421
421
|
/* @__PURE__ */ x("div"),
|
|
422
422
|
/* @__PURE__ */ x("div"),
|
|
423
423
|
/* @__PURE__ */ x("div"),
|
|
424
424
|
/* @__PURE__ */ x("div")
|
|
425
|
-
], -1)),
|
|
426
|
-
|
|
427
|
-
],
|
|
425
|
+
], -1)), br = [
|
|
426
|
+
gr
|
|
427
|
+
], kr = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
430
|
-
},
|
|
431
|
-
...
|
|
430
|
+
}, wr = /* @__PURE__ */ E({
|
|
431
|
+
...kr,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
434
434
|
form: {},
|
|
@@ -459,13 +459,13 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
459
459
|
zIndex: { default: 1e3 }
|
|
460
460
|
},
|
|
461
461
|
emits: ["submit"],
|
|
462
|
-
setup(e, { expose:
|
|
462
|
+
setup(e, { expose: n, emit: r }) {
|
|
463
463
|
ot((p) => ({
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a =
|
|
467
|
-
let
|
|
468
|
-
const c = N(), o = N(),
|
|
466
|
+
const t = e, a = r, u = ye(Ce), l = _(!1);
|
|
467
|
+
let i = 0, h = 0;
|
|
468
|
+
const c = N(), o = N(), s = N(), d = N(), m = N(), v = N(), { height: k } = G(c), { height: y } = G(s, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: j } = G(m), { height: P } = G(v), { x: z, y: H } = dr(s, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
471
|
function B() {
|
|
@@ -489,7 +489,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
489
489
|
}[t.position]), p;
|
|
490
490
|
}), b = F(() => {
|
|
491
491
|
const p = {};
|
|
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(${z.value -
|
|
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(${z.value - i}px, ${H.value - h}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
493
|
}), O = F(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
@@ -510,7 +510,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
510
510
|
}
|
|
511
511
|
function Je() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
Q(c), Q(o), o.value && (
|
|
513
|
+
Q(c), Q(o), o.value && (i = o.value.offsetLeft, h = o.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
function Qe() {
|
|
@@ -522,7 +522,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Ze() {
|
|
525
|
-
|
|
525
|
+
i = o.value.offsetLeft, h = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
W(() => {
|
|
528
528
|
Qe(), Je();
|
|
@@ -534,7 +534,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
534
534
|
function $e() {
|
|
535
535
|
l.value = !1;
|
|
536
536
|
}
|
|
537
|
-
return
|
|
537
|
+
return n({
|
|
538
538
|
showLoading: et,
|
|
539
539
|
hideLoading: $e
|
|
540
540
|
}), (p, L) => ($(), T("div", {
|
|
@@ -553,13 +553,13 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
553
553
|
p.header ? ($(), T("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
|
-
ref:
|
|
556
|
+
ref: s,
|
|
557
557
|
class: "modal-header",
|
|
558
558
|
style: R(O.value),
|
|
559
559
|
onMousedown: Ze
|
|
560
560
|
}, [
|
|
561
|
-
x("div",
|
|
562
|
-
x("div",
|
|
561
|
+
x("div", hr, A(p.title), 1),
|
|
562
|
+
x("div", vr, [
|
|
563
563
|
p.closeable ? ($(), T("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
@@ -576,7 +576,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
576
576
|
class: "modal-body",
|
|
577
577
|
style: R(Y.value)
|
|
578
578
|
}, [
|
|
579
|
-
($(),
|
|
579
|
+
($(), ne(Ee(p.component), st(dt(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
581
581
|
x("div", {
|
|
582
582
|
id: "modal-footer-slot",
|
|
@@ -599,18 +599,18 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
599
599
|
form: p.form,
|
|
600
600
|
type: "submit",
|
|
601
601
|
onClick: ee
|
|
602
|
-
}, A(p.submitText), 9,
|
|
602
|
+
}, A(p.submitText), 9, pr)
|
|
603
603
|
], 512)) : U("", !0),
|
|
604
|
-
l.value ? ($(), T("div",
|
|
604
|
+
l.value ? ($(), T("div", yr, br)) : U("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
608
|
-
}), oe = (e,
|
|
609
|
-
const
|
|
610
|
-
for (const [t, a] of
|
|
611
|
-
|
|
612
|
-
return
|
|
613
|
-
},
|
|
608
|
+
}), oe = (e, n) => {
|
|
609
|
+
const r = e.__vccOpts || e;
|
|
610
|
+
for (const [t, a] of n)
|
|
611
|
+
r[t] = a;
|
|
612
|
+
return r;
|
|
613
|
+
}, xr = /* @__PURE__ */ oe(wr, [["__scopeId", "data-v-9a7af353"]]), Cr = { class: "modal-dialog" }, Sr = { class: "dialog-body" }, _r = { class: "dialog-title" }, $r = { class: "dialog-content" }, Fr = /* @__PURE__ */ E({
|
|
614
614
|
__name: "modal-dialog",
|
|
615
615
|
props: {
|
|
616
616
|
type: {},
|
|
@@ -623,29 +623,29 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
623
623
|
footer: {}
|
|
624
624
|
},
|
|
625
625
|
setup(e) {
|
|
626
|
-
const
|
|
626
|
+
const n = e, r = qe(), t = F(() => n.title ? n.title : {
|
|
627
627
|
confirm: "提示",
|
|
628
628
|
info: "提示",
|
|
629
629
|
warning: "警告",
|
|
630
630
|
error: "错误",
|
|
631
631
|
success: "成功"
|
|
632
|
-
}[
|
|
632
|
+
}[n.type]);
|
|
633
633
|
async function a() {
|
|
634
|
-
|
|
634
|
+
n.onOk && await n.onOk(), r.close();
|
|
635
635
|
}
|
|
636
636
|
async function u() {
|
|
637
|
-
|
|
637
|
+
n.onCancel && await n.onCancel(), r.close();
|
|
638
638
|
}
|
|
639
|
-
return (l,
|
|
640
|
-
x("div",
|
|
641
|
-
x("div",
|
|
642
|
-
x("div",
|
|
639
|
+
return (l, i) => ($(), T("section", Cr, [
|
|
640
|
+
x("div", Sr, [
|
|
641
|
+
x("div", _r, A(t.value), 1),
|
|
642
|
+
x("div", $r, A(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 ? ($(),
|
|
648
|
+
l.footer ? ($(), ne(Ee(l.footer), { key: 0 })) : ($(), T(re, { key: 1 }, [
|
|
649
649
|
x("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
@@ -661,32 +661,32 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}),
|
|
664
|
+
}), Or = /* @__PURE__ */ oe(Fr, [["__scopeId", "data-v-0c6b8db2"]]), Yr = (e) => (Ae("data-v-559bdf2e"), e = e(), Ne(), e), Mr = { class: "flex-center" }, Tr = /* @__PURE__ */ Yr(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
|
|
665
665
|
/* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
666
666
|
/* @__PURE__ */ x("div"),
|
|
667
667
|
/* @__PURE__ */ x("div"),
|
|
668
668
|
/* @__PURE__ */ x("div"),
|
|
669
669
|
/* @__PURE__ */ x("div")
|
|
670
670
|
])
|
|
671
|
-
], -1)),
|
|
671
|
+
], -1)), Pr = { class: "modal-loading-text" }, jr = /* @__PURE__ */ E({
|
|
672
672
|
__name: "modal-loading",
|
|
673
673
|
props: {
|
|
674
674
|
text: { default: "加载中" }
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
|
-
return (
|
|
678
|
-
|
|
679
|
-
x("div",
|
|
677
|
+
return (n, r) => ($(), T("section", Mr, [
|
|
678
|
+
Tr,
|
|
679
|
+
x("div", Pr, A(n.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
|
-
}),
|
|
682
|
+
}), Lr = /* @__PURE__ */ oe(jr, [["__scopeId", "data-v-559bdf2e"]]), Ir = {
|
|
683
683
|
key: 0,
|
|
684
684
|
class: "modal-teleport"
|
|
685
|
-
},
|
|
685
|
+
}, Dr = {
|
|
686
686
|
name: "ModalProvider",
|
|
687
687
|
inheritAttrs: !0
|
|
688
|
-
},
|
|
689
|
-
...
|
|
688
|
+
}, Er = /* @__PURE__ */ E({
|
|
689
|
+
...Dr,
|
|
690
690
|
props: {
|
|
691
691
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
692
692
|
sizes: { default: () => ({
|
|
@@ -698,17 +698,17 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
698
698
|
maxHeight: { default: "90%" },
|
|
699
699
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
700
700
|
},
|
|
701
|
-
setup(e, { expose:
|
|
702
|
-
const
|
|
701
|
+
setup(e, { expose: n }) {
|
|
702
|
+
const r = N([]), t = _(!1), a = q();
|
|
703
703
|
function u(d, m = {}, v = {}) {
|
|
704
704
|
const k = ut(
|
|
705
|
-
() => Promise.resolve(typeof d == "string" ?
|
|
705
|
+
() => Promise.resolve(typeof d == "string" ? Or : d)
|
|
706
706
|
);
|
|
707
707
|
typeof d == "string" && (m.type = d, v.size = "small", v.fullscreen = !1, v.mode = "dialog", v.footer = !1, v.header = !1);
|
|
708
708
|
const y = Math.random().toString(32).slice(2), C = Object.assign({
|
|
709
709
|
zIndex: typeof d == "string" ? 1100 : 1e3
|
|
710
710
|
}, v), j = new Promise((P, z) => {
|
|
711
|
-
|
|
711
|
+
r.value.push({
|
|
712
712
|
id: y,
|
|
713
713
|
component: k,
|
|
714
714
|
props: m || {},
|
|
@@ -719,7 +719,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
719
719
|
resolve: P,
|
|
720
720
|
reject: z,
|
|
721
721
|
listeners: []
|
|
722
|
-
}), Q(
|
|
722
|
+
}), Q(r);
|
|
723
723
|
}).catch((P) => P === "CANCEL" ? new Promise(() => {
|
|
724
724
|
}) : Promise.reject(P));
|
|
725
725
|
return Object.assign(j, {
|
|
@@ -727,26 +727,26 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
function l(d, m) {
|
|
730
|
-
const v =
|
|
730
|
+
const v = r.value.findIndex((y) => y.id === d);
|
|
731
731
|
if (v < 0)
|
|
732
732
|
return;
|
|
733
|
-
const k =
|
|
734
|
-
m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m),
|
|
733
|
+
const k = r.value[v];
|
|
734
|
+
m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), r.value.splice(v, 1), Q(r);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
!
|
|
736
|
+
function i() {
|
|
737
|
+
!r.value || r.value.length === 0 || (r.value.forEach((d) => {
|
|
738
738
|
d == null || d.reject("CANCEL");
|
|
739
|
-
}),
|
|
739
|
+
}), r.value = [], Q(r));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const v =
|
|
741
|
+
function h(d, m) {
|
|
742
|
+
const v = r.value.find((y) => y.id === d);
|
|
743
743
|
if (!v)
|
|
744
744
|
return;
|
|
745
745
|
const k = v.listeners.find((y) => y.event === m);
|
|
746
746
|
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
748
|
close: (y) => l(v.id, y),
|
|
749
|
-
closeAll:
|
|
749
|
+
closeAll: i,
|
|
750
750
|
showLoading: () => c(v.id),
|
|
751
751
|
hideLoading: () => o(v.id),
|
|
752
752
|
confirm: (y) => u("confirm", y),
|
|
@@ -763,7 +763,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
763
763
|
if (v)
|
|
764
764
|
return v.showLoading();
|
|
765
765
|
{
|
|
766
|
-
const { close: k } = u(
|
|
766
|
+
const { close: k } = u(Lr, {
|
|
767
767
|
text: m == null ? void 0 : m.text
|
|
768
768
|
}, {
|
|
769
769
|
footer: !1,
|
|
@@ -786,8 +786,8 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
786
786
|
if (m)
|
|
787
787
|
return m.hideLoading();
|
|
788
788
|
}
|
|
789
|
-
function
|
|
790
|
-
const k =
|
|
789
|
+
function s(d, m, v) {
|
|
790
|
+
const k = r.value.find((y) => y.id === d);
|
|
791
791
|
k && k.listeners.push({
|
|
792
792
|
event: m,
|
|
793
793
|
callback: v
|
|
@@ -796,27 +796,27 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
796
796
|
return he(Ce, {
|
|
797
797
|
open: u,
|
|
798
798
|
close: l,
|
|
799
|
-
closeAll:
|
|
800
|
-
addEventListener:
|
|
799
|
+
closeAll: i,
|
|
800
|
+
addEventListener: s,
|
|
801
801
|
showLoading: c,
|
|
802
802
|
hideLoading: o
|
|
803
|
-
}),
|
|
804
|
-
elements:
|
|
803
|
+
}), n({
|
|
804
|
+
elements: r,
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
|
-
closeAll:
|
|
807
|
+
closeAll: i
|
|
808
808
|
}), W(() => {
|
|
809
809
|
t.value = !0;
|
|
810
|
-
}), (d, m) => ($(), T(
|
|
810
|
+
}), (d, m) => ($(), T(re, null, [
|
|
811
811
|
tt(d.$slots, "default", {}, void 0, !0),
|
|
812
|
-
t.value ? ($(), T("div",
|
|
813
|
-
($(),
|
|
812
|
+
t.value ? ($(), T("div", Ir, [
|
|
813
|
+
($(), ne(rt, {
|
|
814
814
|
disabled: !d.appendToBody,
|
|
815
815
|
to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
|
|
816
816
|
}, [
|
|
817
|
-
f(
|
|
817
|
+
f(nt, { name: "modal-fade" }, {
|
|
818
818
|
default: lt(() => [
|
|
819
|
-
($(!0), T(
|
|
819
|
+
($(!0), T(re, null, at(r.value, (v) => ($(), ne(xr, ge({
|
|
820
820
|
id: v.id,
|
|
821
821
|
key: v.id,
|
|
822
822
|
ref_for: !0,
|
|
@@ -828,7 +828,7 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
828
828
|
offset: d.offset,
|
|
829
829
|
sizes: d.sizes
|
|
830
830
|
}, v.options, {
|
|
831
|
-
onSubmit: () =>
|
|
831
|
+
onSubmit: () => h(v.id, "submit")
|
|
832
832
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
833
833
|
]),
|
|
834
834
|
_: 1
|
|
@@ -837,28 +837,28 @@ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "titl
|
|
|
837
837
|
])) : U("", !0)
|
|
838
838
|
], 64));
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
841
|
-
function me(e,
|
|
842
|
-
var
|
|
840
|
+
}), zr = /* @__PURE__ */ oe(Er, [["__scopeId", "data-v-60414811"]]);
|
|
841
|
+
function me(e, n) {
|
|
842
|
+
var r, t;
|
|
843
843
|
let a = e == null ? void 0 : e.parent;
|
|
844
|
-
for (; a && ((
|
|
844
|
+
for (; a && ((r = a == null ? void 0 : a.type) == null ? void 0 : r.name) !== n; )
|
|
845
845
|
a = a.parent;
|
|
846
|
-
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) ===
|
|
846
|
+
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === n ? a : null;
|
|
847
847
|
}
|
|
848
848
|
function qe() {
|
|
849
|
-
const e = ye(Ce),
|
|
850
|
-
function
|
|
849
|
+
const e = ye(Ce), n = q();
|
|
850
|
+
function r(t, a, u) {
|
|
851
851
|
if (!e)
|
|
852
852
|
throw new Error("Not Found Modal Provider Component");
|
|
853
853
|
return e.open(t, a, u);
|
|
854
854
|
}
|
|
855
855
|
return {
|
|
856
|
-
open:
|
|
856
|
+
open: r,
|
|
857
857
|
close(t) {
|
|
858
858
|
var a;
|
|
859
859
|
if (!e)
|
|
860
860
|
throw new Error("Not Found Modal Provider Component");
|
|
861
|
-
const u = me(
|
|
861
|
+
const u = me(n, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
|
|
862
862
|
if (!l)
|
|
863
863
|
throw new Error("Not Found Current Modal Container");
|
|
864
864
|
e.close(l, t);
|
|
@@ -872,14 +872,14 @@ function qe() {
|
|
|
872
872
|
var a;
|
|
873
873
|
if (!e)
|
|
874
874
|
throw new Error("Not Found Modal Provider Component");
|
|
875
|
-
const u = me(
|
|
875
|
+
const u = me(n, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
|
|
876
876
|
return e.showLoading(l, t);
|
|
877
877
|
},
|
|
878
878
|
hideLoading() {
|
|
879
879
|
var t;
|
|
880
880
|
if (!e)
|
|
881
881
|
throw new Error("Not Found Modal Provider Component");
|
|
882
|
-
const a = me(
|
|
882
|
+
const a = me(n, "ModalContainer"), u = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
|
|
883
883
|
return e.hideLoading(u);
|
|
884
884
|
},
|
|
885
885
|
confirm(t) {
|
|
@@ -903,38 +903,38 @@ const Te = {
|
|
|
903
903
|
id: Symbol("ID"),
|
|
904
904
|
source: Symbol("Source")
|
|
905
905
|
};
|
|
906
|
-
function
|
|
907
|
-
const
|
|
906
|
+
function Rr(e, n) {
|
|
907
|
+
const r = _({});
|
|
908
908
|
return e == null || e.forEach((a) => {
|
|
909
909
|
let u = null;
|
|
910
|
-
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null),
|
|
911
|
-
}), [
|
|
912
|
-
|
|
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;
|
|
911
|
+
}), [r, (a) => {
|
|
912
|
+
r.value = a;
|
|
913
913
|
}];
|
|
914
914
|
}
|
|
915
915
|
var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
916
916
|
function We(e) {
|
|
917
917
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
918
918
|
}
|
|
919
|
-
var
|
|
920
|
-
(function(e,
|
|
921
|
-
(function(
|
|
919
|
+
var Ar = { exports: {} };
|
|
920
|
+
(function(e, n) {
|
|
921
|
+
(function(r, t) {
|
|
922
922
|
e.exports = t(S);
|
|
923
|
-
})(Se, function(
|
|
923
|
+
})(Se, function(r) {
|
|
924
924
|
function t(l) {
|
|
925
925
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
926
926
|
default: l
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
var a = t(
|
|
929
|
+
var a = t(r), u = {
|
|
930
930
|
name: "zh-cn",
|
|
931
931
|
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
932
932
|
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
933
933
|
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
934
934
|
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
935
935
|
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
936
|
-
ordinal: function(l,
|
|
937
|
-
return
|
|
936
|
+
ordinal: function(l, i) {
|
|
937
|
+
return i === "W" ? l + "周" : l + "日";
|
|
938
938
|
},
|
|
939
939
|
weekStart: 1,
|
|
940
940
|
yearStart: 4,
|
|
@@ -965,82 +965,82 @@ var Nn = { exports: {} };
|
|
|
965
965
|
y: "1 年",
|
|
966
966
|
yy: "%d 年"
|
|
967
967
|
},
|
|
968
|
-
meridiem: function(l,
|
|
969
|
-
var
|
|
970
|
-
return
|
|
968
|
+
meridiem: function(l, i) {
|
|
969
|
+
var h = 100 * l + i;
|
|
970
|
+
return h < 600 ? "凌晨" : h < 900 ? "早上" : h < 1100 ? "上午" : h < 1300 ? "中午" : h < 1800 ? "下午" : "晚上";
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
return a.default.locale(u, null, !0), u;
|
|
974
974
|
});
|
|
975
|
-
})(
|
|
975
|
+
})(Ar);
|
|
976
976
|
var He = { exports: {} };
|
|
977
|
-
(function(e,
|
|
978
|
-
(function(
|
|
977
|
+
(function(e, n) {
|
|
978
|
+
(function(r, t) {
|
|
979
979
|
e.exports = t();
|
|
980
980
|
})(Se, function() {
|
|
981
|
-
var
|
|
981
|
+
var r = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
return this.add(7 * (
|
|
983
|
+
var i = u.prototype;
|
|
984
|
+
i.week = function(h) {
|
|
985
|
+
if (h === void 0 && (h = null), h !== null)
|
|
986
|
+
return this.add(7 * (h - this.week()), "day");
|
|
987
987
|
var c = this.$locale().yearStart || 1;
|
|
988
988
|
if (this.month() === 11 && this.date() > 25) {
|
|
989
|
-
var o = l(this).startOf(t).add(1, t).date(c),
|
|
990
|
-
if (o.isBefore(
|
|
989
|
+
var o = l(this).startOf(t).add(1, t).date(c), s = l(this).endOf(r);
|
|
990
|
+
if (o.isBefore(s))
|
|
991
991
|
return 1;
|
|
992
992
|
}
|
|
993
|
-
var d = l(this).startOf(t).date(c).startOf(
|
|
993
|
+
var d = l(this).startOf(t).date(c).startOf(r).subtract(1, "millisecond"), m = this.diff(d, r, !0);
|
|
994
994
|
return m < 0 ? l(this).startOf("week").week() : Math.ceil(m);
|
|
995
|
-
},
|
|
996
|
-
return
|
|
995
|
+
}, i.weeks = function(h) {
|
|
996
|
+
return h === void 0 && (h = null), this.week(h);
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
999
|
});
|
|
1000
1000
|
})(He);
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1001
|
+
var Nr = He.exports;
|
|
1002
|
+
const Vr = /* @__PURE__ */ We(Nr);
|
|
1003
1003
|
var Ge = { exports: {} };
|
|
1004
|
-
(function(e,
|
|
1005
|
-
(function(
|
|
1004
|
+
(function(e, n) {
|
|
1005
|
+
(function(r, t) {
|
|
1006
1006
|
e.exports = t();
|
|
1007
1007
|
})(Se, function() {
|
|
1008
|
-
var
|
|
1008
|
+
var r = "month", t = "quarter";
|
|
1009
1009
|
return function(a, u) {
|
|
1010
1010
|
var l = u.prototype;
|
|
1011
1011
|
l.quarter = function(c) {
|
|
1012
1012
|
return this.$utils().u(c) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (c - 1));
|
|
1013
1013
|
};
|
|
1014
|
-
var
|
|
1014
|
+
var i = l.add;
|
|
1015
1015
|
l.add = function(c, o) {
|
|
1016
|
-
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c,
|
|
1016
|
+
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, r) : i.bind(this)(c, o);
|
|
1017
1017
|
};
|
|
1018
|
-
var
|
|
1018
|
+
var h = l.startOf;
|
|
1019
1019
|
l.startOf = function(c, o) {
|
|
1020
|
-
var
|
|
1021
|
-
if (
|
|
1020
|
+
var s = this.$utils(), d = !!s.u(o) || o;
|
|
1021
|
+
if (s.p(c) === t) {
|
|
1022
1022
|
var m = this.quarter() - 1;
|
|
1023
|
-
return d ? this.month(3 * m).startOf(
|
|
1023
|
+
return d ? this.month(3 * m).startOf(r).startOf("day") : this.month(3 * m + 2).endOf(r).endOf("day");
|
|
1024
1024
|
}
|
|
1025
|
-
return
|
|
1025
|
+
return h.bind(this)(c, o);
|
|
1026
1026
|
};
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
1029
1029
|
})(Ge);
|
|
1030
|
-
var
|
|
1031
|
-
const
|
|
1032
|
-
S.extend(
|
|
1033
|
-
S.extend(
|
|
1030
|
+
var Br = Ge.exports;
|
|
1031
|
+
const Ur = /* @__PURE__ */ We(Br);
|
|
1032
|
+
S.extend(Vr);
|
|
1033
|
+
S.extend(Ur);
|
|
1034
1034
|
S.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
1036
1036
|
});
|
|
1037
|
-
function
|
|
1038
|
-
function r
|
|
1039
|
-
return e != null && e.disabledDate ? e.disabledDate(
|
|
1037
|
+
function qr(e) {
|
|
1038
|
+
function n(r, t) {
|
|
1039
|
+
return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
|
|
1040
1040
|
}
|
|
1041
|
-
return (
|
|
1041
|
+
return (r, t) => {
|
|
1042
1042
|
function a() {
|
|
1043
|
-
const l =
|
|
1043
|
+
const l = r[t.key];
|
|
1044
1044
|
switch (e == null ? void 0 : e.type) {
|
|
1045
1045
|
case "week":
|
|
1046
1046
|
return f("span", null, [`${S(l).format("YYYY年")}${S(l).week()}周`]);
|
|
@@ -1060,33 +1060,33 @@ function Wn(e) {
|
|
|
1060
1060
|
case "week":
|
|
1061
1061
|
return f(wt, {
|
|
1062
1062
|
"day-start-of-week": 1,
|
|
1063
|
-
modelValue:
|
|
1064
|
-
"onUpdate:modelValue": (l) =>
|
|
1065
|
-
"disabled-date":
|
|
1063
|
+
modelValue: r[t.key],
|
|
1064
|
+
"onUpdate:modelValue": (l) => r[t.key] = l,
|
|
1065
|
+
"disabled-date": n,
|
|
1066
1066
|
format: e == null ? void 0 : e.labelFormat,
|
|
1067
1067
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1068
1068
|
}, null);
|
|
1069
1069
|
case "month":
|
|
1070
1070
|
return f(kt, {
|
|
1071
|
-
modelValue:
|
|
1072
|
-
"onUpdate:modelValue": (l) =>
|
|
1073
|
-
"disabled-date":
|
|
1071
|
+
modelValue: r[t.key],
|
|
1072
|
+
"onUpdate:modelValue": (l) => r[t.key] = l,
|
|
1073
|
+
"disabled-date": n,
|
|
1074
1074
|
format: e == null ? void 0 : e.labelFormat,
|
|
1075
1075
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1076
1076
|
}, null);
|
|
1077
1077
|
case "quarter":
|
|
1078
1078
|
return f(bt, {
|
|
1079
|
-
modelValue:
|
|
1080
|
-
"onUpdate:modelValue": (l) =>
|
|
1081
|
-
"disabled-date":
|
|
1079
|
+
modelValue: r[t.key],
|
|
1080
|
+
"onUpdate:modelValue": (l) => r[t.key] = l,
|
|
1081
|
+
"disabled-date": n,
|
|
1082
1082
|
format: e == null ? void 0 : e.labelFormat,
|
|
1083
1083
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1084
1084
|
}, null);
|
|
1085
1085
|
case "year":
|
|
1086
1086
|
return f(gt, {
|
|
1087
|
-
modelValue:
|
|
1088
|
-
"onUpdate:modelValue": (l) =>
|
|
1089
|
-
"disabled-date":
|
|
1087
|
+
modelValue: r[t.key],
|
|
1088
|
+
"onUpdate:modelValue": (l) => r[t.key] = l,
|
|
1089
|
+
"disabled-date": n,
|
|
1090
1090
|
format: e == null ? void 0 : e.labelFormat,
|
|
1091
1091
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1092
1092
|
}, null);
|
|
@@ -1094,9 +1094,9 @@ function Wn(e) {
|
|
|
1094
1094
|
default:
|
|
1095
1095
|
return f(yt, ge({
|
|
1096
1096
|
"disabled-input": !0,
|
|
1097
|
-
modelValue:
|
|
1098
|
-
"onUpdate:modelValue": (l) =>
|
|
1099
|
-
"disabled-date":
|
|
1097
|
+
modelValue: r[t.key],
|
|
1098
|
+
"onUpdate:modelValue": (l) => r[t.key] = l,
|
|
1099
|
+
"disabled-date": n,
|
|
1100
1100
|
format: e == null ? void 0 : e.labelFormat,
|
|
1101
1101
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1102
1102
|
}, {
|
|
@@ -1119,82 +1119,84 @@ function Pe(e) {
|
|
|
1119
1119
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1120
1120
|
const je = () => {
|
|
1121
1121
|
};
|
|
1122
|
-
function
|
|
1123
|
-
function
|
|
1122
|
+
function Wr(e, n) {
|
|
1123
|
+
function r(...t) {
|
|
1124
1124
|
return new Promise((a, u) => {
|
|
1125
|
-
Promise.resolve(e(() =>
|
|
1125
|
+
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(a).catch(u);
|
|
1126
1126
|
});
|
|
1127
1127
|
}
|
|
1128
|
-
return
|
|
1128
|
+
return r;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
let
|
|
1132
|
-
const u = (
|
|
1133
|
-
clearTimeout(
|
|
1130
|
+
function Hr(e, n = {}) {
|
|
1131
|
+
let r, t, a = je;
|
|
1132
|
+
const u = (i) => {
|
|
1133
|
+
clearTimeout(i), a(), a = je;
|
|
1134
1134
|
};
|
|
1135
|
-
return (
|
|
1136
|
-
const
|
|
1137
|
-
return
|
|
1138
|
-
a =
|
|
1139
|
-
|
|
1140
|
-
}, c)),
|
|
1141
|
-
t && u(t), t = null, o(
|
|
1142
|
-
},
|
|
1135
|
+
return (i) => {
|
|
1136
|
+
const h = Pe(e), c = Pe(n.maxWait);
|
|
1137
|
+
return r && u(r), h <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(i())) : new Promise((o, s) => {
|
|
1138
|
+
a = n.rejectOnCancel ? s : o, c && !t && (t = setTimeout(() => {
|
|
1139
|
+
r && u(r), t = null, o(i());
|
|
1140
|
+
}, c)), r = setTimeout(() => {
|
|
1141
|
+
t && u(t), t = null, o(i());
|
|
1142
|
+
}, h);
|
|
1143
1143
|
});
|
|
1144
1144
|
};
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1148
|
-
|
|
1146
|
+
function Gr(e, n = 200, r = {}) {
|
|
1147
|
+
return Wr(
|
|
1148
|
+
Hr(n, r),
|
|
1149
1149
|
e
|
|
1150
1150
|
);
|
|
1151
1151
|
}
|
|
1152
|
-
function _e(e,
|
|
1153
|
-
const t = Z(e, (...a) => (Re(() => t()),
|
|
1152
|
+
function _e(e, n, r) {
|
|
1153
|
+
const t = Z(e, (...a) => (Re(() => t()), n(...a)), r);
|
|
1154
1154
|
return t;
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1156
|
+
const Kr = Gr((e) => {
|
|
1157
|
+
e && e.dispatchEvent(new Event("submit"));
|
|
1158
|
+
}, 1e3);
|
|
1159
|
+
function Xr(e) {
|
|
1160
|
+
let n;
|
|
1161
|
+
return (r, t) => {
|
|
1159
1162
|
function a() {
|
|
1160
|
-
return f("span", null, [
|
|
1163
|
+
return f("span", null, [r[t.key]]);
|
|
1161
1164
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
}, 1e3);
|
|
1165
|
-
function l() {
|
|
1166
|
-
if (!(e != null && e.autoSumbit))
|
|
1165
|
+
function u() {
|
|
1166
|
+
if (!(e != null && e.autoSubmit))
|
|
1167
1167
|
return;
|
|
1168
|
-
let
|
|
1169
|
-
for (;
|
|
1170
|
-
|
|
1171
|
-
if (
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1168
|
+
let i = n;
|
|
1169
|
+
for (; i && i.$el.tagName !== "FORM"; )
|
|
1170
|
+
i = i.$parent;
|
|
1171
|
+
if (i && i.$el) {
|
|
1172
|
+
const h = i.$el;
|
|
1173
|
+
Kr(h);
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function l() {
|
|
1177
1177
|
switch (e == null ? void 0 : e.type) {
|
|
1178
1178
|
case "number":
|
|
1179
1179
|
return f(Ve, {
|
|
1180
|
-
ref: (
|
|
1181
|
-
modelValue:
|
|
1182
|
-
"onUpdate:modelValue": (
|
|
1180
|
+
ref: (i) => n = i,
|
|
1181
|
+
modelValue: r[t.key],
|
|
1182
|
+
"onUpdate:modelValue": (i) => r[t.key] = i,
|
|
1183
1183
|
hideButton: !0,
|
|
1184
1184
|
"read-only": e == null ? void 0 : e.readonly,
|
|
1185
1185
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1186
|
-
onInput:
|
|
1186
|
+
onInput: u,
|
|
1187
|
+
onClear: () => u(),
|
|
1187
1188
|
allowClear: e == null ? void 0 : e.clearable
|
|
1188
1189
|
}, null);
|
|
1189
1190
|
case "string":
|
|
1190
1191
|
default:
|
|
1191
1192
|
return f(xt, {
|
|
1192
|
-
ref: (
|
|
1193
|
-
modelValue:
|
|
1194
|
-
"onUpdate:modelValue": (
|
|
1193
|
+
ref: (i) => n = i,
|
|
1194
|
+
modelValue: r[t.key],
|
|
1195
|
+
"onUpdate:modelValue": (i) => r[t.key] = i,
|
|
1195
1196
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1196
1197
|
readonly: e == null ? void 0 : e.readonly,
|
|
1197
|
-
onInput:
|
|
1198
|
+
onInput: u,
|
|
1199
|
+
onClear: () => u(),
|
|
1198
1200
|
allowClear: e == null ? void 0 : e.clearable
|
|
1199
1201
|
}, null);
|
|
1200
1202
|
}
|
|
@@ -1204,31 +1206,31 @@ function Xn(e) {
|
|
|
1204
1206
|
return a();
|
|
1205
1207
|
case "component":
|
|
1206
1208
|
default:
|
|
1207
|
-
return
|
|
1209
|
+
return l();
|
|
1208
1210
|
}
|
|
1209
1211
|
};
|
|
1210
1212
|
}
|
|
1211
|
-
function
|
|
1213
|
+
function Jr(e) {
|
|
1212
1214
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1213
1215
|
}
|
|
1214
1216
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1215
|
-
function
|
|
1217
|
+
function Qr() {
|
|
1216
1218
|
const e = _(/* @__PURE__ */ new Map());
|
|
1217
|
-
return [e, (
|
|
1219
|
+
return [e, (r) => e.value = r];
|
|
1218
1220
|
}
|
|
1219
|
-
function
|
|
1220
|
-
let
|
|
1221
|
-
const [t, a] =
|
|
1222
|
-
if (e.onChange && e.onChange(c), !e.
|
|
1221
|
+
function Zr(e) {
|
|
1222
|
+
let n, r = !1;
|
|
1223
|
+
const [t, a] = Qr(), u = (c) => {
|
|
1224
|
+
if (e.onChange && e.onChange(c), !e.autoSubmit || !n)
|
|
1223
1225
|
return;
|
|
1224
|
-
let o =
|
|
1226
|
+
let o = n;
|
|
1225
1227
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1226
1228
|
o = o.$parent;
|
|
1227
1229
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1228
1230
|
}, l = (c, o) => {
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
},
|
|
1231
|
+
const s = c();
|
|
1232
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1233
|
+
}, i = async () => {
|
|
1232
1234
|
const c = K.get(e.options);
|
|
1233
1235
|
switch (typeof c) {
|
|
1234
1236
|
case "function":
|
|
@@ -1239,17 +1241,17 @@ function Zn(e) {
|
|
|
1239
1241
|
return;
|
|
1240
1242
|
}
|
|
1241
1243
|
K.set(e.options, a), l(e.options, (o) => {
|
|
1242
|
-
const
|
|
1243
|
-
K.set(e.options, o),
|
|
1244
|
+
const s = K.get(e.options);
|
|
1245
|
+
K.set(e.options, o), s(o);
|
|
1244
1246
|
});
|
|
1245
|
-
},
|
|
1247
|
+
}, h = () => {
|
|
1246
1248
|
l(e.options, (c) => {
|
|
1247
1249
|
a(c);
|
|
1248
1250
|
});
|
|
1249
1251
|
};
|
|
1250
1252
|
switch (!0) {
|
|
1251
1253
|
case e.options instanceof Function: {
|
|
1252
|
-
e.cache !== !1 ?
|
|
1254
|
+
e.cache !== !1 ? i() : h();
|
|
1253
1255
|
break;
|
|
1254
1256
|
}
|
|
1255
1257
|
case ae(e.options): {
|
|
@@ -1264,15 +1266,15 @@ function Zn(e) {
|
|
|
1264
1266
|
t.value = e.options;
|
|
1265
1267
|
}
|
|
1266
1268
|
return (c, o) => {
|
|
1267
|
-
e.default && !
|
|
1268
|
-
function
|
|
1269
|
+
e.default && !r && (c[o.key] = e.default, r = !0);
|
|
1270
|
+
function s() {
|
|
1269
1271
|
const m = c[o.key];
|
|
1270
1272
|
return e.multiple ? f("span", null, [m.map((v) => t.value.get(v)).join(" ,")]) : f("span", null, [t.value.get(m)]);
|
|
1271
1273
|
}
|
|
1272
1274
|
function d() {
|
|
1273
1275
|
let m;
|
|
1274
1276
|
return f(Ct, {
|
|
1275
|
-
ref: (v) =>
|
|
1277
|
+
ref: (v) => n = v,
|
|
1276
1278
|
multiple: e.multiple,
|
|
1277
1279
|
modelValue: c[o.key],
|
|
1278
1280
|
"onUpdate:modelValue": (v) => c[o.key] = v,
|
|
@@ -1282,7 +1284,7 @@ function Zn(e) {
|
|
|
1282
1284
|
"allow-create": e.createable,
|
|
1283
1285
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1284
1286
|
onChange: u
|
|
1285
|
-
},
|
|
1287
|
+
}, Jr(m = Array.from(t.value.entries()).map(([v, k]) => f(St, {
|
|
1286
1288
|
key: v,
|
|
1287
1289
|
value: v,
|
|
1288
1290
|
label: k
|
|
@@ -1292,19 +1294,19 @@ function Zn(e) {
|
|
|
1292
1294
|
}
|
|
1293
1295
|
switch (o.mode) {
|
|
1294
1296
|
case "text":
|
|
1295
|
-
return
|
|
1297
|
+
return s();
|
|
1296
1298
|
case "component":
|
|
1297
1299
|
default:
|
|
1298
1300
|
return d();
|
|
1299
1301
|
}
|
|
1300
1302
|
};
|
|
1301
1303
|
}
|
|
1302
|
-
function
|
|
1303
|
-
let
|
|
1304
|
-
function
|
|
1305
|
-
if (!(e != null && e.
|
|
1304
|
+
function en(e) {
|
|
1305
|
+
let n;
|
|
1306
|
+
function r() {
|
|
1307
|
+
if (!(e != null && e.autoSubmit) || !n)
|
|
1306
1308
|
return;
|
|
1307
|
-
let t =
|
|
1309
|
+
let t = n;
|
|
1308
1310
|
for (; t && t.$el.tagName !== "FORM"; )
|
|
1309
1311
|
t = t.$parent;
|
|
1310
1312
|
t && t.$el && t.$el.dispatchEvent(new Event("submit"));
|
|
@@ -1312,19 +1314,19 @@ function er(e) {
|
|
|
1312
1314
|
return (t, a) => {
|
|
1313
1315
|
e != null && e.default && (t[a.key] = e.default);
|
|
1314
1316
|
function u() {
|
|
1315
|
-
const
|
|
1316
|
-
return f("span", null, [
|
|
1317
|
+
const i = t[a.key];
|
|
1318
|
+
return f("span", null, [i ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1317
1319
|
}
|
|
1318
1320
|
function l() {
|
|
1319
1321
|
return f(_t, {
|
|
1320
|
-
ref: (
|
|
1322
|
+
ref: (i) => n = i,
|
|
1321
1323
|
modelValue: t[a.key],
|
|
1322
|
-
"onUpdate:modelValue": (
|
|
1324
|
+
"onUpdate:modelValue": (i) => t[a.key] = i,
|
|
1323
1325
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1324
1326
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1325
1327
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
1326
1328
|
uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
|
|
1327
|
-
onChange:
|
|
1329
|
+
onChange: r
|
|
1328
1330
|
}, null);
|
|
1329
1331
|
}
|
|
1330
1332
|
switch (a.mode) {
|
|
@@ -1336,23 +1338,23 @@ function er(e) {
|
|
|
1336
1338
|
}
|
|
1337
1339
|
};
|
|
1338
1340
|
}
|
|
1339
|
-
function
|
|
1340
|
-
return (
|
|
1341
|
+
function tn(e) {
|
|
1342
|
+
return (n, r) => {
|
|
1341
1343
|
let t = [];
|
|
1342
1344
|
function a(c) {
|
|
1343
1345
|
t = c;
|
|
1344
1346
|
}
|
|
1345
1347
|
function u(c) {
|
|
1346
1348
|
if (c && c.length === 2) {
|
|
1347
|
-
const [o,
|
|
1348
|
-
r
|
|
1349
|
+
const [o, s] = c.sort(), d = S(o).startOf("days"), m = S(s).endOf("days");
|
|
1350
|
+
n[r.key] = [d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), m.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1349
1351
|
}
|
|
1350
1352
|
}
|
|
1351
1353
|
function l(c) {
|
|
1352
1354
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
|
|
1353
1355
|
}
|
|
1354
|
-
function
|
|
1355
|
-
const c = r
|
|
1356
|
+
function i() {
|
|
1357
|
+
const c = n[r.key], [o, s] = c, d = (m) => {
|
|
1356
1358
|
switch (e == null ? void 0 : e.type) {
|
|
1357
1359
|
case "week":
|
|
1358
1360
|
return f("span", null, [`${S(m).format("YYYY年")}${S(m).week()}周`]);
|
|
@@ -1367,16 +1369,16 @@ function tr(e) {
|
|
|
1367
1369
|
return f("span", null, [S(m).format("YYYY年MM月DD日")]);
|
|
1368
1370
|
}
|
|
1369
1371
|
};
|
|
1370
|
-
return f("span", null, [d(o), I(" - "), d(
|
|
1372
|
+
return f("span", null, [d(o), I(" - "), d(s)]);
|
|
1371
1373
|
}
|
|
1372
|
-
function
|
|
1374
|
+
function h() {
|
|
1373
1375
|
return f("div", null, [f($t, {
|
|
1374
1376
|
"disabled-input": !0,
|
|
1375
1377
|
style: {
|
|
1376
1378
|
width: "300px"
|
|
1377
1379
|
},
|
|
1378
|
-
modelValue: r
|
|
1379
|
-
"onUpdate:modelValue": (c) => r
|
|
1380
|
+
modelValue: n[r.key],
|
|
1381
|
+
"onUpdate:modelValue": (c) => n[r.key] = c,
|
|
1380
1382
|
onSelect: a,
|
|
1381
1383
|
onChange: u,
|
|
1382
1384
|
mode: e == null ? void 0 : e.type,
|
|
@@ -1387,30 +1389,30 @@ function tr(e) {
|
|
|
1387
1389
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1388
1390
|
}, null)]);
|
|
1389
1391
|
}
|
|
1390
|
-
switch (
|
|
1392
|
+
switch (r.mode) {
|
|
1391
1393
|
case "text":
|
|
1392
|
-
return
|
|
1394
|
+
return i();
|
|
1393
1395
|
case "component":
|
|
1394
1396
|
default:
|
|
1395
|
-
return
|
|
1397
|
+
return h();
|
|
1396
1398
|
}
|
|
1397
1399
|
};
|
|
1398
1400
|
}
|
|
1399
|
-
function
|
|
1400
|
-
return (
|
|
1401
|
+
function rn(e) {
|
|
1402
|
+
return (n, r) => {
|
|
1401
1403
|
function t() {
|
|
1402
|
-
return f("span", null, [r
|
|
1404
|
+
return f("span", null, [n[r.key]]);
|
|
1403
1405
|
}
|
|
1404
1406
|
function a() {
|
|
1405
1407
|
return f(Ft, {
|
|
1406
|
-
modelValue: r
|
|
1407
|
-
"onUpdate:modelValue": (u) => r
|
|
1408
|
+
modelValue: n[r.key],
|
|
1409
|
+
"onUpdate:modelValue": (u) => n[r.key] = u,
|
|
1408
1410
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1409
1411
|
autoSize: e == null ? void 0 : e.autosize,
|
|
1410
1412
|
maxLength: e == null ? void 0 : e.maxLength
|
|
1411
1413
|
}, null);
|
|
1412
1414
|
}
|
|
1413
|
-
switch (
|
|
1415
|
+
switch (r.mode) {
|
|
1414
1416
|
case "text":
|
|
1415
1417
|
return t();
|
|
1416
1418
|
case "component":
|
|
@@ -1420,46 +1422,46 @@ function nr(e) {
|
|
|
1420
1422
|
};
|
|
1421
1423
|
}
|
|
1422
1424
|
function Ke(e) {
|
|
1423
|
-
let
|
|
1424
|
-
const
|
|
1425
|
+
let n = !1;
|
|
1426
|
+
const r = [], t = (a) => {
|
|
1425
1427
|
var u;
|
|
1426
|
-
if (!
|
|
1427
|
-
if (
|
|
1428
|
-
|
|
1428
|
+
if (!n) {
|
|
1429
|
+
if (r.push(a), a[e.valueProp] === e.key) {
|
|
1430
|
+
n = !0;
|
|
1429
1431
|
return;
|
|
1430
1432
|
}
|
|
1431
|
-
(u = a.children) != null && u.length && a.children.forEach(t),
|
|
1433
|
+
(u = a.children) != null && u.length && a.children.forEach(t), n || r.pop();
|
|
1432
1434
|
}
|
|
1433
1435
|
};
|
|
1434
|
-
return e.data.forEach(t),
|
|
1436
|
+
return e.data.forEach(t), r;
|
|
1435
1437
|
}
|
|
1436
|
-
function
|
|
1437
|
-
let
|
|
1438
|
-
const
|
|
1438
|
+
function nn(e) {
|
|
1439
|
+
let n = e.data;
|
|
1440
|
+
const r = [];
|
|
1439
1441
|
return e.path.forEach((t) => {
|
|
1440
1442
|
var u;
|
|
1441
|
-
const a =
|
|
1442
|
-
a &&
|
|
1443
|
-
}),
|
|
1443
|
+
const a = n.find((l) => l[e.valueProp] === t);
|
|
1444
|
+
a && r.push(a), a && ((u = a.children) != null && u.length) && (n = a.children);
|
|
1445
|
+
}), r;
|
|
1444
1446
|
}
|
|
1445
1447
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1446
|
-
function
|
|
1448
|
+
function ln() {
|
|
1447
1449
|
const e = _([]);
|
|
1448
|
-
return [e, (
|
|
1450
|
+
return [e, (r) => e.value = r];
|
|
1449
1451
|
}
|
|
1450
|
-
function
|
|
1451
|
-
let
|
|
1452
|
-
const [t, a] =
|
|
1453
|
-
if (!e.
|
|
1452
|
+
function an(e) {
|
|
1453
|
+
let n, r = !1;
|
|
1454
|
+
const [t, a] = ln(), u = () => {
|
|
1455
|
+
if (!e.autoSubmit || !n)
|
|
1454
1456
|
return;
|
|
1455
|
-
let o =
|
|
1457
|
+
let o = n;
|
|
1456
1458
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1457
1459
|
o = o.$parent;
|
|
1458
1460
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1459
|
-
}, l = (o,
|
|
1461
|
+
}, l = (o, s) => {
|
|
1460
1462
|
const d = o();
|
|
1461
|
-
d instanceof Promise ? d.then(
|
|
1462
|
-
},
|
|
1463
|
+
d instanceof Promise ? d.then(s) : s(d);
|
|
1464
|
+
}, i = async () => {
|
|
1463
1465
|
const o = X.get(e.options);
|
|
1464
1466
|
switch (typeof o) {
|
|
1465
1467
|
case "function":
|
|
@@ -1469,18 +1471,18 @@ function ar(e) {
|
|
|
1469
1471
|
a(o);
|
|
1470
1472
|
return;
|
|
1471
1473
|
}
|
|
1472
|
-
X.set(e.options, a), l(e.options, (
|
|
1474
|
+
X.set(e.options, a), l(e.options, (s) => {
|
|
1473
1475
|
const d = X.get(e.options);
|
|
1474
|
-
X.set(e.options,
|
|
1476
|
+
X.set(e.options, s), d(s);
|
|
1475
1477
|
});
|
|
1476
|
-
},
|
|
1478
|
+
}, h = () => {
|
|
1477
1479
|
l(e.options, (o) => {
|
|
1478
1480
|
a(o);
|
|
1479
1481
|
});
|
|
1480
1482
|
};
|
|
1481
1483
|
switch (!0) {
|
|
1482
1484
|
case e.options instanceof Function: {
|
|
1483
|
-
e.cache !== !1 ?
|
|
1485
|
+
e.cache !== !1 ? i() : h();
|
|
1484
1486
|
break;
|
|
1485
1487
|
}
|
|
1486
1488
|
case ae(e.options): {
|
|
@@ -1494,15 +1496,15 @@ function ar(e) {
|
|
|
1494
1496
|
default:
|
|
1495
1497
|
t.value = e.options;
|
|
1496
1498
|
}
|
|
1497
|
-
function c(o,
|
|
1499
|
+
function c(o, s) {
|
|
1498
1500
|
var v;
|
|
1499
|
-
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m =
|
|
1501
|
+
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m = s[d];
|
|
1500
1502
|
return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
|
|
1501
1503
|
}
|
|
1502
|
-
return (o,
|
|
1503
|
-
e.default && !
|
|
1504
|
+
return (o, s) => {
|
|
1505
|
+
e.default && !r && (o[s.key] = e.default, r = !0);
|
|
1504
1506
|
function d() {
|
|
1505
|
-
const v = o[
|
|
1507
|
+
const v = o[s.key], k = (y) => {
|
|
1506
1508
|
const [C] = Ke({
|
|
1507
1509
|
data: t.value,
|
|
1508
1510
|
labelProp: "title",
|
|
@@ -1521,10 +1523,10 @@ function ar(e) {
|
|
|
1521
1523
|
}
|
|
1522
1524
|
function m() {
|
|
1523
1525
|
return f(Ot, {
|
|
1524
|
-
ref: (v) =>
|
|
1526
|
+
ref: (v) => n = v,
|
|
1525
1527
|
multiple: e.multiple,
|
|
1526
|
-
modelValue: o[
|
|
1527
|
-
"onUpdate:modelValue": (v) => o[
|
|
1528
|
+
modelValue: o[s.key],
|
|
1529
|
+
"onUpdate:modelValue": (v) => o[s.key] = v,
|
|
1528
1530
|
placeholder: e.placeholder,
|
|
1529
1531
|
allowClear: e.clearable,
|
|
1530
1532
|
allowSearch: e.searchable,
|
|
@@ -1533,12 +1535,14 @@ function ar(e) {
|
|
|
1533
1535
|
filterTreeNode: c,
|
|
1534
1536
|
data: t.value,
|
|
1535
1537
|
fieldNames: e.fieldNames,
|
|
1536
|
-
treeProps: e.treeProps
|
|
1538
|
+
treeProps: e.treeProps,
|
|
1539
|
+
treeCheckStrictly: e.treeCheckStrictly,
|
|
1540
|
+
treeCheckedStrategy: e.treeCheckedStrategy
|
|
1537
1541
|
}, {
|
|
1538
1542
|
...e.slots
|
|
1539
1543
|
});
|
|
1540
1544
|
}
|
|
1541
|
-
switch (
|
|
1545
|
+
switch (s.mode) {
|
|
1542
1546
|
case "text":
|
|
1543
1547
|
return d();
|
|
1544
1548
|
case "component":
|
|
@@ -1548,23 +1552,23 @@ function ar(e) {
|
|
|
1548
1552
|
};
|
|
1549
1553
|
}
|
|
1550
1554
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1551
|
-
function
|
|
1555
|
+
function un() {
|
|
1552
1556
|
const e = _([]);
|
|
1553
|
-
return [e, (
|
|
1557
|
+
return [e, (r) => e.value = r];
|
|
1554
1558
|
}
|
|
1555
|
-
function
|
|
1556
|
-
let
|
|
1557
|
-
const [t, a] =
|
|
1558
|
-
if (!e.
|
|
1559
|
+
function on(e) {
|
|
1560
|
+
let n, r = !1;
|
|
1561
|
+
const [t, a] = un(), u = () => {
|
|
1562
|
+
if (!e.autoSubmit || !n)
|
|
1559
1563
|
return;
|
|
1560
|
-
let c =
|
|
1564
|
+
let c = n;
|
|
1561
1565
|
for (; c && c.$el.tagName !== "FORM"; )
|
|
1562
1566
|
c = c.$parent;
|
|
1563
1567
|
c && c.$el && c.$el.dispatchEvent(new Event("submit"));
|
|
1564
1568
|
}, l = (c, o) => {
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1569
|
+
const s = c();
|
|
1570
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1571
|
+
}, i = async () => {
|
|
1568
1572
|
const c = J.get(e.options);
|
|
1569
1573
|
switch (typeof c) {
|
|
1570
1574
|
case "function":
|
|
@@ -1575,17 +1579,17 @@ function or(e) {
|
|
|
1575
1579
|
return;
|
|
1576
1580
|
}
|
|
1577
1581
|
J.set(e.options, a), l(e.options, (o) => {
|
|
1578
|
-
const
|
|
1579
|
-
J.set(e.options, o),
|
|
1582
|
+
const s = J.get(e.options);
|
|
1583
|
+
J.set(e.options, o), s(o);
|
|
1580
1584
|
});
|
|
1581
|
-
},
|
|
1585
|
+
}, h = () => {
|
|
1582
1586
|
l(e.options, (c) => {
|
|
1583
1587
|
a(c);
|
|
1584
1588
|
});
|
|
1585
1589
|
};
|
|
1586
1590
|
switch (!0) {
|
|
1587
1591
|
case e.options instanceof Function: {
|
|
1588
|
-
e.cache !== !1 ?
|
|
1592
|
+
e.cache !== !1 ? i() : h();
|
|
1589
1593
|
break;
|
|
1590
1594
|
}
|
|
1591
1595
|
case ae(e.options): {
|
|
@@ -1600,14 +1604,14 @@ function or(e) {
|
|
|
1600
1604
|
t.value = e.options;
|
|
1601
1605
|
}
|
|
1602
1606
|
return (c, o) => {
|
|
1603
|
-
e.default && !
|
|
1604
|
-
function
|
|
1607
|
+
e.default && !r && (c[o.key] = e.default, r = !0);
|
|
1608
|
+
function s() {
|
|
1605
1609
|
const m = c[o.key], v = (y) => Ke({
|
|
1606
1610
|
data: t.value,
|
|
1607
1611
|
labelProp: "label",
|
|
1608
1612
|
valueProp: "value",
|
|
1609
1613
|
key: y
|
|
1610
|
-
}).map((j) => j.label).join("/"), k = (y) =>
|
|
1614
|
+
}).map((j) => j.label).join("/"), k = (y) => nn({
|
|
1611
1615
|
data: t.value,
|
|
1612
1616
|
labelProp: "label",
|
|
1613
1617
|
valueProp: "value",
|
|
@@ -1637,7 +1641,7 @@ function or(e) {
|
|
|
1637
1641
|
function d() {
|
|
1638
1642
|
return f(Yt, {
|
|
1639
1643
|
pathMode: e.pathMode,
|
|
1640
|
-
ref: (m) =>
|
|
1644
|
+
ref: (m) => n = m,
|
|
1641
1645
|
multiple: e.multiple,
|
|
1642
1646
|
modelValue: c[o.key],
|
|
1643
1647
|
"onUpdate:modelValue": (m) => c[o.key] = m,
|
|
@@ -1646,22 +1650,24 @@ function or(e) {
|
|
|
1646
1650
|
allowSearch: e.searchable,
|
|
1647
1651
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1648
1652
|
onChange: u,
|
|
1653
|
+
checkStrictly: e.checkStrictly,
|
|
1654
|
+
triggerProps: e.triggerProps,
|
|
1649
1655
|
options: t.value
|
|
1650
1656
|
}, null);
|
|
1651
1657
|
}
|
|
1652
1658
|
switch (o.mode) {
|
|
1653
1659
|
case "text":
|
|
1654
|
-
return
|
|
1660
|
+
return s();
|
|
1655
1661
|
case "component":
|
|
1656
1662
|
default:
|
|
1657
1663
|
return d();
|
|
1658
1664
|
}
|
|
1659
1665
|
};
|
|
1660
1666
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return (
|
|
1667
|
+
function cn(e) {
|
|
1668
|
+
return (n, r) => e(n, r);
|
|
1663
1669
|
}
|
|
1664
|
-
const
|
|
1670
|
+
const sn = {
|
|
1665
1671
|
thousands: !0,
|
|
1666
1672
|
inputUnit: "元",
|
|
1667
1673
|
outputUnit: "元"
|
|
@@ -1670,45 +1676,45 @@ const ir = {
|
|
|
1670
1676
|
元: 10 ** 2,
|
|
1671
1677
|
万: 10 ** 4
|
|
1672
1678
|
};
|
|
1673
|
-
function
|
|
1679
|
+
function dn(e) {
|
|
1674
1680
|
e = {
|
|
1675
|
-
...
|
|
1681
|
+
...sn,
|
|
1676
1682
|
...e || {}
|
|
1677
1683
|
};
|
|
1678
|
-
const
|
|
1684
|
+
const n = (l) => {
|
|
1679
1685
|
if (l == null)
|
|
1680
1686
|
return;
|
|
1681
1687
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1682
1688
|
return l;
|
|
1683
|
-
const
|
|
1684
|
-
return parseFloat((l *
|
|
1685
|
-
},
|
|
1689
|
+
const i = te[e.outputUnit] / te[e.inputUnit];
|
|
1690
|
+
return parseFloat((l * i).toFixed(10));
|
|
1691
|
+
}, r = (l) => {
|
|
1686
1692
|
if (l == null)
|
|
1687
1693
|
return;
|
|
1688
1694
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1689
1695
|
return l;
|
|
1690
|
-
const
|
|
1691
|
-
return parseFloat((l *
|
|
1696
|
+
const i = te[e.inputUnit] / te[e.outputUnit];
|
|
1697
|
+
return parseFloat((l * i).toFixed(10));
|
|
1692
1698
|
}, t = (l) => {
|
|
1693
|
-
const
|
|
1694
|
-
return
|
|
1699
|
+
const i = l.split(".");
|
|
1700
|
+
return i[0] = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), i.join(".");
|
|
1695
1701
|
}, a = (l) => {
|
|
1696
|
-
const
|
|
1697
|
-
return e != null && e.thousands ? t(
|
|
1702
|
+
const i = l;
|
|
1703
|
+
return e != null && e.thousands ? t(i) : i;
|
|
1698
1704
|
}, u = (l) => l.replace(/,/g, "");
|
|
1699
|
-
return (l,
|
|
1700
|
-
const
|
|
1701
|
-
Z(
|
|
1702
|
-
l[
|
|
1705
|
+
return (l, i) => {
|
|
1706
|
+
const h = _(n(l[i.key]));
|
|
1707
|
+
Z(h, (m) => {
|
|
1708
|
+
l[i.key] = r(m);
|
|
1703
1709
|
});
|
|
1704
1710
|
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
|
|
1705
|
-
function
|
|
1706
|
-
return f("span", null, [a(
|
|
1711
|
+
function s() {
|
|
1712
|
+
return f("span", null, [a(h.value.toString()), o()]);
|
|
1707
1713
|
}
|
|
1708
1714
|
function d() {
|
|
1709
1715
|
return f(Ve, {
|
|
1710
|
-
modelValue:
|
|
1711
|
-
"onUpdate:modelValue": (m) =>
|
|
1716
|
+
modelValue: h.value,
|
|
1717
|
+
"onUpdate:modelValue": (m) => h.value = m,
|
|
1712
1718
|
formatter: a,
|
|
1713
1719
|
parser: u,
|
|
1714
1720
|
precision: e == null ? void 0 : e.precision,
|
|
@@ -1721,57 +1727,57 @@ function sr(e) {
|
|
|
1721
1727
|
suffix: o
|
|
1722
1728
|
});
|
|
1723
1729
|
}
|
|
1724
|
-
switch (
|
|
1730
|
+
switch (i.mode) {
|
|
1725
1731
|
case "text":
|
|
1726
|
-
return
|
|
1732
|
+
return s();
|
|
1727
1733
|
case "component":
|
|
1728
1734
|
default:
|
|
1729
1735
|
return d();
|
|
1730
1736
|
}
|
|
1731
1737
|
};
|
|
1732
1738
|
}
|
|
1733
|
-
function
|
|
1739
|
+
function fn() {
|
|
1734
1740
|
return {
|
|
1735
|
-
input:
|
|
1736
|
-
textarea:
|
|
1737
|
-
select:
|
|
1738
|
-
treeSelect:
|
|
1739
|
-
date:
|
|
1740
|
-
switch:
|
|
1741
|
-
dateRange:
|
|
1742
|
-
render:
|
|
1743
|
-
cascader:
|
|
1744
|
-
currency:
|
|
1741
|
+
input: Xr,
|
|
1742
|
+
textarea: rn,
|
|
1743
|
+
select: Zr,
|
|
1744
|
+
treeSelect: an,
|
|
1745
|
+
date: qr,
|
|
1746
|
+
switch: en,
|
|
1747
|
+
dateRange: tn,
|
|
1748
|
+
render: cn,
|
|
1749
|
+
cascader: on,
|
|
1750
|
+
currency: dn
|
|
1745
1751
|
};
|
|
1746
1752
|
}
|
|
1747
|
-
function Le(e,
|
|
1748
|
-
|
|
1749
|
-
const
|
|
1750
|
-
...
|
|
1753
|
+
function Le(e, n) {
|
|
1754
|
+
n.render || (n.render = (t) => t.input());
|
|
1755
|
+
const r = n.render({
|
|
1756
|
+
...fn()
|
|
1751
1757
|
});
|
|
1752
1758
|
return {
|
|
1753
|
-
default: () =>
|
|
1759
|
+
default: () => r(e, n)
|
|
1754
1760
|
};
|
|
1755
1761
|
}
|
|
1756
|
-
function Ie(e,
|
|
1757
|
-
switch (
|
|
1762
|
+
function Ie(e, n) {
|
|
1763
|
+
switch (n.mode) {
|
|
1758
1764
|
case "text":
|
|
1759
|
-
return Oe(Le(e,
|
|
1765
|
+
return Oe(Le(e, n).default);
|
|
1760
1766
|
case "component":
|
|
1761
1767
|
default:
|
|
1762
1768
|
return Oe(ve, {
|
|
1763
|
-
field:
|
|
1764
|
-
label:
|
|
1765
|
-
hideLabel:
|
|
1766
|
-
labelColStyle:
|
|
1767
|
-
wrapperColStyle:
|
|
1768
|
-
}, Le(e,
|
|
1769
|
+
field: n.key,
|
|
1770
|
+
label: n.title,
|
|
1771
|
+
hideLabel: n.hideLabel,
|
|
1772
|
+
labelColStyle: n.labelStyle,
|
|
1773
|
+
wrapperColStyle: n.contentStyle
|
|
1774
|
+
}, Le(e, n));
|
|
1769
1775
|
}
|
|
1770
1776
|
}
|
|
1771
|
-
function
|
|
1777
|
+
function mn(e) {
|
|
1772
1778
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1773
1779
|
}
|
|
1774
|
-
const
|
|
1780
|
+
const hn = /* @__PURE__ */ E({
|
|
1775
1781
|
props: {
|
|
1776
1782
|
form: {
|
|
1777
1783
|
type: Object,
|
|
@@ -1782,52 +1788,52 @@ const mr = /* @__PURE__ */ E({
|
|
|
1782
1788
|
}
|
|
1783
1789
|
},
|
|
1784
1790
|
setup(e) {
|
|
1785
|
-
const
|
|
1786
|
-
...
|
|
1791
|
+
const n = qe(), r = e.form.map((h) => ({
|
|
1792
|
+
...h,
|
|
1787
1793
|
collapsed: !1
|
|
1788
|
-
})), t = Array.from(new Set(
|
|
1789
|
-
let
|
|
1790
|
-
|
|
1794
|
+
})), t = Array.from(new Set(r.map((h) => h.group).flat().filter(Boolean))), a = r.reduce((h, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
|
|
1795
|
+
let s = h.find((d) => d.group === o);
|
|
1796
|
+
s || (s = {
|
|
1791
1797
|
group: o,
|
|
1792
1798
|
instance: void 0,
|
|
1793
1799
|
form: []
|
|
1794
|
-
},
|
|
1795
|
-
}),
|
|
1800
|
+
}, h.push(s)), s.form.push(c);
|
|
1801
|
+
}), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), u = _("默认");
|
|
1796
1802
|
return {
|
|
1797
|
-
formItems:
|
|
1803
|
+
formItems: r,
|
|
1798
1804
|
groups: t,
|
|
1799
1805
|
groupForms: a,
|
|
1800
1806
|
activeTab: u,
|
|
1801
1807
|
onSubmit: () => {
|
|
1802
|
-
const
|
|
1803
|
-
if (
|
|
1804
|
-
const c =
|
|
1805
|
-
|
|
1806
|
-
o ||
|
|
1808
|
+
const h = a.find((c) => c.group === u.value);
|
|
1809
|
+
if (h && h.instance) {
|
|
1810
|
+
const c = h.instance.formSource;
|
|
1811
|
+
h.instance.validate().then((o) => {
|
|
1812
|
+
o || n.close(c);
|
|
1807
1813
|
});
|
|
1808
1814
|
}
|
|
1809
1815
|
},
|
|
1810
1816
|
onReset: () => {
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1817
|
+
const h = a.find((c) => c.group === u.value);
|
|
1818
|
+
h && h.instance && h.instance.reset();
|
|
1813
1819
|
}
|
|
1814
1820
|
};
|
|
1815
1821
|
},
|
|
1816
1822
|
render() {
|
|
1817
|
-
const e = this.groupForms.find((
|
|
1823
|
+
const e = this.groupForms.find((n) => n.group === this.activeTab);
|
|
1818
1824
|
if (this.groups.length) {
|
|
1819
|
-
let
|
|
1825
|
+
let n;
|
|
1820
1826
|
return f(Mt, {
|
|
1821
1827
|
"active-key": this.activeTab,
|
|
1822
|
-
"onUpdate:active-key": (
|
|
1823
|
-
},
|
|
1824
|
-
title:
|
|
1825
|
-
key:
|
|
1828
|
+
"onUpdate:active-key": (r) => this.activeTab = r
|
|
1829
|
+
}, mn(n = this.groupForms.map((r) => f(Tt, {
|
|
1830
|
+
title: r.group,
|
|
1831
|
+
key: r.group
|
|
1826
1832
|
}, {
|
|
1827
1833
|
default: () => [f(pe, {
|
|
1828
|
-
form:
|
|
1834
|
+
form: r.form,
|
|
1829
1835
|
value: this.value,
|
|
1830
|
-
ref: (t) =>
|
|
1836
|
+
ref: (t) => r.instance = t
|
|
1831
1837
|
}, null), f(Ye, null, null), f("div", {
|
|
1832
1838
|
class: "flex items-center justify-between space-x-2"
|
|
1833
1839
|
}, [f(D, {
|
|
@@ -1844,14 +1850,14 @@ const mr = /* @__PURE__ */ E({
|
|
|
1844
1850
|
}, {
|
|
1845
1851
|
default: () => [I("搜索")]
|
|
1846
1852
|
})])]
|
|
1847
|
-
}))) ?
|
|
1848
|
-
default: () => [
|
|
1853
|
+
}))) ? n : {
|
|
1854
|
+
default: () => [n]
|
|
1849
1855
|
});
|
|
1850
1856
|
} else
|
|
1851
|
-
return f(
|
|
1857
|
+
return f(re, null, [f(pe, {
|
|
1852
1858
|
form: this.formItems,
|
|
1853
1859
|
value: this.value,
|
|
1854
|
-
ref: (
|
|
1860
|
+
ref: (n) => e.instance = n
|
|
1855
1861
|
}, null), f(Ye, null, null), f("div", {
|
|
1856
1862
|
class: "flex items-center justify-between space-x-2"
|
|
1857
1863
|
}, [f(D, {
|
|
@@ -1938,12 +1944,12 @@ const pe = /* @__PURE__ */ E({
|
|
|
1938
1944
|
emits: ["submit", "cancel", "update:model-value"],
|
|
1939
1945
|
expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
|
|
1940
1946
|
setup(e, {
|
|
1941
|
-
emit:
|
|
1947
|
+
emit: n
|
|
1942
1948
|
}) {
|
|
1943
|
-
const
|
|
1949
|
+
const r = _(), [t, a] = Rr(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), i = _(), h = () => l.value = !l.value, c = _(""), o = _("");
|
|
1944
1950
|
he(Te.id, c), he(Te.source, t);
|
|
1945
|
-
const
|
|
1946
|
-
|
|
1951
|
+
const s = () => {
|
|
1952
|
+
n("submit", t.value), n("update:model-value", t.value);
|
|
1947
1953
|
}, d = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1948
1954
|
switch (!0) {
|
|
1949
1955
|
case typeof g.visiable == "boolean":
|
|
@@ -1970,16 +1976,16 @@ const pe = /* @__PURE__ */ E({
|
|
|
1970
1976
|
var b;
|
|
1971
1977
|
if (e.columns)
|
|
1972
1978
|
return;
|
|
1973
|
-
const g = (b =
|
|
1979
|
+
const g = (b = r.value) == null ? void 0 : b.$el;
|
|
1974
1980
|
g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
|
|
1975
1981
|
}
|
|
1976
1982
|
function C() {
|
|
1977
1983
|
var b;
|
|
1978
|
-
const g = (b =
|
|
1984
|
+
const g = (b = r.value) == null ? void 0 : b.$el;
|
|
1979
1985
|
g && (g.id = c.value);
|
|
1980
1986
|
}
|
|
1981
1987
|
function j() {
|
|
1982
|
-
|
|
1988
|
+
i.value.open(hn, {
|
|
1983
1989
|
form: e.form,
|
|
1984
1990
|
value: t.value
|
|
1985
1991
|
}, {
|
|
@@ -1987,7 +1993,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
1987
1993
|
footer: !1,
|
|
1988
1994
|
submitText: "搜索"
|
|
1989
1995
|
}).then((g) => {
|
|
1990
|
-
g && (P(g),
|
|
1996
|
+
g && (P(g), s());
|
|
1991
1997
|
});
|
|
1992
1998
|
}
|
|
1993
1999
|
W(() => {
|
|
@@ -2011,38 +2017,38 @@ const pe = /* @__PURE__ */ E({
|
|
|
2011
2017
|
}
|
|
2012
2018
|
function B() {
|
|
2013
2019
|
var g;
|
|
2014
|
-
(g =
|
|
2020
|
+
(g = r.value) == null || g.resetFields();
|
|
2015
2021
|
}
|
|
2016
2022
|
function w() {
|
|
2017
2023
|
var g;
|
|
2018
|
-
return (g =
|
|
2024
|
+
return (g = r.value) == null ? void 0 : g.validate();
|
|
2019
2025
|
}
|
|
2020
2026
|
return {
|
|
2021
2027
|
formId: c,
|
|
2022
2028
|
formName: o,
|
|
2023
2029
|
formSource: t,
|
|
2024
|
-
formInstance:
|
|
2030
|
+
formInstance: r,
|
|
2025
2031
|
formColumns: u,
|
|
2026
2032
|
formRules: k,
|
|
2027
2033
|
formCollspased: l,
|
|
2028
2034
|
formActiosSpan: m,
|
|
2029
2035
|
formItems: d,
|
|
2030
|
-
toggleFormCollapsed:
|
|
2036
|
+
toggleFormCollapsed: h,
|
|
2031
2037
|
updateFormField: z,
|
|
2032
2038
|
resetFormField: H,
|
|
2033
2039
|
updateFormSource: P,
|
|
2034
2040
|
reset: B,
|
|
2035
2041
|
validate: w,
|
|
2036
|
-
onSubmitSuccess:
|
|
2042
|
+
onSubmitSuccess: s,
|
|
2037
2043
|
openCollapsedDialog: j,
|
|
2038
|
-
modalInstance:
|
|
2044
|
+
modalInstance: i
|
|
2039
2045
|
};
|
|
2040
2046
|
},
|
|
2041
2047
|
render() {
|
|
2042
2048
|
const e = () => {
|
|
2043
2049
|
if (!this.showFormResult)
|
|
2044
2050
|
return;
|
|
2045
|
-
const
|
|
2051
|
+
const r = this.form.filter((a) => {
|
|
2046
2052
|
const u = this.formSource[a.key];
|
|
2047
2053
|
switch (!0) {
|
|
2048
2054
|
case typeof u == "string":
|
|
@@ -2054,7 +2060,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
2054
2060
|
}
|
|
2055
2061
|
}), t = (a) => {
|
|
2056
2062
|
var l;
|
|
2057
|
-
const u = this.formItems.find((
|
|
2063
|
+
const u = this.formItems.find((i) => i.key === a);
|
|
2058
2064
|
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
2059
2065
|
};
|
|
2060
2066
|
return f(ce, {
|
|
@@ -2069,7 +2075,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
2069
2075
|
wrap: !0,
|
|
2070
2076
|
align: "center"
|
|
2071
2077
|
}, {
|
|
2072
|
-
default: () => [
|
|
2078
|
+
default: () => [r.length > 0 ? r.map((a) => f(Lt, {
|
|
2073
2079
|
key: a.key,
|
|
2074
2080
|
closable: !0,
|
|
2075
2081
|
onClose: () => t(a.key)
|
|
@@ -2091,18 +2097,18 @@ const pe = /* @__PURE__ */ E({
|
|
|
2091
2097
|
})])]
|
|
2092
2098
|
})]
|
|
2093
2099
|
});
|
|
2094
|
-
},
|
|
2095
|
-
const
|
|
2100
|
+
}, n = () => {
|
|
2101
|
+
const r = [], t = this.footer ? {
|
|
2096
2102
|
span: this.formColumns
|
|
2097
2103
|
} : {
|
|
2098
2104
|
span: this.formActiosSpan
|
|
2099
2105
|
};
|
|
2100
|
-
if (this.searchable && (
|
|
2106
|
+
if (this.searchable && (r.push(f(D, {
|
|
2101
2107
|
type: "primary",
|
|
2102
2108
|
htmlType: "submit"
|
|
2103
2109
|
}, {
|
|
2104
2110
|
default: () => [I("搜索")]
|
|
2105
|
-
})),
|
|
2111
|
+
})), r.push(f(D, {
|
|
2106
2112
|
type: "secondary",
|
|
2107
2113
|
onClick: () => {
|
|
2108
2114
|
var a;
|
|
@@ -2110,41 +2116,41 @@ const pe = /* @__PURE__ */ E({
|
|
|
2110
2116
|
}
|
|
2111
2117
|
}, {
|
|
2112
2118
|
default: () => [I("重置")]
|
|
2113
|
-
}))), this.submitable && (
|
|
2119
|
+
}))), this.submitable && (r.push(f(D, {
|
|
2114
2120
|
type: "primary",
|
|
2115
2121
|
htmlType: "submit"
|
|
2116
2122
|
}, {
|
|
2117
2123
|
default: () => [I("提交")]
|
|
2118
|
-
})),
|
|
2124
|
+
})), r.push(f(D, {
|
|
2119
2125
|
type: "secondary",
|
|
2120
2126
|
onClick: () => this.$emit("cancel")
|
|
2121
2127
|
}, {
|
|
2122
2128
|
default: () => [I("取消")]
|
|
2123
|
-
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" &&
|
|
2129
|
+
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && r.push(f(D, {
|
|
2124
2130
|
onClick: this.toggleFormCollapsed
|
|
2125
2131
|
}, {
|
|
2126
2132
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2127
2133
|
icon: () => this.formCollspased ? f(Ut, null, null) : f(Xt, null, null)
|
|
2128
|
-
})), this.collapsedMode === "dialog" &&
|
|
2134
|
+
})), this.collapsedMode === "dialog" && r.push(f(D, {
|
|
2129
2135
|
onClick: this.openCollapsedDialog
|
|
2130
2136
|
}, {
|
|
2131
2137
|
default: () => "高级搜索",
|
|
2132
|
-
icon: () => f(
|
|
2133
|
-
}))), this.$slots.actions &&
|
|
2138
|
+
icon: () => f(rr, null, null)
|
|
2139
|
+
}))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
|
|
2134
2140
|
return f(ce, t, {
|
|
2135
2141
|
default: () => [f(ve, {
|
|
2136
2142
|
contentClass: this.footer ? "form-footer" : ""
|
|
2137
2143
|
}, {
|
|
2138
|
-
default: () => [f(Me, null, De(
|
|
2139
|
-
default: () => [
|
|
2144
|
+
default: () => [f(Me, null, De(r) ? r : {
|
|
2145
|
+
default: () => [r]
|
|
2140
2146
|
})]
|
|
2141
2147
|
})]
|
|
2142
2148
|
});
|
|
2143
2149
|
};
|
|
2144
2150
|
return f("div", {
|
|
2145
2151
|
class: "form-render"
|
|
2146
|
-
}, [f(
|
|
2147
|
-
ref: (
|
|
2152
|
+
}, [f(zr, {
|
|
2153
|
+
ref: (r) => this.modalInstance = r
|
|
2148
2154
|
}, {
|
|
2149
2155
|
default: () => [f(Pt, ge({
|
|
2150
2156
|
name: this.formName
|
|
@@ -2154,7 +2160,7 @@ const pe = /* @__PURE__ */ E({
|
|
|
2154
2160
|
rules: this.formRules,
|
|
2155
2161
|
onSubmitSuccess: this.onSubmitSuccess,
|
|
2156
2162
|
"auto-label-width": !0,
|
|
2157
|
-
ref: (
|
|
2163
|
+
ref: (r) => this.formInstance = r,
|
|
2158
2164
|
model: this.formSource
|
|
2159
2165
|
}), {
|
|
2160
2166
|
default: () => [f(jt, {
|
|
@@ -2162,40 +2168,40 @@ const pe = /* @__PURE__ */ E({
|
|
|
2162
2168
|
"col-gap": 24,
|
|
2163
2169
|
"rol-gap": 10
|
|
2164
2170
|
}, {
|
|
2165
|
-
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((
|
|
2171
|
+
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
|
|
2166
2172
|
let t;
|
|
2167
2173
|
return f(ce, {
|
|
2168
|
-
span:
|
|
2169
|
-
}, De(t = Ie(this.formSource,
|
|
2174
|
+
span: r.span
|
|
2175
|
+
}, De(t = Ie(this.formSource, r)) ? t : {
|
|
2170
2176
|
default: () => [t]
|
|
2171
2177
|
});
|
|
2172
|
-
}),
|
|
2178
|
+
}), n(), e()]
|
|
2173
2179
|
})]
|
|
2174
2180
|
})]
|
|
2175
2181
|
})]);
|
|
2176
2182
|
}
|
|
2177
2183
|
});
|
|
2178
|
-
function
|
|
2184
|
+
function gn(e) {
|
|
2179
2185
|
return e;
|
|
2180
2186
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const
|
|
2187
|
+
function bn(e) {
|
|
2188
|
+
const n = q(), r = _();
|
|
2183
2189
|
function t() {
|
|
2184
2190
|
var u, l;
|
|
2185
|
-
const a = (l = (u =
|
|
2186
|
-
a && (
|
|
2191
|
+
const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
2192
|
+
a && (r.value = a);
|
|
2187
2193
|
}
|
|
2188
|
-
return W(t), pt(t),
|
|
2194
|
+
return W(t), pt(t), r;
|
|
2189
2195
|
}
|
|
2190
|
-
const
|
|
2191
|
-
install(e,
|
|
2196
|
+
const kn = {
|
|
2197
|
+
install(e, n) {
|
|
2192
2198
|
e.component("FormRender", pe);
|
|
2193
2199
|
}
|
|
2194
2200
|
};
|
|
2195
2201
|
export {
|
|
2196
2202
|
pe as FormRender,
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2203
|
+
Cn as FormRenderResolver,
|
|
2204
|
+
kn as default,
|
|
2205
|
+
gn as defineForm,
|
|
2206
|
+
bn as useForm
|
|
2201
2207
|
};
|