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