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