@gopowerteam/form-render 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/form-items/date/index.d.ts +2 -0
- package/dist/cjs/form-items/date-range/index.d.ts +2 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-items/date/index.d.ts +2 -0
- package/dist/es/form-items/date-range/index.d.ts +2 -0
- package/dist/es/index.mjs +651 -617
- 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 bt, FormItem as Le, Tabs as pt, 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 be(e) {
|
|
11
11
|
return Ot.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
13
|
var pe = (e, r) => {
|
|
14
|
-
for (const [
|
|
15
|
-
e[
|
|
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 = be(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__ */ pe(_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 = be(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__ */ pe(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 = be(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__ */ pe(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)), p = 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
|
-
|
|
286
|
+
p(), 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
|
-
onMove:
|
|
307
|
+
onMove: p,
|
|
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 = (b) => a ? a.includes(b.pointerType) : !0, I = (b) => {
|
|
318
|
+
F(u) && b.preventDefault(), F(n) && b.stopPropagation();
|
|
319
|
+
}, y = (b) => {
|
|
320
320
|
var z;
|
|
321
|
-
if (F(r.disabled) || !
|
|
321
|
+
if (F(r.disabled) || !L(b) || F(d) && b.target !== F(e))
|
|
322
322
|
return;
|
|
323
|
-
const M = F(m),
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
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: b.clientX - (M ? T.left - P.left + M.scrollLeft : T.left),
|
|
325
|
+
y: b.clientY - (M ? T.top - P.top + M.scrollTop : T.top)
|
|
326
326
|
};
|
|
327
|
-
(
|
|
328
|
-
}, $ = (
|
|
329
|
-
if (F(r.disabled) || !
|
|
327
|
+
(o == null ? void 0 : o(K, b)) !== !1 && (_.value = K, I(b));
|
|
328
|
+
}, $ = (b) => {
|
|
329
|
+
if (F(r.disabled) || !L(b) || !_.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
|
-
},
|
|
337
|
-
},
|
|
338
|
-
F(r.disabled) || !
|
|
332
|
+
let { x: P, y: T } = g.value;
|
|
333
|
+
(i === "x" || i === "both") && (P = b.clientX - _.value.x, z && (P = Math.min(Math.max(0, P), z.scrollWidth - M.width))), (i === "y" || i === "both") && (T = b.clientY - _.value.y, z && (T = Math.min(Math.max(0, T), z.scrollHeight - M.height))), g.value = {
|
|
334
|
+
x: P,
|
|
335
|
+
y: T
|
|
336
|
+
}, p == null || p(g.value, b), I(b);
|
|
337
|
+
}, N = (b) => {
|
|
338
|
+
F(r.disabled) || !L(b) || _.value && (_.value = void 0, s == null || s(g.value, b), I(b));
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
|
|
340
|
+
if (Pe) {
|
|
341
|
+
const b = { capture: (t = r.capture) != null ? t : !0 };
|
|
342
|
+
fe(w, "pointerdown", y, b), fe(h, "pointermove", $, b), fe(h, "pointerup", N, b);
|
|
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
|
-
},
|
|
359
|
-
|
|
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
|
+
}, p = C(() => Array.isArray(e) ? e.map((c) => D(c)) : [D(e)]), s = Q(
|
|
359
|
+
p,
|
|
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: p } = 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
|
|
409
|
-
|
|
408
|
+
function o() {
|
|
409
|
+
p(), 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,
|
|
467
|
-
let d = 0,
|
|
468
|
-
const s =
|
|
466
|
+
const t = e, a = l, u = le(oe), n = x(!1);
|
|
467
|
+
let d = 0, p = 0;
|
|
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
|
-
function
|
|
474
|
+
function b(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 =
|
|
493
|
-
}),
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? f.maxHeight = b(t.maxHeight) : (f.width = b(t.sizes[t.size]), f.maxWidth = b(t.maxWidth)), t.width && (f.width = b(t.width)), t.height && (f.height = b(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 - p}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(b(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, p = 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, p = 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"]]), br = (e) => (Me("data-v-559bdf2e"), e = e(), Te(), e), pr = { class: "flex-center" }, kr = /* @__PURE__ */ br(() => /* @__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", pr, [
|
|
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
|
-
function
|
|
724
|
-
const m =
|
|
741
|
+
function p(i, h) {
|
|
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,
|
|
@@ -792,7 +828,7 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
|
|
|
792
828
|
offset: i.offset,
|
|
793
829
|
sizes: i.sizes
|
|
794
830
|
}, m.options, {
|
|
795
|
-
onSubmit: () =>
|
|
831
|
+
onSubmit: () => p(m.id, "submit")
|
|
796
832
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
797
833
|
]),
|
|
798
834
|
_: 1
|
|
@@ -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,82 +899,83 @@ 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,
|
|
966
|
+
shortcuts: e == null ? void 0 : e.shortcuts,
|
|
934
967
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
935
968
|
}, null);
|
|
936
969
|
}
|
|
937
970
|
};
|
|
938
971
|
}
|
|
939
|
-
function
|
|
940
|
-
return (r,
|
|
972
|
+
function Tr(e) {
|
|
973
|
+
return (r, l) => {
|
|
941
974
|
switch (e == null ? void 0 : e.type) {
|
|
942
975
|
case "number":
|
|
943
|
-
return v(
|
|
944
|
-
modelValue: r[
|
|
945
|
-
"onUpdate:modelValue": (t) => r[
|
|
976
|
+
return v(je, {
|
|
977
|
+
modelValue: r[l.key],
|
|
978
|
+
"onUpdate:modelValue": (t) => r[l.key] = t,
|
|
946
979
|
hideButton: !0,
|
|
947
980
|
"read-only": e == null ? void 0 : e.readonly,
|
|
948
981
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
@@ -951,8 +984,8 @@ function $r(e) {
|
|
|
951
984
|
case "string":
|
|
952
985
|
default:
|
|
953
986
|
return v(st, {
|
|
954
|
-
modelValue: r[
|
|
955
|
-
"onUpdate:modelValue": (t) => r[
|
|
987
|
+
modelValue: r[l.key],
|
|
988
|
+
"onUpdate:modelValue": (t) => r[l.key] = t,
|
|
956
989
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
957
990
|
readonly: e == null ? void 0 : e.readonly,
|
|
958
991
|
allowClear: e == null ? void 0 : e.clearable
|
|
@@ -961,57 +994,57 @@ function $r(e) {
|
|
|
961
994
|
};
|
|
962
995
|
}
|
|
963
996
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
964
|
-
function ke(e, r,
|
|
965
|
-
const t =
|
|
997
|
+
function ke(e, r, l) {
|
|
998
|
+
const t = Q(e, (...a) => (Ie(() => t()), r(...a)), l);
|
|
966
999
|
return t;
|
|
967
1000
|
}
|
|
968
|
-
function
|
|
969
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1001
|
+
function jr(e) {
|
|
1002
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
970
1003
|
}
|
|
971
1004
|
const H = /* @__PURE__ */ new WeakMap();
|
|
972
|
-
function
|
|
1005
|
+
function Lr() {
|
|
973
1006
|
const e = x(/* @__PURE__ */ new Map());
|
|
974
|
-
return [e, (
|
|
1007
|
+
return [e, (l) => e.value = l];
|
|
975
1008
|
}
|
|
976
|
-
function
|
|
977
|
-
let r,
|
|
978
|
-
const [t,
|
|
1009
|
+
function zr(e) {
|
|
1010
|
+
let r, l = !1;
|
|
1011
|
+
const [t, a] = Lr(), u = (s) => {
|
|
979
1012
|
if (e.onChange && e.onChange(s), !e.autoSumbit || !r)
|
|
980
1013
|
return;
|
|
981
|
-
let
|
|
982
|
-
for (;
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
},
|
|
1014
|
+
let o = r;
|
|
1015
|
+
for (; o && o.$el.tagName !== "FORM"; )
|
|
1016
|
+
o = o.$parent;
|
|
1017
|
+
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1018
|
+
}, n = (s, o) => {
|
|
986
1019
|
const c = s();
|
|
987
|
-
c instanceof Promise ? c.then(
|
|
1020
|
+
c instanceof Promise ? c.then(o) : o(c);
|
|
988
1021
|
}, d = async () => {
|
|
989
1022
|
const s = H.get(e.options);
|
|
990
1023
|
switch (typeof s) {
|
|
991
1024
|
case "function":
|
|
992
|
-
H.set(e.options,
|
|
1025
|
+
H.set(e.options, a);
|
|
993
1026
|
return;
|
|
994
1027
|
case "object":
|
|
995
|
-
|
|
1028
|
+
a(s);
|
|
996
1029
|
return;
|
|
997
1030
|
}
|
|
998
|
-
H.set(e.options,
|
|
1031
|
+
H.set(e.options, a), n(e.options, (o) => {
|
|
999
1032
|
const c = H.get(e.options);
|
|
1000
|
-
H.set(e.options,
|
|
1033
|
+
H.set(e.options, o), c(o);
|
|
1001
1034
|
});
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
|
|
1035
|
+
}, p = () => {
|
|
1036
|
+
n(e.options, (s) => {
|
|
1037
|
+
a(s);
|
|
1005
1038
|
});
|
|
1006
1039
|
};
|
|
1007
1040
|
switch (!0) {
|
|
1008
1041
|
case e.options instanceof Function: {
|
|
1009
|
-
e.cache !== !1 ? d() :
|
|
1042
|
+
e.cache !== !1 ? d() : p();
|
|
1010
1043
|
break;
|
|
1011
1044
|
}
|
|
1012
1045
|
case ae(e.options): {
|
|
1013
1046
|
ke(() => e.options, () => {
|
|
1014
|
-
|
|
1047
|
+
a(e.options.value);
|
|
1015
1048
|
}, {
|
|
1016
1049
|
immediate: !0
|
|
1017
1050
|
});
|
|
@@ -1020,20 +1053,20 @@ function _r(e) {
|
|
|
1020
1053
|
default:
|
|
1021
1054
|
t.value = e.options;
|
|
1022
1055
|
}
|
|
1023
|
-
return (s,
|
|
1056
|
+
return (s, o) => {
|
|
1024
1057
|
let c;
|
|
1025
|
-
return e.default && !
|
|
1058
|
+
return e.default && !l && (s[o.key] = e.default, l = !0), v(ft, {
|
|
1026
1059
|
ref: (i) => r = i,
|
|
1027
1060
|
multiple: e.multiple,
|
|
1028
|
-
modelValue: s[
|
|
1029
|
-
"onUpdate:modelValue": (i) => s[
|
|
1061
|
+
modelValue: s[o.key],
|
|
1062
|
+
"onUpdate:modelValue": (i) => s[o.key] = i,
|
|
1030
1063
|
placeholder: e.placeholder,
|
|
1031
1064
|
allowClear: e.clearable,
|
|
1032
1065
|
allowSearch: e.searchable,
|
|
1033
1066
|
"allow-create": e.createable,
|
|
1034
1067
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1035
|
-
onChange:
|
|
1036
|
-
},
|
|
1068
|
+
onChange: u
|
|
1069
|
+
}, jr(c = Array.from(t.value.entries()).map(([i, h]) => v(mt, {
|
|
1037
1070
|
key: i,
|
|
1038
1071
|
value: i,
|
|
1039
1072
|
label: h
|
|
@@ -1042,13 +1075,13 @@ function _r(e) {
|
|
|
1042
1075
|
});
|
|
1043
1076
|
};
|
|
1044
1077
|
}
|
|
1045
|
-
function
|
|
1078
|
+
function Pr(e) {
|
|
1046
1079
|
function r() {
|
|
1047
1080
|
e != null && e.autoSumbit;
|
|
1048
1081
|
}
|
|
1049
|
-
return (
|
|
1050
|
-
modelValue:
|
|
1051
|
-
"onUpdate:modelValue": (
|
|
1082
|
+
return (l, t) => (e != null && e.default && (l[t.key] = e.default), v(ht, {
|
|
1083
|
+
modelValue: l[t.key],
|
|
1084
|
+
"onUpdate:modelValue": (a) => l[t.key] = a,
|
|
1052
1085
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1053
1086
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1054
1087
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
@@ -1056,19 +1089,19 @@ function Ir(e) {
|
|
|
1056
1089
|
onChange: r
|
|
1057
1090
|
}, null));
|
|
1058
1091
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return (r,
|
|
1092
|
+
function Vr(e) {
|
|
1093
|
+
return (r, l) => {
|
|
1061
1094
|
let t = [];
|
|
1062
|
-
function
|
|
1095
|
+
function a(d) {
|
|
1063
1096
|
t = d;
|
|
1064
1097
|
}
|
|
1065
|
-
function
|
|
1098
|
+
function u(d) {
|
|
1066
1099
|
if (d && d.length === 2) {
|
|
1067
|
-
const [
|
|
1068
|
-
r[
|
|
1100
|
+
const [p, s] = d.sort(), o = xe(p).startOf("days"), c = xe(s).endOf("days");
|
|
1101
|
+
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
1102
|
}
|
|
1070
1103
|
}
|
|
1071
|
-
function
|
|
1104
|
+
function n(d) {
|
|
1072
1105
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), d) : !1;
|
|
1073
1106
|
}
|
|
1074
1107
|
return v("div", null, [v(vt, {
|
|
@@ -1076,71 +1109,72 @@ function Mr(e) {
|
|
|
1076
1109
|
style: {
|
|
1077
1110
|
width: "300px"
|
|
1078
1111
|
},
|
|
1079
|
-
modelValue: r[
|
|
1080
|
-
"onUpdate:modelValue": (d) => r[
|
|
1081
|
-
onSelect:
|
|
1082
|
-
onChange:
|
|
1112
|
+
modelValue: r[l.key],
|
|
1113
|
+
"onUpdate:modelValue": (d) => r[l.key] = d,
|
|
1114
|
+
onSelect: a,
|
|
1115
|
+
onChange: u,
|
|
1083
1116
|
mode: e == null ? void 0 : e.type,
|
|
1117
|
+
shortcuts: e == null ? void 0 : e.shortcuts,
|
|
1084
1118
|
allowClear: e == null ? void 0 : e.clearable,
|
|
1085
|
-
"disabled-date":
|
|
1119
|
+
"disabled-date": n,
|
|
1086
1120
|
format: e == null ? void 0 : e.labelFormat,
|
|
1087
1121
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1088
1122
|
}, null)]);
|
|
1089
1123
|
};
|
|
1090
1124
|
}
|
|
1091
|
-
function
|
|
1092
|
-
return (r,
|
|
1093
|
-
modelValue: r[
|
|
1094
|
-
"onUpdate:modelValue": (t) => r[
|
|
1125
|
+
function Nr(e) {
|
|
1126
|
+
return (r, l) => v(gt, {
|
|
1127
|
+
modelValue: r[l.key],
|
|
1128
|
+
"onUpdate:modelValue": (t) => r[l.key] = t,
|
|
1095
1129
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1096
1130
|
autoSize: e == null ? void 0 : e.autosize,
|
|
1097
1131
|
maxLength: e == null ? void 0 : e.maxLength
|
|
1098
1132
|
}, null);
|
|
1099
1133
|
}
|
|
1100
1134
|
const Y = /* @__PURE__ */ new WeakMap();
|
|
1101
|
-
function
|
|
1135
|
+
function Ar() {
|
|
1102
1136
|
const e = x([]);
|
|
1103
|
-
return [e, (
|
|
1137
|
+
return [e, (l) => e.value = l];
|
|
1104
1138
|
}
|
|
1105
|
-
function
|
|
1106
|
-
let r,
|
|
1107
|
-
const [t,
|
|
1139
|
+
function Er(e) {
|
|
1140
|
+
let r, l = !1;
|
|
1141
|
+
const [t, a] = Ar(), u = () => {
|
|
1108
1142
|
if (!e.autoSumbit || !r)
|
|
1109
1143
|
return;
|
|
1110
|
-
let
|
|
1111
|
-
for (;
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1115
|
-
const i =
|
|
1144
|
+
let o = r;
|
|
1145
|
+
for (; o && o.$el.tagName !== "FORM"; )
|
|
1146
|
+
o = o.$parent;
|
|
1147
|
+
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1148
|
+
}, n = (o, c) => {
|
|
1149
|
+
const i = o();
|
|
1116
1150
|
i instanceof Promise ? i.then(c) : c(i);
|
|
1117
1151
|
}, d = async () => {
|
|
1118
|
-
const
|
|
1119
|
-
switch (typeof
|
|
1152
|
+
const o = Y.get(e.options);
|
|
1153
|
+
switch (typeof o) {
|
|
1120
1154
|
case "function":
|
|
1121
|
-
Y.set(e.options,
|
|
1155
|
+
Y.set(e.options, a);
|
|
1122
1156
|
return;
|
|
1123
1157
|
case "object":
|
|
1124
|
-
|
|
1158
|
+
a(o);
|
|
1125
1159
|
return;
|
|
1126
1160
|
}
|
|
1127
|
-
Y.set(e.options,
|
|
1161
|
+
Y.set(e.options, a), n(e.options, (c) => {
|
|
1128
1162
|
const i = Y.get(e.options);
|
|
1129
1163
|
Y.set(e.options, c), i(c);
|
|
1130
1164
|
});
|
|
1131
|
-
},
|
|
1132
|
-
|
|
1133
|
-
|
|
1165
|
+
}, p = () => {
|
|
1166
|
+
n(e.options, (o) => {
|
|
1167
|
+
a(o);
|
|
1134
1168
|
});
|
|
1135
1169
|
};
|
|
1136
1170
|
switch (!0) {
|
|
1137
1171
|
case e.options instanceof Function: {
|
|
1138
|
-
e.cache !== !1 ? d() :
|
|
1172
|
+
e.cache !== !1 ? d() : p();
|
|
1139
1173
|
break;
|
|
1140
1174
|
}
|
|
1141
1175
|
case ae(e.options): {
|
|
1142
1176
|
ke(e.options, () => {
|
|
1143
|
-
|
|
1177
|
+
a(e.options.value);
|
|
1144
1178
|
}, {
|
|
1145
1179
|
immediate: !0
|
|
1146
1180
|
});
|
|
@@ -1149,21 +1183,21 @@ function Tr(e) {
|
|
|
1149
1183
|
default:
|
|
1150
1184
|
t.value = e.options;
|
|
1151
1185
|
}
|
|
1152
|
-
function s(
|
|
1186
|
+
function s(o, c) {
|
|
1153
1187
|
var m;
|
|
1154
1188
|
const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
|
|
1155
|
-
return h ? h.toLowerCase().includes(
|
|
1189
|
+
return h ? h.toLowerCase().includes(o.toLowerCase()) : !1;
|
|
1156
1190
|
}
|
|
1157
|
-
return (
|
|
1191
|
+
return (o, c) => (e.default && !l && (o[c.key] = e.default, l = !0), v(yt, {
|
|
1158
1192
|
ref: (i) => r = i,
|
|
1159
1193
|
multiple: e.multiple,
|
|
1160
|
-
modelValue:
|
|
1161
|
-
"onUpdate:modelValue": (i) =>
|
|
1194
|
+
modelValue: o[c.key],
|
|
1195
|
+
"onUpdate:modelValue": (i) => o[c.key] = i,
|
|
1162
1196
|
placeholder: e.placeholder,
|
|
1163
1197
|
allowClear: e.clearable,
|
|
1164
1198
|
allowSearch: e.searchable,
|
|
1165
1199
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1166
|
-
onChange:
|
|
1200
|
+
onChange: u,
|
|
1167
1201
|
filterTreeNode: s,
|
|
1168
1202
|
data: t.value,
|
|
1169
1203
|
fieldNames: e.fieldNames,
|
|
@@ -1173,49 +1207,49 @@ function Tr(e) {
|
|
|
1173
1207
|
}));
|
|
1174
1208
|
}
|
|
1175
1209
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1176
|
-
function
|
|
1210
|
+
function Rr() {
|
|
1177
1211
|
const e = x([]);
|
|
1178
|
-
return [e, (
|
|
1212
|
+
return [e, (l) => e.value = l];
|
|
1179
1213
|
}
|
|
1180
|
-
function
|
|
1181
|
-
let r,
|
|
1182
|
-
const [t,
|
|
1214
|
+
function Dr(e) {
|
|
1215
|
+
let r, l = !1;
|
|
1216
|
+
const [t, a] = Rr(), u = () => {
|
|
1183
1217
|
if (!e.autoSumbit || !r)
|
|
1184
1218
|
return;
|
|
1185
1219
|
let s = r;
|
|
1186
1220
|
for (; s && s.$el.tagName !== "FORM"; )
|
|
1187
1221
|
s = s.$parent;
|
|
1188
1222
|
s && s.$el && s.$el.dispatchEvent(new Event("submit"));
|
|
1189
|
-
},
|
|
1223
|
+
}, n = (s, o) => {
|
|
1190
1224
|
const c = s();
|
|
1191
|
-
c instanceof Promise ? c.then(
|
|
1225
|
+
c instanceof Promise ? c.then(o) : o(c);
|
|
1192
1226
|
}, d = async () => {
|
|
1193
1227
|
const s = X.get(e.options);
|
|
1194
1228
|
switch (typeof s) {
|
|
1195
1229
|
case "function":
|
|
1196
|
-
X.set(e.options,
|
|
1230
|
+
X.set(e.options, a);
|
|
1197
1231
|
return;
|
|
1198
1232
|
case "object":
|
|
1199
|
-
|
|
1233
|
+
a(s);
|
|
1200
1234
|
return;
|
|
1201
1235
|
}
|
|
1202
|
-
X.set(e.options,
|
|
1236
|
+
X.set(e.options, a), n(e.options, (o) => {
|
|
1203
1237
|
const c = X.get(e.options);
|
|
1204
|
-
X.set(e.options,
|
|
1238
|
+
X.set(e.options, o), c(o);
|
|
1205
1239
|
});
|
|
1206
|
-
},
|
|
1207
|
-
|
|
1208
|
-
|
|
1240
|
+
}, p = () => {
|
|
1241
|
+
n(e.options, (s) => {
|
|
1242
|
+
a(s);
|
|
1209
1243
|
});
|
|
1210
1244
|
};
|
|
1211
1245
|
switch (!0) {
|
|
1212
1246
|
case e.options instanceof Function: {
|
|
1213
|
-
e.cache !== !1 ? d() :
|
|
1247
|
+
e.cache !== !1 ? d() : p();
|
|
1214
1248
|
break;
|
|
1215
1249
|
}
|
|
1216
1250
|
case ae(e.options): {
|
|
1217
1251
|
ke(e.options, () => {
|
|
1218
|
-
|
|
1252
|
+
a(e.options.value);
|
|
1219
1253
|
}, {
|
|
1220
1254
|
immediate: !0
|
|
1221
1255
|
});
|
|
@@ -1224,24 +1258,24 @@ function Nr(e) {
|
|
|
1224
1258
|
default:
|
|
1225
1259
|
t.value = e.options;
|
|
1226
1260
|
}
|
|
1227
|
-
return (s,
|
|
1261
|
+
return (s, o) => (e.default && !l && (s[o.key] = e.default, l = !0), v(bt, {
|
|
1228
1262
|
pathMode: e.pathMode,
|
|
1229
1263
|
ref: (c) => r = c,
|
|
1230
1264
|
multiple: e.multiple,
|
|
1231
|
-
modelValue: s[
|
|
1232
|
-
"onUpdate:modelValue": (c) => s[
|
|
1265
|
+
modelValue: s[o.key],
|
|
1266
|
+
"onUpdate:modelValue": (c) => s[o.key] = c,
|
|
1233
1267
|
placeholder: e.placeholder,
|
|
1234
1268
|
allowClear: e.clearable,
|
|
1235
1269
|
allowSearch: e.searchable,
|
|
1236
1270
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1237
|
-
onChange:
|
|
1271
|
+
onChange: u,
|
|
1238
1272
|
options: t.value
|
|
1239
1273
|
}, null));
|
|
1240
1274
|
}
|
|
1241
|
-
function
|
|
1275
|
+
function Br(e) {
|
|
1242
1276
|
return (r) => e(r);
|
|
1243
1277
|
}
|
|
1244
|
-
const
|
|
1278
|
+
const Ur = {
|
|
1245
1279
|
thousands: !0,
|
|
1246
1280
|
inputUnit: "元",
|
|
1247
1281
|
outputUnit: "元"
|
|
@@ -1250,41 +1284,41 @@ const Vr = {
|
|
|
1250
1284
|
元: 10 ** 2,
|
|
1251
1285
|
万: 10 ** 4
|
|
1252
1286
|
};
|
|
1253
|
-
function
|
|
1287
|
+
function Wr(e) {
|
|
1254
1288
|
e = {
|
|
1255
|
-
...
|
|
1289
|
+
...Ur,
|
|
1256
1290
|
...e || {}
|
|
1257
1291
|
};
|
|
1258
|
-
const r = (
|
|
1259
|
-
if (
|
|
1292
|
+
const r = (n) => {
|
|
1293
|
+
if (n == null)
|
|
1260
1294
|
return;
|
|
1261
1295
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1262
|
-
return
|
|
1296
|
+
return n;
|
|
1263
1297
|
const d = ee[e.outputUnit] / ee[e.inputUnit];
|
|
1264
|
-
return
|
|
1265
|
-
},
|
|
1266
|
-
if (
|
|
1298
|
+
return n * d;
|
|
1299
|
+
}, l = (n) => {
|
|
1300
|
+
if (n == null)
|
|
1267
1301
|
return;
|
|
1268
1302
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1269
|
-
return
|
|
1303
|
+
return n;
|
|
1270
1304
|
const d = ee[e.inputUnit] / ee[e.outputUnit];
|
|
1271
|
-
return
|
|
1272
|
-
}, t = (
|
|
1273
|
-
const d =
|
|
1305
|
+
return n * d;
|
|
1306
|
+
}, t = (n) => {
|
|
1307
|
+
const d = n.split(".");
|
|
1274
1308
|
return d[0] = d[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), d.join(".");
|
|
1275
|
-
},
|
|
1276
|
-
const d =
|
|
1309
|
+
}, a = (n) => {
|
|
1310
|
+
const d = n;
|
|
1277
1311
|
return e != null && e.thousands ? t(d) : d;
|
|
1278
|
-
},
|
|
1279
|
-
return (
|
|
1280
|
-
const
|
|
1281
|
-
return
|
|
1282
|
-
|
|
1283
|
-
}), v(
|
|
1284
|
-
modelValue:
|
|
1285
|
-
"onUpdate:modelValue": (s) =>
|
|
1286
|
-
formatter:
|
|
1287
|
-
parser:
|
|
1312
|
+
}, u = (n) => n.replace(/,/g, "");
|
|
1313
|
+
return (n, d) => {
|
|
1314
|
+
const p = x(r(n[d.key]));
|
|
1315
|
+
return Q(p, (s) => {
|
|
1316
|
+
n[d.key] = l(s);
|
|
1317
|
+
}), v(je, {
|
|
1318
|
+
modelValue: p.value,
|
|
1319
|
+
"onUpdate:modelValue": (s) => p.value = s,
|
|
1320
|
+
formatter: a,
|
|
1321
|
+
parser: u,
|
|
1288
1322
|
precision: e == null ? void 0 : e.precision,
|
|
1289
1323
|
hideButton: !0,
|
|
1290
1324
|
"read-only": e == null ? void 0 : e.readonly,
|
|
@@ -1296,39 +1330,39 @@ function Rr(e) {
|
|
|
1296
1330
|
});
|
|
1297
1331
|
};
|
|
1298
1332
|
}
|
|
1299
|
-
function
|
|
1333
|
+
function qr() {
|
|
1300
1334
|
return {
|
|
1301
|
-
input:
|
|
1302
|
-
textarea:
|
|
1303
|
-
select:
|
|
1304
|
-
treeSelect:
|
|
1305
|
-
date:
|
|
1306
|
-
switch:
|
|
1307
|
-
dateRange:
|
|
1308
|
-
render:
|
|
1309
|
-
cascader:
|
|
1310
|
-
currency:
|
|
1335
|
+
input: Tr,
|
|
1336
|
+
textarea: Nr,
|
|
1337
|
+
select: zr,
|
|
1338
|
+
treeSelect: Er,
|
|
1339
|
+
date: Mr,
|
|
1340
|
+
switch: Pr,
|
|
1341
|
+
dateRange: Vr,
|
|
1342
|
+
render: Br,
|
|
1343
|
+
cascader: Dr,
|
|
1344
|
+
currency: Wr
|
|
1311
1345
|
};
|
|
1312
1346
|
}
|
|
1313
|
-
function
|
|
1347
|
+
function Gr(e, r) {
|
|
1314
1348
|
r.render || (r.render = (t) => t.input());
|
|
1315
|
-
const
|
|
1316
|
-
...
|
|
1349
|
+
const l = r.render({
|
|
1350
|
+
...qr()
|
|
1317
1351
|
});
|
|
1318
1352
|
return {
|
|
1319
|
-
default: () =>
|
|
1353
|
+
default: () => l(e, r)
|
|
1320
1354
|
};
|
|
1321
1355
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return
|
|
1356
|
+
function Hr(e, r) {
|
|
1357
|
+
return nt(Le, {
|
|
1324
1358
|
field: r.key,
|
|
1325
1359
|
label: r.title
|
|
1326
|
-
},
|
|
1360
|
+
}, Gr(e, r));
|
|
1327
1361
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1362
|
+
function Yr(e) {
|
|
1363
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
1330
1364
|
}
|
|
1331
|
-
const
|
|
1365
|
+
const Xr = /* @__PURE__ */ V({
|
|
1332
1366
|
props: {
|
|
1333
1367
|
form: {
|
|
1334
1368
|
type: Object,
|
|
@@ -1336,61 +1370,61 @@ const Ur = /* @__PURE__ */ R({
|
|
|
1336
1370
|
}
|
|
1337
1371
|
},
|
|
1338
1372
|
setup(e) {
|
|
1339
|
-
const r =
|
|
1340
|
-
...
|
|
1373
|
+
const r = Ve(), l = e.form.map((n) => ({
|
|
1374
|
+
...n,
|
|
1341
1375
|
collapsed: !1
|
|
1342
|
-
})), t = Array.from(new Set(
|
|
1343
|
-
let s =
|
|
1376
|
+
})), t = Array.from(new Set(l.map((n) => n.group).flat().filter(Boolean))), a = l.reduce((n, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((p) => {
|
|
1377
|
+
let s = n.find((o) => o.group === p);
|
|
1344
1378
|
s || (s = {
|
|
1345
|
-
group:
|
|
1379
|
+
group: p,
|
|
1346
1380
|
instance: void 0,
|
|
1347
1381
|
form: []
|
|
1348
|
-
},
|
|
1349
|
-
}),
|
|
1350
|
-
return
|
|
1351
|
-
const
|
|
1352
|
-
if (
|
|
1353
|
-
const d =
|
|
1354
|
-
|
|
1382
|
+
}, n.push(s)), s.form.push(d);
|
|
1383
|
+
}), n), []).sort((n, d) => n.group === "默认" ? -1 : d.group === "默认" ? 1 : n.group > d.group ? -1 : 1), u = x("默认");
|
|
1384
|
+
return _r(() => {
|
|
1385
|
+
const n = a.find((d) => d.group === u.value);
|
|
1386
|
+
if (n && n.instance) {
|
|
1387
|
+
const d = n.instance.formSource;
|
|
1388
|
+
n.instance.validate().then(() => {
|
|
1355
1389
|
r.close(d);
|
|
1356
1390
|
});
|
|
1357
1391
|
}
|
|
1358
1392
|
}), {
|
|
1359
|
-
formItems:
|
|
1393
|
+
formItems: l,
|
|
1360
1394
|
groups: t,
|
|
1361
|
-
groupForms:
|
|
1362
|
-
activeTab:
|
|
1395
|
+
groupForms: a,
|
|
1396
|
+
activeTab: u
|
|
1363
1397
|
};
|
|
1364
1398
|
},
|
|
1365
1399
|
render() {
|
|
1366
1400
|
const e = this.groupForms.find((r) => r.group === this.activeTab);
|
|
1367
1401
|
if (this.groups.length) {
|
|
1368
1402
|
let r;
|
|
1369
|
-
return v(
|
|
1403
|
+
return v(pt, {
|
|
1370
1404
|
"active-key": this.activeTab,
|
|
1371
|
-
"onUpdate:active-key": (
|
|
1372
|
-
},
|
|
1373
|
-
title:
|
|
1374
|
-
key:
|
|
1405
|
+
"onUpdate:active-key": (l) => this.activeTab = l
|
|
1406
|
+
}, Yr(r = this.groupForms.map((l) => v(kt, {
|
|
1407
|
+
title: l.group,
|
|
1408
|
+
key: l.group
|
|
1375
1409
|
}, {
|
|
1376
|
-
default: () => [v(
|
|
1377
|
-
form:
|
|
1378
|
-
ref: (t) =>
|
|
1410
|
+
default: () => [v(ve, {
|
|
1411
|
+
form: l.form,
|
|
1412
|
+
ref: (t) => l.instance = t
|
|
1379
1413
|
}, null)]
|
|
1380
1414
|
}))) ? r : {
|
|
1381
1415
|
default: () => [r]
|
|
1382
1416
|
});
|
|
1383
1417
|
} else
|
|
1384
|
-
return v(
|
|
1418
|
+
return v(ve, {
|
|
1385
1419
|
form: this.formItems,
|
|
1386
1420
|
ref: (r) => e.instance = r
|
|
1387
1421
|
}, null);
|
|
1388
1422
|
}
|
|
1389
1423
|
});
|
|
1390
1424
|
function Fe(e) {
|
|
1391
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1425
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
1392
1426
|
}
|
|
1393
|
-
const
|
|
1427
|
+
const ve = /* @__PURE__ */ V({
|
|
1394
1428
|
props: {
|
|
1395
1429
|
form: {
|
|
1396
1430
|
type: Object,
|
|
@@ -1454,93 +1488,93 @@ const he = /* @__PURE__ */ R({
|
|
|
1454
1488
|
setup(e, {
|
|
1455
1489
|
emit: r
|
|
1456
1490
|
}) {
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1491
|
+
const l = x(), [t, a] = Ir(e.form, e.modelValue || e.value), u = x(e.columns || 0), n = x(!0), d = x(), p = () => n.value = !n.value;
|
|
1492
|
+
me($e.id, e.id), me($e.source, t);
|
|
1459
1493
|
const s = () => {
|
|
1460
1494
|
r("submit", t.value), r("update:model-value", t.value);
|
|
1461
|
-
},
|
|
1495
|
+
}, o = C(() => e.form.filter((y) => n.value ? !y.collapsed : !0).filter((y) => {
|
|
1462
1496
|
switch (!0) {
|
|
1463
|
-
case typeof
|
|
1464
|
-
return
|
|
1465
|
-
case typeof
|
|
1466
|
-
return
|
|
1497
|
+
case typeof y.visiable == "boolean":
|
|
1498
|
+
return y.visiable;
|
|
1499
|
+
case typeof y.visiable == "function":
|
|
1500
|
+
return y.visiable(t.value);
|
|
1467
1501
|
default:
|
|
1468
1502
|
return !0;
|
|
1469
1503
|
}
|
|
1470
|
-
})), c =
|
|
1471
|
-
if (!
|
|
1504
|
+
})), c = C(() => {
|
|
1505
|
+
if (!u.value)
|
|
1472
1506
|
return 1;
|
|
1473
|
-
const
|
|
1474
|
-
return
|
|
1475
|
-
}), i =
|
|
1507
|
+
const y = o.value.reduce(($, N) => $ + ((N == null ? void 0 : N.span) || 1), 0);
|
|
1508
|
+
return u.value - y % u.value;
|
|
1509
|
+
}), i = C(() => e.form.reduce((y, $) => ($.rule && (y[$.key] = $.rule), y), {}));
|
|
1476
1510
|
function h() {
|
|
1477
1511
|
var $;
|
|
1478
1512
|
if (e.columns)
|
|
1479
1513
|
return;
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1514
|
+
const y = ($ = l.value) == null ? void 0 : $.$el;
|
|
1515
|
+
y && (u.value = Math.max(Math.floor(y.offsetWidth / e.minWidth), 1));
|
|
1482
1516
|
}
|
|
1483
1517
|
function m() {
|
|
1484
1518
|
var $;
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1519
|
+
const y = ($ = l.value) == null ? void 0 : $.$el;
|
|
1520
|
+
y && (y.id = e.id);
|
|
1487
1521
|
}
|
|
1488
|
-
function
|
|
1489
|
-
d.value.open(
|
|
1522
|
+
function w() {
|
|
1523
|
+
d.value.open(Xr, {
|
|
1490
1524
|
form: e.form
|
|
1491
1525
|
}, {
|
|
1492
1526
|
title: "高级搜索",
|
|
1493
1527
|
footer: !0,
|
|
1494
1528
|
submitText: "搜索"
|
|
1495
|
-
}).then((
|
|
1496
|
-
|
|
1529
|
+
}).then((y) => {
|
|
1530
|
+
y && (g(y), s());
|
|
1497
1531
|
});
|
|
1498
1532
|
}
|
|
1499
1533
|
B(() => {
|
|
1500
1534
|
h(), m();
|
|
1501
1535
|
});
|
|
1502
|
-
function y
|
|
1503
|
-
|
|
1536
|
+
function g(y) {
|
|
1537
|
+
a({
|
|
1504
1538
|
...t.value,
|
|
1505
|
-
...
|
|
1539
|
+
...y || {}
|
|
1506
1540
|
});
|
|
1507
1541
|
}
|
|
1508
|
-
function _(
|
|
1509
|
-
t.value[
|
|
1542
|
+
function _(y, $) {
|
|
1543
|
+
t.value[y] = $, g({
|
|
1510
1544
|
...t.value
|
|
1511
1545
|
});
|
|
1512
1546
|
}
|
|
1513
|
-
function
|
|
1514
|
-
var
|
|
1515
|
-
(
|
|
1547
|
+
function L() {
|
|
1548
|
+
var y;
|
|
1549
|
+
(y = l.value) == null || y.resetFields();
|
|
1516
1550
|
}
|
|
1517
1551
|
function I() {
|
|
1518
|
-
var
|
|
1519
|
-
return (
|
|
1552
|
+
var y;
|
|
1553
|
+
return (y = l.value) == null ? void 0 : y.validate();
|
|
1520
1554
|
}
|
|
1521
1555
|
return B(() => {
|
|
1522
1556
|
window && window.addEventListener("resize", h);
|
|
1523
1557
|
}), {
|
|
1524
1558
|
formSource: t,
|
|
1525
|
-
formInstance:
|
|
1526
|
-
formColumns:
|
|
1559
|
+
formInstance: l,
|
|
1560
|
+
formColumns: u,
|
|
1527
1561
|
formRules: i,
|
|
1528
|
-
formCollspased:
|
|
1562
|
+
formCollspased: n,
|
|
1529
1563
|
formActiosSpan: c,
|
|
1530
|
-
formItems:
|
|
1531
|
-
toggleFormCollapsed:
|
|
1564
|
+
formItems: o,
|
|
1565
|
+
toggleFormCollapsed: p,
|
|
1532
1566
|
updateFormField: _,
|
|
1533
|
-
updateFormSource:
|
|
1534
|
-
reset:
|
|
1567
|
+
updateFormSource: g,
|
|
1568
|
+
reset: L,
|
|
1535
1569
|
validate: I,
|
|
1536
1570
|
onSubmitSuccess: s,
|
|
1537
|
-
openCollapsedDialog:
|
|
1571
|
+
openCollapsedDialog: w,
|
|
1538
1572
|
modalInstance: d
|
|
1539
1573
|
};
|
|
1540
1574
|
},
|
|
1541
1575
|
render() {
|
|
1542
1576
|
const e = () => {
|
|
1543
|
-
const r = [],
|
|
1577
|
+
const r = [], l = this.footer ? {
|
|
1544
1578
|
span: this.formColumns
|
|
1545
1579
|
} : {
|
|
1546
1580
|
span: this.formActiosSpan
|
|
@@ -1572,15 +1606,15 @@ const he = /* @__PURE__ */ R({
|
|
|
1572
1606
|
onClick: this.toggleFormCollapsed
|
|
1573
1607
|
}, {
|
|
1574
1608
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
1575
|
-
icon: () => this.formCollspased ? v(
|
|
1609
|
+
icon: () => this.formCollspased ? v(Lt, null, null) : v(Et, null, null)
|
|
1576
1610
|
})), this.collapsedMode === "dialog" && r.push(v(W, {
|
|
1577
1611
|
onClick: this.openCollapsedDialog
|
|
1578
1612
|
}, {
|
|
1579
1613
|
default: () => "高级搜索",
|
|
1580
1614
|
icon: () => v(qt, null, null)
|
|
1581
1615
|
}))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
|
|
1582
|
-
return v(Ce,
|
|
1583
|
-
default: () => [v(
|
|
1616
|
+
return v(Ce, l, {
|
|
1617
|
+
default: () => [v(Le, {
|
|
1584
1618
|
contentClass: this.footer ? "form-footer" : ""
|
|
1585
1619
|
}, {
|
|
1586
1620
|
default: () => [v(Ct, null, Fe(r) ? r : {
|
|
@@ -1591,7 +1625,7 @@ const he = /* @__PURE__ */ R({
|
|
|
1591
1625
|
};
|
|
1592
1626
|
return v("div", {
|
|
1593
1627
|
class: "form-render"
|
|
1594
|
-
}, [v(
|
|
1628
|
+
}, [v(Or, {
|
|
1595
1629
|
ref: (r) => this.modalInstance = r
|
|
1596
1630
|
}, {
|
|
1597
1631
|
default: () => [v(wt, Oe({
|
|
@@ -1611,11 +1645,11 @@ const he = /* @__PURE__ */ R({
|
|
|
1611
1645
|
"rol-gap": 10
|
|
1612
1646
|
}, {
|
|
1613
1647
|
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
|
|
1614
|
-
let
|
|
1648
|
+
let l;
|
|
1615
1649
|
return v(Ce, {
|
|
1616
1650
|
span: r.span
|
|
1617
|
-
}, Fe(
|
|
1618
|
-
default: () => [
|
|
1651
|
+
}, Fe(l = Hr(this.formSource, r)) ? l : {
|
|
1652
|
+
default: () => [l]
|
|
1619
1653
|
});
|
|
1620
1654
|
}), e()]
|
|
1621
1655
|
})]
|
|
@@ -1623,27 +1657,27 @@ const he = /* @__PURE__ */ R({
|
|
|
1623
1657
|
})]);
|
|
1624
1658
|
}
|
|
1625
1659
|
});
|
|
1626
|
-
function
|
|
1660
|
+
function Zr(e) {
|
|
1627
1661
|
return e;
|
|
1628
1662
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const r = U(),
|
|
1663
|
+
function el(e) {
|
|
1664
|
+
const r = U(), l = x();
|
|
1631
1665
|
function t() {
|
|
1632
|
-
var
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1666
|
+
var u, n;
|
|
1667
|
+
const a = (n = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : n[e];
|
|
1668
|
+
a && (l.value = a);
|
|
1635
1669
|
}
|
|
1636
|
-
return B(t), at(t),
|
|
1670
|
+
return B(t), at(t), l;
|
|
1637
1671
|
}
|
|
1638
|
-
const
|
|
1672
|
+
const tl = {
|
|
1639
1673
|
install(e, r) {
|
|
1640
|
-
e.component("FormRender",
|
|
1674
|
+
e.component("FormRender", ve);
|
|
1641
1675
|
}
|
|
1642
1676
|
};
|
|
1643
1677
|
export {
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1678
|
+
ve as FormRender,
|
|
1679
|
+
nl as FormRenderResolver,
|
|
1680
|
+
tl as default,
|
|
1681
|
+
Zr as defineForm,
|
|
1682
|
+
el as useForm
|
|
1649
1683
|
};
|