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