@gopowerteam/form-render 0.0.75 → 0.0.76
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,21 +1,21 @@
|
|
|
1
|
-
import { getCurrentInstance as q, inject as ye, defineComponent as
|
|
2
|
-
import { DatePicker 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 ne, renderSlot as tt, createBlock as re, Teleport as nt, createVNode as f, TransitionGroup as rt, 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
|
+
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
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
const a = q(), u = ye(
|
|
8
|
-
return `${(t = (
|
|
9
|
-
},
|
|
4
|
+
import { FormRenderResolver as xr } from "./resolver.mjs";
|
|
5
|
+
const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
|
|
6
|
+
var r, n, t;
|
|
7
|
+
const a = q(), u = ye(It, void 0);
|
|
8
|
+
return `${(t = (n = u == null ? void 0 : u.prefixCls) != null ? n : (r = a == null ? void 0 : a.appContext.config.globalProperties[Et]) == null ? void 0 : r.classPrefix) != null ? t : Dt}-${e}`;
|
|
9
|
+
}, zt = Object.prototype.toString;
|
|
10
10
|
function we(e) {
|
|
11
|
-
return
|
|
11
|
+
return zt.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var xe = (e,
|
|
14
|
-
for (const [
|
|
15
|
-
e[
|
|
13
|
+
var xe = (e, r) => {
|
|
14
|
+
for (const [n, t] of r)
|
|
15
|
+
e[n] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const
|
|
18
|
+
const Rt = E({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -42,10 +42,10 @@ const zt = z({
|
|
|
42
42
|
click: (e) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(e, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: r
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
[`${
|
|
47
|
+
const n = ke("icon"), t = F(() => [n, `${n}-down`, {
|
|
48
|
+
[`${n}-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 zt = z({
|
|
|
54
54
|
cls: t,
|
|
55
55
|
innerStyle: a,
|
|
56
56
|
onClick: (l) => {
|
|
57
|
-
|
|
57
|
+
r("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
|
-
}, null, -1),
|
|
64
|
-
function
|
|
63
|
+
}, null, -1), Vt = [Nt];
|
|
64
|
+
function Bt(e, r, n, t, a, u) {
|
|
65
65
|
return $(), T("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
@@ -72,17 +72,17 @@ function Nt(e, n, r, t, a, u) {
|
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
|
-
onClick:
|
|
76
|
-
},
|
|
75
|
+
onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
|
+
}, Vt, 14, At);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(
|
|
79
|
-
const
|
|
80
|
-
install: (e,
|
|
81
|
-
var
|
|
82
|
-
const t = (
|
|
78
|
+
var ie = /* @__PURE__ */ xe(Rt, [["render", Bt]]);
|
|
79
|
+
const Ut = Object.assign(ie, {
|
|
80
|
+
install: (e, r) => {
|
|
81
|
+
var n;
|
|
82
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
83
83
|
e.component(t + ie.name, ie);
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), qt = E({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -109,10 +109,10 @@ const Bt = Object.assign(ie, {
|
|
|
109
109
|
click: (e) => !0
|
|
110
110
|
},
|
|
111
111
|
setup(e, {
|
|
112
|
-
emit:
|
|
112
|
+
emit: r
|
|
113
113
|
}) {
|
|
114
|
-
const
|
|
115
|
-
[`${
|
|
114
|
+
const n = ke("icon"), t = F(() => [n, `${n}-up`, {
|
|
115
|
+
[`${n}-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 Bt = Object.assign(ie, {
|
|
|
121
121
|
cls: t,
|
|
122
122
|
innerStyle: a,
|
|
123
123
|
onClick: (l) => {
|
|
124
|
-
|
|
124
|
+
r("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
|
-
}, null, -1),
|
|
131
|
-
function
|
|
130
|
+
}, null, -1), Gt = [Ht];
|
|
131
|
+
function Kt(e, r, n, t, a, u) {
|
|
132
132
|
return $(), T("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
@@ -139,17 +139,17 @@ function Ht(e, n, r, t, a, u) {
|
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
|
-
onClick:
|
|
143
|
-
},
|
|
142
|
+
onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
143
|
+
}, Gt, 14, Wt);
|
|
144
144
|
}
|
|
145
|
-
var se = /* @__PURE__ */ xe(
|
|
146
|
-
const
|
|
147
|
-
install: (e,
|
|
148
|
-
var
|
|
149
|
-
const t = (
|
|
145
|
+
var se = /* @__PURE__ */ xe(qt, [["render", Kt]]);
|
|
146
|
+
const Xt = Object.assign(se, {
|
|
147
|
+
install: (e, r) => {
|
|
148
|
+
var n;
|
|
149
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
150
150
|
e.component(t + se.name, se);
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
152
|
+
}), Jt = E({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -176,10 +176,10 @@ const Gt = Object.assign(se, {
|
|
|
176
176
|
click: (e) => !0
|
|
177
177
|
},
|
|
178
178
|
setup(e, {
|
|
179
|
-
emit:
|
|
179
|
+
emit: r
|
|
180
180
|
}) {
|
|
181
|
-
const
|
|
182
|
-
[`${
|
|
181
|
+
const n = ke("icon"), t = F(() => [n, `${n}-search`, {
|
|
182
|
+
[`${n}-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 Gt = Object.assign(se, {
|
|
|
188
188
|
cls: t,
|
|
189
189
|
innerStyle: a,
|
|
190
190
|
onClick: (l) => {
|
|
191
|
-
|
|
191
|
+
r("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), en = [Zt];
|
|
198
|
+
function tn(e, r, n, t, a, u) {
|
|
199
199
|
return $(), T("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
@@ -206,42 +206,42 @@ function Zt(e, n, r, 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: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
210
|
+
}, en, 14, Qt);
|
|
211
211
|
}
|
|
212
|
-
var de = /* @__PURE__ */ xe(
|
|
213
|
-
const
|
|
214
|
-
install: (e,
|
|
215
|
-
var
|
|
216
|
-
const t = (
|
|
212
|
+
var de = /* @__PURE__ */ xe(Jt, [["render", tn]]);
|
|
213
|
+
const nn = Object.assign(de, {
|
|
214
|
+
install: (e, r) => {
|
|
215
|
+
var n;
|
|
216
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
217
217
|
e.component(t + de.name, de);
|
|
218
218
|
}
|
|
219
219
|
}), Ce = Symbol("__MODAL__");
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function Be(e) {
|
|
221
|
+
return ht() ? (vt(e), !0) : !1;
|
|
222
222
|
}
|
|
223
223
|
function M(e) {
|
|
224
|
-
return typeof e == "function" ? e() :
|
|
224
|
+
return typeof e == "function" ? e() : ze(e);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const Ue = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
|
-
const
|
|
228
|
+
const rn = Object.prototype.toString, ln = (e) => rn.call(e) === "[object Object]", an = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function un(e) {
|
|
231
231
|
return q();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function on(e, r = {}) {
|
|
234
234
|
if (!ae(e))
|
|
235
|
-
return
|
|
236
|
-
const
|
|
235
|
+
return ft(e);
|
|
236
|
+
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
237
237
|
for (const t in e.value)
|
|
238
|
-
|
|
238
|
+
n[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(r.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,96 +253,96 @@ function ar(e, n = {}) {
|
|
|
253
253
|
e.value[t] = a;
|
|
254
254
|
}
|
|
255
255
|
}));
|
|
256
|
-
return
|
|
256
|
+
return n;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
258
|
+
function cn(e, r = !0, n) {
|
|
259
|
+
un() ? W(e, n) : r ? e() : Re(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return (
|
|
261
|
+
function V(e) {
|
|
262
|
+
var r;
|
|
263
|
+
const n = M(e);
|
|
264
|
+
return (r = n == null ? void 0 : n.$el) != null ? r : n;
|
|
265
265
|
}
|
|
266
|
-
const ue =
|
|
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 r, n, t, a;
|
|
269
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, t, a] = e, r = ue) : [r, n, t, a] = e, !r)
|
|
270
|
+
return an;
|
|
271
|
+
Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
|
-
}, h = (o, i,
|
|
275
|
-
() => [
|
|
274
|
+
}, h = (o, i, d, m) => (o.addEventListener(i, d, m), () => o.removeEventListener(i, d, m)), s = Z(
|
|
275
|
+
() => [V(r), M(a)],
|
|
276
276
|
([o, i]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
279
|
+
const d = ln(i) ? { ...i } : i;
|
|
280
280
|
u.push(
|
|
281
|
-
...
|
|
281
|
+
...n.flatMap((m) => t.map((v) => h(o, m, v, d)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
285
285
|
), c = () => {
|
|
286
|
-
|
|
286
|
+
s(), l();
|
|
287
287
|
};
|
|
288
|
-
return
|
|
288
|
+
return Be(c), c;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
const e = _(!1),
|
|
292
|
-
return
|
|
290
|
+
function sn() {
|
|
291
|
+
const e = _(!1), r = q();
|
|
292
|
+
return r && W(() => {
|
|
293
293
|
e.value = !0;
|
|
294
|
-
},
|
|
294
|
+
}, r), e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
return F(() => (
|
|
296
|
+
function dn(e) {
|
|
297
|
+
const r = sn();
|
|
298
|
+
return F(() => (r.value, !!e()));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
var
|
|
300
|
+
function fn(e, r = {}) {
|
|
301
|
+
var n, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
304
304
|
preventDefault: u,
|
|
305
305
|
stopPropagation: l,
|
|
306
306
|
exact: h,
|
|
307
|
-
onMove:
|
|
307
|
+
onMove: s,
|
|
308
308
|
onEnd: c,
|
|
309
309
|
onStart: o,
|
|
310
310
|
initialValue: i,
|
|
311
|
-
axis:
|
|
312
|
-
draggingElement:
|
|
313
|
-
containerElement:
|
|
311
|
+
axis: d = "both",
|
|
312
|
+
draggingElement: m = ue,
|
|
313
|
+
containerElement: v,
|
|
314
314
|
handle: k = e
|
|
315
|
-
} =
|
|
316
|
-
(
|
|
317
|
-
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0,
|
|
315
|
+
} = r, y = _(
|
|
316
|
+
(n = M(i)) != null ? n : { x: 0, y: 0 }
|
|
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(r.disabled) || !j(w) || M(h) && w.target !== M(e))
|
|
322
322
|
return;
|
|
323
|
-
const b = M(
|
|
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),
|
|
325
325
|
y: w.clientY - (b ? Y.top - O.top + b.scrollTop : Y.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee,
|
|
327
|
+
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, P(w));
|
|
328
328
|
}, H = (w) => {
|
|
329
|
-
if (M(
|
|
329
|
+
if (M(r.disabled) || !j(w) || !C.value)
|
|
330
330
|
return;
|
|
331
|
-
const g = M(
|
|
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
|
-
},
|
|
337
|
-
},
|
|
338
|
-
M(
|
|
336
|
+
}, s == null || s(y.value, w), P(w);
|
|
337
|
+
}, B = (w) => {
|
|
338
|
+
M(r.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), P(w));
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const w = { capture: (t =
|
|
342
|
-
fe(k, "pointerdown",
|
|
340
|
+
if (Ue) {
|
|
341
|
+
const w = { capture: (t = r.capture) != null ? t : !0 };
|
|
342
|
+
fe(k, "pointerdown", z, w), fe(m, "pointermove", H, w), fe(m, "pointerup", B, w);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...
|
|
345
|
+
...on(y),
|
|
346
346
|
position: y,
|
|
347
347
|
isDragging: F(() => !!C.value),
|
|
348
348
|
style: F(
|
|
@@ -350,63 +350,63 @@ function ir(e, n = {}) {
|
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const { window: t = ue, ...a } =
|
|
353
|
+
function mn(e, r, n = {}) {
|
|
354
|
+
const { window: t = ue, ...a } = n;
|
|
355
355
|
let u;
|
|
356
|
-
const l =
|
|
356
|
+
const l = dn(() => t && "ResizeObserver" in t), h = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
},
|
|
359
|
-
|
|
358
|
+
}, s = F(() => Array.isArray(e) ? e.map((i) => V(i)) : [V(e)]), c = Z(
|
|
359
|
+
s,
|
|
360
360
|
(i) => {
|
|
361
361
|
if (h(), l.value && t) {
|
|
362
|
-
u = new ResizeObserver(
|
|
363
|
-
for (const
|
|
364
|
-
|
|
362
|
+
u = new ResizeObserver(r);
|
|
363
|
+
for (const d of i)
|
|
364
|
+
d && u.observe(d, a);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
369
|
h(), c();
|
|
370
370
|
};
|
|
371
|
-
return
|
|
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 i,
|
|
379
|
-
return (
|
|
380
|
-
}), l = _(
|
|
376
|
+
function G(e, r = { width: 0, height: 0 }, n = {}) {
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = n, u = F(() => {
|
|
378
|
+
var i, d;
|
|
379
|
+
return (d = (i = V(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
380
|
+
}), l = _(r.width), h = _(r.height), { stop: s } = mn(
|
|
381
381
|
e,
|
|
382
382
|
([i]) => {
|
|
383
|
-
const
|
|
383
|
+
const d = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
l.value = Number.parseFloat(
|
|
385
|
+
const m = V(e);
|
|
386
|
+
if (m) {
|
|
387
|
+
const v = t.getComputedStyle(m);
|
|
388
|
+
l.value = Number.parseFloat(v.width), h.value = Number.parseFloat(v.height);
|
|
389
389
|
}
|
|
390
|
-
} else if (
|
|
391
|
-
const
|
|
392
|
-
l.value =
|
|
390
|
+
} else if (d) {
|
|
391
|
+
const m = Array.isArray(d) ? d : [d];
|
|
392
|
+
l.value = m.reduce((v, { inlineSize: k }) => v + k, 0), h.value = m.reduce((v, { blockSize: k }) => v + k, 0);
|
|
393
393
|
} else
|
|
394
394
|
l.value = i.contentRect.width, h.value = i.contentRect.height;
|
|
395
395
|
},
|
|
396
|
-
|
|
396
|
+
n
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
const i =
|
|
400
|
-
i && (l.value = "offsetWidth" in i ? i.offsetWidth :
|
|
398
|
+
cn(() => {
|
|
399
|
+
const i = V(e);
|
|
400
|
+
i && (l.value = "offsetWidth" in i ? i.offsetWidth : r.width, h.value = "offsetHeight" in i ? i.offsetHeight : r.height);
|
|
401
401
|
});
|
|
402
402
|
const c = Z(
|
|
403
|
-
() =>
|
|
403
|
+
() => V(e),
|
|
404
404
|
(i) => {
|
|
405
|
-
l.value = i ?
|
|
405
|
+
l.value = i ? r.width : 0, h.value = i ? r.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
function o() {
|
|
409
|
-
|
|
409
|
+
s(), c();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: l,
|
|
@@ -414,21 +414,21 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
|
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "title text-16px font-bold" }, pn = { class: "action" }, yn = ["form"], gn = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, bn = /* @__PURE__ */ hn(() => /* @__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)), kn = [
|
|
426
|
+
bn
|
|
427
|
+
], wn = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
430
|
-
},
|
|
431
|
-
...
|
|
430
|
+
}, xn = /* @__PURE__ */ E({
|
|
431
|
+
...wn,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
434
434
|
form: {},
|
|
@@ -459,16 +459,16 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
459
459
|
zIndex: { default: 1e3 }
|
|
460
460
|
},
|
|
461
461
|
emits: ["submit"],
|
|
462
|
-
setup(e, { expose:
|
|
463
|
-
|
|
462
|
+
setup(e, { expose: r, emit: n }) {
|
|
463
|
+
ot((p) => ({
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a =
|
|
467
|
-
let h = 0,
|
|
468
|
-
const c = N(), o = N(), i = N(),
|
|
466
|
+
const t = e, a = n, u = ye(Ce), l = _(!1);
|
|
467
|
+
let h = 0, s = 0;
|
|
468
|
+
const c = N(), o = N(), i = N(), d = N(), m = N(), v = N(), { height: k } = G(c), { height: y } = G(i, 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 } = fn(i, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
|
-
function
|
|
471
|
+
function B() {
|
|
472
472
|
u == null || u.close(t.id);
|
|
473
473
|
}
|
|
474
474
|
function w(p) {
|
|
@@ -489,60 +489,60 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { 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(${
|
|
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 - h}px, ${H.value - s}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;
|
|
496
496
|
}), Y = F(() => {
|
|
497
|
-
const p = {},
|
|
498
|
-
return t.maxHeight && (p.maxHeight = `${Fe -
|
|
497
|
+
const p = {}, L = j.value + P.value + y.value + C.value, Fe = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
|
|
498
|
+
return t.maxHeight && (p.maxHeight = `${Fe - L}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - L}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${L}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
|
|
499
499
|
});
|
|
500
500
|
function ee() {
|
|
501
501
|
const p = o.value;
|
|
502
502
|
if (t.form && p) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const L = p.querySelector(`form[name="${t.form}"]`);
|
|
504
|
+
L && L.dispatchEvent(new Event("submit"));
|
|
505
505
|
}
|
|
506
506
|
a("submit");
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Xe() {
|
|
509
509
|
u == null || u.close(t.id);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Je() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
Q(c), Q(o), o.value && (h = o.value.offsetLeft,
|
|
513
|
+
Q(c), Q(o), o.value && (h = o.value.offsetLeft, s = o.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Qe() {
|
|
517
517
|
if (t.closeable && t.esc) {
|
|
518
|
-
const p = ({ key:
|
|
519
|
-
|
|
518
|
+
const p = ({ key: L }) => {
|
|
519
|
+
L === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
|
|
520
520
|
};
|
|
521
521
|
window.addEventListener("keydown", p);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
h = o.value.offsetLeft,
|
|
524
|
+
function Ze() {
|
|
525
|
+
h = o.value.offsetLeft, s = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
W(() => {
|
|
528
|
-
|
|
529
|
-
}),
|
|
528
|
+
Qe(), Je();
|
|
529
|
+
}), ct(() => {
|
|
530
530
|
});
|
|
531
|
-
function
|
|
531
|
+
function et() {
|
|
532
532
|
return l.value = !0, () => $e();
|
|
533
533
|
}
|
|
534
534
|
function $e() {
|
|
535
535
|
l.value = !1;
|
|
536
536
|
}
|
|
537
|
-
return
|
|
538
|
-
showLoading:
|
|
537
|
+
return r({
|
|
538
|
+
showLoading: et,
|
|
539
539
|
hideLoading: $e
|
|
540
|
-
}), (p,
|
|
540
|
+
}), (p, L) => ($(), T("div", {
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: c,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
544
|
style: R(g.value),
|
|
545
|
-
onClick:
|
|
545
|
+
onClick: L[0] || (L[0] = it((Fe) => p.maskClosable && B(), ["self"]))
|
|
546
546
|
}, [
|
|
547
547
|
x("div", {
|
|
548
548
|
ref_key: "contentRef",
|
|
@@ -556,61 +556,61 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
556
556
|
ref: i,
|
|
557
557
|
class: "modal-header",
|
|
558
558
|
style: R(O.value),
|
|
559
|
-
onMousedown:
|
|
559
|
+
onMousedown: Ze
|
|
560
560
|
}, [
|
|
561
|
-
x("div",
|
|
562
|
-
x("div",
|
|
561
|
+
x("div", vn, A(p.title), 1),
|
|
562
|
+
x("div", pn, [
|
|
563
563
|
p.closeable ? ($(), T("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
566
|
-
onClick:
|
|
566
|
+
onClick: B
|
|
567
567
|
})) : U("", !0)
|
|
568
568
|
])
|
|
569
569
|
], 36)) : U("", !0),
|
|
570
570
|
x("div", {
|
|
571
571
|
id: "modal-header-slot",
|
|
572
572
|
ref_key: "headerSlotRef",
|
|
573
|
-
ref:
|
|
573
|
+
ref: m
|
|
574
574
|
}, null, 512),
|
|
575
575
|
x("div", {
|
|
576
576
|
class: "modal-body",
|
|
577
577
|
style: R(Y.value)
|
|
578
578
|
}, [
|
|
579
|
-
($(),
|
|
579
|
+
($(), re(Ee(p.component), st(dt(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
581
581
|
x("div", {
|
|
582
582
|
id: "modal-footer-slot",
|
|
583
583
|
ref_key: "footerSlotRef",
|
|
584
|
-
ref:
|
|
584
|
+
ref: v
|
|
585
585
|
}, null, 512),
|
|
586
586
|
p.footer ? ($(), T("div", {
|
|
587
587
|
key: 1,
|
|
588
588
|
ref_key: "footerRef",
|
|
589
|
-
ref:
|
|
589
|
+
ref: d,
|
|
590
590
|
class: "modal-footer space-x-2"
|
|
591
591
|
}, [
|
|
592
592
|
x("button", {
|
|
593
593
|
class: "cancel-button",
|
|
594
594
|
type: "button",
|
|
595
|
-
onClick:
|
|
595
|
+
onClick: Xe
|
|
596
596
|
}, A(p.cancelText), 1),
|
|
597
597
|
x("button", {
|
|
598
598
|
class: "submit-button",
|
|
599
599
|
form: p.form,
|
|
600
600
|
type: "submit",
|
|
601
601
|
onClick: ee
|
|
602
|
-
}, A(p.submitText), 9,
|
|
602
|
+
}, A(p.submitText), 9, yn)
|
|
603
603
|
], 512)) : U("", !0),
|
|
604
|
-
l.value ? ($(), T("div",
|
|
604
|
+
l.value ? ($(), T("div", gn, kn)) : 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, r) => {
|
|
609
|
+
const n = e.__vccOpts || e;
|
|
610
|
+
for (const [t, a] of r)
|
|
611
|
+
n[t] = a;
|
|
612
|
+
return n;
|
|
613
|
+
}, Cn = /* @__PURE__ */ oe(xn, [["__scopeId", "data-v-9a7af353"]]), Sn = { class: "modal-dialog" }, _n = { class: "dialog-body" }, $n = { class: "dialog-title" }, Fn = { class: "dialog-content" }, On = /* @__PURE__ */ E({
|
|
614
614
|
__name: "modal-dialog",
|
|
615
615
|
props: {
|
|
616
616
|
type: {},
|
|
@@ -623,29 +623,29 @@ 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
|
|
626
|
+
const r = e, n = qe(), t = F(() => r.title ? r.title : {
|
|
627
627
|
confirm: "提示",
|
|
628
628
|
info: "提示",
|
|
629
629
|
warning: "警告",
|
|
630
630
|
error: "错误",
|
|
631
631
|
success: "成功"
|
|
632
|
-
}[
|
|
632
|
+
}[r.type]);
|
|
633
633
|
async function a() {
|
|
634
|
-
|
|
634
|
+
r.onOk && await r.onOk(), n.close();
|
|
635
635
|
}
|
|
636
636
|
async function u() {
|
|
637
|
-
|
|
637
|
+
r.onCancel && await r.onCancel(), n.close();
|
|
638
638
|
}
|
|
639
|
-
return (l, h) => ($(), T("section",
|
|
640
|
-
x("div",
|
|
641
|
-
x("div",
|
|
642
|
-
x("div",
|
|
639
|
+
return (l, h) => ($(), T("section", Sn, [
|
|
640
|
+
x("div", _n, [
|
|
641
|
+
x("div", $n, A(t.value), 1),
|
|
642
|
+
x("div", Fn, 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 ? ($(), re(Ee(l.footer), { key: 0 })) : ($(), T(ne, { key: 1 }, [
|
|
649
649
|
x("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
@@ -661,32 +661,32 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}),
|
|
664
|
+
}), Yn = /* @__PURE__ */ oe(On, [["__scopeId", "data-v-0c6b8db2"]]), Mn = (e) => (Ae("data-v-559bdf2e"), e = e(), Ne(), e), Tn = { class: "flex-center" }, Pn = /* @__PURE__ */ Mn(() => /* @__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)), jn = { class: "modal-loading-text" }, Ln = /* @__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 (r, n) => ($(), T("section", Tn, [
|
|
678
|
+
Pn,
|
|
679
|
+
x("div", jn, A(r.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
|
-
}),
|
|
682
|
+
}), In = /* @__PURE__ */ oe(Ln, [["__scopeId", "data-v-559bdf2e"]]), Dn = {
|
|
683
683
|
key: 0,
|
|
684
684
|
class: "modal-teleport"
|
|
685
|
-
},
|
|
685
|
+
}, En = {
|
|
686
686
|
name: "ModalProvider",
|
|
687
687
|
inheritAttrs: !0
|
|
688
|
-
},
|
|
689
|
-
...
|
|
688
|
+
}, zn = /* @__PURE__ */ E({
|
|
689
|
+
...En,
|
|
690
690
|
props: {
|
|
691
691
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
692
692
|
sizes: { default: () => ({
|
|
@@ -698,57 +698,57 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
698
698
|
maxHeight: { default: "90%" },
|
|
699
699
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
700
700
|
},
|
|
701
|
-
setup(e, { expose:
|
|
702
|
-
const
|
|
703
|
-
function u(
|
|
704
|
-
const k =
|
|
705
|
-
() => Promise.resolve(typeof
|
|
701
|
+
setup(e, { expose: r }) {
|
|
702
|
+
const n = N([]), t = _(!1), a = q();
|
|
703
|
+
function u(d, m = {}, v = {}) {
|
|
704
|
+
const k = ut(
|
|
705
|
+
() => Promise.resolve(typeof d == "string" ? Yn : d)
|
|
706
706
|
);
|
|
707
|
-
typeof
|
|
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
|
-
zIndex: typeof
|
|
710
|
-
},
|
|
711
|
-
|
|
709
|
+
zIndex: typeof d == "string" ? 1100 : 1e3
|
|
710
|
+
}, v), j = new Promise((P, z) => {
|
|
711
|
+
n.value.push({
|
|
712
712
|
id: y,
|
|
713
713
|
component: k,
|
|
714
|
-
props:
|
|
714
|
+
props: m || {},
|
|
715
715
|
options: {
|
|
716
716
|
...C,
|
|
717
|
-
type: typeof
|
|
717
|
+
type: typeof d == "string" ? d : "component"
|
|
718
718
|
},
|
|
719
|
-
resolve:
|
|
720
|
-
reject:
|
|
719
|
+
resolve: P,
|
|
720
|
+
reject: z,
|
|
721
721
|
listeners: []
|
|
722
|
-
}), Q(
|
|
723
|
-
}).catch((
|
|
724
|
-
}) : Promise.reject(
|
|
722
|
+
}), Q(n);
|
|
723
|
+
}).catch((P) => P === "CANCEL" ? new Promise(() => {
|
|
724
|
+
}) : Promise.reject(P));
|
|
725
725
|
return Object.assign(j, {
|
|
726
726
|
close: () => l(y)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
|
-
function l(
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
729
|
+
function l(d, m) {
|
|
730
|
+
const v = n.value.findIndex((y) => y.id === d);
|
|
731
|
+
if (v < 0)
|
|
732
732
|
return;
|
|
733
|
-
const k =
|
|
734
|
-
|
|
733
|
+
const k = n.value[v];
|
|
734
|
+
m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), n.value.splice(v, 1), Q(n);
|
|
735
735
|
}
|
|
736
736
|
function h() {
|
|
737
|
-
!
|
|
738
|
-
|
|
739
|
-
}),
|
|
737
|
+
!n.value || n.value.length === 0 || (n.value.forEach((d) => {
|
|
738
|
+
d == null || d.reject("CANCEL");
|
|
739
|
+
}), n.value = [], Q(n));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
743
|
-
if (!
|
|
741
|
+
function s(d, m) {
|
|
742
|
+
const v = n.value.find((y) => y.id === d);
|
|
743
|
+
if (!v)
|
|
744
744
|
return;
|
|
745
|
-
const k =
|
|
745
|
+
const k = v.listeners.find((y) => y.event === m);
|
|
746
746
|
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
|
-
close: (y) => l(
|
|
748
|
+
close: (y) => l(v.id, y),
|
|
749
749
|
closeAll: h,
|
|
750
|
-
showLoading: () => c(
|
|
751
|
-
hideLoading: () => o(
|
|
750
|
+
showLoading: () => c(v.id),
|
|
751
|
+
hideLoading: () => o(v.id),
|
|
752
752
|
confirm: (y) => u("confirm", y),
|
|
753
753
|
success: (y) => u("success", y),
|
|
754
754
|
error: (y) => u("error", y),
|
|
@@ -756,41 +756,41 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
756
756
|
info: (y) => u("info", y)
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
function c(
|
|
759
|
+
function c(d, m) {
|
|
760
760
|
if (!a)
|
|
761
761
|
return;
|
|
762
|
-
const [
|
|
763
|
-
if (
|
|
764
|
-
return
|
|
762
|
+
const [v] = a.refs[`modal-container_${d}`] || [];
|
|
763
|
+
if (v)
|
|
764
|
+
return v.showLoading();
|
|
765
765
|
{
|
|
766
|
-
const { close: k } = u(
|
|
767
|
-
text:
|
|
766
|
+
const { close: k } = u(In, {
|
|
767
|
+
text: m == null ? void 0 : m.text
|
|
768
768
|
}, {
|
|
769
769
|
footer: !1,
|
|
770
770
|
header: !1,
|
|
771
771
|
closeable: !1,
|
|
772
772
|
backgroundColor: "transparent"
|
|
773
773
|
});
|
|
774
|
-
return
|
|
774
|
+
return m != null && m.duration && setTimeout(
|
|
775
775
|
() => {
|
|
776
776
|
k();
|
|
777
777
|
},
|
|
778
|
-
|
|
778
|
+
m == null ? void 0 : m.duration
|
|
779
779
|
), k;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
function o(
|
|
782
|
+
function o(d) {
|
|
783
783
|
if (!a)
|
|
784
784
|
return;
|
|
785
|
-
const [
|
|
786
|
-
if (
|
|
787
|
-
return
|
|
785
|
+
const [m] = a.refs[`modal-container_${d}`];
|
|
786
|
+
if (m)
|
|
787
|
+
return m.hideLoading();
|
|
788
788
|
}
|
|
789
|
-
function i(
|
|
790
|
-
const k =
|
|
789
|
+
function i(d, m, v) {
|
|
790
|
+
const k = n.value.find((y) => y.id === d);
|
|
791
791
|
k && k.listeners.push({
|
|
792
|
-
event:
|
|
793
|
-
callback:
|
|
792
|
+
event: m,
|
|
793
|
+
callback: v
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
return he(Ce, {
|
|
@@ -800,35 +800,35 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
800
800
|
addEventListener: i,
|
|
801
801
|
showLoading: c,
|
|
802
802
|
hideLoading: o
|
|
803
|
-
}),
|
|
804
|
-
elements:
|
|
803
|
+
}), r({
|
|
804
|
+
elements: n,
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
807
|
closeAll: h
|
|
808
808
|
}), W(() => {
|
|
809
809
|
t.value = !0;
|
|
810
|
-
}), (
|
|
811
|
-
|
|
812
|
-
t.value ? ($(), T("div",
|
|
813
|
-
($(),
|
|
814
|
-
disabled: !
|
|
815
|
-
to: typeof
|
|
810
|
+
}), (d, m) => ($(), T(ne, null, [
|
|
811
|
+
tt(d.$slots, "default", {}, void 0, !0),
|
|
812
|
+
t.value ? ($(), T("div", Dn, [
|
|
813
|
+
($(), re(nt, {
|
|
814
|
+
disabled: !d.appendToBody,
|
|
815
|
+
to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
|
|
816
816
|
}, [
|
|
817
|
-
|
|
818
|
-
default:
|
|
819
|
-
($(!0), T(
|
|
820
|
-
id:
|
|
821
|
-
key:
|
|
817
|
+
f(rt, { name: "modal-fade" }, {
|
|
818
|
+
default: lt(() => [
|
|
819
|
+
($(!0), T(ne, null, at(n.value, (v) => ($(), re(Cn, ge({
|
|
820
|
+
id: v.id,
|
|
821
|
+
key: v.id,
|
|
822
822
|
ref_for: !0,
|
|
823
|
-
ref: `modal-container_${
|
|
824
|
-
component:
|
|
825
|
-
"component-props":
|
|
826
|
-
"max-height":
|
|
827
|
-
"max-width":
|
|
828
|
-
offset:
|
|
829
|
-
sizes:
|
|
830
|
-
},
|
|
831
|
-
onSubmit: () => v
|
|
823
|
+
ref: `modal-container_${v.id}`,
|
|
824
|
+
component: v.component,
|
|
825
|
+
"component-props": v.props,
|
|
826
|
+
"max-height": d.maxHeight,
|
|
827
|
+
"max-width": d.maxWidth,
|
|
828
|
+
offset: d.offset,
|
|
829
|
+
sizes: d.sizes
|
|
830
|
+
}, v.options, {
|
|
831
|
+
onSubmit: () => s(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 dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
837
837
|
])) : U("", !0)
|
|
838
838
|
], 64));
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
841
|
-
function me(e,
|
|
842
|
-
var
|
|
840
|
+
}), Rn = /* @__PURE__ */ oe(zn, [["__scopeId", "data-v-60414811"]]);
|
|
841
|
+
function me(e, r) {
|
|
842
|
+
var n, t;
|
|
843
843
|
let a = e == null ? void 0 : e.parent;
|
|
844
|
-
for (; a && ((
|
|
844
|
+
for (; a && ((n = a == null ? void 0 : a.type) == null ? void 0 : n.name) !== r; )
|
|
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) === r ? a : null;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
const e = ye(Ce),
|
|
850
|
-
function
|
|
848
|
+
function qe() {
|
|
849
|
+
const e = ye(Ce), r = q();
|
|
850
|
+
function n(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: n,
|
|
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(r, "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 Be() {
|
|
|
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(r, "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(r, "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,30 +903,30 @@ const Te = {
|
|
|
903
903
|
id: Symbol("ID"),
|
|
904
904
|
source: Symbol("Source")
|
|
905
905
|
};
|
|
906
|
-
function
|
|
907
|
-
const
|
|
906
|
+
function An(e, r) {
|
|
907
|
+
const n = _({});
|
|
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), r && r[a.key] !== void 0 && (u = r[a.key]), n.value[a.key] = u;
|
|
911
|
+
}), [n, (a) => {
|
|
912
|
+
n.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
|
-
function
|
|
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 Nn = { exports: {} };
|
|
920
|
+
(function(e, r) {
|
|
921
|
+
(function(n, t) {
|
|
922
922
|
e.exports = t(S);
|
|
923
|
-
})(Se, function(
|
|
923
|
+
})(Se, function(n) {
|
|
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(n), u = {
|
|
930
930
|
name: "zh-cn",
|
|
931
931
|
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
932
932
|
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
@@ -966,46 +966,46 @@ var Er = { exports: {} };
|
|
|
966
966
|
yy: "%d 年"
|
|
967
967
|
},
|
|
968
968
|
meridiem: function(l, h) {
|
|
969
|
-
var
|
|
970
|
-
return
|
|
969
|
+
var s = 100 * l + h;
|
|
970
|
+
return s < 600 ? "凌晨" : s < 900 ? "早上" : s < 1100 ? "上午" : s < 1300 ? "中午" : s < 1800 ? "下午" : "晚上";
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
return a.default.locale(u, null, !0), u;
|
|
974
974
|
});
|
|
975
|
-
})(
|
|
976
|
-
var
|
|
977
|
-
(function(e,
|
|
978
|
-
(function(
|
|
975
|
+
})(Nn);
|
|
976
|
+
var He = { exports: {} };
|
|
977
|
+
(function(e, r) {
|
|
978
|
+
(function(n, t) {
|
|
979
979
|
e.exports = t();
|
|
980
980
|
})(Se, function() {
|
|
981
|
-
var
|
|
981
|
+
var n = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
983
|
var h = u.prototype;
|
|
984
|
-
h.week = function(
|
|
985
|
-
if (
|
|
986
|
-
return this.add(7 * (
|
|
984
|
+
h.week = function(s) {
|
|
985
|
+
if (s === void 0 && (s = null), s !== null)
|
|
986
|
+
return this.add(7 * (s - 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), i = l(this).endOf(
|
|
989
|
+
var o = l(this).startOf(t).add(1, t).date(c), i = l(this).endOf(n);
|
|
990
990
|
if (o.isBefore(i))
|
|
991
991
|
return 1;
|
|
992
992
|
}
|
|
993
|
-
var
|
|
994
|
-
return
|
|
995
|
-
}, h.weeks = function(
|
|
996
|
-
return
|
|
993
|
+
var d = l(this).startOf(t).date(c).startOf(n).subtract(1, "millisecond"), m = this.diff(d, n, !0);
|
|
994
|
+
return m < 0 ? l(this).startOf("week").week() : Math.ceil(m);
|
|
995
|
+
}, h.weeks = function(s) {
|
|
996
|
+
return s === void 0 && (s = null), this.week(s);
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
999
|
});
|
|
1000
|
-
})(
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1003
|
-
var
|
|
1004
|
-
(function(e,
|
|
1005
|
-
(function(
|
|
1000
|
+
})(He);
|
|
1001
|
+
var Vn = He.exports;
|
|
1002
|
+
const Bn = /* @__PURE__ */ We(Vn);
|
|
1003
|
+
var Ge = { exports: {} };
|
|
1004
|
+
(function(e, r) {
|
|
1005
|
+
(function(n, t) {
|
|
1006
1006
|
e.exports = t();
|
|
1007
1007
|
})(Se, function() {
|
|
1008
|
-
var
|
|
1008
|
+
var n = "month", t = "quarter";
|
|
1009
1009
|
return function(a, u) {
|
|
1010
1010
|
var l = u.prototype;
|
|
1011
1011
|
l.quarter = function(c) {
|
|
@@ -1013,90 +1013,90 @@ var qe = { exports: {} };
|
|
|
1013
1013
|
};
|
|
1014
1014
|
var h = 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, n) : h.bind(this)(c, o);
|
|
1017
1017
|
};
|
|
1018
|
-
var
|
|
1018
|
+
var s = l.startOf;
|
|
1019
1019
|
l.startOf = function(c, o) {
|
|
1020
|
-
var i = this.$utils(),
|
|
1020
|
+
var i = this.$utils(), d = !!i.u(o) || o;
|
|
1021
1021
|
if (i.p(c) === t) {
|
|
1022
|
-
var
|
|
1023
|
-
return
|
|
1022
|
+
var m = this.quarter() - 1;
|
|
1023
|
+
return d ? this.month(3 * m).startOf(n).startOf("day") : this.month(3 * m + 2).endOf(n).endOf("day");
|
|
1024
1024
|
}
|
|
1025
|
-
return
|
|
1025
|
+
return s.bind(this)(c, o);
|
|
1026
1026
|
};
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
1029
|
-
})(
|
|
1030
|
-
var
|
|
1031
|
-
const
|
|
1032
|
-
S.extend(
|
|
1033
|
-
S.extend(
|
|
1029
|
+
})(Ge);
|
|
1030
|
+
var Un = Ge.exports;
|
|
1031
|
+
const qn = /* @__PURE__ */ We(Un);
|
|
1032
|
+
S.extend(Bn);
|
|
1033
|
+
S.extend(qn);
|
|
1034
1034
|
S.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
1036
1036
|
});
|
|
1037
|
-
function
|
|
1038
|
-
function n
|
|
1039
|
-
return e != null && e.disabledDate ? e.disabledDate(
|
|
1037
|
+
function Wn(e) {
|
|
1038
|
+
function r(n, t) {
|
|
1039
|
+
return e != null && e.disabledDate ? e.disabledDate(n, t) : !1;
|
|
1040
1040
|
}
|
|
1041
|
-
return (
|
|
1041
|
+
return (n, t) => {
|
|
1042
1042
|
function a() {
|
|
1043
|
-
const l =
|
|
1043
|
+
const l = n[t.key];
|
|
1044
1044
|
switch (e == null ? void 0 : e.type) {
|
|
1045
1045
|
case "week":
|
|
1046
|
-
return
|
|
1046
|
+
return f("span", null, [`${S(l).format("YYYY年")}${S(l).week()}周`]);
|
|
1047
1047
|
case "month":
|
|
1048
|
-
return
|
|
1048
|
+
return f("span", null, [S(l).format("YYYY年MM月")]);
|
|
1049
1049
|
case "quarter":
|
|
1050
|
-
return
|
|
1050
|
+
return f("span", null, [`${S(l).format("YYYY年")}${S(l).quarter()}季度`]);
|
|
1051
1051
|
case "year":
|
|
1052
|
-
return
|
|
1052
|
+
return f("span", null, [S(l).format("YYYY年")]);
|
|
1053
1053
|
case "date":
|
|
1054
1054
|
default:
|
|
1055
|
-
return
|
|
1055
|
+
return f("span", null, [S(l).format("YYYY年MM月DD日")]);
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
function u() {
|
|
1059
1059
|
switch (e == null ? void 0 : e.type) {
|
|
1060
1060
|
case "week":
|
|
1061
|
-
return
|
|
1061
|
+
return f(wt, {
|
|
1062
1062
|
"day-start-of-week": 1,
|
|
1063
|
-
modelValue:
|
|
1064
|
-
"onUpdate:modelValue": (l) =>
|
|
1065
|
-
"disabled-date":
|
|
1063
|
+
modelValue: n[t.key],
|
|
1064
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1065
|
+
"disabled-date": r,
|
|
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
|
-
return
|
|
1071
|
-
modelValue:
|
|
1072
|
-
"onUpdate:modelValue": (l) =>
|
|
1073
|
-
"disabled-date":
|
|
1070
|
+
return f(kt, {
|
|
1071
|
+
modelValue: n[t.key],
|
|
1072
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1073
|
+
"disabled-date": r,
|
|
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
|
-
return
|
|
1079
|
-
modelValue:
|
|
1080
|
-
"onUpdate:modelValue": (l) =>
|
|
1081
|
-
"disabled-date":
|
|
1078
|
+
return f(bt, {
|
|
1079
|
+
modelValue: n[t.key],
|
|
1080
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1081
|
+
"disabled-date": r,
|
|
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
|
-
return
|
|
1087
|
-
modelValue:
|
|
1088
|
-
"onUpdate:modelValue": (l) =>
|
|
1089
|
-
"disabled-date":
|
|
1086
|
+
return f(gt, {
|
|
1087
|
+
modelValue: n[t.key],
|
|
1088
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1089
|
+
"disabled-date": r,
|
|
1090
1090
|
format: e == null ? void 0 : e.labelFormat,
|
|
1091
1091
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1092
1092
|
}, null);
|
|
1093
1093
|
case "date":
|
|
1094
1094
|
default:
|
|
1095
|
-
return
|
|
1095
|
+
return f(yt, ge({
|
|
1096
1096
|
"disabled-input": !0,
|
|
1097
|
-
modelValue:
|
|
1098
|
-
"onUpdate:modelValue": (l) =>
|
|
1099
|
-
"disabled-date":
|
|
1097
|
+
modelValue: n[t.key],
|
|
1098
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1099
|
+
"disabled-date": r,
|
|
1100
1100
|
format: e == null ? void 0 : e.labelFormat,
|
|
1101
1101
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1102
1102
|
}, {
|
|
@@ -1113,61 +1113,115 @@ function Vr(e) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
};
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return (
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1116
|
+
function Pe(e) {
|
|
1117
|
+
return typeof e == "function" ? e() : ze(e);
|
|
1118
|
+
}
|
|
1119
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1120
|
+
const je = () => {
|
|
1121
|
+
};
|
|
1122
|
+
function Hn(e, r) {
|
|
1123
|
+
function n(...t) {
|
|
1124
|
+
return new Promise((a, u) => {
|
|
1125
|
+
Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(a).catch(u);
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
return n;
|
|
1129
|
+
}
|
|
1130
|
+
function Gn(e, r = {}) {
|
|
1131
|
+
let n, t, a = je;
|
|
1132
|
+
const u = (h) => {
|
|
1133
|
+
clearTimeout(h), a(), a = je;
|
|
1134
|
+
};
|
|
1135
|
+
return (h) => {
|
|
1136
|
+
const s = Pe(e), c = Pe(r.maxWait);
|
|
1137
|
+
return n && u(n), s <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(h())) : new Promise((o, i) => {
|
|
1138
|
+
a = r.rejectOnCancel ? i : o, c && !t && (t = setTimeout(() => {
|
|
1139
|
+
n && u(n), t = null, o(h());
|
|
1140
|
+
}, c)), n = setTimeout(() => {
|
|
1141
|
+
t && u(t), t = null, o(h());
|
|
1142
|
+
}, s);
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
function Kn(e, r = 200, n = {}) {
|
|
1147
|
+
return Hn(
|
|
1148
|
+
Gn(r, n),
|
|
1149
|
+
e
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
function _e(e, r, n) {
|
|
1153
|
+
const t = Z(e, (...a) => (Re(() => t()), r(...a)), n);
|
|
1154
|
+
return t;
|
|
1155
|
+
}
|
|
1156
|
+
function Xn(e) {
|
|
1157
|
+
let r;
|
|
1158
|
+
return (n, t) => {
|
|
1121
1159
|
function a() {
|
|
1160
|
+
return f("span", null, [n[t.key]]);
|
|
1161
|
+
}
|
|
1162
|
+
const u = Kn((s) => {
|
|
1163
|
+
s && s.dispatchEvent(new Event("submit"));
|
|
1164
|
+
}, 1e3);
|
|
1165
|
+
function l() {
|
|
1166
|
+
if (!(e != null && e.autoSumbit))
|
|
1167
|
+
return;
|
|
1168
|
+
let s = r;
|
|
1169
|
+
for (; s && s.$el.tagName !== "FORM"; )
|
|
1170
|
+
s = s.$parent;
|
|
1171
|
+
if (s && s.$el) {
|
|
1172
|
+
const c = s.$el;
|
|
1173
|
+
u(c);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
function h() {
|
|
1122
1177
|
switch (e == null ? void 0 : e.type) {
|
|
1123
1178
|
case "number":
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1126
|
-
|
|
1179
|
+
return f(Ve, {
|
|
1180
|
+
ref: (s) => r = s,
|
|
1181
|
+
modelValue: n[t.key],
|
|
1182
|
+
"onUpdate:modelValue": (s) => n[t.key] = s,
|
|
1127
1183
|
hideButton: !0,
|
|
1128
1184
|
"read-only": e == null ? void 0 : e.readonly,
|
|
1129
1185
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1186
|
+
onInput: l,
|
|
1130
1187
|
allowClear: e == null ? void 0 : e.clearable
|
|
1131
1188
|
}, null);
|
|
1132
1189
|
case "string":
|
|
1133
1190
|
default:
|
|
1134
|
-
return
|
|
1135
|
-
|
|
1136
|
-
|
|
1191
|
+
return f(xt, {
|
|
1192
|
+
ref: (s) => r = s,
|
|
1193
|
+
modelValue: n[t.key],
|
|
1194
|
+
"onUpdate:modelValue": (s) => n[t.key] = s,
|
|
1137
1195
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1138
1196
|
readonly: e == null ? void 0 : e.readonly,
|
|
1197
|
+
onInput: l,
|
|
1139
1198
|
allowClear: e == null ? void 0 : e.clearable
|
|
1140
1199
|
}, null);
|
|
1141
1200
|
}
|
|
1142
1201
|
}
|
|
1143
|
-
switch (
|
|
1202
|
+
switch (t.mode) {
|
|
1144
1203
|
case "text":
|
|
1145
|
-
return
|
|
1204
|
+
return a();
|
|
1146
1205
|
case "component":
|
|
1147
1206
|
default:
|
|
1148
|
-
return
|
|
1207
|
+
return h();
|
|
1149
1208
|
}
|
|
1150
1209
|
};
|
|
1151
1210
|
}
|
|
1152
|
-
|
|
1153
|
-
function _e(e, n, r) {
|
|
1154
|
-
const t = Z(e, (...a) => (Ie(() => t()), n(...a)), r);
|
|
1155
|
-
return t;
|
|
1156
|
-
}
|
|
1157
|
-
function qr(e) {
|
|
1211
|
+
function Jn(e) {
|
|
1158
1212
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1159
1213
|
}
|
|
1160
1214
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1161
|
-
function
|
|
1215
|
+
function Qn() {
|
|
1162
1216
|
const e = _(/* @__PURE__ */ new Map());
|
|
1163
|
-
return [e, (
|
|
1217
|
+
return [e, (n) => e.value = n];
|
|
1164
1218
|
}
|
|
1165
|
-
function
|
|
1166
|
-
let
|
|
1167
|
-
const [t, a] =
|
|
1168
|
-
if (e.onChange && e.onChange(c), !e.autoSumbit || !
|
|
1219
|
+
function Zn(e) {
|
|
1220
|
+
let r, n = !1;
|
|
1221
|
+
const [t, a] = Qn(), u = (c) => {
|
|
1222
|
+
if (e.onChange && e.onChange(c), !e.autoSumbit || !r)
|
|
1169
1223
|
return;
|
|
1170
|
-
let o =
|
|
1224
|
+
let o = r;
|
|
1171
1225
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1172
1226
|
o = o.$parent;
|
|
1173
1227
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
@@ -1188,14 +1242,14 @@ function Hr(e) {
|
|
|
1188
1242
|
const i = K.get(e.options);
|
|
1189
1243
|
K.set(e.options, o), i(o);
|
|
1190
1244
|
});
|
|
1191
|
-
},
|
|
1245
|
+
}, s = () => {
|
|
1192
1246
|
l(e.options, (c) => {
|
|
1193
1247
|
a(c);
|
|
1194
1248
|
});
|
|
1195
1249
|
};
|
|
1196
1250
|
switch (!0) {
|
|
1197
1251
|
case e.options instanceof Function: {
|
|
1198
|
-
e.cache !== !1 ? h() :
|
|
1252
|
+
e.cache !== !1 ? h() : s();
|
|
1199
1253
|
break;
|
|
1200
1254
|
}
|
|
1201
1255
|
case ae(e.options): {
|
|
@@ -1210,30 +1264,30 @@ function Hr(e) {
|
|
|
1210
1264
|
t.value = e.options;
|
|
1211
1265
|
}
|
|
1212
1266
|
return (c, o) => {
|
|
1213
|
-
e.default && !
|
|
1267
|
+
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1214
1268
|
function i() {
|
|
1215
|
-
const
|
|
1216
|
-
return e.multiple ?
|
|
1269
|
+
const m = c[o.key];
|
|
1270
|
+
return e.multiple ? f("span", null, [m.map((v) => t.value.get(v)).join(" ,")]) : f("span", null, [t.value.get(m)]);
|
|
1217
1271
|
}
|
|
1218
|
-
function
|
|
1219
|
-
let
|
|
1220
|
-
return
|
|
1221
|
-
ref: (
|
|
1272
|
+
function d() {
|
|
1273
|
+
let m;
|
|
1274
|
+
return f(Ct, {
|
|
1275
|
+
ref: (v) => r = v,
|
|
1222
1276
|
multiple: e.multiple,
|
|
1223
1277
|
modelValue: c[o.key],
|
|
1224
|
-
"onUpdate:modelValue": (
|
|
1278
|
+
"onUpdate:modelValue": (v) => c[o.key] = v,
|
|
1225
1279
|
placeholder: e.placeholder,
|
|
1226
1280
|
allowClear: e.clearable,
|
|
1227
1281
|
allowSearch: e.searchable,
|
|
1228
1282
|
"allow-create": e.createable,
|
|
1229
1283
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1230
1284
|
onChange: u
|
|
1231
|
-
},
|
|
1232
|
-
key:
|
|
1233
|
-
value:
|
|
1285
|
+
}, Jn(m = Array.from(t.value.entries()).map(([v, k]) => f(St, {
|
|
1286
|
+
key: v,
|
|
1287
|
+
value: v,
|
|
1234
1288
|
label: k
|
|
1235
|
-
}, null))) ?
|
|
1236
|
-
default: () => [
|
|
1289
|
+
}, null))) ? m : {
|
|
1290
|
+
default: () => [m]
|
|
1237
1291
|
});
|
|
1238
1292
|
}
|
|
1239
1293
|
switch (o.mode) {
|
|
@@ -1241,16 +1295,16 @@ function Hr(e) {
|
|
|
1241
1295
|
return i();
|
|
1242
1296
|
case "component":
|
|
1243
1297
|
default:
|
|
1244
|
-
return
|
|
1298
|
+
return d();
|
|
1245
1299
|
}
|
|
1246
1300
|
};
|
|
1247
1301
|
}
|
|
1248
|
-
function
|
|
1249
|
-
let
|
|
1250
|
-
function
|
|
1251
|
-
if (!(e != null && e.autoSumbit) || !
|
|
1302
|
+
function er(e) {
|
|
1303
|
+
let r;
|
|
1304
|
+
function n() {
|
|
1305
|
+
if (!(e != null && e.autoSumbit) || !r)
|
|
1252
1306
|
return;
|
|
1253
|
-
let t =
|
|
1307
|
+
let t = r;
|
|
1254
1308
|
for (; t && t.$el.tagName !== "FORM"; )
|
|
1255
1309
|
t = t.$parent;
|
|
1256
1310
|
t && t.$el && t.$el.dispatchEvent(new Event("submit"));
|
|
@@ -1259,18 +1313,18 @@ function Gr(e) {
|
|
|
1259
1313
|
e != null && e.default && (t[a.key] = e.default);
|
|
1260
1314
|
function u() {
|
|
1261
1315
|
const h = t[a.key];
|
|
1262
|
-
return
|
|
1316
|
+
return f("span", null, [h ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1263
1317
|
}
|
|
1264
1318
|
function l() {
|
|
1265
|
-
return
|
|
1266
|
-
ref: (h) =>
|
|
1319
|
+
return f(_t, {
|
|
1320
|
+
ref: (h) => r = h,
|
|
1267
1321
|
modelValue: t[a.key],
|
|
1268
1322
|
"onUpdate:modelValue": (h) => t[a.key] = h,
|
|
1269
1323
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1270
1324
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1271
1325
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
1272
1326
|
uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
|
|
1273
|
-
onChange:
|
|
1327
|
+
onChange: n
|
|
1274
1328
|
}, null);
|
|
1275
1329
|
}
|
|
1276
1330
|
switch (a.mode) {
|
|
@@ -1282,47 +1336,47 @@ function Gr(e) {
|
|
|
1282
1336
|
}
|
|
1283
1337
|
};
|
|
1284
1338
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return (
|
|
1339
|
+
function tr(e) {
|
|
1340
|
+
return (r, n) => {
|
|
1287
1341
|
let t = [];
|
|
1288
1342
|
function a(c) {
|
|
1289
1343
|
t = c;
|
|
1290
1344
|
}
|
|
1291
1345
|
function u(c) {
|
|
1292
1346
|
if (c && c.length === 2) {
|
|
1293
|
-
const [o, i] = c.sort(),
|
|
1294
|
-
n
|
|
1347
|
+
const [o, i] = c.sort(), d = S(o).startOf("days"), m = S(i).endOf("days");
|
|
1348
|
+
r[n.key] = [d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), m.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1295
1349
|
}
|
|
1296
1350
|
}
|
|
1297
1351
|
function l(c) {
|
|
1298
1352
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
|
|
1299
1353
|
}
|
|
1300
1354
|
function h() {
|
|
1301
|
-
const c = n
|
|
1355
|
+
const c = r[n.key], [o, i] = c, d = (m) => {
|
|
1302
1356
|
switch (e == null ? void 0 : e.type) {
|
|
1303
1357
|
case "week":
|
|
1304
|
-
return
|
|
1358
|
+
return f("span", null, [`${S(m).format("YYYY年")}${S(m).week()}周`]);
|
|
1305
1359
|
case "month":
|
|
1306
|
-
return
|
|
1360
|
+
return f("span", null, [S(m).format("YYYY年MM月")]);
|
|
1307
1361
|
case "quarter":
|
|
1308
|
-
return
|
|
1362
|
+
return f("span", null, [`${S(m).format("YYYY年")}${S(m).quarter()}季度`]);
|
|
1309
1363
|
case "year":
|
|
1310
|
-
return
|
|
1364
|
+
return f("span", null, [S(m).format("YYYY年")]);
|
|
1311
1365
|
case "date":
|
|
1312
1366
|
default:
|
|
1313
|
-
return
|
|
1367
|
+
return f("span", null, [S(m).format("YYYY年MM月DD日")]);
|
|
1314
1368
|
}
|
|
1315
1369
|
};
|
|
1316
|
-
return
|
|
1370
|
+
return f("span", null, [d(o), I(" - "), d(i)]);
|
|
1317
1371
|
}
|
|
1318
|
-
function
|
|
1319
|
-
return
|
|
1372
|
+
function s() {
|
|
1373
|
+
return f("div", null, [f($t, {
|
|
1320
1374
|
"disabled-input": !0,
|
|
1321
1375
|
style: {
|
|
1322
1376
|
width: "300px"
|
|
1323
1377
|
},
|
|
1324
|
-
modelValue: n
|
|
1325
|
-
"onUpdate:modelValue": (c) => n
|
|
1378
|
+
modelValue: r[n.key],
|
|
1379
|
+
"onUpdate:modelValue": (c) => r[n.key] = c,
|
|
1326
1380
|
onSelect: a,
|
|
1327
1381
|
onChange: u,
|
|
1328
1382
|
mode: e == null ? void 0 : e.type,
|
|
@@ -1333,30 +1387,30 @@ function Kr(e) {
|
|
|
1333
1387
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1334
1388
|
}, null)]);
|
|
1335
1389
|
}
|
|
1336
|
-
switch (
|
|
1390
|
+
switch (n.mode) {
|
|
1337
1391
|
case "text":
|
|
1338
1392
|
return h();
|
|
1339
1393
|
case "component":
|
|
1340
1394
|
default:
|
|
1341
|
-
return
|
|
1395
|
+
return s();
|
|
1342
1396
|
}
|
|
1343
1397
|
};
|
|
1344
1398
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return (
|
|
1399
|
+
function nr(e) {
|
|
1400
|
+
return (r, n) => {
|
|
1347
1401
|
function t() {
|
|
1348
|
-
return
|
|
1402
|
+
return f("span", null, [r[n.key]]);
|
|
1349
1403
|
}
|
|
1350
1404
|
function a() {
|
|
1351
|
-
return
|
|
1352
|
-
modelValue: n
|
|
1353
|
-
"onUpdate:modelValue": (u) => n
|
|
1405
|
+
return f(Ft, {
|
|
1406
|
+
modelValue: r[n.key],
|
|
1407
|
+
"onUpdate:modelValue": (u) => r[n.key] = u,
|
|
1354
1408
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1355
1409
|
autoSize: e == null ? void 0 : e.autosize,
|
|
1356
1410
|
maxLength: e == null ? void 0 : e.maxLength
|
|
1357
1411
|
}, null);
|
|
1358
1412
|
}
|
|
1359
|
-
switch (
|
|
1413
|
+
switch (n.mode) {
|
|
1360
1414
|
case "text":
|
|
1361
1415
|
return t();
|
|
1362
1416
|
case "component":
|
|
@@ -1365,46 +1419,46 @@ function Xr(e) {
|
|
|
1365
1419
|
}
|
|
1366
1420
|
};
|
|
1367
1421
|
}
|
|
1368
|
-
function
|
|
1369
|
-
let
|
|
1370
|
-
const
|
|
1422
|
+
function Ke(e) {
|
|
1423
|
+
let r = !1;
|
|
1424
|
+
const n = [], t = (a) => {
|
|
1371
1425
|
var u;
|
|
1372
|
-
if (!
|
|
1373
|
-
if (
|
|
1374
|
-
|
|
1426
|
+
if (!r) {
|
|
1427
|
+
if (n.push(a), a[e.valueProp] === e.key) {
|
|
1428
|
+
r = !0;
|
|
1375
1429
|
return;
|
|
1376
1430
|
}
|
|
1377
|
-
(u = a.children) != null && u.length && a.children.forEach(t),
|
|
1431
|
+
(u = a.children) != null && u.length && a.children.forEach(t), r || n.pop();
|
|
1378
1432
|
}
|
|
1379
1433
|
};
|
|
1380
|
-
return e.data.forEach(t),
|
|
1434
|
+
return e.data.forEach(t), n;
|
|
1381
1435
|
}
|
|
1382
|
-
function
|
|
1383
|
-
let
|
|
1384
|
-
const
|
|
1436
|
+
function rr(e) {
|
|
1437
|
+
let r = e.data;
|
|
1438
|
+
const n = [];
|
|
1385
1439
|
return e.path.forEach((t) => {
|
|
1386
1440
|
var u;
|
|
1387
|
-
const a =
|
|
1388
|
-
a &&
|
|
1389
|
-
}),
|
|
1441
|
+
const a = r.find((l) => l[e.valueProp] === t);
|
|
1442
|
+
a && n.push(a), a && ((u = a.children) != null && u.length) && (r = a.children);
|
|
1443
|
+
}), n;
|
|
1390
1444
|
}
|
|
1391
1445
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1392
|
-
function
|
|
1446
|
+
function lr() {
|
|
1393
1447
|
const e = _([]);
|
|
1394
|
-
return [e, (
|
|
1448
|
+
return [e, (n) => e.value = n];
|
|
1395
1449
|
}
|
|
1396
|
-
function
|
|
1397
|
-
let
|
|
1398
|
-
const [t, a] =
|
|
1399
|
-
if (!e.autoSumbit || !
|
|
1450
|
+
function ar(e) {
|
|
1451
|
+
let r, n = !1;
|
|
1452
|
+
const [t, a] = lr(), u = () => {
|
|
1453
|
+
if (!e.autoSumbit || !r)
|
|
1400
1454
|
return;
|
|
1401
|
-
let o =
|
|
1455
|
+
let o = r;
|
|
1402
1456
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1403
1457
|
o = o.$parent;
|
|
1404
1458
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1405
1459
|
}, l = (o, i) => {
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1460
|
+
const d = o();
|
|
1461
|
+
d instanceof Promise ? d.then(i) : i(d);
|
|
1408
1462
|
}, h = async () => {
|
|
1409
1463
|
const o = X.get(e.options);
|
|
1410
1464
|
switch (typeof o) {
|
|
@@ -1416,17 +1470,17 @@ function Zr(e) {
|
|
|
1416
1470
|
return;
|
|
1417
1471
|
}
|
|
1418
1472
|
X.set(e.options, a), l(e.options, (i) => {
|
|
1419
|
-
const
|
|
1420
|
-
X.set(e.options, i),
|
|
1473
|
+
const d = X.get(e.options);
|
|
1474
|
+
X.set(e.options, i), d(i);
|
|
1421
1475
|
});
|
|
1422
|
-
},
|
|
1476
|
+
}, s = () => {
|
|
1423
1477
|
l(e.options, (o) => {
|
|
1424
1478
|
a(o);
|
|
1425
1479
|
});
|
|
1426
1480
|
};
|
|
1427
1481
|
switch (!0) {
|
|
1428
1482
|
case e.options instanceof Function: {
|
|
1429
|
-
e.cache !== !1 ? h() :
|
|
1483
|
+
e.cache !== !1 ? h() : s();
|
|
1430
1484
|
break;
|
|
1431
1485
|
}
|
|
1432
1486
|
case ae(e.options): {
|
|
@@ -1441,15 +1495,15 @@ function Zr(e) {
|
|
|
1441
1495
|
t.value = e.options;
|
|
1442
1496
|
}
|
|
1443
1497
|
function c(o, i) {
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1498
|
+
var v;
|
|
1499
|
+
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m = i[d];
|
|
1500
|
+
return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
|
|
1447
1501
|
}
|
|
1448
1502
|
return (o, i) => {
|
|
1449
|
-
e.default && !
|
|
1450
|
-
function
|
|
1451
|
-
const
|
|
1452
|
-
const [C] =
|
|
1503
|
+
e.default && !n && (o[i.key] = e.default, n = !0);
|
|
1504
|
+
function d() {
|
|
1505
|
+
const v = o[i.key], k = (y) => {
|
|
1506
|
+
const [C] = Ke({
|
|
1453
1507
|
data: t.value,
|
|
1454
1508
|
labelProp: "title",
|
|
1455
1509
|
valueProp: "key",
|
|
@@ -1458,19 +1512,19 @@ function Zr(e) {
|
|
|
1458
1512
|
return C == null ? void 0 : C.title;
|
|
1459
1513
|
};
|
|
1460
1514
|
if (e.multiple) {
|
|
1461
|
-
const y =
|
|
1462
|
-
return
|
|
1515
|
+
const y = v.map((C) => k(C));
|
|
1516
|
+
return f("span", null, [y.join(", ")]);
|
|
1463
1517
|
} else {
|
|
1464
|
-
const y = k(
|
|
1465
|
-
return
|
|
1518
|
+
const y = k(v);
|
|
1519
|
+
return f("span", null, [y]);
|
|
1466
1520
|
}
|
|
1467
1521
|
}
|
|
1468
|
-
function
|
|
1469
|
-
return
|
|
1470
|
-
ref: (
|
|
1522
|
+
function m() {
|
|
1523
|
+
return f(Ot, {
|
|
1524
|
+
ref: (v) => r = v,
|
|
1471
1525
|
multiple: e.multiple,
|
|
1472
1526
|
modelValue: o[i.key],
|
|
1473
|
-
"onUpdate:modelValue": (
|
|
1527
|
+
"onUpdate:modelValue": (v) => o[i.key] = v,
|
|
1474
1528
|
placeholder: e.placeholder,
|
|
1475
1529
|
allowClear: e.clearable,
|
|
1476
1530
|
allowSearch: e.searchable,
|
|
@@ -1486,24 +1540,24 @@ function Zr(e) {
|
|
|
1486
1540
|
}
|
|
1487
1541
|
switch (i.mode) {
|
|
1488
1542
|
case "text":
|
|
1489
|
-
return
|
|
1543
|
+
return d();
|
|
1490
1544
|
case "component":
|
|
1491
1545
|
default:
|
|
1492
|
-
return
|
|
1546
|
+
return m();
|
|
1493
1547
|
}
|
|
1494
1548
|
};
|
|
1495
1549
|
}
|
|
1496
1550
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1497
|
-
function
|
|
1551
|
+
function ur() {
|
|
1498
1552
|
const e = _([]);
|
|
1499
|
-
return [e, (
|
|
1553
|
+
return [e, (n) => e.value = n];
|
|
1500
1554
|
}
|
|
1501
|
-
function
|
|
1502
|
-
let
|
|
1503
|
-
const [t, a] =
|
|
1504
|
-
if (!e.autoSumbit || !
|
|
1555
|
+
function or(e) {
|
|
1556
|
+
let r, n = !1;
|
|
1557
|
+
const [t, a] = ur(), u = () => {
|
|
1558
|
+
if (!e.autoSumbit || !r)
|
|
1505
1559
|
return;
|
|
1506
|
-
let c =
|
|
1560
|
+
let c = r;
|
|
1507
1561
|
for (; c && c.$el.tagName !== "FORM"; )
|
|
1508
1562
|
c = c.$parent;
|
|
1509
1563
|
c && c.$el && c.$el.dispatchEvent(new Event("submit"));
|
|
@@ -1524,14 +1578,14 @@ function tn(e) {
|
|
|
1524
1578
|
const i = J.get(e.options);
|
|
1525
1579
|
J.set(e.options, o), i(o);
|
|
1526
1580
|
});
|
|
1527
|
-
},
|
|
1581
|
+
}, s = () => {
|
|
1528
1582
|
l(e.options, (c) => {
|
|
1529
1583
|
a(c);
|
|
1530
1584
|
});
|
|
1531
1585
|
};
|
|
1532
1586
|
switch (!0) {
|
|
1533
1587
|
case e.options instanceof Function: {
|
|
1534
|
-
e.cache !== !1 ? h() :
|
|
1588
|
+
e.cache !== !1 ? h() : s();
|
|
1535
1589
|
break;
|
|
1536
1590
|
}
|
|
1537
1591
|
case ae(e.options): {
|
|
@@ -1546,14 +1600,14 @@ function tn(e) {
|
|
|
1546
1600
|
t.value = e.options;
|
|
1547
1601
|
}
|
|
1548
1602
|
return (c, o) => {
|
|
1549
|
-
e.default && !
|
|
1603
|
+
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1550
1604
|
function i() {
|
|
1551
|
-
const
|
|
1605
|
+
const m = c[o.key], v = (y) => Ke({
|
|
1552
1606
|
data: t.value,
|
|
1553
1607
|
labelProp: "label",
|
|
1554
1608
|
valueProp: "value",
|
|
1555
1609
|
key: y
|
|
1556
|
-
}).map((j) => j.label).join("/"), k = (y) =>
|
|
1610
|
+
}).map((j) => j.label).join("/"), k = (y) => rr({
|
|
1557
1611
|
data: t.value,
|
|
1558
1612
|
labelProp: "label",
|
|
1559
1613
|
valueProp: "value",
|
|
@@ -1561,32 +1615,32 @@ function tn(e) {
|
|
|
1561
1615
|
}).map((j) => j.label).join("/");
|
|
1562
1616
|
switch (!0) {
|
|
1563
1617
|
case (!e.pathMode && !e.multiple): {
|
|
1564
|
-
const y = m
|
|
1565
|
-
return
|
|
1618
|
+
const y = v(m);
|
|
1619
|
+
return f("span", null, [y]);
|
|
1566
1620
|
}
|
|
1567
1621
|
case (!e.pathMode && e.multiple): {
|
|
1568
|
-
const y =
|
|
1569
|
-
return
|
|
1622
|
+
const y = m.map((C) => v(C));
|
|
1623
|
+
return f("span", null, [y.join(", ")]);
|
|
1570
1624
|
}
|
|
1571
1625
|
case (e.pathMode && !e.multiple): {
|
|
1572
|
-
const y = k(
|
|
1573
|
-
return
|
|
1626
|
+
const y = k(m);
|
|
1627
|
+
return f("span", null, [y]);
|
|
1574
1628
|
}
|
|
1575
1629
|
case (e.pathMode && e.multiple): {
|
|
1576
|
-
const y =
|
|
1577
|
-
return
|
|
1630
|
+
const y = m.map((C) => k(C));
|
|
1631
|
+
return f("span", null, [y.join(", ")]);
|
|
1578
1632
|
}
|
|
1579
1633
|
default:
|
|
1580
|
-
return
|
|
1634
|
+
return f("span", null, null);
|
|
1581
1635
|
}
|
|
1582
1636
|
}
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1637
|
+
function d() {
|
|
1638
|
+
return f(Yt, {
|
|
1585
1639
|
pathMode: e.pathMode,
|
|
1586
|
-
ref: (
|
|
1640
|
+
ref: (m) => r = m,
|
|
1587
1641
|
multiple: e.multiple,
|
|
1588
1642
|
modelValue: c[o.key],
|
|
1589
|
-
"onUpdate:modelValue": (
|
|
1643
|
+
"onUpdate:modelValue": (m) => c[o.key] = m,
|
|
1590
1644
|
placeholder: e.placeholder,
|
|
1591
1645
|
allowClear: e.clearable,
|
|
1592
1646
|
allowSearch: e.searchable,
|
|
@@ -1600,14 +1654,14 @@ function tn(e) {
|
|
|
1600
1654
|
return i();
|
|
1601
1655
|
case "component":
|
|
1602
1656
|
default:
|
|
1603
|
-
return
|
|
1657
|
+
return d();
|
|
1604
1658
|
}
|
|
1605
1659
|
};
|
|
1606
1660
|
}
|
|
1607
|
-
function
|
|
1608
|
-
return (
|
|
1661
|
+
function cr(e) {
|
|
1662
|
+
return (r, n) => e(r, n);
|
|
1609
1663
|
}
|
|
1610
|
-
const
|
|
1664
|
+
const ir = {
|
|
1611
1665
|
thousands: !0,
|
|
1612
1666
|
inputUnit: "元",
|
|
1613
1667
|
outputUnit: "元"
|
|
@@ -1616,19 +1670,19 @@ const nn = {
|
|
|
1616
1670
|
元: 10 ** 2,
|
|
1617
1671
|
万: 10 ** 4
|
|
1618
1672
|
};
|
|
1619
|
-
function
|
|
1673
|
+
function sr(e) {
|
|
1620
1674
|
e = {
|
|
1621
|
-
...
|
|
1675
|
+
...ir,
|
|
1622
1676
|
...e || {}
|
|
1623
1677
|
};
|
|
1624
|
-
const
|
|
1678
|
+
const r = (l) => {
|
|
1625
1679
|
if (l == null)
|
|
1626
1680
|
return;
|
|
1627
1681
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1628
1682
|
return l;
|
|
1629
1683
|
const h = te[e.outputUnit] / te[e.inputUnit];
|
|
1630
1684
|
return parseFloat((l * h).toFixed(10));
|
|
1631
|
-
},
|
|
1685
|
+
}, n = (l) => {
|
|
1632
1686
|
if (l == null)
|
|
1633
1687
|
return;
|
|
1634
1688
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
@@ -1643,18 +1697,18 @@ function ln(e) {
|
|
|
1643
1697
|
return e != null && e.thousands ? t(h) : h;
|
|
1644
1698
|
}, u = (l) => l.replace(/,/g, "");
|
|
1645
1699
|
return (l, h) => {
|
|
1646
|
-
const
|
|
1647
|
-
Z(
|
|
1648
|
-
l[h.key] =
|
|
1700
|
+
const s = _(r(l[h.key]));
|
|
1701
|
+
Z(s, (m) => {
|
|
1702
|
+
l[h.key] = n(m);
|
|
1649
1703
|
});
|
|
1650
|
-
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ?
|
|
1704
|
+
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;
|
|
1651
1705
|
function i() {
|
|
1652
|
-
return
|
|
1706
|
+
return f("span", null, [a(s.value.toString()), o()]);
|
|
1653
1707
|
}
|
|
1654
|
-
function
|
|
1655
|
-
return
|
|
1656
|
-
modelValue:
|
|
1657
|
-
"onUpdate:modelValue": (
|
|
1708
|
+
function d() {
|
|
1709
|
+
return f(Ve, {
|
|
1710
|
+
modelValue: s.value,
|
|
1711
|
+
"onUpdate:modelValue": (m) => s.value = m,
|
|
1658
1712
|
formatter: a,
|
|
1659
1713
|
parser: u,
|
|
1660
1714
|
precision: e == null ? void 0 : e.precision,
|
|
@@ -1672,52 +1726,52 @@ function ln(e) {
|
|
|
1672
1726
|
return i();
|
|
1673
1727
|
case "component":
|
|
1674
1728
|
default:
|
|
1675
|
-
return
|
|
1729
|
+
return d();
|
|
1676
1730
|
}
|
|
1677
1731
|
};
|
|
1678
1732
|
}
|
|
1679
|
-
function
|
|
1733
|
+
function dr() {
|
|
1680
1734
|
return {
|
|
1681
|
-
input:
|
|
1682
|
-
textarea:
|
|
1683
|
-
select:
|
|
1684
|
-
treeSelect:
|
|
1685
|
-
date:
|
|
1686
|
-
switch:
|
|
1687
|
-
dateRange:
|
|
1688
|
-
render:
|
|
1689
|
-
cascader:
|
|
1690
|
-
currency:
|
|
1735
|
+
input: Xn,
|
|
1736
|
+
textarea: nr,
|
|
1737
|
+
select: Zn,
|
|
1738
|
+
treeSelect: ar,
|
|
1739
|
+
date: Wn,
|
|
1740
|
+
switch: er,
|
|
1741
|
+
dateRange: tr,
|
|
1742
|
+
render: cr,
|
|
1743
|
+
cascader: or,
|
|
1744
|
+
currency: sr
|
|
1691
1745
|
};
|
|
1692
1746
|
}
|
|
1693
|
-
function Le(e,
|
|
1694
|
-
|
|
1695
|
-
const
|
|
1696
|
-
...
|
|
1747
|
+
function Le(e, r) {
|
|
1748
|
+
r.render || (r.render = (t) => t.input());
|
|
1749
|
+
const n = r.render({
|
|
1750
|
+
...dr()
|
|
1697
1751
|
});
|
|
1698
1752
|
return {
|
|
1699
|
-
default: () =>
|
|
1753
|
+
default: () => n(e, r)
|
|
1700
1754
|
};
|
|
1701
1755
|
}
|
|
1702
|
-
function
|
|
1703
|
-
switch (
|
|
1756
|
+
function Ie(e, r) {
|
|
1757
|
+
switch (r.mode) {
|
|
1704
1758
|
case "text":
|
|
1705
|
-
return Oe(Le(e,
|
|
1759
|
+
return Oe(Le(e, r).default);
|
|
1706
1760
|
case "component":
|
|
1707
1761
|
default:
|
|
1708
1762
|
return Oe(ve, {
|
|
1709
|
-
field:
|
|
1710
|
-
label:
|
|
1711
|
-
hideLabel:
|
|
1712
|
-
labelColStyle:
|
|
1713
|
-
wrapperColStyle:
|
|
1714
|
-
}, Le(e,
|
|
1763
|
+
field: r.key,
|
|
1764
|
+
label: r.title,
|
|
1765
|
+
hideLabel: r.hideLabel,
|
|
1766
|
+
labelColStyle: r.labelStyle,
|
|
1767
|
+
wrapperColStyle: r.contentStyle
|
|
1768
|
+
}, Le(e, r));
|
|
1715
1769
|
}
|
|
1716
1770
|
}
|
|
1717
|
-
function
|
|
1771
|
+
function fr(e) {
|
|
1718
1772
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1719
1773
|
}
|
|
1720
|
-
const
|
|
1774
|
+
const mr = /* @__PURE__ */ E({
|
|
1721
1775
|
props: {
|
|
1722
1776
|
form: {
|
|
1723
1777
|
type: Object,
|
|
@@ -1728,98 +1782,98 @@ const on = /* @__PURE__ */ z({
|
|
|
1728
1782
|
}
|
|
1729
1783
|
},
|
|
1730
1784
|
setup(e) {
|
|
1731
|
-
const
|
|
1732
|
-
...
|
|
1785
|
+
const r = qe(), n = e.form.map((s) => ({
|
|
1786
|
+
...s,
|
|
1733
1787
|
collapsed: !1
|
|
1734
|
-
})), t = Array.from(new Set(
|
|
1735
|
-
let i =
|
|
1788
|
+
})), t = Array.from(new Set(n.map((s) => s.group).flat().filter(Boolean))), a = n.reduce((s, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
|
|
1789
|
+
let i = s.find((d) => d.group === o);
|
|
1736
1790
|
i || (i = {
|
|
1737
1791
|
group: o,
|
|
1738
1792
|
instance: void 0,
|
|
1739
1793
|
form: []
|
|
1740
|
-
},
|
|
1741
|
-
}),
|
|
1794
|
+
}, s.push(i)), i.form.push(c);
|
|
1795
|
+
}), s), []).sort((s, c) => s.group === "默认" ? -1 : c.group === "默认" ? 1 : s.group > c.group ? -1 : 1), u = _("默认");
|
|
1742
1796
|
return {
|
|
1743
|
-
formItems:
|
|
1797
|
+
formItems: n,
|
|
1744
1798
|
groups: t,
|
|
1745
1799
|
groupForms: a,
|
|
1746
1800
|
activeTab: u,
|
|
1747
1801
|
onSubmit: () => {
|
|
1748
|
-
const
|
|
1749
|
-
if (
|
|
1750
|
-
const c =
|
|
1751
|
-
|
|
1752
|
-
o ||
|
|
1802
|
+
const s = a.find((c) => c.group === u.value);
|
|
1803
|
+
if (s && s.instance) {
|
|
1804
|
+
const c = s.instance.formSource;
|
|
1805
|
+
s.instance.validate().then((o) => {
|
|
1806
|
+
o || r.close(c);
|
|
1753
1807
|
});
|
|
1754
1808
|
}
|
|
1755
1809
|
},
|
|
1756
1810
|
onReset: () => {
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1811
|
+
const s = a.find((c) => c.group === u.value);
|
|
1812
|
+
s && s.instance && s.instance.reset();
|
|
1759
1813
|
}
|
|
1760
1814
|
};
|
|
1761
1815
|
},
|
|
1762
1816
|
render() {
|
|
1763
|
-
const e = this.groupForms.find((
|
|
1817
|
+
const e = this.groupForms.find((r) => r.group === this.activeTab);
|
|
1764
1818
|
if (this.groups.length) {
|
|
1765
|
-
let
|
|
1766
|
-
return
|
|
1819
|
+
let r;
|
|
1820
|
+
return f(Mt, {
|
|
1767
1821
|
"active-key": this.activeTab,
|
|
1768
|
-
"onUpdate:active-key": (
|
|
1769
|
-
},
|
|
1770
|
-
title:
|
|
1771
|
-
key:
|
|
1822
|
+
"onUpdate:active-key": (n) => this.activeTab = n
|
|
1823
|
+
}, fr(r = this.groupForms.map((n) => f(Tt, {
|
|
1824
|
+
title: n.group,
|
|
1825
|
+
key: n.group
|
|
1772
1826
|
}, {
|
|
1773
|
-
default: () => [
|
|
1774
|
-
form:
|
|
1827
|
+
default: () => [f(pe, {
|
|
1828
|
+
form: n.form,
|
|
1775
1829
|
value: this.value,
|
|
1776
|
-
ref: (t) =>
|
|
1777
|
-
}, null),
|
|
1830
|
+
ref: (t) => n.instance = t
|
|
1831
|
+
}, null), f(Ye, null, null), f("div", {
|
|
1778
1832
|
class: "flex items-center justify-between space-x-2"
|
|
1779
|
-
}, [
|
|
1833
|
+
}, [f(D, {
|
|
1780
1834
|
type: "secondary",
|
|
1781
1835
|
size: "large",
|
|
1782
1836
|
onClick: this.onReset
|
|
1783
1837
|
}, {
|
|
1784
|
-
default: () => [
|
|
1785
|
-
}),
|
|
1838
|
+
default: () => [I("重置")]
|
|
1839
|
+
}), f(D, {
|
|
1786
1840
|
class: "w-100px",
|
|
1787
1841
|
type: "primary",
|
|
1788
1842
|
size: "large",
|
|
1789
1843
|
onClick: this.onSubmit
|
|
1790
1844
|
}, {
|
|
1791
|
-
default: () => [
|
|
1845
|
+
default: () => [I("搜索")]
|
|
1792
1846
|
})])]
|
|
1793
|
-
}))) ?
|
|
1794
|
-
default: () => [
|
|
1847
|
+
}))) ? r : {
|
|
1848
|
+
default: () => [r]
|
|
1795
1849
|
});
|
|
1796
1850
|
} else
|
|
1797
|
-
return
|
|
1851
|
+
return f(ne, null, [f(pe, {
|
|
1798
1852
|
form: this.formItems,
|
|
1799
1853
|
value: this.value,
|
|
1800
|
-
ref: (
|
|
1801
|
-
}, null),
|
|
1854
|
+
ref: (r) => e.instance = r
|
|
1855
|
+
}, null), f(Ye, null, null), f("div", {
|
|
1802
1856
|
class: "flex items-center justify-between space-x-2"
|
|
1803
|
-
}, [
|
|
1857
|
+
}, [f(D, {
|
|
1804
1858
|
type: "secondary",
|
|
1805
1859
|
size: "large",
|
|
1806
1860
|
onClick: this.onReset
|
|
1807
1861
|
}, {
|
|
1808
|
-
default: () => [
|
|
1809
|
-
}),
|
|
1862
|
+
default: () => [I("重置")]
|
|
1863
|
+
}), f(D, {
|
|
1810
1864
|
class: "w-100px",
|
|
1811
1865
|
type: "primary",
|
|
1812
1866
|
size: "large",
|
|
1813
1867
|
onClick: this.onSubmit
|
|
1814
1868
|
}, {
|
|
1815
|
-
default: () => [
|
|
1869
|
+
default: () => [I("搜索")]
|
|
1816
1870
|
})])]);
|
|
1817
1871
|
}
|
|
1818
1872
|
});
|
|
1819
|
-
function
|
|
1873
|
+
function De(e) {
|
|
1820
1874
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1821
1875
|
}
|
|
1822
|
-
const pe = /* @__PURE__ */
|
|
1876
|
+
const pe = /* @__PURE__ */ E({
|
|
1823
1877
|
props: {
|
|
1824
1878
|
form: {
|
|
1825
1879
|
type: Object,
|
|
@@ -1884,13 +1938,13 @@ const pe = /* @__PURE__ */ z({
|
|
|
1884
1938
|
emits: ["submit", "cancel", "update:model-value"],
|
|
1885
1939
|
expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
|
|
1886
1940
|
setup(e, {
|
|
1887
|
-
emit:
|
|
1941
|
+
emit: r
|
|
1888
1942
|
}) {
|
|
1889
|
-
const
|
|
1943
|
+
const n = _(), [t, a] = An(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), h = _(), s = () => l.value = !l.value, c = _(""), o = _("");
|
|
1890
1944
|
he(Te.id, c), he(Te.source, t);
|
|
1891
1945
|
const i = () => {
|
|
1892
|
-
|
|
1893
|
-
},
|
|
1946
|
+
r("submit", t.value), r("update:model-value", t.value);
|
|
1947
|
+
}, d = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1894
1948
|
switch (!0) {
|
|
1895
1949
|
case typeof g.visiable == "boolean":
|
|
1896
1950
|
return g.visiable;
|
|
@@ -1899,33 +1953,33 @@ const pe = /* @__PURE__ */ z({
|
|
|
1899
1953
|
default:
|
|
1900
1954
|
return !0;
|
|
1901
1955
|
}
|
|
1902
|
-
})),
|
|
1956
|
+
})), m = F(() => {
|
|
1903
1957
|
if (!u.value)
|
|
1904
1958
|
return 1;
|
|
1905
|
-
const g =
|
|
1959
|
+
const g = d.value.reduce((b, O) => b + ((O == null ? void 0 : O.span) || 1), 0);
|
|
1906
1960
|
return u.value - g % u.value;
|
|
1907
|
-
}),
|
|
1961
|
+
}), v = (g) => g != null && g.validator ? {
|
|
1908
1962
|
...g,
|
|
1909
1963
|
validator: (b, O) => {
|
|
1910
1964
|
const Y = g.validator(b, O);
|
|
1911
1965
|
if (typeof Y == "function")
|
|
1912
1966
|
return Y(t.value);
|
|
1913
1967
|
}
|
|
1914
|
-
} : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(
|
|
1968
|
+
} : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(v) : g[b.key] = v(b.rule)), g), {}));
|
|
1915
1969
|
function y() {
|
|
1916
1970
|
var b;
|
|
1917
1971
|
if (e.columns)
|
|
1918
1972
|
return;
|
|
1919
|
-
const g = (b =
|
|
1973
|
+
const g = (b = n.value) == null ? void 0 : b.$el;
|
|
1920
1974
|
g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
|
|
1921
1975
|
}
|
|
1922
1976
|
function C() {
|
|
1923
1977
|
var b;
|
|
1924
|
-
const g = (b =
|
|
1978
|
+
const g = (b = n.value) == null ? void 0 : b.$el;
|
|
1925
1979
|
g && (g.id = c.value);
|
|
1926
1980
|
}
|
|
1927
1981
|
function j() {
|
|
1928
|
-
h.value.open(
|
|
1982
|
+
h.value.open(mr, {
|
|
1929
1983
|
form: e.form,
|
|
1930
1984
|
value: t.value
|
|
1931
1985
|
}, {
|
|
@@ -1933,51 +1987,51 @@ const pe = /* @__PURE__ */ z({
|
|
|
1933
1987
|
footer: !1,
|
|
1934
1988
|
submitText: "搜索"
|
|
1935
1989
|
}).then((g) => {
|
|
1936
|
-
g && (
|
|
1990
|
+
g && (P(g), i());
|
|
1937
1991
|
});
|
|
1938
1992
|
}
|
|
1939
1993
|
W(() => {
|
|
1940
1994
|
const g = Math.random().toString(32).slice(2);
|
|
1941
1995
|
c.value = e.id ?? g, o.value = e.name ?? g, y(), C(), window && window.addEventListener("resize", y);
|
|
1942
1996
|
});
|
|
1943
|
-
function
|
|
1997
|
+
function P(g) {
|
|
1944
1998
|
a({
|
|
1945
1999
|
...t.value,
|
|
1946
2000
|
...g || {}
|
|
1947
2001
|
});
|
|
1948
2002
|
}
|
|
1949
|
-
function
|
|
1950
|
-
t.value[g] = b,
|
|
2003
|
+
function z(g, b) {
|
|
2004
|
+
t.value[g] = b, P({
|
|
1951
2005
|
...t.value
|
|
1952
2006
|
});
|
|
1953
2007
|
}
|
|
1954
2008
|
function H(g) {
|
|
1955
2009
|
const b = e.form.find((Y) => Y.key === g), O = (typeof b.default == "function" ? b.default() : b.default) || null;
|
|
1956
|
-
|
|
2010
|
+
z(g, O);
|
|
1957
2011
|
}
|
|
1958
|
-
function
|
|
2012
|
+
function B() {
|
|
1959
2013
|
var g;
|
|
1960
|
-
(g =
|
|
2014
|
+
(g = n.value) == null || g.resetFields();
|
|
1961
2015
|
}
|
|
1962
2016
|
function w() {
|
|
1963
2017
|
var g;
|
|
1964
|
-
return (g =
|
|
2018
|
+
return (g = n.value) == null ? void 0 : g.validate();
|
|
1965
2019
|
}
|
|
1966
2020
|
return {
|
|
1967
2021
|
formId: c,
|
|
1968
2022
|
formName: o,
|
|
1969
2023
|
formSource: t,
|
|
1970
|
-
formInstance:
|
|
2024
|
+
formInstance: n,
|
|
1971
2025
|
formColumns: u,
|
|
1972
2026
|
formRules: k,
|
|
1973
2027
|
formCollspased: l,
|
|
1974
|
-
formActiosSpan:
|
|
1975
|
-
formItems:
|
|
1976
|
-
toggleFormCollapsed:
|
|
1977
|
-
updateFormField:
|
|
2028
|
+
formActiosSpan: m,
|
|
2029
|
+
formItems: d,
|
|
2030
|
+
toggleFormCollapsed: s,
|
|
2031
|
+
updateFormField: z,
|
|
1978
2032
|
resetFormField: H,
|
|
1979
|
-
updateFormSource:
|
|
1980
|
-
reset:
|
|
2033
|
+
updateFormSource: P,
|
|
2034
|
+
reset: B,
|
|
1981
2035
|
validate: w,
|
|
1982
2036
|
onSubmitSuccess: i,
|
|
1983
2037
|
openCollapsedDialog: j,
|
|
@@ -1988,7 +2042,7 @@ const pe = /* @__PURE__ */ z({
|
|
|
1988
2042
|
const e = () => {
|
|
1989
2043
|
if (!this.showFormResult)
|
|
1990
2044
|
return;
|
|
1991
|
-
const
|
|
2045
|
+
const n = this.form.filter((a) => {
|
|
1992
2046
|
const u = this.formSource[a.key];
|
|
1993
2047
|
switch (!0) {
|
|
1994
2048
|
case typeof u == "string":
|
|
@@ -2003,96 +2057,96 @@ const pe = /* @__PURE__ */ z({
|
|
|
2003
2057
|
const u = this.formItems.find((h) => h.key === a);
|
|
2004
2058
|
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
2005
2059
|
};
|
|
2006
|
-
return
|
|
2060
|
+
return f(ce, {
|
|
2007
2061
|
span: this.formColumns
|
|
2008
2062
|
}, {
|
|
2009
|
-
default: () => [
|
|
2063
|
+
default: () => [f(ve, {
|
|
2010
2064
|
label: "搜索条件"
|
|
2011
2065
|
}, {
|
|
2012
|
-
default: () => [
|
|
2066
|
+
default: () => [f("div", {
|
|
2013
2067
|
class: "w-full mt-5px text-left"
|
|
2014
|
-
}, [
|
|
2068
|
+
}, [f(Me, {
|
|
2015
2069
|
wrap: !0,
|
|
2016
2070
|
align: "center"
|
|
2017
2071
|
}, {
|
|
2018
|
-
default: () => [
|
|
2072
|
+
default: () => [n.length > 0 ? n.map((a) => f(Lt, {
|
|
2019
2073
|
key: a.key,
|
|
2020
2074
|
closable: !0,
|
|
2021
2075
|
onClose: () => t(a.key)
|
|
2022
2076
|
}, {
|
|
2023
|
-
default: () => [
|
|
2077
|
+
default: () => [f("div", {
|
|
2024
2078
|
class: "flex space-x-2"
|
|
2025
|
-
}, [
|
|
2079
|
+
}, [f("div", {
|
|
2026
2080
|
class: "text-#999"
|
|
2027
|
-
}, [a.title,
|
|
2081
|
+
}, [a.title, I(":")]), f("div", {
|
|
2028
2082
|
class: "text-#333"
|
|
2029
|
-
}, [
|
|
2083
|
+
}, [Ie(this.formSource, {
|
|
2030
2084
|
...a,
|
|
2031
2085
|
key: a.key,
|
|
2032
2086
|
mode: "text"
|
|
2033
2087
|
})])])]
|
|
2034
|
-
})) :
|
|
2088
|
+
})) : f("div", {
|
|
2035
2089
|
class: "text-#999"
|
|
2036
|
-
}, [
|
|
2090
|
+
}, [I("暂无搜索条件")])]
|
|
2037
2091
|
})])]
|
|
2038
2092
|
})]
|
|
2039
2093
|
});
|
|
2040
|
-
},
|
|
2041
|
-
const
|
|
2094
|
+
}, r = () => {
|
|
2095
|
+
const n = [], t = this.footer ? {
|
|
2042
2096
|
span: this.formColumns
|
|
2043
2097
|
} : {
|
|
2044
2098
|
span: this.formActiosSpan
|
|
2045
2099
|
};
|
|
2046
|
-
if (this.searchable && (
|
|
2100
|
+
if (this.searchable && (n.push(f(D, {
|
|
2047
2101
|
type: "primary",
|
|
2048
2102
|
htmlType: "submit"
|
|
2049
2103
|
}, {
|
|
2050
|
-
default: () => [
|
|
2051
|
-
})),
|
|
2104
|
+
default: () => [I("搜索")]
|
|
2105
|
+
})), n.push(f(D, {
|
|
2052
2106
|
type: "secondary",
|
|
2053
2107
|
onClick: () => {
|
|
2054
2108
|
var a;
|
|
2055
2109
|
return (a = this.formInstance) == null ? void 0 : a.resetFields();
|
|
2056
2110
|
}
|
|
2057
2111
|
}, {
|
|
2058
|
-
default: () => [
|
|
2059
|
-
}))), this.submitable && (
|
|
2112
|
+
default: () => [I("重置")]
|
|
2113
|
+
}))), this.submitable && (n.push(f(D, {
|
|
2060
2114
|
type: "primary",
|
|
2061
2115
|
htmlType: "submit"
|
|
2062
2116
|
}, {
|
|
2063
|
-
default: () => [
|
|
2064
|
-
})),
|
|
2117
|
+
default: () => [I("提交")]
|
|
2118
|
+
})), n.push(f(D, {
|
|
2065
2119
|
type: "secondary",
|
|
2066
2120
|
onClick: () => this.$emit("cancel")
|
|
2067
2121
|
}, {
|
|
2068
|
-
default: () => [
|
|
2069
|
-
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" &&
|
|
2122
|
+
default: () => [I("取消")]
|
|
2123
|
+
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && n.push(f(D, {
|
|
2070
2124
|
onClick: this.toggleFormCollapsed
|
|
2071
2125
|
}, {
|
|
2072
2126
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2073
|
-
icon: () => this.formCollspased ?
|
|
2074
|
-
})), this.collapsedMode === "dialog" &&
|
|
2127
|
+
icon: () => this.formCollspased ? f(Ut, null, null) : f(Xt, null, null)
|
|
2128
|
+
})), this.collapsedMode === "dialog" && n.push(f(D, {
|
|
2075
2129
|
onClick: this.openCollapsedDialog
|
|
2076
2130
|
}, {
|
|
2077
2131
|
default: () => "高级搜索",
|
|
2078
|
-
icon: () =>
|
|
2079
|
-
}))), this.$slots.actions &&
|
|
2080
|
-
return
|
|
2081
|
-
default: () => [
|
|
2132
|
+
icon: () => f(nn, null, null)
|
|
2133
|
+
}))), this.$slots.actions && n.push(...this.$slots.actions()), n.length)
|
|
2134
|
+
return f(ce, t, {
|
|
2135
|
+
default: () => [f(ve, {
|
|
2082
2136
|
contentClass: this.footer ? "form-footer" : ""
|
|
2083
2137
|
}, {
|
|
2084
|
-
default: () => [
|
|
2085
|
-
default: () => [
|
|
2138
|
+
default: () => [f(Me, null, De(n) ? n : {
|
|
2139
|
+
default: () => [n]
|
|
2086
2140
|
})]
|
|
2087
2141
|
})]
|
|
2088
2142
|
});
|
|
2089
2143
|
};
|
|
2090
|
-
return
|
|
2144
|
+
return f("div", {
|
|
2091
2145
|
class: "form-render"
|
|
2092
|
-
}, [
|
|
2093
|
-
ref: (
|
|
2146
|
+
}, [f(Rn, {
|
|
2147
|
+
ref: (n) => this.modalInstance = n
|
|
2094
2148
|
}, {
|
|
2095
|
-
default: () => [
|
|
2149
|
+
default: () => [f(Pt, ge({
|
|
2096
2150
|
name: this.formName
|
|
2097
2151
|
}, {
|
|
2098
2152
|
labelAlign: "right",
|
|
@@ -2100,48 +2154,48 @@ const pe = /* @__PURE__ */ z({
|
|
|
2100
2154
|
rules: this.formRules,
|
|
2101
2155
|
onSubmitSuccess: this.onSubmitSuccess,
|
|
2102
2156
|
"auto-label-width": !0,
|
|
2103
|
-
ref: (
|
|
2157
|
+
ref: (n) => this.formInstance = n,
|
|
2104
2158
|
model: this.formSource
|
|
2105
2159
|
}), {
|
|
2106
|
-
default: () => [
|
|
2160
|
+
default: () => [f(jt, {
|
|
2107
2161
|
cols: this.formColumns,
|
|
2108
2162
|
"col-gap": 24,
|
|
2109
2163
|
"rol-gap": 10
|
|
2110
2164
|
}, {
|
|
2111
|
-
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((
|
|
2165
|
+
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((n) => {
|
|
2112
2166
|
let t;
|
|
2113
|
-
return
|
|
2114
|
-
span:
|
|
2115
|
-
},
|
|
2167
|
+
return f(ce, {
|
|
2168
|
+
span: n.span
|
|
2169
|
+
}, De(t = Ie(this.formSource, n)) ? t : {
|
|
2116
2170
|
default: () => [t]
|
|
2117
2171
|
});
|
|
2118
|
-
}),
|
|
2172
|
+
}), r(), e()]
|
|
2119
2173
|
})]
|
|
2120
2174
|
})]
|
|
2121
2175
|
})]);
|
|
2122
2176
|
}
|
|
2123
2177
|
});
|
|
2124
|
-
function
|
|
2178
|
+
function yr(e) {
|
|
2125
2179
|
return e;
|
|
2126
2180
|
}
|
|
2127
|
-
function
|
|
2128
|
-
const
|
|
2181
|
+
function gr(e) {
|
|
2182
|
+
const r = q(), n = _();
|
|
2129
2183
|
function t() {
|
|
2130
2184
|
var u, l;
|
|
2131
|
-
const a = (l = (u =
|
|
2132
|
-
a && (
|
|
2185
|
+
const a = (l = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
2186
|
+
a && (n.value = a);
|
|
2133
2187
|
}
|
|
2134
|
-
return W(t),
|
|
2188
|
+
return W(t), pt(t), n;
|
|
2135
2189
|
}
|
|
2136
|
-
const
|
|
2137
|
-
install(e,
|
|
2190
|
+
const br = {
|
|
2191
|
+
install(e, r) {
|
|
2138
2192
|
e.component("FormRender", pe);
|
|
2139
2193
|
}
|
|
2140
2194
|
};
|
|
2141
2195
|
export {
|
|
2142
2196
|
pe as FormRender,
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2197
|
+
xr as FormRenderResolver,
|
|
2198
|
+
br as default,
|
|
2199
|
+
yr as defineForm,
|
|
2200
|
+
gr as useForm
|
|
2147
2201
|
};
|