@gopowerteam/form-render 0.0.49 → 0.0.51
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/index.cjs +1 -1
- package/dist/es/index.mjs +696 -696
- package/package.json +2 -2
package/dist/es/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { getCurrentInstance as W, inject as
|
|
2
|
-
import { DatePicker as
|
|
1
|
+
import { getCurrentInstance as W, inject as ne, defineComponent as P, computed as C, openBlock as x, createElementBlock as F, normalizeClass as re, normalizeStyle as z, createElementVNode as w, shallowRef as V, ref as $, provide as fe, onMounted as D, Fragment as me, renderSlot as Ee, createBlock as te, Teleport as Ve, createVNode as v, TransitionGroup as Ae, withCtx as Be, renderList as De, mergeProps as Oe, createCommentVNode as H, defineAsyncComponent as We, triggerRef as Q, useCssVars as Ue, onUnmounted as qe, withModifiers as He, toDisplayString as A, resolveDynamicComponent as _e, normalizeProps as Ye, guardReactiveProps as Ge, watch as le, unref as Xe, isRef as oe, toRefs as Je, customRef as Qe, nextTick as Ie, getCurrentScope as Ke, onScopeDispose as Ze, pushScopeId as et, popScopeId as tt, isVNode as ve, h as nt, createTextVNode as Z, onUpdated as rt } from "vue";
|
|
2
|
+
import { DatePicker as lt, YearPicker as ot, QuarterPicker as at, MonthPicker as ut, WeekPicker as it, Input as ct, InputNumber as st, Select as dt, Option as ft, Switch as mt, RangePicker as ht, Textarea as vt, TreeSelect as pt, Cascader as yt, FormItem as Me, Tabs as gt, TabPane as bt, Form as kt, Grid as wt, GridItem as xe, Button as q, Space as St } from "@arco-design/web-vue";
|
|
3
3
|
import Ce from "dayjs";
|
|
4
|
-
import { FormRenderResolver as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
const
|
|
4
|
+
import { FormRenderResolver as Xn } from "./resolver.mjs";
|
|
5
|
+
const xt = Symbol("ArcoConfigProvider"), Ct = "arco", $t = "$arco", pe = (e) => {
|
|
6
|
+
var r, t, n;
|
|
7
|
+
const l = W(), a = ne(xt, void 0), o = (n = (t = a == null ? void 0 : a.prefixCls) != null ? t : (r = l == null ? void 0 : l.appContext.config.globalProperties[$t]) == null ? void 0 : r.classPrefix) != null ? n : Ct;
|
|
8
8
|
return e ? `${o}-${e}` : o;
|
|
9
|
-
},
|
|
9
|
+
}, Ft = Object.prototype.toString;
|
|
10
10
|
function ye(e) {
|
|
11
|
-
return
|
|
11
|
+
return Ft.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var ge = (e,
|
|
14
|
-
for (const [t, n] of
|
|
13
|
+
var ge = (e, r) => {
|
|
14
|
+
for (const [t, n] of r)
|
|
15
15
|
e[t] = n;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const
|
|
18
|
+
const Ot = P({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -42,47 +42,47 @@ const _t = R({
|
|
|
42
42
|
click: (e) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(e, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: r
|
|
46
46
|
}) {
|
|
47
|
-
const t =
|
|
47
|
+
const t = pe("icon"), n = C(() => [t, `${t}-down`, {
|
|
48
48
|
[`${t}-spin`]: e.spin
|
|
49
|
-
}]),
|
|
49
|
+
}]), l = C(() => {
|
|
50
50
|
const o = {};
|
|
51
51
|
return e.size && (o.fontSize = ye(e.size) ? `${e.size}px` : e.size), e.rotate && (o.transform = `rotate(${e.rotate}deg)`), o;
|
|
52
52
|
});
|
|
53
53
|
return {
|
|
54
54
|
cls: n,
|
|
55
|
-
innerStyle:
|
|
55
|
+
innerStyle: l,
|
|
56
56
|
onClick: (o) => {
|
|
57
|
-
|
|
57
|
+
r("click", o);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), _t = ["stroke-width", "stroke-linecap", "stroke-linejoin"], It = /* @__PURE__ */ w("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
-
}, null, -1),
|
|
64
|
-
function
|
|
65
|
-
return
|
|
63
|
+
}, null, -1), Mt = [It];
|
|
64
|
+
function jt(e, r, t, n, l, a) {
|
|
65
|
+
return x(), F("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
68
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
69
69
|
stroke: "currentColor",
|
|
70
|
-
class:
|
|
71
|
-
style:
|
|
70
|
+
class: re(e.cls),
|
|
71
|
+
style: z(e.innerStyle),
|
|
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] = (...o) => e.onClick && e.onClick(...o))
|
|
76
|
+
}, Mt, 14, _t);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ ge(
|
|
78
|
+
var ie = /* @__PURE__ */ ge(Ot, [["render", jt]]);
|
|
79
79
|
const Lt = Object.assign(ie, {
|
|
80
|
-
install: (e,
|
|
80
|
+
install: (e, r) => {
|
|
81
81
|
var t;
|
|
82
|
-
const n = (t =
|
|
82
|
+
const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
|
|
83
83
|
e.component(n + ie.name, ie);
|
|
84
84
|
}
|
|
85
|
-
}), Tt =
|
|
85
|
+
}), Tt = P({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -109,47 +109,47 @@ const Lt = Object.assign(ie, {
|
|
|
109
109
|
click: (e) => !0
|
|
110
110
|
},
|
|
111
111
|
setup(e, {
|
|
112
|
-
emit:
|
|
112
|
+
emit: r
|
|
113
113
|
}) {
|
|
114
|
-
const t =
|
|
114
|
+
const t = pe("icon"), n = C(() => [t, `${t}-up`, {
|
|
115
115
|
[`${t}-spin`]: e.spin
|
|
116
|
-
}]),
|
|
116
|
+
}]), l = C(() => {
|
|
117
117
|
const o = {};
|
|
118
118
|
return e.size && (o.fontSize = ye(e.size) ? `${e.size}px` : e.size), e.rotate && (o.transform = `rotate(${e.rotate}deg)`), o;
|
|
119
119
|
});
|
|
120
120
|
return {
|
|
121
121
|
cls: n,
|
|
122
|
-
innerStyle:
|
|
122
|
+
innerStyle: l,
|
|
123
123
|
onClick: (o) => {
|
|
124
|
-
|
|
124
|
+
r("click", o);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), zt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Pt = /* @__PURE__ */ w("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
130
|
}, null, -1), Rt = [Pt];
|
|
131
|
-
function Nt(e,
|
|
132
|
-
return
|
|
131
|
+
function Nt(e, r, t, n, l, a) {
|
|
132
|
+
return x(), F("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
135
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
136
136
|
stroke: "currentColor",
|
|
137
|
-
class:
|
|
138
|
-
style:
|
|
137
|
+
class: re(e.cls),
|
|
138
|
+
style: z(e.innerStyle),
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
|
-
onClick:
|
|
143
|
-
}, Rt, 14,
|
|
142
|
+
onClick: r[0] || (r[0] = (...o) => e.onClick && e.onClick(...o))
|
|
143
|
+
}, Rt, 14, zt);
|
|
144
144
|
}
|
|
145
145
|
var ce = /* @__PURE__ */ ge(Tt, [["render", Nt]]);
|
|
146
|
-
const
|
|
147
|
-
install: (e,
|
|
146
|
+
const Et = Object.assign(ce, {
|
|
147
|
+
install: (e, r) => {
|
|
148
148
|
var t;
|
|
149
|
-
const n = (t =
|
|
149
|
+
const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
|
|
150
150
|
e.component(n + ce.name, ce);
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
152
|
+
}), Vt = P({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -176,257 +176,257 @@ const Vt = Object.assign(ce, {
|
|
|
176
176
|
click: (e) => !0
|
|
177
177
|
},
|
|
178
178
|
setup(e, {
|
|
179
|
-
emit:
|
|
179
|
+
emit: r
|
|
180
180
|
}) {
|
|
181
|
-
const t =
|
|
181
|
+
const t = pe("icon"), n = C(() => [t, `${t}-search`, {
|
|
182
182
|
[`${t}-spin`]: e.spin
|
|
183
|
-
}]),
|
|
183
|
+
}]), l = C(() => {
|
|
184
184
|
const o = {};
|
|
185
185
|
return e.size && (o.fontSize = ye(e.size) ? `${e.size}px` : e.size), e.rotate && (o.transform = `rotate(${e.rotate}deg)`), o;
|
|
186
186
|
});
|
|
187
187
|
return {
|
|
188
188
|
cls: n,
|
|
189
|
-
innerStyle:
|
|
189
|
+
innerStyle: l,
|
|
190
190
|
onClick: (o) => {
|
|
191
|
-
|
|
191
|
+
r("click", o);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ w("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
|
|
199
|
-
return
|
|
197
|
+
}, null, -1), Dt = [Bt];
|
|
198
|
+
function Wt(e, r, t, n, l, a) {
|
|
199
|
+
return x(), F("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
203
203
|
stroke: "currentColor",
|
|
204
|
-
class:
|
|
205
|
-
style:
|
|
204
|
+
class: re(e.cls),
|
|
205
|
+
style: z(e.innerStyle),
|
|
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] = (...o) => e.onClick && e.onClick(...o))
|
|
210
|
+
}, Dt, 14, At);
|
|
211
211
|
}
|
|
212
|
-
var se = /* @__PURE__ */ ge(
|
|
213
|
-
const
|
|
214
|
-
install: (e,
|
|
212
|
+
var se = /* @__PURE__ */ ge(Vt, [["render", Wt]]);
|
|
213
|
+
const Ut = Object.assign(se, {
|
|
214
|
+
install: (e, r) => {
|
|
215
215
|
var t;
|
|
216
|
-
const n = (t =
|
|
216
|
+
const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
|
|
217
217
|
e.component(n + se.name, se);
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
219
|
+
}), ae = Symbol("__MODAL__");
|
|
220
220
|
function je(e) {
|
|
221
|
-
return
|
|
221
|
+
return Ke() ? (Ze(e), !0) : !1;
|
|
222
222
|
}
|
|
223
223
|
function I(e) {
|
|
224
|
-
return typeof e == "function" ? e() :
|
|
224
|
+
return typeof e == "function" ? e() : Xe(e);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const Le = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
|
-
const
|
|
228
|
+
const qt = Object.prototype.toString, Ht = (e) => qt.call(e) === "[object Object]", Yt = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
231
|
-
if (!
|
|
230
|
+
function Gt(e, r = {}) {
|
|
231
|
+
if (!oe(e))
|
|
232
232
|
return Je(e);
|
|
233
233
|
const t = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
234
234
|
for (const n in e.value)
|
|
235
|
-
t[n] =
|
|
235
|
+
t[n] = Qe(() => ({
|
|
236
236
|
get() {
|
|
237
237
|
return e.value[n];
|
|
238
238
|
},
|
|
239
|
-
set(
|
|
240
|
-
var
|
|
241
|
-
if ((
|
|
239
|
+
set(l) {
|
|
240
|
+
var a;
|
|
241
|
+
if ((a = I(r.replaceRef)) == null || a)
|
|
242
242
|
if (Array.isArray(e.value)) {
|
|
243
243
|
const o = [...e.value];
|
|
244
|
-
o[n] =
|
|
244
|
+
o[n] = l, e.value = o;
|
|
245
245
|
} else {
|
|
246
|
-
const o = { ...e.value, [n]:
|
|
246
|
+
const o = { ...e.value, [n]: l };
|
|
247
247
|
Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
|
|
248
248
|
}
|
|
249
249
|
else
|
|
250
|
-
e.value[n] =
|
|
250
|
+
e.value[n] = l;
|
|
251
251
|
}
|
|
252
252
|
}));
|
|
253
253
|
return t;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
W() ?
|
|
255
|
+
function Xt(e, r = !0) {
|
|
256
|
+
W() ? D(e) : r ? e() : Ie(e);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
var
|
|
258
|
+
function B(e) {
|
|
259
|
+
var r;
|
|
260
260
|
const t = I(e);
|
|
261
|
-
return (
|
|
261
|
+
return (r = t == null ? void 0 : t.$el) != null ? r : t;
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const ue = Le ? window : void 0;
|
|
264
264
|
function de(...e) {
|
|
265
|
-
let
|
|
266
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n,
|
|
267
|
-
return
|
|
265
|
+
let r, t, n, l;
|
|
266
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, l] = e, r = ue) : [r, t, n, l] = e, !r)
|
|
267
|
+
return Yt;
|
|
268
268
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
},
|
|
272
|
-
() => [
|
|
273
|
-
([
|
|
274
|
-
if (o(), !
|
|
269
|
+
const a = [], o = () => {
|
|
270
|
+
a.forEach((u) => u()), a.length = 0;
|
|
271
|
+
}, f = (u, c, i, h) => (u.addEventListener(c, i, h), () => u.removeEventListener(c, i, h)), b = le(
|
|
272
|
+
() => [B(r), I(l)],
|
|
273
|
+
([u, c]) => {
|
|
274
|
+
if (o(), !u)
|
|
275
275
|
return;
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
...t.flatMap((
|
|
276
|
+
const i = Ht(c) ? { ...c } : c;
|
|
277
|
+
a.push(
|
|
278
|
+
...t.flatMap((h) => n.map((m) => f(u, h, m, i)))
|
|
279
279
|
);
|
|
280
280
|
},
|
|
281
281
|
{ immediate: !0, flush: "post" }
|
|
282
|
-
),
|
|
282
|
+
), s = () => {
|
|
283
283
|
b(), o();
|
|
284
284
|
};
|
|
285
|
-
return je(
|
|
285
|
+
return je(s), s;
|
|
286
286
|
}
|
|
287
287
|
function Jt() {
|
|
288
|
-
const e =
|
|
289
|
-
return W() &&
|
|
288
|
+
const e = $(!1);
|
|
289
|
+
return W() && D(() => {
|
|
290
290
|
e.value = !0;
|
|
291
291
|
}), e;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
const
|
|
295
|
-
return C(() => (
|
|
293
|
+
function Qt(e) {
|
|
294
|
+
const r = Jt();
|
|
295
|
+
return C(() => (r.value, !!e()));
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Kt(e, r = {}) {
|
|
298
298
|
var t, n;
|
|
299
299
|
const {
|
|
300
|
-
pointerTypes:
|
|
301
|
-
preventDefault:
|
|
300
|
+
pointerTypes: l,
|
|
301
|
+
preventDefault: a,
|
|
302
302
|
stopPropagation: o,
|
|
303
|
-
exact:
|
|
303
|
+
exact: f,
|
|
304
304
|
onMove: b,
|
|
305
|
-
onEnd:
|
|
306
|
-
onStart:
|
|
307
|
-
initialValue:
|
|
308
|
-
axis:
|
|
309
|
-
draggingElement:
|
|
310
|
-
containerElement:
|
|
311
|
-
handle:
|
|
312
|
-
} =
|
|
313
|
-
(t = I(
|
|
314
|
-
),
|
|
315
|
-
I(
|
|
316
|
-
},
|
|
317
|
-
var
|
|
318
|
-
if (!
|
|
305
|
+
onEnd: s,
|
|
306
|
+
onStart: u,
|
|
307
|
+
initialValue: c,
|
|
308
|
+
axis: i = "both",
|
|
309
|
+
draggingElement: h = ue,
|
|
310
|
+
containerElement: m,
|
|
311
|
+
handle: k = e
|
|
312
|
+
} = r, p = $(
|
|
313
|
+
(t = I(c)) != null ? t : { x: 0, y: 0 }
|
|
314
|
+
), O = $(), j = (g) => l ? l.includes(g.pointerType) : !0, y = (g) => {
|
|
315
|
+
I(a) && g.preventDefault(), I(o) && g.stopPropagation();
|
|
316
|
+
}, S = (g) => {
|
|
317
|
+
var N;
|
|
318
|
+
if (!j(g) || I(f) && g.target !== I(e))
|
|
319
319
|
return;
|
|
320
|
-
const _ = I(
|
|
321
|
-
x:
|
|
322
|
-
y:
|
|
320
|
+
const _ = I(m), E = (N = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : N.call(_), L = I(e).getBoundingClientRect(), T = {
|
|
321
|
+
x: g.clientX - (_ ? L.left - E.left : L.left),
|
|
322
|
+
y: g.clientY - (_ ? L.top - E.top : L.top)
|
|
323
323
|
};
|
|
324
|
-
(
|
|
325
|
-
},
|
|
326
|
-
var
|
|
327
|
-
if (!
|
|
324
|
+
(u == null ? void 0 : u(T, g)) !== !1 && (O.value = T, y(g));
|
|
325
|
+
}, R = (g) => {
|
|
326
|
+
var N;
|
|
327
|
+
if (!j(g) || !O.value)
|
|
328
328
|
return;
|
|
329
|
-
const _ = I(
|
|
330
|
-
let { x:
|
|
331
|
-
(
|
|
332
|
-
x:
|
|
329
|
+
const _ = I(m), E = (N = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : N.call(_), L = I(e).getBoundingClientRect();
|
|
330
|
+
let { x: T, y: U } = p.value;
|
|
331
|
+
(i === "x" || i === "both") && (T = g.clientX - O.value.x, _ && (T = Math.min(Math.max(0, T), E.width - L.width))), (i === "y" || i === "both") && (U = g.clientY - O.value.y, _ && (U = Math.min(Math.max(0, U), E.height - L.height))), p.value = {
|
|
332
|
+
x: T,
|
|
333
333
|
y: U
|
|
334
|
-
}, b == null || b(
|
|
335
|
-
},
|
|
336
|
-
|
|
334
|
+
}, b == null || b(p.value, g), y(g);
|
|
335
|
+
}, K = (g) => {
|
|
336
|
+
j(g) && O.value && (O.value = void 0, s == null || s(p.value, g), y(g));
|
|
337
337
|
};
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
de(
|
|
338
|
+
if (Le) {
|
|
339
|
+
const g = { capture: (n = r.capture) != null ? n : !0 };
|
|
340
|
+
de(k, "pointerdown", S, g), de(h, "pointermove", R, g), de(h, "pointerup", K, g);
|
|
341
341
|
}
|
|
342
342
|
return {
|
|
343
|
-
...
|
|
344
|
-
position:
|
|
345
|
-
isDragging: C(() => !!
|
|
343
|
+
...Gt(p),
|
|
344
|
+
position: p,
|
|
345
|
+
isDragging: C(() => !!O.value),
|
|
346
346
|
style: C(
|
|
347
|
-
() => `left:${
|
|
347
|
+
() => `left:${p.value.x}px;top:${p.value.y}px;`
|
|
348
348
|
)
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
const { window: n =
|
|
353
|
-
let
|
|
354
|
-
const o =
|
|
355
|
-
|
|
356
|
-
}, b = C(() => Array.isArray(e) ? e.map((
|
|
351
|
+
function Zt(e, r, t = {}) {
|
|
352
|
+
const { window: n = ue, ...l } = t;
|
|
353
|
+
let a;
|
|
354
|
+
const o = Qt(() => n && "ResizeObserver" in n), f = () => {
|
|
355
|
+
a && (a.disconnect(), a = void 0);
|
|
356
|
+
}, b = C(() => Array.isArray(e) ? e.map((c) => B(c)) : [B(e)]), s = le(
|
|
357
357
|
b,
|
|
358
|
-
(
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
for (const
|
|
362
|
-
|
|
358
|
+
(c) => {
|
|
359
|
+
if (f(), o.value && n) {
|
|
360
|
+
a = new ResizeObserver(r);
|
|
361
|
+
for (const i of c)
|
|
362
|
+
i && a.observe(i, l);
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
366
|
-
),
|
|
367
|
-
|
|
366
|
+
), u = () => {
|
|
367
|
+
f(), s();
|
|
368
368
|
};
|
|
369
|
-
return je(
|
|
369
|
+
return je(u), {
|
|
370
370
|
isSupported: o,
|
|
371
|
-
stop:
|
|
371
|
+
stop: u
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
const { window: n =
|
|
376
|
-
var
|
|
377
|
-
return (
|
|
378
|
-
}), o =
|
|
374
|
+
function Y(e, r = { width: 0, height: 0 }, t = {}) {
|
|
375
|
+
const { window: n = ue, box: l = "content-box" } = t, a = C(() => {
|
|
376
|
+
var c, i;
|
|
377
|
+
return (i = (c = B(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : i.includes("svg");
|
|
378
|
+
}), o = $(r.width), f = $(r.height), { stop: b } = Zt(
|
|
379
379
|
e,
|
|
380
|
-
([
|
|
381
|
-
const
|
|
382
|
-
if (n &&
|
|
383
|
-
const
|
|
384
|
-
if (
|
|
385
|
-
const
|
|
386
|
-
o.value = Number.parseFloat(
|
|
380
|
+
([c]) => {
|
|
381
|
+
const i = l === "border-box" ? c.borderBoxSize : l === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
382
|
+
if (n && a.value) {
|
|
383
|
+
const h = B(e);
|
|
384
|
+
if (h) {
|
|
385
|
+
const m = n.getComputedStyle(h);
|
|
386
|
+
o.value = Number.parseFloat(m.width), f.value = Number.parseFloat(m.height);
|
|
387
387
|
}
|
|
388
|
-
} else if (
|
|
389
|
-
const
|
|
390
|
-
o.value =
|
|
388
|
+
} else if (i) {
|
|
389
|
+
const h = Array.isArray(i) ? i : [i];
|
|
390
|
+
o.value = h.reduce((m, { inlineSize: k }) => m + k, 0), f.value = h.reduce((m, { blockSize: k }) => m + k, 0);
|
|
391
391
|
} else
|
|
392
|
-
o.value =
|
|
392
|
+
o.value = c.contentRect.width, f.value = c.contentRect.height;
|
|
393
393
|
},
|
|
394
394
|
t
|
|
395
395
|
);
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
|
|
396
|
+
Xt(() => {
|
|
397
|
+
const c = B(e);
|
|
398
|
+
c && (o.value = "offsetWidth" in c ? c.offsetWidth : r.width, f.value = "offsetHeight" in c ? c.offsetHeight : r.height);
|
|
399
399
|
});
|
|
400
|
-
const
|
|
401
|
-
() =>
|
|
402
|
-
(
|
|
403
|
-
o.value =
|
|
400
|
+
const s = le(
|
|
401
|
+
() => B(e),
|
|
402
|
+
(c) => {
|
|
403
|
+
o.value = c ? r.width : 0, f.value = c ? r.height : 0;
|
|
404
404
|
}
|
|
405
405
|
);
|
|
406
|
-
function
|
|
407
|
-
b(),
|
|
406
|
+
function u() {
|
|
407
|
+
b(), s();
|
|
408
408
|
}
|
|
409
409
|
return {
|
|
410
410
|
width: o,
|
|
411
|
-
height:
|
|
412
|
-
stop:
|
|
411
|
+
height: f,
|
|
412
|
+
stop: u
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
const
|
|
415
|
+
const en = (e) => (et("data-v-189513f2"), e = e(), tt(), e), tn = { class: "title text-16px font-bold" }, nn = { class: "action" }, rn = ["form"], ln = {
|
|
416
416
|
key: 2,
|
|
417
417
|
class: "modal-loading"
|
|
418
|
-
},
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
], -1)),
|
|
424
|
-
|
|
425
|
-
],
|
|
418
|
+
}, on = /* @__PURE__ */ en(() => /* @__PURE__ */ w("div", { class: "lds-ring" }, [
|
|
419
|
+
/* @__PURE__ */ w("div"),
|
|
420
|
+
/* @__PURE__ */ w("div"),
|
|
421
|
+
/* @__PURE__ */ w("div"),
|
|
422
|
+
/* @__PURE__ */ w("div")
|
|
423
|
+
], -1)), an = [
|
|
424
|
+
on
|
|
425
|
+
], un = {
|
|
426
426
|
name: "ModalContainer",
|
|
427
427
|
inheritAttrs: !0
|
|
428
|
-
},
|
|
429
|
-
...
|
|
428
|
+
}, cn = /* @__PURE__ */ P({
|
|
429
|
+
...un,
|
|
430
430
|
props: {
|
|
431
431
|
id: {},
|
|
432
432
|
form: {},
|
|
@@ -455,65 +455,64 @@ const tn = (e) => (tt("data-v-8dfa7cd4"), e = e(), nt(), e), nn = { class: "titl
|
|
|
455
455
|
zIndex: { default: 1e3 }
|
|
456
456
|
},
|
|
457
457
|
emits: ["submit"],
|
|
458
|
-
setup(e, { expose:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
"635715bb": x.value
|
|
458
|
+
setup(e, { expose: r, emit: t }) {
|
|
459
|
+
Ue((d) => ({
|
|
460
|
+
b10a2d42: d.zIndex
|
|
462
461
|
}));
|
|
463
|
-
const n = e,
|
|
464
|
-
let
|
|
465
|
-
const
|
|
462
|
+
const n = e, l = t, a = ne(ae), o = $(!1);
|
|
463
|
+
let f = 0, b = 0;
|
|
464
|
+
const s = V(), u = V(), c = V(), i = V(), h = V(), m = V(), { height: k } = Y(s), { height: p } = Y(c, void 0, { box: "border-box" }), { height: O } = Y(i, void 0, { box: "border-box" }), { height: j } = Y(h), { height: y } = Y(m), { x: S, y: R } = Kt(c, {
|
|
466
465
|
initialValue: { x: 0, y: 0 }
|
|
467
466
|
});
|
|
468
|
-
function
|
|
469
|
-
|
|
467
|
+
function K() {
|
|
468
|
+
a == null || a.close(n.id);
|
|
470
469
|
}
|
|
471
|
-
function
|
|
472
|
-
return typeof
|
|
470
|
+
function g(d) {
|
|
471
|
+
return typeof d == "number" ? `${d}px` : d;
|
|
473
472
|
}
|
|
474
|
-
const
|
|
475
|
-
const
|
|
476
|
-
return n.mode === "dialog" && (
|
|
477
|
-
}),
|
|
478
|
-
const
|
|
479
|
-
return n.size && (
|
|
480
|
-
}), T = C(() => {
|
|
481
|
-
const s = {};
|
|
482
|
-
return n.draggable && !n.fullscreen && n.mode === "dialog" && (s.cursor = "move"), s;
|
|
473
|
+
const N = C(() => {
|
|
474
|
+
const d = {};
|
|
475
|
+
return n.mode === "dialog" && (d.justifyContent = "center"), n.mode === "drawer" && (d.justifyContent = "flex-end"), d;
|
|
476
|
+
}), _ = C(() => {
|
|
477
|
+
const d = {};
|
|
478
|
+
return n.size && (d.width = g(n.sizes[n.size])), n.width && (d.width = g(n.width)), n.maxWidth && (d.maxWidth = g(n.maxWidth)), n.fullscreen && (d.maxWidth = "unset", d.width = "100%", d.position = "fixed", d.top = 0, d.left = 0, d.bottom = 0, d.right = 0, d.borderRadius = 0), n.draggable && !n.fullscreen && n.mode === "dialog" && (d.transform = `translate3d(${S.value - f}px, ${R.value - b}px, 0px)`), n.mode === "drawer" && (d.borderRadius = 0, d.height = "100%"), n.offset && n.mode === "dialog" && (d.marginLeft = `${n.offset.x || 0}px`, d.marginTop = `${n.offset.y || 0}px`), n.backgroundColor && (d.backgroundColor = n.backgroundColor), d;
|
|
483
479
|
}), E = C(() => {
|
|
484
|
-
const
|
|
485
|
-
return n.
|
|
480
|
+
const d = {};
|
|
481
|
+
return n.draggable && !n.fullscreen && n.mode === "dialog" && (d.cursor = "move"), d;
|
|
482
|
+
}), L = C(() => {
|
|
483
|
+
const d = {}, M = j.value + y.value + p.value + O.value, Se = Math.floor(k.value * (Number(g(n.maxHeight).replace("%", "")) / 100));
|
|
484
|
+
return n.maxHeight && (d.maxHeight = `${Se - M}px`), n.mode === "drawer" && (d.maxHeight = "unset", d.height = `${k.value - M}px`), n.fullscreen && (d.maxHeight = "unset", d.height = `calc(100% - ${M}px)`), n.type !== "component" && (d.padding = "0"), n.bodyStyle && Object.assign(d, n.bodyStyle), d;
|
|
486
485
|
});
|
|
487
|
-
function
|
|
488
|
-
const
|
|
489
|
-
if (n.form &&
|
|
490
|
-
const M =
|
|
486
|
+
function T() {
|
|
487
|
+
const d = u.value;
|
|
488
|
+
if (n.form && d) {
|
|
489
|
+
const M = d.querySelector(`form[name="${n.form}"]`);
|
|
491
490
|
M && M.dispatchEvent(new Event("submit"));
|
|
492
491
|
}
|
|
493
|
-
|
|
492
|
+
l("submit");
|
|
494
493
|
}
|
|
495
|
-
function
|
|
496
|
-
|
|
494
|
+
function U() {
|
|
495
|
+
a == null || a.close(n.id);
|
|
497
496
|
}
|
|
498
|
-
function
|
|
497
|
+
function ze() {
|
|
499
498
|
window && window.addEventListener("resize", () => {
|
|
500
|
-
|
|
499
|
+
Q(s), Q(u), u.value && (f = u.value.offsetLeft, b = u.value.offsetTop);
|
|
501
500
|
});
|
|
502
501
|
}
|
|
503
502
|
function Pe() {
|
|
504
503
|
if (n.closeable && n.esc) {
|
|
505
|
-
const
|
|
506
|
-
M === "Escape" && (
|
|
504
|
+
const d = ({ key: M }) => {
|
|
505
|
+
M === "Escape" && (a == null || a.close(n.id), window.removeEventListener("keydown", d));
|
|
507
506
|
};
|
|
508
|
-
window.addEventListener("keydown",
|
|
507
|
+
window.addEventListener("keydown", d);
|
|
509
508
|
}
|
|
510
509
|
}
|
|
511
510
|
function Re() {
|
|
512
|
-
|
|
511
|
+
f = u.value.offsetLeft, b = u.value.offsetTop;
|
|
513
512
|
}
|
|
514
|
-
|
|
515
|
-
Pe(),
|
|
516
|
-
}),
|
|
513
|
+
D(() => {
|
|
514
|
+
Pe(), ze();
|
|
515
|
+
}), qe(() => {
|
|
517
516
|
});
|
|
518
517
|
function Ne() {
|
|
519
518
|
return o.value = !0, () => we();
|
|
@@ -521,83 +520,83 @@ const tn = (e) => (tt("data-v-8dfa7cd4"), e = e(), nt(), e), nn = { class: "titl
|
|
|
521
520
|
function we() {
|
|
522
521
|
o.value = !1;
|
|
523
522
|
}
|
|
524
|
-
return
|
|
523
|
+
return r({
|
|
525
524
|
showLoading: Ne,
|
|
526
525
|
hideLoading: we
|
|
527
|
-
}), (
|
|
526
|
+
}), (d, M) => (x(), F("div", {
|
|
528
527
|
ref_key: "wrapperRef",
|
|
529
|
-
ref:
|
|
528
|
+
ref: s,
|
|
530
529
|
class: "modal-wrapper",
|
|
531
|
-
style:
|
|
532
|
-
onClick: M[0] || (M[0] =
|
|
530
|
+
style: z(N.value),
|
|
531
|
+
onClick: M[0] || (M[0] = He((Se) => d.maskClosable && K(), ["self"]))
|
|
533
532
|
}, [
|
|
534
|
-
|
|
533
|
+
w("div", {
|
|
535
534
|
ref_key: "contentRef",
|
|
536
|
-
ref:
|
|
537
|
-
class:
|
|
538
|
-
style:
|
|
535
|
+
ref: u,
|
|
536
|
+
class: re(["modal-content", { [`${d.mode}-mode`]: !0 }]),
|
|
537
|
+
style: z(_.value)
|
|
539
538
|
}, [
|
|
540
|
-
|
|
539
|
+
d.header ? (x(), F("div", {
|
|
541
540
|
key: 0,
|
|
542
541
|
ref_key: "headerRef",
|
|
543
|
-
ref:
|
|
542
|
+
ref: c,
|
|
544
543
|
class: "modal-header",
|
|
545
|
-
style:
|
|
544
|
+
style: z(E.value),
|
|
546
545
|
onMousedown: Re
|
|
547
546
|
}, [
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
547
|
+
w("div", tn, A(d.title), 1),
|
|
548
|
+
w("div", nn, [
|
|
549
|
+
d.closeable ? (x(), F("div", {
|
|
551
550
|
key: 0,
|
|
552
551
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
553
|
-
onClick:
|
|
554
|
-
})) :
|
|
552
|
+
onClick: K
|
|
553
|
+
})) : H("", !0)
|
|
555
554
|
])
|
|
556
|
-
], 36)) :
|
|
557
|
-
|
|
555
|
+
], 36)) : H("", !0),
|
|
556
|
+
w("div", {
|
|
558
557
|
id: "modal-header-slot",
|
|
559
558
|
ref_key: "headerSlotRef",
|
|
560
|
-
ref:
|
|
559
|
+
ref: h
|
|
561
560
|
}, null, 512),
|
|
562
|
-
|
|
561
|
+
w("div", {
|
|
563
562
|
class: "modal-body",
|
|
564
|
-
style:
|
|
563
|
+
style: z(L.value)
|
|
565
564
|
}, [
|
|
566
|
-
(
|
|
565
|
+
(x(), te(_e(d.component), Ye(Ge(d.componentProps)), null, 16))
|
|
567
566
|
], 4),
|
|
568
|
-
|
|
567
|
+
w("div", {
|
|
569
568
|
id: "modal-footer-slot",
|
|
570
569
|
ref_key: "footerSlotRef",
|
|
571
|
-
ref:
|
|
570
|
+
ref: m
|
|
572
571
|
}, null, 512),
|
|
573
|
-
|
|
572
|
+
d.footer ? (x(), F("div", {
|
|
574
573
|
key: 1,
|
|
575
574
|
ref_key: "footerRef",
|
|
576
|
-
ref:
|
|
575
|
+
ref: i,
|
|
577
576
|
class: "modal-footer space-x-2"
|
|
578
577
|
}, [
|
|
579
|
-
|
|
578
|
+
w("button", {
|
|
580
579
|
class: "cancel-button",
|
|
581
580
|
type: "button",
|
|
582
|
-
onClick:
|
|
583
|
-
}, A(
|
|
584
|
-
|
|
581
|
+
onClick: U
|
|
582
|
+
}, A(d.cancelText), 1),
|
|
583
|
+
w("button", {
|
|
585
584
|
class: "submit-button",
|
|
586
|
-
form:
|
|
585
|
+
form: d.form,
|
|
587
586
|
type: "submit",
|
|
588
|
-
onClick:
|
|
589
|
-
}, A(
|
|
590
|
-
], 512)) :
|
|
591
|
-
o.value ? (
|
|
587
|
+
onClick: T
|
|
588
|
+
}, A(d.submitText), 9, rn)
|
|
589
|
+
], 512)) : H("", !0),
|
|
590
|
+
o.value ? (x(), F("div", ln, an)) : H("", !0)
|
|
592
591
|
], 6)
|
|
593
592
|
], 4));
|
|
594
593
|
}
|
|
595
|
-
}), be = (e,
|
|
594
|
+
}), be = (e, r) => {
|
|
596
595
|
const t = e.__vccOpts || e;
|
|
597
|
-
for (const [n,
|
|
598
|
-
t[n] =
|
|
596
|
+
for (const [n, l] of r)
|
|
597
|
+
t[n] = l;
|
|
599
598
|
return t;
|
|
600
|
-
},
|
|
599
|
+
}, sn = /* @__PURE__ */ be(cn, [["__scopeId", "data-v-189513f2"]]), dn = { class: "modal-dialog" }, fn = { class: "dialog-body" }, mn = { class: "dialog-title" }, hn = { class: "dialog-content" }, vn = /* @__PURE__ */ P({
|
|
601
600
|
__name: "modal-dialog",
|
|
602
601
|
props: {
|
|
603
602
|
type: {},
|
|
@@ -610,52 +609,52 @@ const tn = (e) => (tt("data-v-8dfa7cd4"), e = e(), nt(), e), nn = { class: "titl
|
|
|
610
609
|
footer: {}
|
|
611
610
|
},
|
|
612
611
|
setup(e) {
|
|
613
|
-
const
|
|
612
|
+
const r = e, t = Te(), n = C(() => r.title ? r.title : {
|
|
614
613
|
confirm: "提示",
|
|
615
614
|
info: "提示",
|
|
616
615
|
warning: "警告",
|
|
617
616
|
error: "错误",
|
|
618
617
|
success: "成功"
|
|
619
|
-
}[
|
|
620
|
-
async function
|
|
621
|
-
|
|
618
|
+
}[r.type]);
|
|
619
|
+
async function l() {
|
|
620
|
+
r.onOk && await r.onOk(), t.close();
|
|
622
621
|
}
|
|
623
|
-
async function
|
|
624
|
-
|
|
622
|
+
async function a() {
|
|
623
|
+
r.onCancel && await r.onCancel(), t.close();
|
|
625
624
|
}
|
|
626
|
-
return (o,
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
625
|
+
return (o, f) => (x(), F("section", dn, [
|
|
626
|
+
w("div", fn, [
|
|
627
|
+
w("div", mn, A(n.value), 1),
|
|
628
|
+
w("div", hn, A(o.content), 1)
|
|
630
629
|
]),
|
|
631
|
-
|
|
630
|
+
w("div", {
|
|
632
631
|
class: "dialog-footer space-x-2",
|
|
633
|
-
style:
|
|
632
|
+
style: z(o.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
634
633
|
}, [
|
|
635
|
-
o.footer ? (
|
|
636
|
-
|
|
634
|
+
o.footer ? (x(), te(_e(o.footer), { key: 0 })) : (x(), F(me, { key: 1 }, [
|
|
635
|
+
w("button", {
|
|
637
636
|
class: "submit-button",
|
|
638
637
|
type: "submit",
|
|
639
|
-
onClick:
|
|
638
|
+
onClick: l
|
|
640
639
|
}, A(o.okText), 1),
|
|
641
|
-
o.type === "confirm" ? (
|
|
640
|
+
o.type === "confirm" ? (x(), F("button", {
|
|
642
641
|
key: 0,
|
|
643
642
|
class: "cancel-button",
|
|
644
643
|
type: "button",
|
|
645
|
-
onClick:
|
|
646
|
-
}, A(o.cancelText), 1)) :
|
|
644
|
+
onClick: a
|
|
645
|
+
}, A(o.cancelText), 1)) : H("", !0)
|
|
647
646
|
], 64))
|
|
648
647
|
], 4)
|
|
649
648
|
]));
|
|
650
649
|
}
|
|
651
|
-
}),
|
|
650
|
+
}), pn = /* @__PURE__ */ be(vn, [["__scopeId", "data-v-8326e5a5"]]), yn = {
|
|
652
651
|
key: 0,
|
|
653
652
|
class: "modal-teleport"
|
|
654
|
-
},
|
|
653
|
+
}, gn = {
|
|
655
654
|
name: "ModalProvider",
|
|
656
655
|
inheritAttrs: !0
|
|
657
|
-
},
|
|
658
|
-
...
|
|
656
|
+
}, bn = /* @__PURE__ */ P({
|
|
657
|
+
...gn,
|
|
659
658
|
props: {
|
|
660
659
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
661
660
|
sizes: { default: () => ({
|
|
@@ -667,148 +666,149 @@ const tn = (e) => (tt("data-v-8dfa7cd4"), e = e(), nt(), e), nn = { class: "titl
|
|
|
667
666
|
maxHeight: { default: "90%" },
|
|
668
667
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
669
668
|
},
|
|
670
|
-
setup(e, { expose:
|
|
671
|
-
const t = V([]), n =
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
() => Promise.resolve(typeof f == "string" ? yn : f)
|
|
669
|
+
setup(e, { expose: r }) {
|
|
670
|
+
const t = V([]), n = $(!1), l = W();
|
|
671
|
+
function a(i, h = {}, m = {}) {
|
|
672
|
+
const k = We(
|
|
673
|
+
() => Promise.resolve(typeof i == "string" ? pn : i)
|
|
676
674
|
);
|
|
677
|
-
typeof
|
|
678
|
-
const
|
|
675
|
+
typeof i == "string" && (h.type = i, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
|
|
676
|
+
const p = Math.random().toString(32).slice(2), O = Object.assign({
|
|
677
|
+
zIndex: typeof i == "string" ? 1100 : 1e3
|
|
678
|
+
}, m), j = new Promise((y, S) => {
|
|
679
679
|
t.value.push({
|
|
680
|
-
id:
|
|
681
|
-
component:
|
|
682
|
-
props:
|
|
680
|
+
id: p,
|
|
681
|
+
component: k,
|
|
682
|
+
props: h || {},
|
|
683
683
|
options: {
|
|
684
|
-
...
|
|
685
|
-
type: typeof
|
|
684
|
+
...O,
|
|
685
|
+
type: typeof i == "string" ? i : "component"
|
|
686
686
|
},
|
|
687
|
-
resolve:
|
|
688
|
-
reject:
|
|
687
|
+
resolve: y,
|
|
688
|
+
reject: S,
|
|
689
689
|
listeners: []
|
|
690
|
-
}),
|
|
691
|
-
}).catch((
|
|
692
|
-
}) : Promise.reject(
|
|
693
|
-
return Object.assign(
|
|
694
|
-
close: () =>
|
|
690
|
+
}), Q(t);
|
|
691
|
+
}).catch((y) => y === "CANCEL" ? new Promise(() => {
|
|
692
|
+
}) : Promise.reject(y));
|
|
693
|
+
return Object.assign(j, {
|
|
694
|
+
close: () => o(p)
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
const
|
|
699
|
-
if (
|
|
697
|
+
function o(i, h) {
|
|
698
|
+
const m = t.value.findIndex((p) => p.id === i);
|
|
699
|
+
if (m < 0)
|
|
700
700
|
return;
|
|
701
|
-
const
|
|
702
|
-
|
|
701
|
+
const k = t.value[m];
|
|
702
|
+
h === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(h), t.value.splice(m, 1), Q(t);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
!t.value || t.value.length === 0 || (t.value.forEach((
|
|
706
|
-
|
|
707
|
-
}), t.value = [],
|
|
704
|
+
function f() {
|
|
705
|
+
!t.value || t.value.length === 0 || (t.value.forEach((i) => {
|
|
706
|
+
i == null || i.reject("CANCEL");
|
|
707
|
+
}), t.value = [], Q(t));
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
if (!
|
|
709
|
+
function b(i, h) {
|
|
710
|
+
const m = t.value.find((p) => p.id === i);
|
|
711
|
+
if (!m)
|
|
712
712
|
return;
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
open:
|
|
716
|
-
close: (
|
|
717
|
-
closeAll:
|
|
718
|
-
showLoading: () =>
|
|
719
|
-
hideLoading: () => u(
|
|
720
|
-
confirm: (
|
|
721
|
-
success: (
|
|
722
|
-
error: (
|
|
723
|
-
warning: (
|
|
724
|
-
info: (
|
|
713
|
+
const k = m.listeners.find((p) => p.event === h);
|
|
714
|
+
k && k.callback({
|
|
715
|
+
open: a,
|
|
716
|
+
close: (p) => o(m.id, p),
|
|
717
|
+
closeAll: f,
|
|
718
|
+
showLoading: () => s(m.id),
|
|
719
|
+
hideLoading: () => u(m.id),
|
|
720
|
+
confirm: (p) => a("confirm", p),
|
|
721
|
+
success: (p) => a("success", p),
|
|
722
|
+
error: (p) => a("error", p),
|
|
723
|
+
warning: (p) => a("warning", p),
|
|
724
|
+
info: (p) => a("info", p)
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
if (!
|
|
727
|
+
function s(i) {
|
|
728
|
+
if (!l)
|
|
729
729
|
return;
|
|
730
|
-
const [
|
|
731
|
-
if (
|
|
732
|
-
return
|
|
730
|
+
const [h] = l.refs[`modal-container_${i}`];
|
|
731
|
+
if (h)
|
|
732
|
+
return h.showLoading();
|
|
733
733
|
}
|
|
734
|
-
function u(
|
|
735
|
-
if (!
|
|
734
|
+
function u(i) {
|
|
735
|
+
if (!l)
|
|
736
736
|
return;
|
|
737
|
-
const [
|
|
738
|
-
if (
|
|
739
|
-
return
|
|
737
|
+
const [h] = l.refs[`modal-container_${i}`];
|
|
738
|
+
if (h)
|
|
739
|
+
return h.hideLoading();
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
event:
|
|
745
|
-
callback:
|
|
741
|
+
function c(i, h, m) {
|
|
742
|
+
const k = t.value.find((p) => p.id === i);
|
|
743
|
+
k && k.listeners.push({
|
|
744
|
+
event: h,
|
|
745
|
+
callback: m
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
return fe(
|
|
749
|
-
open:
|
|
750
|
-
close:
|
|
751
|
-
closeAll:
|
|
752
|
-
addEventListener:
|
|
753
|
-
}),
|
|
748
|
+
return fe(ae, {
|
|
749
|
+
open: a,
|
|
750
|
+
close: o,
|
|
751
|
+
closeAll: f,
|
|
752
|
+
addEventListener: c
|
|
753
|
+
}), r({
|
|
754
754
|
elements: t,
|
|
755
|
-
open:
|
|
756
|
-
close:
|
|
757
|
-
closeAll:
|
|
758
|
-
}),
|
|
755
|
+
open: a,
|
|
756
|
+
close: o,
|
|
757
|
+
closeAll: f
|
|
758
|
+
}), D(() => {
|
|
759
759
|
n.value = !0;
|
|
760
|
-
}), (
|
|
761
|
-
|
|
762
|
-
n.value ? (
|
|
763
|
-
(
|
|
764
|
-
disabled: !
|
|
765
|
-
to: typeof
|
|
760
|
+
}), (i, h) => (x(), F(me, null, [
|
|
761
|
+
Ee(i.$slots, "default", {}, void 0, !0),
|
|
762
|
+
n.value ? (x(), F("div", yn, [
|
|
763
|
+
(x(), te(Ve, {
|
|
764
|
+
disabled: !i.appendToBody,
|
|
765
|
+
to: typeof i.appendToBody == "string" ? i.appendToBody : "body"
|
|
766
766
|
}, [
|
|
767
|
-
|
|
767
|
+
v(Ae, { name: "modal-fade" }, {
|
|
768
768
|
default: Be(() => [
|
|
769
|
-
(
|
|
770
|
-
id:
|
|
771
|
-
key:
|
|
769
|
+
(x(!0), F(me, null, De(t.value, (m) => (x(), te(sn, Oe({
|
|
770
|
+
id: m.id,
|
|
771
|
+
key: m.id,
|
|
772
772
|
ref_for: !0,
|
|
773
|
-
ref: `modal-container_${
|
|
774
|
-
component:
|
|
775
|
-
"component-props":
|
|
776
|
-
"max-height":
|
|
777
|
-
"max-width":
|
|
778
|
-
offset:
|
|
779
|
-
sizes:
|
|
780
|
-
},
|
|
781
|
-
onSubmit: () =>
|
|
773
|
+
ref: `modal-container_${m.id}`,
|
|
774
|
+
component: m.component,
|
|
775
|
+
"component-props": m.props,
|
|
776
|
+
"max-height": i.maxHeight,
|
|
777
|
+
"max-width": i.maxWidth,
|
|
778
|
+
offset: i.offset,
|
|
779
|
+
sizes: i.sizes
|
|
780
|
+
}, m.options, {
|
|
781
|
+
onSubmit: () => b(m.id, "submit")
|
|
782
782
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
783
783
|
]),
|
|
784
784
|
_: 1
|
|
785
785
|
})
|
|
786
786
|
], 8, ["disabled", "to"]))
|
|
787
|
-
])) :
|
|
787
|
+
])) : H("", !0)
|
|
788
788
|
], 64));
|
|
789
789
|
}
|
|
790
|
-
}),
|
|
791
|
-
function
|
|
790
|
+
}), kn = /* @__PURE__ */ be(bn, [["__scopeId", "data-v-45a851d0"]]);
|
|
791
|
+
function ee(e, r) {
|
|
792
792
|
var t, n;
|
|
793
|
-
let
|
|
794
|
-
for (;
|
|
795
|
-
|
|
796
|
-
return ((n =
|
|
793
|
+
let l = e == null ? void 0 : e.parent;
|
|
794
|
+
for (; l && ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) !== r; )
|
|
795
|
+
l = l.parent;
|
|
796
|
+
return ((n = l == null ? void 0 : l.type) == null ? void 0 : n.name) === r ? l : null;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
const e =
|
|
800
|
-
function t(n,
|
|
798
|
+
function Te() {
|
|
799
|
+
const e = ne(ae), r = W();
|
|
800
|
+
function t(n, l, a) {
|
|
801
801
|
if (!e)
|
|
802
802
|
throw new Error("Not Found Modal Provider Component");
|
|
803
|
-
return e.open(n,
|
|
803
|
+
return e.open(n, l, a);
|
|
804
804
|
}
|
|
805
805
|
return {
|
|
806
806
|
open: t,
|
|
807
807
|
close(n) {
|
|
808
|
-
var
|
|
808
|
+
var l;
|
|
809
809
|
if (!e)
|
|
810
810
|
throw new Error("Not Found Modal Provider Component");
|
|
811
|
-
const
|
|
811
|
+
const a = ee(r, "ModalContainer"), o = (l = a == null ? void 0 : a.props) == null ? void 0 : l.id;
|
|
812
812
|
if (!o)
|
|
813
813
|
throw new Error("Not Found Current Modal Container");
|
|
814
814
|
e.close(o, n);
|
|
@@ -822,19 +822,19 @@ function Le() {
|
|
|
822
822
|
var n;
|
|
823
823
|
if (!e)
|
|
824
824
|
throw new Error("Not Found Modal Provider Component");
|
|
825
|
-
const
|
|
826
|
-
if (!((n =
|
|
825
|
+
const l = ee(r, "ModalContainer");
|
|
826
|
+
if (!((n = l == null ? void 0 : l.props) != null && n.id))
|
|
827
827
|
throw new Error("Not Found Current Modal Container");
|
|
828
|
-
|
|
828
|
+
l != null && l.exposed && (l == null || l.exposed.showLoading());
|
|
829
829
|
},
|
|
830
830
|
hideLoading() {
|
|
831
831
|
var n;
|
|
832
832
|
if (!e)
|
|
833
833
|
throw new Error("Not Found Modal Provider Component");
|
|
834
|
-
const
|
|
835
|
-
if (!((n =
|
|
834
|
+
const l = ee(r, "ModalContainer");
|
|
835
|
+
if (!((n = l == null ? void 0 : l.props) != null && n.id))
|
|
836
836
|
throw new Error("Not Found Current Modal Container");
|
|
837
|
-
|
|
837
|
+
l != null && l.exposed && (l == null || l.exposed.hideLoading());
|
|
838
838
|
},
|
|
839
839
|
confirm(n) {
|
|
840
840
|
return this.open("confirm", n);
|
|
@@ -853,82 +853,82 @@ function Le() {
|
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
function
|
|
857
|
-
var
|
|
858
|
-
const t =
|
|
859
|
-
t &&
|
|
856
|
+
function wn(e) {
|
|
857
|
+
var r;
|
|
858
|
+
const t = ne(ae), n = W(), l = ee(n, "ModalContainer"), a = (r = l == null ? void 0 : l.props) == null ? void 0 : r.id;
|
|
859
|
+
t && a && t.addEventListener(a, "submit", e);
|
|
860
860
|
}
|
|
861
861
|
const $e = {
|
|
862
862
|
id: Symbol("ID"),
|
|
863
863
|
source: Symbol("Source")
|
|
864
864
|
};
|
|
865
|
-
function Sn(e,
|
|
866
|
-
const t =
|
|
867
|
-
return e == null || e.forEach((
|
|
868
|
-
let
|
|
869
|
-
|
|
870
|
-
}), [t, (
|
|
871
|
-
t.value =
|
|
865
|
+
function Sn(e, r) {
|
|
866
|
+
const t = $({});
|
|
867
|
+
return e == null || e.forEach((l) => {
|
|
868
|
+
let a = null;
|
|
869
|
+
l.default && (a = (typeof l.default == "function" ? l.default() : l.default) || null), r && r[l.key] !== void 0 && (a = r[l.key]), t.value[l.key] = a;
|
|
870
|
+
}), [t, (l) => {
|
|
871
|
+
t.value = l;
|
|
872
872
|
}];
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
function
|
|
874
|
+
function xn(e) {
|
|
875
|
+
function r(t, n) {
|
|
876
876
|
return e != null && e.disabledDate ? e.disabledDate(t, n) : !1;
|
|
877
877
|
}
|
|
878
878
|
return (t, n) => {
|
|
879
879
|
switch (e == null ? void 0 : e.type) {
|
|
880
880
|
case "week":
|
|
881
|
-
return
|
|
881
|
+
return v(it, {
|
|
882
882
|
modelValue: t[n.key],
|
|
883
|
-
"onUpdate:modelValue": (
|
|
884
|
-
"disabled-date":
|
|
883
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
884
|
+
"disabled-date": r,
|
|
885
885
|
format: e == null ? void 0 : e.labelFormat,
|
|
886
886
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
887
887
|
}, null);
|
|
888
888
|
case "month":
|
|
889
|
-
return
|
|
889
|
+
return v(ut, {
|
|
890
890
|
modelValue: t[n.key],
|
|
891
|
-
"onUpdate:modelValue": (
|
|
892
|
-
"disabled-date":
|
|
891
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
892
|
+
"disabled-date": r,
|
|
893
893
|
format: e == null ? void 0 : e.labelFormat,
|
|
894
894
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
895
895
|
}, null);
|
|
896
896
|
case "quarter":
|
|
897
|
-
return
|
|
897
|
+
return v(at, {
|
|
898
898
|
modelValue: t[n.key],
|
|
899
|
-
"onUpdate:modelValue": (
|
|
900
|
-
"disabled-date":
|
|
899
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
900
|
+
"disabled-date": r,
|
|
901
901
|
format: e == null ? void 0 : e.labelFormat,
|
|
902
902
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
903
903
|
}, null);
|
|
904
904
|
case "year":
|
|
905
|
-
return
|
|
905
|
+
return v(ot, {
|
|
906
906
|
modelValue: t[n.key],
|
|
907
|
-
"onUpdate:modelValue": (
|
|
908
|
-
"disabled-date":
|
|
907
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
908
|
+
"disabled-date": r,
|
|
909
909
|
format: e == null ? void 0 : e.labelFormat,
|
|
910
910
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
911
911
|
}, null);
|
|
912
912
|
case "date":
|
|
913
913
|
default:
|
|
914
|
-
return
|
|
914
|
+
return v(lt, {
|
|
915
915
|
"disabled-input": !0,
|
|
916
916
|
modelValue: t[n.key],
|
|
917
|
-
"onUpdate:modelValue": (
|
|
918
|
-
"disabled-date":
|
|
917
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
918
|
+
"disabled-date": r,
|
|
919
919
|
format: e == null ? void 0 : e.labelFormat,
|
|
920
920
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
921
921
|
}, null);
|
|
922
922
|
}
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return (
|
|
925
|
+
function Cn(e) {
|
|
926
|
+
return (r, t) => {
|
|
927
927
|
switch (e == null ? void 0 : e.type) {
|
|
928
928
|
case "number":
|
|
929
|
-
return
|
|
930
|
-
modelValue:
|
|
931
|
-
"onUpdate:modelValue": (n) =>
|
|
929
|
+
return v(st, {
|
|
930
|
+
modelValue: r[t.key],
|
|
931
|
+
"onUpdate:modelValue": (n) => r[t.key] = n,
|
|
932
932
|
hideButton: !0,
|
|
933
933
|
"read-only": e == null ? void 0 : e.readonly,
|
|
934
934
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
@@ -936,9 +936,9 @@ function $n(e) {
|
|
|
936
936
|
}, null);
|
|
937
937
|
case "string":
|
|
938
938
|
default:
|
|
939
|
-
return
|
|
940
|
-
modelValue:
|
|
941
|
-
"onUpdate:modelValue": (n) =>
|
|
939
|
+
return v(ct, {
|
|
940
|
+
modelValue: r[t.key],
|
|
941
|
+
"onUpdate:modelValue": (n) => r[t.key] = n,
|
|
942
942
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
943
943
|
readonly: e == null ? void 0 : e.readonly,
|
|
944
944
|
allowClear: e == null ? void 0 : e.clearable
|
|
@@ -947,57 +947,57 @@ function $n(e) {
|
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
949
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
950
|
-
function ke(e,
|
|
951
|
-
const n = le(e, (...
|
|
950
|
+
function ke(e, r, t) {
|
|
951
|
+
const n = le(e, (...l) => (Ie(() => n()), r(...l)), t);
|
|
952
952
|
return n;
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
954
|
+
function $n(e) {
|
|
955
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
|
|
956
956
|
}
|
|
957
|
-
const
|
|
958
|
-
function
|
|
959
|
-
const e =
|
|
957
|
+
const G = /* @__PURE__ */ new WeakMap();
|
|
958
|
+
function Fn() {
|
|
959
|
+
const e = $(/* @__PURE__ */ new Map());
|
|
960
960
|
return [e, (t) => e.value = t];
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
let
|
|
964
|
-
const [n,
|
|
965
|
-
if (!e.autoSumbit || !
|
|
962
|
+
function On(e) {
|
|
963
|
+
let r, t = !1;
|
|
964
|
+
const [n, l] = Fn(), a = () => {
|
|
965
|
+
if (!e.autoSumbit || !r)
|
|
966
966
|
return;
|
|
967
|
-
let
|
|
968
|
-
for (;
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}, o = (
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
const
|
|
976
|
-
switch (typeof
|
|
967
|
+
let s = r;
|
|
968
|
+
for (; s && s.$el.tagName !== "FORM"; )
|
|
969
|
+
s = s.$parent;
|
|
970
|
+
s && s.$el && s.$el.dispatchEvent(new Event("submit"));
|
|
971
|
+
}, o = (s, u) => {
|
|
972
|
+
const c = s();
|
|
973
|
+
c instanceof Promise ? c.then(u) : u(c);
|
|
974
|
+
}, f = async () => {
|
|
975
|
+
const s = G.get(e.options);
|
|
976
|
+
switch (typeof s) {
|
|
977
977
|
case "function":
|
|
978
|
-
|
|
978
|
+
G.set(e.options, l);
|
|
979
979
|
return;
|
|
980
980
|
case "object":
|
|
981
|
-
|
|
981
|
+
l(s);
|
|
982
982
|
return;
|
|
983
983
|
}
|
|
984
|
-
|
|
985
|
-
const
|
|
986
|
-
|
|
984
|
+
G.set(e.options, l), o(e.options, (u) => {
|
|
985
|
+
const c = G.get(e.options);
|
|
986
|
+
G.set(e.options, u), c(u);
|
|
987
987
|
});
|
|
988
988
|
}, b = () => {
|
|
989
|
-
o(e.options, (
|
|
990
|
-
|
|
989
|
+
o(e.options, (s) => {
|
|
990
|
+
l(s);
|
|
991
991
|
});
|
|
992
992
|
};
|
|
993
993
|
switch (!0) {
|
|
994
994
|
case e.options instanceof Function: {
|
|
995
|
-
e.cache !== !1 ?
|
|
995
|
+
e.cache !== !1 ? f() : b();
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
|
-
case
|
|
998
|
+
case oe(e.options): {
|
|
999
999
|
ke(e.options, () => {
|
|
1000
|
-
|
|
1000
|
+
l(e.options.value);
|
|
1001
1001
|
}, {
|
|
1002
1002
|
immediate: !0
|
|
1003
1003
|
});
|
|
@@ -1006,65 +1006,65 @@ function _n(e) {
|
|
|
1006
1006
|
default:
|
|
1007
1007
|
n.value = e.options;
|
|
1008
1008
|
}
|
|
1009
|
-
return (
|
|
1010
|
-
let
|
|
1011
|
-
return e.default && !t && (
|
|
1012
|
-
ref: (
|
|
1009
|
+
return (s, u) => {
|
|
1010
|
+
let c;
|
|
1011
|
+
return e.default && !t && (s[u.key] = e.default, t = !0), v(dt, {
|
|
1012
|
+
ref: (i) => r = i,
|
|
1013
1013
|
multiple: e.multiple,
|
|
1014
|
-
modelValue:
|
|
1015
|
-
"onUpdate:modelValue": (
|
|
1014
|
+
modelValue: s[u.key],
|
|
1015
|
+
"onUpdate:modelValue": (i) => s[u.key] = i,
|
|
1016
1016
|
placeholder: e.placeholder,
|
|
1017
1017
|
allowClear: e.clearable,
|
|
1018
1018
|
allowSearch: e.searchable,
|
|
1019
1019
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1020
|
-
onChange:
|
|
1021
|
-
},
|
|
1022
|
-
key:
|
|
1023
|
-
value:
|
|
1024
|
-
label:
|
|
1025
|
-
}, null))) ?
|
|
1026
|
-
default: () => [
|
|
1020
|
+
onChange: a
|
|
1021
|
+
}, $n(c = Array.from(n.value.entries()).map(([i, h]) => v(ft, {
|
|
1022
|
+
key: i,
|
|
1023
|
+
value: i,
|
|
1024
|
+
label: h
|
|
1025
|
+
}, null))) ? c : {
|
|
1026
|
+
default: () => [c]
|
|
1027
1027
|
});
|
|
1028
1028
|
};
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1031
|
-
function
|
|
1030
|
+
function _n(e) {
|
|
1031
|
+
function r() {
|
|
1032
1032
|
e != null && e.autoSumbit;
|
|
1033
1033
|
}
|
|
1034
|
-
return (t, n) => (e != null && e.default && (t[n.key] = e.default),
|
|
1034
|
+
return (t, n) => (e != null && e.default && (t[n.key] = e.default), v(mt, {
|
|
1035
1035
|
modelValue: t[n.key],
|
|
1036
|
-
"onUpdate:modelValue": (
|
|
1036
|
+
"onUpdate:modelValue": (l) => t[n.key] = l,
|
|
1037
1037
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1038
1038
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1039
1039
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
1040
1040
|
uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
|
|
1041
|
-
onChange:
|
|
1041
|
+
onChange: r
|
|
1042
1042
|
}, null));
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
return (
|
|
1044
|
+
function In(e) {
|
|
1045
|
+
return (r, t) => {
|
|
1046
1046
|
let n = [];
|
|
1047
|
-
function
|
|
1048
|
-
n =
|
|
1047
|
+
function l(f) {
|
|
1048
|
+
n = f;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
if (
|
|
1052
|
-
const [b,
|
|
1053
|
-
|
|
1050
|
+
function a(f) {
|
|
1051
|
+
if (f && f.length === 2) {
|
|
1052
|
+
const [b, s] = f.sort(), u = Ce(b).startOf("days"), c = Ce(s).endOf("days");
|
|
1053
|
+
r[t.key] = [u.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), c.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
|
-
function o(
|
|
1057
|
-
return e != null && e.disabledDate ? e.disabledDate(n,
|
|
1056
|
+
function o(f) {
|
|
1057
|
+
return e != null && e.disabledDate ? e.disabledDate(n, f) : !1;
|
|
1058
1058
|
}
|
|
1059
|
-
return
|
|
1059
|
+
return v("div", null, [v(ht, {
|
|
1060
1060
|
"disabled-input": !0,
|
|
1061
1061
|
style: {
|
|
1062
1062
|
width: "300px"
|
|
1063
1063
|
},
|
|
1064
|
-
modelValue:
|
|
1065
|
-
"onUpdate:modelValue": (
|
|
1066
|
-
onSelect:
|
|
1067
|
-
onChange:
|
|
1064
|
+
modelValue: r[t.key],
|
|
1065
|
+
"onUpdate:modelValue": (f) => r[t.key] = f,
|
|
1066
|
+
onSelect: l,
|
|
1067
|
+
onChange: a,
|
|
1068
1068
|
mode: e == null ? void 0 : e.type,
|
|
1069
1069
|
allowClear: e == null ? void 0 : e.clearable,
|
|
1070
1070
|
"disabled-date": o,
|
|
@@ -1073,59 +1073,59 @@ function Mn(e) {
|
|
|
1073
1073
|
}, null)]);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return (
|
|
1078
|
-
modelValue:
|
|
1079
|
-
"onUpdate:modelValue": (n) =>
|
|
1076
|
+
function Mn(e) {
|
|
1077
|
+
return (r, t) => v(vt, {
|
|
1078
|
+
modelValue: r[t.key],
|
|
1079
|
+
"onUpdate:modelValue": (n) => r[t.key] = n,
|
|
1080
1080
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1081
1081
|
autoSize: e == null ? void 0 : e.autosize,
|
|
1082
1082
|
maxLength: e == null ? void 0 : e.maxLength
|
|
1083
1083
|
}, null);
|
|
1084
1084
|
}
|
|
1085
1085
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1086
|
-
function
|
|
1087
|
-
const e =
|
|
1086
|
+
function jn() {
|
|
1087
|
+
const e = $([]);
|
|
1088
1088
|
return [e, (t) => e.value = t];
|
|
1089
1089
|
}
|
|
1090
1090
|
function Ln(e) {
|
|
1091
|
-
let
|
|
1092
|
-
const [n,
|
|
1093
|
-
if (!e.autoSumbit || !
|
|
1091
|
+
let r, t = !1;
|
|
1092
|
+
const [n, l] = jn(), a = () => {
|
|
1093
|
+
if (!e.autoSumbit || !r)
|
|
1094
1094
|
return;
|
|
1095
|
-
let
|
|
1096
|
-
for (;
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}, o = (
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
},
|
|
1103
|
-
const
|
|
1104
|
-
switch (typeof
|
|
1095
|
+
let u = r;
|
|
1096
|
+
for (; u && u.$el.tagName !== "FORM"; )
|
|
1097
|
+
u = u.$parent;
|
|
1098
|
+
u && u.$el && u.$el.dispatchEvent(new Event("submit"));
|
|
1099
|
+
}, o = (u, c) => {
|
|
1100
|
+
const i = u();
|
|
1101
|
+
i instanceof Promise ? i.then(c) : c(i);
|
|
1102
|
+
}, f = async () => {
|
|
1103
|
+
const u = X.get(e.options);
|
|
1104
|
+
switch (typeof u) {
|
|
1105
1105
|
case "function":
|
|
1106
|
-
X.set(e.options,
|
|
1106
|
+
X.set(e.options, l);
|
|
1107
1107
|
return;
|
|
1108
1108
|
case "object":
|
|
1109
|
-
|
|
1109
|
+
l(u);
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
|
-
X.set(e.options,
|
|
1113
|
-
const
|
|
1114
|
-
X.set(e.options,
|
|
1112
|
+
X.set(e.options, l), o(e.options, (c) => {
|
|
1113
|
+
const i = X.get(e.options);
|
|
1114
|
+
X.set(e.options, c), i(c);
|
|
1115
1115
|
});
|
|
1116
1116
|
}, b = () => {
|
|
1117
|
-
o(e.options, (
|
|
1118
|
-
|
|
1117
|
+
o(e.options, (u) => {
|
|
1118
|
+
l(u);
|
|
1119
1119
|
});
|
|
1120
1120
|
};
|
|
1121
1121
|
switch (!0) {
|
|
1122
1122
|
case e.options instanceof Function: {
|
|
1123
|
-
e.cache !== !1 ?
|
|
1123
|
+
e.cache !== !1 ? f() : b();
|
|
1124
1124
|
break;
|
|
1125
1125
|
}
|
|
1126
|
-
case
|
|
1126
|
+
case oe(e.options): {
|
|
1127
1127
|
ke(e.options, () => {
|
|
1128
|
-
|
|
1128
|
+
l(e.options.value);
|
|
1129
1129
|
}, {
|
|
1130
1130
|
immediate: !0
|
|
1131
1131
|
});
|
|
@@ -1134,22 +1134,22 @@ function Ln(e) {
|
|
|
1134
1134
|
default:
|
|
1135
1135
|
n.value = e.options;
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1138
|
-
var
|
|
1139
|
-
const
|
|
1140
|
-
return
|
|
1137
|
+
function s(u, c) {
|
|
1138
|
+
var m;
|
|
1139
|
+
const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
|
|
1140
|
+
return h ? h.toLowerCase().includes(u.toLowerCase()) : !1;
|
|
1141
1141
|
}
|
|
1142
|
-
return (
|
|
1143
|
-
ref: (
|
|
1142
|
+
return (u, c) => (e.default && !t && (u[c.key] = e.default, t = !0), v(pt, {
|
|
1143
|
+
ref: (i) => r = i,
|
|
1144
1144
|
multiple: e.multiple,
|
|
1145
|
-
modelValue:
|
|
1146
|
-
"onUpdate:modelValue": (
|
|
1145
|
+
modelValue: u[c.key],
|
|
1146
|
+
"onUpdate:modelValue": (i) => u[c.key] = i,
|
|
1147
1147
|
placeholder: e.placeholder,
|
|
1148
1148
|
allowClear: e.clearable,
|
|
1149
1149
|
allowSearch: e.searchable,
|
|
1150
1150
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1151
|
-
onChange:
|
|
1152
|
-
filterTreeNode:
|
|
1151
|
+
onChange: a,
|
|
1152
|
+
filterTreeNode: s,
|
|
1153
1153
|
data: n.value,
|
|
1154
1154
|
fieldNames: e.fieldNames,
|
|
1155
1155
|
treeProps: e.treeProps
|
|
@@ -1157,50 +1157,50 @@ function Ln(e) {
|
|
|
1157
1157
|
...e.slots
|
|
1158
1158
|
}));
|
|
1159
1159
|
}
|
|
1160
|
-
const
|
|
1160
|
+
const J = /* @__PURE__ */ new WeakMap();
|
|
1161
1161
|
function Tn() {
|
|
1162
|
-
const e =
|
|
1162
|
+
const e = $([]);
|
|
1163
1163
|
return [e, (t) => e.value = t];
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
let
|
|
1167
|
-
const [n,
|
|
1168
|
-
if (!e.autoSumbit || !
|
|
1165
|
+
function zn(e) {
|
|
1166
|
+
let r, t = !1;
|
|
1167
|
+
const [n, l] = Tn(), a = () => {
|
|
1168
|
+
if (!e.autoSumbit || !r)
|
|
1169
1169
|
return;
|
|
1170
|
-
let
|
|
1171
|
-
for (;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}, o = (
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
},
|
|
1178
|
-
const
|
|
1179
|
-
switch (typeof
|
|
1170
|
+
let s = r;
|
|
1171
|
+
for (; s && s.$el.tagName !== "FORM"; )
|
|
1172
|
+
s = s.$parent;
|
|
1173
|
+
s && s.$el && s.$el.dispatchEvent(new Event("submit"));
|
|
1174
|
+
}, o = (s, u) => {
|
|
1175
|
+
const c = s();
|
|
1176
|
+
c instanceof Promise ? c.then(u) : u(c);
|
|
1177
|
+
}, f = async () => {
|
|
1178
|
+
const s = J.get(e.options);
|
|
1179
|
+
switch (typeof s) {
|
|
1180
1180
|
case "function":
|
|
1181
|
-
|
|
1181
|
+
J.set(e.options, l);
|
|
1182
1182
|
return;
|
|
1183
1183
|
case "object":
|
|
1184
|
-
|
|
1184
|
+
l(s);
|
|
1185
1185
|
return;
|
|
1186
1186
|
}
|
|
1187
|
-
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1187
|
+
J.set(e.options, l), o(e.options, (u) => {
|
|
1188
|
+
const c = J.get(e.options);
|
|
1189
|
+
J.set(e.options, u), c(u);
|
|
1190
1190
|
});
|
|
1191
1191
|
}, b = () => {
|
|
1192
|
-
o(e.options, (
|
|
1193
|
-
|
|
1192
|
+
o(e.options, (s) => {
|
|
1193
|
+
l(s);
|
|
1194
1194
|
});
|
|
1195
1195
|
};
|
|
1196
1196
|
switch (!0) {
|
|
1197
1197
|
case e.options instanceof Function: {
|
|
1198
|
-
e.cache !== !1 ?
|
|
1198
|
+
e.cache !== !1 ? f() : b();
|
|
1199
1199
|
break;
|
|
1200
1200
|
}
|
|
1201
|
-
case
|
|
1201
|
+
case oe(e.options): {
|
|
1202
1202
|
ke(e.options, () => {
|
|
1203
|
-
|
|
1203
|
+
l(e.options.value);
|
|
1204
1204
|
}, {
|
|
1205
1205
|
immediate: !0
|
|
1206
1206
|
});
|
|
@@ -1209,55 +1209,55 @@ function En(e) {
|
|
|
1209
1209
|
default:
|
|
1210
1210
|
n.value = e.options;
|
|
1211
1211
|
}
|
|
1212
|
-
return (
|
|
1212
|
+
return (s, u) => (e.default && !t && (s[u.key] = e.default, t = !0), v(yt, {
|
|
1213
1213
|
pathMode: e.pathMode,
|
|
1214
|
-
ref: (
|
|
1214
|
+
ref: (c) => r = c,
|
|
1215
1215
|
multiple: e.multiple,
|
|
1216
|
-
modelValue:
|
|
1217
|
-
"onUpdate:modelValue": (
|
|
1216
|
+
modelValue: s[u.key],
|
|
1217
|
+
"onUpdate:modelValue": (c) => s[u.key] = c,
|
|
1218
1218
|
placeholder: e.placeholder,
|
|
1219
1219
|
allowClear: e.clearable,
|
|
1220
1220
|
allowSearch: e.searchable,
|
|
1221
1221
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1222
|
-
onChange:
|
|
1222
|
+
onChange: a,
|
|
1223
1223
|
options: n.value
|
|
1224
1224
|
}, null));
|
|
1225
1225
|
}
|
|
1226
1226
|
function Pn(e) {
|
|
1227
|
-
return (
|
|
1227
|
+
return (r) => e(r);
|
|
1228
1228
|
}
|
|
1229
1229
|
function Rn() {
|
|
1230
1230
|
return {
|
|
1231
|
-
input:
|
|
1232
|
-
textarea:
|
|
1233
|
-
select:
|
|
1231
|
+
input: Cn,
|
|
1232
|
+
textarea: Mn,
|
|
1233
|
+
select: On,
|
|
1234
1234
|
treeSelect: Ln,
|
|
1235
|
-
date:
|
|
1236
|
-
switch:
|
|
1237
|
-
dateRange:
|
|
1235
|
+
date: xn,
|
|
1236
|
+
switch: _n,
|
|
1237
|
+
dateRange: In,
|
|
1238
1238
|
render: Pn,
|
|
1239
|
-
cascader:
|
|
1239
|
+
cascader: zn
|
|
1240
1240
|
};
|
|
1241
1241
|
}
|
|
1242
|
-
function Nn(e,
|
|
1243
|
-
|
|
1244
|
-
const t =
|
|
1242
|
+
function Nn(e, r) {
|
|
1243
|
+
r.render || (r.render = (n) => n.input());
|
|
1244
|
+
const t = r.render({
|
|
1245
1245
|
...Rn()
|
|
1246
1246
|
});
|
|
1247
1247
|
return {
|
|
1248
|
-
default: () => t(e,
|
|
1248
|
+
default: () => t(e, r)
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return
|
|
1253
|
-
field:
|
|
1254
|
-
label:
|
|
1255
|
-
}, Nn(e,
|
|
1251
|
+
function En(e, r) {
|
|
1252
|
+
return nt(Me, {
|
|
1253
|
+
field: r.key,
|
|
1254
|
+
label: r.title
|
|
1255
|
+
}, Nn(e, r));
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1257
|
+
function Vn(e) {
|
|
1258
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
|
|
1259
1259
|
}
|
|
1260
|
-
const
|
|
1260
|
+
const An = /* @__PURE__ */ P({
|
|
1261
1261
|
props: {
|
|
1262
1262
|
form: {
|
|
1263
1263
|
type: Object,
|
|
@@ -1265,61 +1265,61 @@ const Dn = /* @__PURE__ */ R({
|
|
|
1265
1265
|
}
|
|
1266
1266
|
},
|
|
1267
1267
|
setup(e) {
|
|
1268
|
-
const
|
|
1268
|
+
const r = Te(), t = e.form.map((o) => ({
|
|
1269
1269
|
...o,
|
|
1270
1270
|
collapsed: !1
|
|
1271
|
-
})), n = Array.from(new Set(t.map((o) => o.group).flat().filter(Boolean))),
|
|
1272
|
-
let
|
|
1273
|
-
|
|
1271
|
+
})), n = Array.from(new Set(t.map((o) => o.group).flat().filter(Boolean))), l = t.reduce((o, f) => ((f.group ? [f.group].flat() : ["默认"]).forEach((b) => {
|
|
1272
|
+
let s = o.find((u) => u.group === b);
|
|
1273
|
+
s || (s = {
|
|
1274
1274
|
group: b,
|
|
1275
1275
|
instance: void 0,
|
|
1276
1276
|
form: []
|
|
1277
|
-
}, o.push(
|
|
1278
|
-
}), o), []).sort((o,
|
|
1279
|
-
return
|
|
1280
|
-
const o =
|
|
1277
|
+
}, o.push(s)), s.form.push(f);
|
|
1278
|
+
}), o), []).sort((o, f) => o.group === "默认" ? -1 : f.group === "默认" ? 1 : o.group > f.group ? -1 : 1), a = $("默认");
|
|
1279
|
+
return wn(() => {
|
|
1280
|
+
const o = l.find((f) => f.group === a.value);
|
|
1281
1281
|
if (o && o.instance) {
|
|
1282
|
-
const
|
|
1282
|
+
const f = o.instance.formSource;
|
|
1283
1283
|
o.instance.validate().then(() => {
|
|
1284
|
-
|
|
1284
|
+
r.close(f);
|
|
1285
1285
|
});
|
|
1286
1286
|
}
|
|
1287
1287
|
}), {
|
|
1288
1288
|
formItems: t,
|
|
1289
1289
|
groups: n,
|
|
1290
|
-
groupForms:
|
|
1291
|
-
activeTab:
|
|
1290
|
+
groupForms: l,
|
|
1291
|
+
activeTab: a
|
|
1292
1292
|
};
|
|
1293
1293
|
},
|
|
1294
1294
|
render() {
|
|
1295
|
-
const e = this.groupForms.find((
|
|
1295
|
+
const e = this.groupForms.find((r) => r.group === this.activeTab);
|
|
1296
1296
|
if (this.groups.length) {
|
|
1297
|
-
let
|
|
1298
|
-
return
|
|
1297
|
+
let r;
|
|
1298
|
+
return v(gt, {
|
|
1299
1299
|
"active-key": this.activeTab,
|
|
1300
1300
|
"onUpdate:active-key": (t) => this.activeTab = t
|
|
1301
|
-
},
|
|
1301
|
+
}, Vn(r = this.groupForms.map((t) => v(bt, {
|
|
1302
1302
|
title: t.group,
|
|
1303
1303
|
key: t.group
|
|
1304
1304
|
}, {
|
|
1305
|
-
default: () => [
|
|
1305
|
+
default: () => [v(he, {
|
|
1306
1306
|
form: t.form,
|
|
1307
1307
|
ref: (n) => t.instance = n
|
|
1308
1308
|
}, null)]
|
|
1309
|
-
}))) ?
|
|
1310
|
-
default: () => [
|
|
1309
|
+
}))) ? r : {
|
|
1310
|
+
default: () => [r]
|
|
1311
1311
|
});
|
|
1312
1312
|
} else
|
|
1313
|
-
return
|
|
1313
|
+
return v(he, {
|
|
1314
1314
|
form: this.formItems,
|
|
1315
|
-
ref: (
|
|
1315
|
+
ref: (r) => e.instance = r
|
|
1316
1316
|
}, null);
|
|
1317
1317
|
}
|
|
1318
1318
|
});
|
|
1319
1319
|
function Fe(e) {
|
|
1320
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1320
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
|
|
1321
1321
|
}
|
|
1322
|
-
const he = /* @__PURE__ */
|
|
1322
|
+
const he = /* @__PURE__ */ P({
|
|
1323
1323
|
props: {
|
|
1324
1324
|
form: {
|
|
1325
1325
|
type: Object,
|
|
@@ -1381,80 +1381,80 @@ const he = /* @__PURE__ */ R({
|
|
|
1381
1381
|
emits: ["submit", "cancel", "update:model-value"],
|
|
1382
1382
|
expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
|
|
1383
1383
|
setup(e, {
|
|
1384
|
-
emit:
|
|
1384
|
+
emit: r
|
|
1385
1385
|
}) {
|
|
1386
|
-
const t =
|
|
1386
|
+
const t = $(), [n, l] = Sn(e.form, e.modelValue || e.value), a = $(e.columns || 0), o = $(!0), f = $(), b = () => o.value = !o.value;
|
|
1387
1387
|
fe($e.id, e.id), fe($e.source, n);
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1390
|
-
},
|
|
1391
|
-
if (!
|
|
1388
|
+
const s = () => {
|
|
1389
|
+
r("submit", n), r("update:model-value", n);
|
|
1390
|
+
}, u = C(() => {
|
|
1391
|
+
if (!a.value)
|
|
1392
1392
|
return 1;
|
|
1393
|
-
const
|
|
1394
|
-
return
|
|
1395
|
-
}),
|
|
1396
|
-
function
|
|
1397
|
-
var
|
|
1393
|
+
const y = e.form.reduce((S, R) => S + ((R == null ? void 0 : R.span) || 1), 0);
|
|
1394
|
+
return a.value - y % a.value;
|
|
1395
|
+
}), c = C(() => e.form.reduce((y, S) => (S.rule && (y[S.key] = S.rule), y), {}));
|
|
1396
|
+
function i() {
|
|
1397
|
+
var S;
|
|
1398
1398
|
if (e.columns)
|
|
1399
1399
|
return;
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1400
|
+
const y = (S = t.value) == null ? void 0 : S.$el;
|
|
1401
|
+
y && (a.value = Math.floor(y.offsetWidth / e.minWidth));
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1404
|
-
var
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1403
|
+
function h() {
|
|
1404
|
+
var S;
|
|
1405
|
+
const y = (S = t.value) == null ? void 0 : S.$el;
|
|
1406
|
+
y && (y.id = e.id);
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
|
|
1408
|
+
function m() {
|
|
1409
|
+
f.value.open(An, {
|
|
1410
1410
|
form: e.form
|
|
1411
1411
|
}, {
|
|
1412
1412
|
title: "高级搜索",
|
|
1413
1413
|
footer: !0,
|
|
1414
1414
|
submitText: "搜索"
|
|
1415
|
-
}).then((
|
|
1416
|
-
|
|
1415
|
+
}).then((y) => {
|
|
1416
|
+
y && (k(y), s());
|
|
1417
1417
|
});
|
|
1418
1418
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1419
|
+
D(() => {
|
|
1420
|
+
i(), h();
|
|
1421
1421
|
});
|
|
1422
|
-
function
|
|
1423
|
-
|
|
1422
|
+
function k(y) {
|
|
1423
|
+
l({
|
|
1424
1424
|
...n.value,
|
|
1425
|
-
...
|
|
1425
|
+
...y || {}
|
|
1426
1426
|
});
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1429
|
-
n.value[
|
|
1428
|
+
function p(y, S) {
|
|
1429
|
+
n.value[y] = S, k({
|
|
1430
1430
|
...n.value
|
|
1431
1431
|
});
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
var
|
|
1435
|
-
(
|
|
1433
|
+
function O() {
|
|
1434
|
+
var y;
|
|
1435
|
+
(y = t.value) == null || y.resetFields();
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
var
|
|
1439
|
-
return (
|
|
1437
|
+
function j() {
|
|
1438
|
+
var y;
|
|
1439
|
+
return (y = t.value) == null ? void 0 : y.validate();
|
|
1440
1440
|
}
|
|
1441
|
-
return
|
|
1442
|
-
window && window.addEventListener("resize",
|
|
1441
|
+
return D(() => {
|
|
1442
|
+
window && window.addEventListener("resize", i);
|
|
1443
1443
|
}), {
|
|
1444
1444
|
formSource: n,
|
|
1445
1445
|
formInstance: t,
|
|
1446
|
-
formColumns:
|
|
1447
|
-
formRules:
|
|
1446
|
+
formColumns: a,
|
|
1447
|
+
formRules: c,
|
|
1448
1448
|
formCollspased: o,
|
|
1449
|
-
formActiosSpan:
|
|
1449
|
+
formActiosSpan: u,
|
|
1450
1450
|
toggleFormCollapsed: b,
|
|
1451
|
-
updateFormField:
|
|
1452
|
-
updateFormSource:
|
|
1453
|
-
reset:
|
|
1454
|
-
validate:
|
|
1455
|
-
onSubmitSuccess:
|
|
1456
|
-
openCollapsedDialog:
|
|
1457
|
-
modalInstance:
|
|
1451
|
+
updateFormField: p,
|
|
1452
|
+
updateFormSource: k,
|
|
1453
|
+
reset: O,
|
|
1454
|
+
validate: j,
|
|
1455
|
+
onSubmitSuccess: s,
|
|
1456
|
+
openCollapsedDialog: m,
|
|
1457
|
+
modalInstance: f
|
|
1458
1458
|
};
|
|
1459
1459
|
},
|
|
1460
1460
|
render() {
|
|
@@ -1464,50 +1464,50 @@ const he = /* @__PURE__ */ R({
|
|
|
1464
1464
|
} : {
|
|
1465
1465
|
span: this.formActiosSpan
|
|
1466
1466
|
};
|
|
1467
|
-
if (this.searchable && (t.push(
|
|
1467
|
+
if (this.searchable && (t.push(v(q, {
|
|
1468
1468
|
type: "primary",
|
|
1469
1469
|
htmlType: "submit"
|
|
1470
1470
|
}, {
|
|
1471
|
-
default: () => [
|
|
1472
|
-
})), t.push(
|
|
1471
|
+
default: () => [Z("搜索")]
|
|
1472
|
+
})), t.push(v(q, {
|
|
1473
1473
|
type: "secondary",
|
|
1474
1474
|
onClick: () => {
|
|
1475
|
-
var
|
|
1476
|
-
return (
|
|
1475
|
+
var l;
|
|
1476
|
+
return (l = this.formInstance) == null ? void 0 : l.resetFields();
|
|
1477
1477
|
}
|
|
1478
1478
|
}, {
|
|
1479
|
-
default: () => [
|
|
1480
|
-
}))), this.submitable && (t.push(
|
|
1479
|
+
default: () => [Z("重置")]
|
|
1480
|
+
}))), this.submitable && (t.push(v(q, {
|
|
1481
1481
|
type: "primary",
|
|
1482
1482
|
htmlType: "submit"
|
|
1483
1483
|
}, {
|
|
1484
|
-
default: () => [
|
|
1485
|
-
})), t.push(
|
|
1484
|
+
default: () => [Z("提交")]
|
|
1485
|
+
})), t.push(v(q, {
|
|
1486
1486
|
type: "secondary",
|
|
1487
1487
|
onClick: () => this.$emit("cancel")
|
|
1488
1488
|
}, {
|
|
1489
|
-
default: () => [
|
|
1490
|
-
}))), this.form.some((
|
|
1489
|
+
default: () => [Z("取消")]
|
|
1490
|
+
}))), this.form.some((l) => !!l.collapsed) && (this.collapsedMode === "append" && t.push(v(q, {
|
|
1491
1491
|
onClick: this.toggleFormCollapsed
|
|
1492
1492
|
}, {
|
|
1493
1493
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
1494
|
-
icon: () => this.formCollspased ?
|
|
1495
|
-
})), this.collapsedMode === "dialog" && t.push(
|
|
1494
|
+
icon: () => this.formCollspased ? v(Lt, null, null) : v(Et, null, null)
|
|
1495
|
+
})), this.collapsedMode === "dialog" && t.push(v(q, {
|
|
1496
1496
|
onClick: this.openCollapsedDialog
|
|
1497
1497
|
}, {
|
|
1498
1498
|
default: () => "高级搜索",
|
|
1499
|
-
icon: () =>
|
|
1499
|
+
icon: () => v(Ut, null, null)
|
|
1500
1500
|
}))), this.$slots.actions && t.push(...this.$slots.actions()), t.length)
|
|
1501
|
-
return
|
|
1502
|
-
default: () => [
|
|
1501
|
+
return v(xe, n, {
|
|
1502
|
+
default: () => [v(Me, {
|
|
1503
1503
|
contentClass: this.footer ? "form-footer" : ""
|
|
1504
1504
|
}, {
|
|
1505
|
-
default: () => [
|
|
1505
|
+
default: () => [v(St, null, Fe(t) ? t : {
|
|
1506
1506
|
default: () => [t]
|
|
1507
1507
|
})]
|
|
1508
1508
|
})]
|
|
1509
1509
|
});
|
|
1510
|
-
},
|
|
1510
|
+
}, r = this.form.filter((t) => this.formCollspased ? !t.collapsed : !0).filter((t) => {
|
|
1511
1511
|
switch (!0) {
|
|
1512
1512
|
case typeof t.visiable == "boolean":
|
|
1513
1513
|
return t.visiable;
|
|
@@ -1517,12 +1517,12 @@ const he = /* @__PURE__ */ R({
|
|
|
1517
1517
|
return !0;
|
|
1518
1518
|
}
|
|
1519
1519
|
});
|
|
1520
|
-
return
|
|
1520
|
+
return v("div", {
|
|
1521
1521
|
class: "form-render"
|
|
1522
|
-
}, [
|
|
1522
|
+
}, [v(kn, {
|
|
1523
1523
|
ref: (t) => this.modalInstance = t
|
|
1524
1524
|
}, {
|
|
1525
|
-
default: () => [
|
|
1525
|
+
default: () => [v(kt, Oe({
|
|
1526
1526
|
name: this.name
|
|
1527
1527
|
}, {
|
|
1528
1528
|
labelAlign: "right",
|
|
@@ -1533,16 +1533,16 @@ const he = /* @__PURE__ */ R({
|
|
|
1533
1533
|
ref: (t) => this.formInstance = t,
|
|
1534
1534
|
model: this.formSource
|
|
1535
1535
|
}), {
|
|
1536
|
-
default: () => [
|
|
1536
|
+
default: () => [v(wt, {
|
|
1537
1537
|
cols: this.formColumns,
|
|
1538
1538
|
"col-gap": 24,
|
|
1539
1539
|
"rol-gap": 10
|
|
1540
1540
|
}, {
|
|
1541
|
-
default: () => [
|
|
1541
|
+
default: () => [r.filter(() => this.formColumns !== 0).map((t) => {
|
|
1542
1542
|
let n;
|
|
1543
|
-
return
|
|
1543
|
+
return v(xe, {
|
|
1544
1544
|
span: t.span
|
|
1545
|
-
}, Fe(n =
|
|
1545
|
+
}, Fe(n = En(this.formSource, t)) ? n : {
|
|
1546
1546
|
default: () => [n]
|
|
1547
1547
|
});
|
|
1548
1548
|
}), e()]
|
|
@@ -1551,27 +1551,27 @@ const he = /* @__PURE__ */ R({
|
|
|
1551
1551
|
})]);
|
|
1552
1552
|
}
|
|
1553
1553
|
});
|
|
1554
|
-
function
|
|
1554
|
+
function Un(e) {
|
|
1555
1555
|
return e;
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const
|
|
1557
|
+
function qn(e) {
|
|
1558
|
+
const r = W(), t = $();
|
|
1559
1559
|
function n() {
|
|
1560
|
-
var
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1560
|
+
var a, o;
|
|
1561
|
+
const l = (o = (a = r == null ? void 0 : r.proxy) == null ? void 0 : a.$refs) == null ? void 0 : o[e];
|
|
1562
|
+
l && (t.value = l);
|
|
1563
1563
|
}
|
|
1564
|
-
return
|
|
1564
|
+
return D(n), rt(n), t;
|
|
1565
1565
|
}
|
|
1566
|
-
const
|
|
1567
|
-
install(e,
|
|
1566
|
+
const Hn = {
|
|
1567
|
+
install(e, r) {
|
|
1568
1568
|
e.component("FormRender", he);
|
|
1569
1569
|
}
|
|
1570
1570
|
};
|
|
1571
1571
|
export {
|
|
1572
1572
|
he as FormRender,
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1573
|
+
Xn as FormRenderResolver,
|
|
1574
|
+
Hn as default,
|
|
1575
|
+
Un as defineForm,
|
|
1576
|
+
qn as useForm
|
|
1577
1577
|
};
|