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