@gopowerteam/form-render 0.0.75 → 0.0.77
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/cascader/index.d.ts +1 -1
- package/dist/cjs/form-items/input/index.d.ts +1 -0
- package/dist/cjs/form-items/select/index.d.ts +1 -1
- package/dist/cjs/form-items/switch/index.d.ts +1 -1
- package/dist/cjs/form-items/tree-select/index.d.ts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/form-items/cascader/index.d.ts +1 -1
- package/dist/es/form-items/input/index.d.ts +1 -0
- package/dist/es/form-items/select/index.d.ts +1 -1
- package/dist/es/form-items/switch/index.d.ts +1 -1
- package/dist/es/form-items/tree-select/index.d.ts +1 -1
- package/dist/es/index.mjs +799 -743
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { getCurrentInstance as q, inject as ye, defineComponent as
|
|
2
|
-
import { DatePicker as
|
|
1
|
+
import { getCurrentInstance as q, inject as ye, defineComponent as E, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, ref as _, provide as he, onMounted as W, Fragment as ne, renderSlot as tt, createBlock as re, Teleport as nt, createVNode as f, TransitionGroup as rt, withCtx as lt, renderList as at, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as ut, triggerRef as Q, useCssVars as ot, onUnmounted as ct, withModifiers as it, toDisplayString as A, resolveDynamicComponent as Ee, normalizeProps as st, guardReactiveProps as dt, watch as Z, unref as ze, isRef as ae, toRefs as ft, customRef as mt, nextTick as Re, getCurrentScope as ht, onScopeDispose as vt, pushScopeId as Ae, popScopeId as Ne, isVNode as be, createTextVNode as I, h as Oe, onUpdated as pt } from "vue";
|
|
2
|
+
import { DatePicker as yt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as _t, RangePicker as $t, Textarea as Ft, TreeSelect as Ot, Cascader as Yt, FormItem as ve, Divider as Ye, Button as D, Tabs as Mt, TabPane as Tt, Form as Pt, Grid as jt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
|
|
3
3
|
import S from "dayjs";
|
|
4
|
-
import { FormRenderResolver as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
const a = q(), u = ye(
|
|
8
|
-
return `${(t = (
|
|
9
|
-
},
|
|
4
|
+
import { FormRenderResolver as Cr } from "./resolver.mjs";
|
|
5
|
+
const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
|
|
6
|
+
var r, n, t;
|
|
7
|
+
const a = q(), u = ye(It, void 0);
|
|
8
|
+
return `${(t = (n = u == null ? void 0 : u.prefixCls) != null ? n : (r = a == null ? void 0 : a.appContext.config.globalProperties[Et]) == null ? void 0 : r.classPrefix) != null ? t : Dt}-${e}`;
|
|
9
|
+
}, zt = Object.prototype.toString;
|
|
10
10
|
function we(e) {
|
|
11
|
-
return
|
|
11
|
+
return zt.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var xe = (e,
|
|
14
|
-
for (const [
|
|
15
|
-
e[
|
|
13
|
+
var xe = (e, r) => {
|
|
14
|
+
for (const [n, t] of r)
|
|
15
|
+
e[n] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const
|
|
18
|
+
const Rt = E({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -42,10 +42,10 @@ const zt = z({
|
|
|
42
42
|
click: (e) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(e, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: r
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
[`${
|
|
47
|
+
const n = ke("icon"), t = F(() => [n, `${n}-down`, {
|
|
48
|
+
[`${n}-spin`]: e.spin
|
|
49
49
|
}]), a = F(() => {
|
|
50
50
|
const l = {};
|
|
51
51
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
@@ -54,14 +54,14 @@ const zt = z({
|
|
|
54
54
|
cls: t,
|
|
55
55
|
innerStyle: a,
|
|
56
56
|
onClick: (l) => {
|
|
57
|
-
|
|
57
|
+
r("click", l);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Nt = /* @__PURE__ */ x("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
|
-
}, null, -1),
|
|
64
|
-
function
|
|
63
|
+
}, null, -1), Vt = [Nt];
|
|
64
|
+
function Bt(e, r, n, t, a, u) {
|
|
65
65
|
return $(), T("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
@@ -72,17 +72,17 @@ function Nt(e, n, r, t, a, u) {
|
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
|
-
onClick:
|
|
76
|
-
},
|
|
75
|
+
onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
76
|
+
}, Vt, 14, At);
|
|
77
77
|
}
|
|
78
|
-
var ie = /* @__PURE__ */ xe(
|
|
79
|
-
const
|
|
80
|
-
install: (e,
|
|
81
|
-
var
|
|
82
|
-
const t = (
|
|
78
|
+
var ie = /* @__PURE__ */ xe(Rt, [["render", Bt]]);
|
|
79
|
+
const Ut = Object.assign(ie, {
|
|
80
|
+
install: (e, r) => {
|
|
81
|
+
var n;
|
|
82
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
83
83
|
e.component(t + ie.name, ie);
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), qt = E({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -109,10 +109,10 @@ const Bt = Object.assign(ie, {
|
|
|
109
109
|
click: (e) => !0
|
|
110
110
|
},
|
|
111
111
|
setup(e, {
|
|
112
|
-
emit:
|
|
112
|
+
emit: r
|
|
113
113
|
}) {
|
|
114
|
-
const
|
|
115
|
-
[`${
|
|
114
|
+
const n = ke("icon"), t = F(() => [n, `${n}-up`, {
|
|
115
|
+
[`${n}-spin`]: e.spin
|
|
116
116
|
}]), a = F(() => {
|
|
117
117
|
const l = {};
|
|
118
118
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
@@ -121,14 +121,14 @@ const Bt = Object.assign(ie, {
|
|
|
121
121
|
cls: t,
|
|
122
122
|
innerStyle: a,
|
|
123
123
|
onClick: (l) => {
|
|
124
|
-
|
|
124
|
+
r("click", l);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), Wt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Ht = /* @__PURE__ */ x("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
|
-
}, null, -1),
|
|
131
|
-
function
|
|
130
|
+
}, null, -1), Gt = [Ht];
|
|
131
|
+
function Kt(e, r, n, t, a, u) {
|
|
132
132
|
return $(), T("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
@@ -139,17 +139,17 @@ function Ht(e, n, r, t, a, u) {
|
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
|
-
onClick:
|
|
143
|
-
},
|
|
142
|
+
onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
143
|
+
}, Gt, 14, Wt);
|
|
144
144
|
}
|
|
145
|
-
var se = /* @__PURE__ */ xe(
|
|
146
|
-
const
|
|
147
|
-
install: (e,
|
|
148
|
-
var
|
|
149
|
-
const t = (
|
|
145
|
+
var se = /* @__PURE__ */ xe(qt, [["render", Kt]]);
|
|
146
|
+
const Xt = Object.assign(se, {
|
|
147
|
+
install: (e, r) => {
|
|
148
|
+
var n;
|
|
149
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
150
150
|
e.component(t + se.name, se);
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
152
|
+
}), Jt = E({
|
|
153
153
|
name: "IconSearch",
|
|
154
154
|
props: {
|
|
155
155
|
size: {
|
|
@@ -176,10 +176,10 @@ const Gt = Object.assign(se, {
|
|
|
176
176
|
click: (e) => !0
|
|
177
177
|
},
|
|
178
178
|
setup(e, {
|
|
179
|
-
emit:
|
|
179
|
+
emit: r
|
|
180
180
|
}) {
|
|
181
|
-
const
|
|
182
|
-
[`${
|
|
181
|
+
const n = ke("icon"), t = F(() => [n, `${n}-search`, {
|
|
182
|
+
[`${n}-spin`]: e.spin
|
|
183
183
|
}]), a = F(() => {
|
|
184
184
|
const l = {};
|
|
185
185
|
return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
@@ -188,14 +188,14 @@ const Gt = Object.assign(se, {
|
|
|
188
188
|
cls: t,
|
|
189
189
|
innerStyle: a,
|
|
190
190
|
onClick: (l) => {
|
|
191
|
-
|
|
191
|
+
r("click", l);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), Qt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Zt = /* @__PURE__ */ x("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
|
|
197
|
+
}, null, -1), en = [Zt];
|
|
198
|
+
function tn(e, r, n, t, a, u) {
|
|
199
199
|
return $(), T("svg", {
|
|
200
200
|
viewBox: "0 0 48 48",
|
|
201
201
|
fill: "none",
|
|
@@ -206,42 +206,42 @@ function Zt(e, n, r, t, a, u) {
|
|
|
206
206
|
"stroke-width": e.strokeWidth,
|
|
207
207
|
"stroke-linecap": e.strokeLinecap,
|
|
208
208
|
"stroke-linejoin": e.strokeLinejoin,
|
|
209
|
-
onClick:
|
|
210
|
-
},
|
|
209
|
+
onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
|
|
210
|
+
}, en, 14, Qt);
|
|
211
211
|
}
|
|
212
|
-
var de = /* @__PURE__ */ xe(
|
|
213
|
-
const
|
|
214
|
-
install: (e,
|
|
215
|
-
var
|
|
216
|
-
const t = (
|
|
212
|
+
var de = /* @__PURE__ */ xe(Jt, [["render", tn]]);
|
|
213
|
+
const nn = Object.assign(de, {
|
|
214
|
+
install: (e, r) => {
|
|
215
|
+
var n;
|
|
216
|
+
const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
|
|
217
217
|
e.component(t + de.name, de);
|
|
218
218
|
}
|
|
219
219
|
}), Ce = Symbol("__MODAL__");
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function Be(e) {
|
|
221
|
+
return ht() ? (vt(e), !0) : !1;
|
|
222
222
|
}
|
|
223
223
|
function M(e) {
|
|
224
|
-
return typeof e == "function" ? e() :
|
|
224
|
+
return typeof e == "function" ? e() : ze(e);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const Ue = typeof window < "u" && typeof document < "u";
|
|
227
227
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
228
|
-
const
|
|
228
|
+
const rn = Object.prototype.toString, ln = (e) => rn.call(e) === "[object Object]", an = () => {
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function un(e) {
|
|
231
231
|
return q();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function on(e, r = {}) {
|
|
234
234
|
if (!ae(e))
|
|
235
|
-
return
|
|
236
|
-
const
|
|
235
|
+
return ft(e);
|
|
236
|
+
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
237
237
|
for (const t in e.value)
|
|
238
|
-
|
|
238
|
+
n[t] = mt(() => ({
|
|
239
239
|
get() {
|
|
240
240
|
return e.value[t];
|
|
241
241
|
},
|
|
242
242
|
set(a) {
|
|
243
243
|
var u;
|
|
244
|
-
if ((u = M(
|
|
244
|
+
if ((u = M(r.replaceRef)) == null || u)
|
|
245
245
|
if (Array.isArray(e.value)) {
|
|
246
246
|
const l = [...e.value];
|
|
247
247
|
l[t] = a, e.value = l;
|
|
@@ -253,96 +253,96 @@ function ar(e, n = {}) {
|
|
|
253
253
|
e.value[t] = a;
|
|
254
254
|
}
|
|
255
255
|
}));
|
|
256
|
-
return
|
|
256
|
+
return n;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
258
|
+
function cn(e, r = !0, n) {
|
|
259
|
+
un() ? W(e, n) : r ? e() : Re(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return (
|
|
261
|
+
function V(e) {
|
|
262
|
+
var r;
|
|
263
|
+
const n = M(e);
|
|
264
|
+
return (r = n == null ? void 0 : n.$el) != null ? r : n;
|
|
265
265
|
}
|
|
266
|
-
const ue =
|
|
266
|
+
const ue = Ue ? window : void 0;
|
|
267
267
|
function fe(...e) {
|
|
268
|
-
let
|
|
269
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
270
|
-
return
|
|
271
|
-
Array.isArray(
|
|
268
|
+
let r, n, t, a;
|
|
269
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, t, a] = e, r = ue) : [r, n, t, a] = e, !r)
|
|
270
|
+
return an;
|
|
271
|
+
Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
|
|
272
272
|
const u = [], l = () => {
|
|
273
273
|
u.forEach((o) => o()), u.length = 0;
|
|
274
|
-
},
|
|
275
|
-
() => [
|
|
276
|
-
([o,
|
|
274
|
+
}, i = (o, s, d, m) => (o.addEventListener(s, d, m), () => o.removeEventListener(s, d, m)), h = Z(
|
|
275
|
+
() => [V(r), M(a)],
|
|
276
|
+
([o, s]) => {
|
|
277
277
|
if (l(), !o)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
279
|
+
const d = ln(s) ? { ...s } : s;
|
|
280
280
|
u.push(
|
|
281
|
-
...
|
|
281
|
+
...n.flatMap((m) => t.map((v) => i(o, m, v, d)))
|
|
282
282
|
);
|
|
283
283
|
},
|
|
284
284
|
{ immediate: !0, flush: "post" }
|
|
285
285
|
), c = () => {
|
|
286
|
-
|
|
286
|
+
h(), l();
|
|
287
287
|
};
|
|
288
|
-
return
|
|
288
|
+
return Be(c), c;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
const e = _(!1),
|
|
292
|
-
return
|
|
290
|
+
function sn() {
|
|
291
|
+
const e = _(!1), r = q();
|
|
292
|
+
return r && W(() => {
|
|
293
293
|
e.value = !0;
|
|
294
|
-
},
|
|
294
|
+
}, r), e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
return F(() => (
|
|
296
|
+
function dn(e) {
|
|
297
|
+
const r = sn();
|
|
298
|
+
return F(() => (r.value, !!e()));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
var
|
|
300
|
+
function fn(e, r = {}) {
|
|
301
|
+
var n, t;
|
|
302
302
|
const {
|
|
303
303
|
pointerTypes: a,
|
|
304
304
|
preventDefault: u,
|
|
305
305
|
stopPropagation: l,
|
|
306
|
-
exact:
|
|
307
|
-
onMove:
|
|
306
|
+
exact: i,
|
|
307
|
+
onMove: h,
|
|
308
308
|
onEnd: c,
|
|
309
309
|
onStart: o,
|
|
310
|
-
initialValue:
|
|
311
|
-
axis:
|
|
312
|
-
draggingElement:
|
|
313
|
-
containerElement:
|
|
310
|
+
initialValue: s,
|
|
311
|
+
axis: d = "both",
|
|
312
|
+
draggingElement: m = ue,
|
|
313
|
+
containerElement: v,
|
|
314
314
|
handle: k = e
|
|
315
|
-
} =
|
|
316
|
-
(
|
|
317
|
-
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0,
|
|
315
|
+
} = r, y = _(
|
|
316
|
+
(n = M(s)) != null ? n : { x: 0, y: 0 }
|
|
317
|
+
), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, P = (w) => {
|
|
318
318
|
M(u) && w.preventDefault(), M(l) && w.stopPropagation();
|
|
319
|
-
},
|
|
319
|
+
}, z = (w) => {
|
|
320
320
|
var g;
|
|
321
|
-
if (M(
|
|
321
|
+
if (M(r.disabled) || !j(w) || M(i) && w.target !== M(e))
|
|
322
322
|
return;
|
|
323
|
-
const b = M(
|
|
323
|
+
const b = M(v), O = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), Y = M(e).getBoundingClientRect(), ee = {
|
|
324
324
|
x: w.clientX - (b ? Y.left - O.left + b.scrollLeft : Y.left),
|
|
325
325
|
y: w.clientY - (b ? Y.top - O.top + b.scrollTop : Y.top)
|
|
326
326
|
};
|
|
327
|
-
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee,
|
|
327
|
+
(o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, P(w));
|
|
328
328
|
}, H = (w) => {
|
|
329
|
-
if (M(
|
|
329
|
+
if (M(r.disabled) || !j(w) || !C.value)
|
|
330
330
|
return;
|
|
331
|
-
const g = M(
|
|
331
|
+
const g = M(v), b = M(e).getBoundingClientRect();
|
|
332
332
|
let { x: O, y: Y } = y.value;
|
|
333
|
-
(
|
|
333
|
+
(d === "x" || d === "both") && (O = w.clientX - C.value.x, g && (O = Math.min(Math.max(0, O), g.scrollWidth - b.width))), (d === "y" || d === "both") && (Y = w.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - b.height))), y.value = {
|
|
334
334
|
x: O,
|
|
335
335
|
y: Y
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
M(
|
|
336
|
+
}, h == null || h(y.value, w), P(w);
|
|
337
|
+
}, B = (w) => {
|
|
338
|
+
M(r.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), P(w));
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const w = { capture: (t =
|
|
342
|
-
fe(k, "pointerdown",
|
|
340
|
+
if (Ue) {
|
|
341
|
+
const w = { capture: (t = r.capture) != null ? t : !0 };
|
|
342
|
+
fe(k, "pointerdown", z, w), fe(m, "pointermove", H, w), fe(m, "pointerup", B, w);
|
|
343
343
|
}
|
|
344
344
|
return {
|
|
345
|
-
...
|
|
345
|
+
...on(y),
|
|
346
346
|
position: y,
|
|
347
347
|
isDragging: F(() => !!C.value),
|
|
348
348
|
style: F(
|
|
@@ -350,85 +350,85 @@ function ir(e, n = {}) {
|
|
|
350
350
|
)
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const { window: t = ue, ...a } =
|
|
353
|
+
function mn(e, r, n = {}) {
|
|
354
|
+
const { window: t = ue, ...a } = n;
|
|
355
355
|
let u;
|
|
356
|
-
const l =
|
|
356
|
+
const l = dn(() => t && "ResizeObserver" in t), i = () => {
|
|
357
357
|
u && (u.disconnect(), u = void 0);
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
(
|
|
361
|
-
if (
|
|
362
|
-
u = new ResizeObserver(
|
|
363
|
-
for (const
|
|
364
|
-
|
|
358
|
+
}, h = F(() => Array.isArray(e) ? e.map((s) => V(s)) : [V(e)]), c = Z(
|
|
359
|
+
h,
|
|
360
|
+
(s) => {
|
|
361
|
+
if (i(), l.value && t) {
|
|
362
|
+
u = new ResizeObserver(r);
|
|
363
|
+
for (const d of s)
|
|
364
|
+
d && u.observe(d, a);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0, flush: "post" }
|
|
368
368
|
), o = () => {
|
|
369
|
-
|
|
369
|
+
i(), c();
|
|
370
370
|
};
|
|
371
|
-
return
|
|
371
|
+
return Be(o), {
|
|
372
372
|
isSupported: l,
|
|
373
373
|
stop: o
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function G(e,
|
|
377
|
-
const { window: t = ue, box: a = "content-box" } =
|
|
378
|
-
var
|
|
379
|
-
return (
|
|
380
|
-
}), l = _(
|
|
376
|
+
function G(e, r = { width: 0, height: 0 }, n = {}) {
|
|
377
|
+
const { window: t = ue, box: a = "content-box" } = n, u = F(() => {
|
|
378
|
+
var s, d;
|
|
379
|
+
return (d = (s = V(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
380
|
+
}), l = _(r.width), i = _(r.height), { stop: h } = mn(
|
|
381
381
|
e,
|
|
382
|
-
([
|
|
383
|
-
const
|
|
382
|
+
([s]) => {
|
|
383
|
+
const d = a === "border-box" ? s.borderBoxSize : a === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
384
384
|
if (t && u.value) {
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
l.value = Number.parseFloat(
|
|
385
|
+
const m = V(e);
|
|
386
|
+
if (m) {
|
|
387
|
+
const v = t.getComputedStyle(m);
|
|
388
|
+
l.value = Number.parseFloat(v.width), i.value = Number.parseFloat(v.height);
|
|
389
389
|
}
|
|
390
|
-
} else if (
|
|
391
|
-
const
|
|
392
|
-
l.value =
|
|
390
|
+
} else if (d) {
|
|
391
|
+
const m = Array.isArray(d) ? d : [d];
|
|
392
|
+
l.value = m.reduce((v, { inlineSize: k }) => v + k, 0), i.value = m.reduce((v, { blockSize: k }) => v + k, 0);
|
|
393
393
|
} else
|
|
394
|
-
l.value =
|
|
394
|
+
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
395
395
|
},
|
|
396
|
-
|
|
396
|
+
n
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
|
|
398
|
+
cn(() => {
|
|
399
|
+
const s = V(e);
|
|
400
|
+
s && (l.value = "offsetWidth" in s ? s.offsetWidth : r.width, i.value = "offsetHeight" in s ? s.offsetHeight : r.height);
|
|
401
401
|
});
|
|
402
402
|
const c = Z(
|
|
403
|
-
() =>
|
|
404
|
-
(
|
|
405
|
-
l.value =
|
|
403
|
+
() => V(e),
|
|
404
|
+
(s) => {
|
|
405
|
+
l.value = s ? r.width : 0, i.value = s ? r.height : 0;
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
function o() {
|
|
409
|
-
|
|
409
|
+
h(), c();
|
|
410
410
|
}
|
|
411
411
|
return {
|
|
412
412
|
width: l,
|
|
413
|
-
height:
|
|
413
|
+
height: i,
|
|
414
414
|
stop: o
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "title text-16px font-bold" }, pn = { class: "action" }, yn = ["form"], gn = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "modal-loading"
|
|
420
|
-
},
|
|
420
|
+
}, bn = /* @__PURE__ */ hn(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
421
421
|
/* @__PURE__ */ x("div"),
|
|
422
422
|
/* @__PURE__ */ x("div"),
|
|
423
423
|
/* @__PURE__ */ x("div"),
|
|
424
424
|
/* @__PURE__ */ x("div")
|
|
425
|
-
], -1)),
|
|
426
|
-
|
|
427
|
-
],
|
|
425
|
+
], -1)), kn = [
|
|
426
|
+
bn
|
|
427
|
+
], wn = {
|
|
428
428
|
name: "ModalContainer",
|
|
429
429
|
inheritAttrs: !0
|
|
430
|
-
},
|
|
431
|
-
...
|
|
430
|
+
}, xn = /* @__PURE__ */ E({
|
|
431
|
+
...wn,
|
|
432
432
|
props: {
|
|
433
433
|
id: {},
|
|
434
434
|
form: {},
|
|
@@ -459,16 +459,16 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
459
459
|
zIndex: { default: 1e3 }
|
|
460
460
|
},
|
|
461
461
|
emits: ["submit"],
|
|
462
|
-
setup(e, { expose:
|
|
463
|
-
|
|
462
|
+
setup(e, { expose: r, emit: n }) {
|
|
463
|
+
ot((p) => ({
|
|
464
464
|
"5751bf6b": p.zIndex
|
|
465
465
|
}));
|
|
466
|
-
const t = e, a =
|
|
467
|
-
let
|
|
468
|
-
const c = N(), o = N(),
|
|
466
|
+
const t = e, a = n, u = ye(Ce), l = _(!1);
|
|
467
|
+
let i = 0, h = 0;
|
|
468
|
+
const c = N(), o = N(), s = N(), d = N(), m = N(), v = N(), { height: k } = G(c), { height: y } = G(s, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: j } = G(m), { height: P } = G(v), { x: z, y: H } = fn(s, {
|
|
469
469
|
initialValue: { x: 0, y: 0 }
|
|
470
470
|
});
|
|
471
|
-
function
|
|
471
|
+
function B() {
|
|
472
472
|
u == null || u.close(t.id);
|
|
473
473
|
}
|
|
474
474
|
function w(p) {
|
|
@@ -489,60 +489,60 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
489
489
|
}[t.position]), p;
|
|
490
490
|
}), b = F(() => {
|
|
491
491
|
const p = {};
|
|
492
|
-
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${
|
|
492
|
+
return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${z.value - i}px, ${H.value - h}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
|
|
493
493
|
}), O = F(() => {
|
|
494
494
|
const p = {};
|
|
495
495
|
return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
|
|
496
496
|
}), Y = F(() => {
|
|
497
|
-
const p = {},
|
|
498
|
-
return t.maxHeight && (p.maxHeight = `${Fe -
|
|
497
|
+
const p = {}, L = j.value + P.value + y.value + C.value, Fe = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
|
|
498
|
+
return t.maxHeight && (p.maxHeight = `${Fe - L}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - L}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${L}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
|
|
499
499
|
});
|
|
500
500
|
function ee() {
|
|
501
501
|
const p = o.value;
|
|
502
502
|
if (t.form && p) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const L = p.querySelector(`form[name="${t.form}"]`);
|
|
504
|
+
L && L.dispatchEvent(new Event("submit"));
|
|
505
505
|
}
|
|
506
506
|
a("submit");
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Xe() {
|
|
509
509
|
u == null || u.close(t.id);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Je() {
|
|
512
512
|
window && window.addEventListener("resize", () => {
|
|
513
|
-
Q(c), Q(o), o.value && (
|
|
513
|
+
Q(c), Q(o), o.value && (i = o.value.offsetLeft, h = o.value.offsetTop);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Qe() {
|
|
517
517
|
if (t.closeable && t.esc) {
|
|
518
|
-
const p = ({ key:
|
|
519
|
-
|
|
518
|
+
const p = ({ key: L }) => {
|
|
519
|
+
L === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
|
|
520
520
|
};
|
|
521
521
|
window.addEventListener("keydown", p);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
524
|
+
function Ze() {
|
|
525
|
+
i = o.value.offsetLeft, h = o.value.offsetTop;
|
|
526
526
|
}
|
|
527
527
|
W(() => {
|
|
528
|
-
|
|
529
|
-
}),
|
|
528
|
+
Qe(), Je();
|
|
529
|
+
}), ct(() => {
|
|
530
530
|
});
|
|
531
|
-
function
|
|
531
|
+
function et() {
|
|
532
532
|
return l.value = !0, () => $e();
|
|
533
533
|
}
|
|
534
534
|
function $e() {
|
|
535
535
|
l.value = !1;
|
|
536
536
|
}
|
|
537
|
-
return
|
|
538
|
-
showLoading:
|
|
537
|
+
return r({
|
|
538
|
+
showLoading: et,
|
|
539
539
|
hideLoading: $e
|
|
540
|
-
}), (p,
|
|
540
|
+
}), (p, L) => ($(), T("div", {
|
|
541
541
|
ref_key: "wrapperRef",
|
|
542
542
|
ref: c,
|
|
543
543
|
class: "modal-wrapper",
|
|
544
544
|
style: R(g.value),
|
|
545
|
-
onClick:
|
|
545
|
+
onClick: L[0] || (L[0] = it((Fe) => p.maskClosable && B(), ["self"]))
|
|
546
546
|
}, [
|
|
547
547
|
x("div", {
|
|
548
548
|
ref_key: "contentRef",
|
|
@@ -553,64 +553,64 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
553
553
|
p.header ? ($(), T("div", {
|
|
554
554
|
key: 0,
|
|
555
555
|
ref_key: "headerRef",
|
|
556
|
-
ref:
|
|
556
|
+
ref: s,
|
|
557
557
|
class: "modal-header",
|
|
558
558
|
style: R(O.value),
|
|
559
|
-
onMousedown:
|
|
559
|
+
onMousedown: Ze
|
|
560
560
|
}, [
|
|
561
|
-
x("div",
|
|
562
|
-
x("div",
|
|
561
|
+
x("div", vn, A(p.title), 1),
|
|
562
|
+
x("div", pn, [
|
|
563
563
|
p.closeable ? ($(), T("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
566
|
-
onClick:
|
|
566
|
+
onClick: B
|
|
567
567
|
})) : U("", !0)
|
|
568
568
|
])
|
|
569
569
|
], 36)) : U("", !0),
|
|
570
570
|
x("div", {
|
|
571
571
|
id: "modal-header-slot",
|
|
572
572
|
ref_key: "headerSlotRef",
|
|
573
|
-
ref:
|
|
573
|
+
ref: m
|
|
574
574
|
}, null, 512),
|
|
575
575
|
x("div", {
|
|
576
576
|
class: "modal-body",
|
|
577
577
|
style: R(Y.value)
|
|
578
578
|
}, [
|
|
579
|
-
($(),
|
|
579
|
+
($(), re(Ee(p.component), st(dt(p.componentProps)), null, 16))
|
|
580
580
|
], 4),
|
|
581
581
|
x("div", {
|
|
582
582
|
id: "modal-footer-slot",
|
|
583
583
|
ref_key: "footerSlotRef",
|
|
584
|
-
ref:
|
|
584
|
+
ref: v
|
|
585
585
|
}, null, 512),
|
|
586
586
|
p.footer ? ($(), T("div", {
|
|
587
587
|
key: 1,
|
|
588
588
|
ref_key: "footerRef",
|
|
589
|
-
ref:
|
|
589
|
+
ref: d,
|
|
590
590
|
class: "modal-footer space-x-2"
|
|
591
591
|
}, [
|
|
592
592
|
x("button", {
|
|
593
593
|
class: "cancel-button",
|
|
594
594
|
type: "button",
|
|
595
|
-
onClick:
|
|
595
|
+
onClick: Xe
|
|
596
596
|
}, A(p.cancelText), 1),
|
|
597
597
|
x("button", {
|
|
598
598
|
class: "submit-button",
|
|
599
599
|
form: p.form,
|
|
600
600
|
type: "submit",
|
|
601
601
|
onClick: ee
|
|
602
|
-
}, A(p.submitText), 9,
|
|
602
|
+
}, A(p.submitText), 9, yn)
|
|
603
603
|
], 512)) : U("", !0),
|
|
604
|
-
l.value ? ($(), T("div",
|
|
604
|
+
l.value ? ($(), T("div", gn, kn)) : U("", !0)
|
|
605
605
|
], 6)
|
|
606
606
|
], 4));
|
|
607
607
|
}
|
|
608
|
-
}), oe = (e,
|
|
609
|
-
const
|
|
610
|
-
for (const [t, a] of
|
|
611
|
-
|
|
612
|
-
return
|
|
613
|
-
},
|
|
608
|
+
}), oe = (e, r) => {
|
|
609
|
+
const n = e.__vccOpts || e;
|
|
610
|
+
for (const [t, a] of r)
|
|
611
|
+
n[t] = a;
|
|
612
|
+
return n;
|
|
613
|
+
}, Cn = /* @__PURE__ */ oe(xn, [["__scopeId", "data-v-9a7af353"]]), Sn = { class: "modal-dialog" }, _n = { class: "dialog-body" }, $n = { class: "dialog-title" }, Fn = { class: "dialog-content" }, On = /* @__PURE__ */ E({
|
|
614
614
|
__name: "modal-dialog",
|
|
615
615
|
props: {
|
|
616
616
|
type: {},
|
|
@@ -623,29 +623,29 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
623
623
|
footer: {}
|
|
624
624
|
},
|
|
625
625
|
setup(e) {
|
|
626
|
-
const
|
|
626
|
+
const r = e, n = qe(), t = F(() => r.title ? r.title : {
|
|
627
627
|
confirm: "提示",
|
|
628
628
|
info: "提示",
|
|
629
629
|
warning: "警告",
|
|
630
630
|
error: "错误",
|
|
631
631
|
success: "成功"
|
|
632
|
-
}[
|
|
632
|
+
}[r.type]);
|
|
633
633
|
async function a() {
|
|
634
|
-
|
|
634
|
+
r.onOk && await r.onOk(), n.close();
|
|
635
635
|
}
|
|
636
636
|
async function u() {
|
|
637
|
-
|
|
637
|
+
r.onCancel && await r.onCancel(), n.close();
|
|
638
638
|
}
|
|
639
|
-
return (l,
|
|
640
|
-
x("div",
|
|
641
|
-
x("div",
|
|
642
|
-
x("div",
|
|
639
|
+
return (l, i) => ($(), T("section", Sn, [
|
|
640
|
+
x("div", _n, [
|
|
641
|
+
x("div", $n, A(t.value), 1),
|
|
642
|
+
x("div", Fn, A(l.content), 1)
|
|
643
643
|
]),
|
|
644
644
|
x("div", {
|
|
645
645
|
class: "dialog-footer space-x-2",
|
|
646
646
|
style: R(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
|
|
647
647
|
}, [
|
|
648
|
-
l.footer ? ($(),
|
|
648
|
+
l.footer ? ($(), re(Ee(l.footer), { key: 0 })) : ($(), T(ne, { key: 1 }, [
|
|
649
649
|
x("button", {
|
|
650
650
|
class: "submit-button",
|
|
651
651
|
type: "submit",
|
|
@@ -661,32 +661,32 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
661
661
|
], 4)
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
|
-
}),
|
|
664
|
+
}), Yn = /* @__PURE__ */ oe(On, [["__scopeId", "data-v-0c6b8db2"]]), Mn = (e) => (Ae("data-v-559bdf2e"), e = e(), Ne(), e), Tn = { class: "flex-center" }, Pn = /* @__PURE__ */ Mn(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
|
|
665
665
|
/* @__PURE__ */ x("div", { class: "lds-ring" }, [
|
|
666
666
|
/* @__PURE__ */ x("div"),
|
|
667
667
|
/* @__PURE__ */ x("div"),
|
|
668
668
|
/* @__PURE__ */ x("div"),
|
|
669
669
|
/* @__PURE__ */ x("div")
|
|
670
670
|
])
|
|
671
|
-
], -1)),
|
|
671
|
+
], -1)), jn = { class: "modal-loading-text" }, Ln = /* @__PURE__ */ E({
|
|
672
672
|
__name: "modal-loading",
|
|
673
673
|
props: {
|
|
674
674
|
text: { default: "加载中" }
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
|
-
return (
|
|
678
|
-
|
|
679
|
-
x("div",
|
|
677
|
+
return (r, n) => ($(), T("section", Tn, [
|
|
678
|
+
Pn,
|
|
679
|
+
x("div", jn, A(r.text), 1)
|
|
680
680
|
]));
|
|
681
681
|
}
|
|
682
|
-
}),
|
|
682
|
+
}), In = /* @__PURE__ */ oe(Ln, [["__scopeId", "data-v-559bdf2e"]]), Dn = {
|
|
683
683
|
key: 0,
|
|
684
684
|
class: "modal-teleport"
|
|
685
|
-
},
|
|
685
|
+
}, En = {
|
|
686
686
|
name: "ModalProvider",
|
|
687
687
|
inheritAttrs: !0
|
|
688
|
-
},
|
|
689
|
-
...
|
|
688
|
+
}, zn = /* @__PURE__ */ E({
|
|
689
|
+
...En,
|
|
690
690
|
props: {
|
|
691
691
|
appendToBody: { type: [Boolean, String], default: !1 },
|
|
692
692
|
sizes: { default: () => ({
|
|
@@ -698,57 +698,57 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
698
698
|
maxHeight: { default: "90%" },
|
|
699
699
|
offset: { default: () => ({ x: 0, y: 0 }) }
|
|
700
700
|
},
|
|
701
|
-
setup(e, { expose:
|
|
702
|
-
const
|
|
703
|
-
function u(
|
|
704
|
-
const k =
|
|
705
|
-
() => Promise.resolve(typeof
|
|
701
|
+
setup(e, { expose: r }) {
|
|
702
|
+
const n = N([]), t = _(!1), a = q();
|
|
703
|
+
function u(d, m = {}, v = {}) {
|
|
704
|
+
const k = ut(
|
|
705
|
+
() => Promise.resolve(typeof d == "string" ? Yn : d)
|
|
706
706
|
);
|
|
707
|
-
typeof
|
|
707
|
+
typeof d == "string" && (m.type = d, v.size = "small", v.fullscreen = !1, v.mode = "dialog", v.footer = !1, v.header = !1);
|
|
708
708
|
const y = Math.random().toString(32).slice(2), C = Object.assign({
|
|
709
|
-
zIndex: typeof
|
|
710
|
-
},
|
|
711
|
-
|
|
709
|
+
zIndex: typeof d == "string" ? 1100 : 1e3
|
|
710
|
+
}, v), j = new Promise((P, z) => {
|
|
711
|
+
n.value.push({
|
|
712
712
|
id: y,
|
|
713
713
|
component: k,
|
|
714
|
-
props:
|
|
714
|
+
props: m || {},
|
|
715
715
|
options: {
|
|
716
716
|
...C,
|
|
717
|
-
type: typeof
|
|
717
|
+
type: typeof d == "string" ? d : "component"
|
|
718
718
|
},
|
|
719
|
-
resolve:
|
|
720
|
-
reject:
|
|
719
|
+
resolve: P,
|
|
720
|
+
reject: z,
|
|
721
721
|
listeners: []
|
|
722
|
-
}), Q(
|
|
723
|
-
}).catch((
|
|
724
|
-
}) : Promise.reject(
|
|
722
|
+
}), Q(n);
|
|
723
|
+
}).catch((P) => P === "CANCEL" ? new Promise(() => {
|
|
724
|
+
}) : Promise.reject(P));
|
|
725
725
|
return Object.assign(j, {
|
|
726
726
|
close: () => l(y)
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
|
-
function l(
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
729
|
+
function l(d, m) {
|
|
730
|
+
const v = n.value.findIndex((y) => y.id === d);
|
|
731
|
+
if (v < 0)
|
|
732
732
|
return;
|
|
733
|
-
const k =
|
|
734
|
-
|
|
733
|
+
const k = n.value[v];
|
|
734
|
+
m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), n.value.splice(v, 1), Q(n);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
!
|
|
738
|
-
|
|
739
|
-
}),
|
|
736
|
+
function i() {
|
|
737
|
+
!n.value || n.value.length === 0 || (n.value.forEach((d) => {
|
|
738
|
+
d == null || d.reject("CANCEL");
|
|
739
|
+
}), n.value = [], Q(n));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
743
|
-
if (!
|
|
741
|
+
function h(d, m) {
|
|
742
|
+
const v = n.value.find((y) => y.id === d);
|
|
743
|
+
if (!v)
|
|
744
744
|
return;
|
|
745
|
-
const k =
|
|
745
|
+
const k = v.listeners.find((y) => y.event === m);
|
|
746
746
|
k && k.callback({
|
|
747
747
|
open: u,
|
|
748
|
-
close: (y) => l(
|
|
749
|
-
closeAll:
|
|
750
|
-
showLoading: () => c(
|
|
751
|
-
hideLoading: () => o(
|
|
748
|
+
close: (y) => l(v.id, y),
|
|
749
|
+
closeAll: i,
|
|
750
|
+
showLoading: () => c(v.id),
|
|
751
|
+
hideLoading: () => o(v.id),
|
|
752
752
|
confirm: (y) => u("confirm", y),
|
|
753
753
|
success: (y) => u("success", y),
|
|
754
754
|
error: (y) => u("error", y),
|
|
@@ -756,79 +756,79 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
756
756
|
info: (y) => u("info", y)
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
function c(
|
|
759
|
+
function c(d, m) {
|
|
760
760
|
if (!a)
|
|
761
761
|
return;
|
|
762
|
-
const [
|
|
763
|
-
if (
|
|
764
|
-
return
|
|
762
|
+
const [v] = a.refs[`modal-container_${d}`] || [];
|
|
763
|
+
if (v)
|
|
764
|
+
return v.showLoading();
|
|
765
765
|
{
|
|
766
|
-
const { close: k } = u(
|
|
767
|
-
text:
|
|
766
|
+
const { close: k } = u(In, {
|
|
767
|
+
text: m == null ? void 0 : m.text
|
|
768
768
|
}, {
|
|
769
769
|
footer: !1,
|
|
770
770
|
header: !1,
|
|
771
771
|
closeable: !1,
|
|
772
772
|
backgroundColor: "transparent"
|
|
773
773
|
});
|
|
774
|
-
return
|
|
774
|
+
return m != null && m.duration && setTimeout(
|
|
775
775
|
() => {
|
|
776
776
|
k();
|
|
777
777
|
},
|
|
778
|
-
|
|
778
|
+
m == null ? void 0 : m.duration
|
|
779
779
|
), k;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
function o(
|
|
782
|
+
function o(d) {
|
|
783
783
|
if (!a)
|
|
784
784
|
return;
|
|
785
|
-
const [
|
|
786
|
-
if (
|
|
787
|
-
return
|
|
785
|
+
const [m] = a.refs[`modal-container_${d}`];
|
|
786
|
+
if (m)
|
|
787
|
+
return m.hideLoading();
|
|
788
788
|
}
|
|
789
|
-
function
|
|
790
|
-
const k =
|
|
789
|
+
function s(d, m, v) {
|
|
790
|
+
const k = n.value.find((y) => y.id === d);
|
|
791
791
|
k && k.listeners.push({
|
|
792
|
-
event:
|
|
793
|
-
callback:
|
|
792
|
+
event: m,
|
|
793
|
+
callback: v
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
return he(Ce, {
|
|
797
797
|
open: u,
|
|
798
798
|
close: l,
|
|
799
|
-
closeAll:
|
|
800
|
-
addEventListener:
|
|
799
|
+
closeAll: i,
|
|
800
|
+
addEventListener: s,
|
|
801
801
|
showLoading: c,
|
|
802
802
|
hideLoading: o
|
|
803
|
-
}),
|
|
804
|
-
elements:
|
|
803
|
+
}), r({
|
|
804
|
+
elements: n,
|
|
805
805
|
open: u,
|
|
806
806
|
close: l,
|
|
807
|
-
closeAll:
|
|
807
|
+
closeAll: i
|
|
808
808
|
}), W(() => {
|
|
809
809
|
t.value = !0;
|
|
810
|
-
}), (
|
|
811
|
-
|
|
812
|
-
t.value ? ($(), T("div",
|
|
813
|
-
($(),
|
|
814
|
-
disabled: !
|
|
815
|
-
to: typeof
|
|
810
|
+
}), (d, m) => ($(), T(ne, null, [
|
|
811
|
+
tt(d.$slots, "default", {}, void 0, !0),
|
|
812
|
+
t.value ? ($(), T("div", Dn, [
|
|
813
|
+
($(), re(nt, {
|
|
814
|
+
disabled: !d.appendToBody,
|
|
815
|
+
to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
|
|
816
816
|
}, [
|
|
817
|
-
|
|
818
|
-
default:
|
|
819
|
-
($(!0), T(
|
|
820
|
-
id:
|
|
821
|
-
key:
|
|
817
|
+
f(rt, { name: "modal-fade" }, {
|
|
818
|
+
default: lt(() => [
|
|
819
|
+
($(!0), T(ne, null, at(n.value, (v) => ($(), re(Cn, ge({
|
|
820
|
+
id: v.id,
|
|
821
|
+
key: v.id,
|
|
822
822
|
ref_for: !0,
|
|
823
|
-
ref: `modal-container_${
|
|
824
|
-
component:
|
|
825
|
-
"component-props":
|
|
826
|
-
"max-height":
|
|
827
|
-
"max-width":
|
|
828
|
-
offset:
|
|
829
|
-
sizes:
|
|
830
|
-
},
|
|
831
|
-
onSubmit: () => v
|
|
823
|
+
ref: `modal-container_${v.id}`,
|
|
824
|
+
component: v.component,
|
|
825
|
+
"component-props": v.props,
|
|
826
|
+
"max-height": d.maxHeight,
|
|
827
|
+
"max-width": d.maxWidth,
|
|
828
|
+
offset: d.offset,
|
|
829
|
+
sizes: d.sizes
|
|
830
|
+
}, v.options, {
|
|
831
|
+
onSubmit: () => h(v.id, "submit")
|
|
832
832
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
|
|
833
833
|
]),
|
|
834
834
|
_: 1
|
|
@@ -837,28 +837,28 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
|
|
|
837
837
|
])) : U("", !0)
|
|
838
838
|
], 64));
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
841
|
-
function me(e,
|
|
842
|
-
var
|
|
840
|
+
}), Rn = /* @__PURE__ */ oe(zn, [["__scopeId", "data-v-60414811"]]);
|
|
841
|
+
function me(e, r) {
|
|
842
|
+
var n, t;
|
|
843
843
|
let a = e == null ? void 0 : e.parent;
|
|
844
|
-
for (; a && ((
|
|
844
|
+
for (; a && ((n = a == null ? void 0 : a.type) == null ? void 0 : n.name) !== r; )
|
|
845
845
|
a = a.parent;
|
|
846
|
-
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) ===
|
|
846
|
+
return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === r ? a : null;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
const e = ye(Ce),
|
|
850
|
-
function
|
|
848
|
+
function qe() {
|
|
849
|
+
const e = ye(Ce), r = q();
|
|
850
|
+
function n(t, a, u) {
|
|
851
851
|
if (!e)
|
|
852
852
|
throw new Error("Not Found Modal Provider Component");
|
|
853
853
|
return e.open(t, a, u);
|
|
854
854
|
}
|
|
855
855
|
return {
|
|
856
|
-
open:
|
|
856
|
+
open: n,
|
|
857
857
|
close(t) {
|
|
858
858
|
var a;
|
|
859
859
|
if (!e)
|
|
860
860
|
throw new Error("Not Found Modal Provider Component");
|
|
861
|
-
const u = me(
|
|
861
|
+
const u = me(r, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
|
|
862
862
|
if (!l)
|
|
863
863
|
throw new Error("Not Found Current Modal Container");
|
|
864
864
|
e.close(l, t);
|
|
@@ -872,14 +872,14 @@ function Be() {
|
|
|
872
872
|
var a;
|
|
873
873
|
if (!e)
|
|
874
874
|
throw new Error("Not Found Modal Provider Component");
|
|
875
|
-
const u = me(
|
|
875
|
+
const u = me(r, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
|
|
876
876
|
return e.showLoading(l, t);
|
|
877
877
|
},
|
|
878
878
|
hideLoading() {
|
|
879
879
|
var t;
|
|
880
880
|
if (!e)
|
|
881
881
|
throw new Error("Not Found Modal Provider Component");
|
|
882
|
-
const a = me(
|
|
882
|
+
const a = me(r, "ModalContainer"), u = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
|
|
883
883
|
return e.hideLoading(u);
|
|
884
884
|
},
|
|
885
885
|
confirm(t) {
|
|
@@ -903,38 +903,38 @@ const Te = {
|
|
|
903
903
|
id: Symbol("ID"),
|
|
904
904
|
source: Symbol("Source")
|
|
905
905
|
};
|
|
906
|
-
function
|
|
907
|
-
const
|
|
906
|
+
function An(e, r) {
|
|
907
|
+
const n = _({});
|
|
908
908
|
return e == null || e.forEach((a) => {
|
|
909
909
|
let u = null;
|
|
910
|
-
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null),
|
|
911
|
-
}), [
|
|
912
|
-
|
|
910
|
+
a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), r && r[a.key] !== void 0 && (u = r[a.key]), n.value[a.key] = u;
|
|
911
|
+
}), [n, (a) => {
|
|
912
|
+
n.value = a;
|
|
913
913
|
}];
|
|
914
914
|
}
|
|
915
915
|
var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
916
|
-
function
|
|
916
|
+
function We(e) {
|
|
917
917
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
918
918
|
}
|
|
919
|
-
var
|
|
920
|
-
(function(e,
|
|
921
|
-
(function(
|
|
919
|
+
var Nn = { exports: {} };
|
|
920
|
+
(function(e, r) {
|
|
921
|
+
(function(n, t) {
|
|
922
922
|
e.exports = t(S);
|
|
923
|
-
})(Se, function(
|
|
923
|
+
})(Se, function(n) {
|
|
924
924
|
function t(l) {
|
|
925
925
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
926
926
|
default: l
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
var a = t(
|
|
929
|
+
var a = t(n), u = {
|
|
930
930
|
name: "zh-cn",
|
|
931
931
|
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
932
932
|
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
933
933
|
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
934
934
|
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
935
935
|
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
936
|
-
ordinal: function(l,
|
|
937
|
-
return
|
|
936
|
+
ordinal: function(l, i) {
|
|
937
|
+
return i === "W" ? l + "周" : l + "日";
|
|
938
938
|
},
|
|
939
939
|
weekStart: 1,
|
|
940
940
|
yearStart: 4,
|
|
@@ -965,138 +965,138 @@ var Er = { exports: {} };
|
|
|
965
965
|
y: "1 年",
|
|
966
966
|
yy: "%d 年"
|
|
967
967
|
},
|
|
968
|
-
meridiem: function(l,
|
|
969
|
-
var
|
|
970
|
-
return
|
|
968
|
+
meridiem: function(l, i) {
|
|
969
|
+
var h = 100 * l + i;
|
|
970
|
+
return h < 600 ? "凌晨" : h < 900 ? "早上" : h < 1100 ? "上午" : h < 1300 ? "中午" : h < 1800 ? "下午" : "晚上";
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
return a.default.locale(u, null, !0), u;
|
|
974
974
|
});
|
|
975
|
-
})(
|
|
976
|
-
var
|
|
977
|
-
(function(e,
|
|
978
|
-
(function(
|
|
975
|
+
})(Nn);
|
|
976
|
+
var He = { exports: {} };
|
|
977
|
+
(function(e, r) {
|
|
978
|
+
(function(n, t) {
|
|
979
979
|
e.exports = t();
|
|
980
980
|
})(Se, function() {
|
|
981
|
-
var
|
|
981
|
+
var n = "week", t = "year";
|
|
982
982
|
return function(a, u, l) {
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
return this.add(7 * (
|
|
983
|
+
var i = u.prototype;
|
|
984
|
+
i.week = function(h) {
|
|
985
|
+
if (h === void 0 && (h = null), h !== null)
|
|
986
|
+
return this.add(7 * (h - this.week()), "day");
|
|
987
987
|
var c = this.$locale().yearStart || 1;
|
|
988
988
|
if (this.month() === 11 && this.date() > 25) {
|
|
989
|
-
var o = l(this).startOf(t).add(1, t).date(c),
|
|
990
|
-
if (o.isBefore(
|
|
989
|
+
var o = l(this).startOf(t).add(1, t).date(c), s = l(this).endOf(n);
|
|
990
|
+
if (o.isBefore(s))
|
|
991
991
|
return 1;
|
|
992
992
|
}
|
|
993
|
-
var
|
|
994
|
-
return
|
|
995
|
-
},
|
|
996
|
-
return
|
|
993
|
+
var d = l(this).startOf(t).date(c).startOf(n).subtract(1, "millisecond"), m = this.diff(d, n, !0);
|
|
994
|
+
return m < 0 ? l(this).startOf("week").week() : Math.ceil(m);
|
|
995
|
+
}, i.weeks = function(h) {
|
|
996
|
+
return h === void 0 && (h = null), this.week(h);
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
999
|
});
|
|
1000
|
-
})(
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1003
|
-
var
|
|
1004
|
-
(function(e,
|
|
1005
|
-
(function(
|
|
1000
|
+
})(He);
|
|
1001
|
+
var Vn = He.exports;
|
|
1002
|
+
const Bn = /* @__PURE__ */ We(Vn);
|
|
1003
|
+
var Ge = { exports: {} };
|
|
1004
|
+
(function(e, r) {
|
|
1005
|
+
(function(n, t) {
|
|
1006
1006
|
e.exports = t();
|
|
1007
1007
|
})(Se, function() {
|
|
1008
|
-
var
|
|
1008
|
+
var n = "month", t = "quarter";
|
|
1009
1009
|
return function(a, u) {
|
|
1010
1010
|
var l = u.prototype;
|
|
1011
1011
|
l.quarter = function(c) {
|
|
1012
1012
|
return this.$utils().u(c) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (c - 1));
|
|
1013
1013
|
};
|
|
1014
|
-
var
|
|
1014
|
+
var i = l.add;
|
|
1015
1015
|
l.add = function(c, o) {
|
|
1016
|
-
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c,
|
|
1016
|
+
return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, n) : i.bind(this)(c, o);
|
|
1017
1017
|
};
|
|
1018
|
-
var
|
|
1018
|
+
var h = l.startOf;
|
|
1019
1019
|
l.startOf = function(c, o) {
|
|
1020
|
-
var
|
|
1021
|
-
if (
|
|
1022
|
-
var
|
|
1023
|
-
return
|
|
1020
|
+
var s = this.$utils(), d = !!s.u(o) || o;
|
|
1021
|
+
if (s.p(c) === t) {
|
|
1022
|
+
var m = this.quarter() - 1;
|
|
1023
|
+
return d ? this.month(3 * m).startOf(n).startOf("day") : this.month(3 * m + 2).endOf(n).endOf("day");
|
|
1024
1024
|
}
|
|
1025
|
-
return
|
|
1025
|
+
return h.bind(this)(c, o);
|
|
1026
1026
|
};
|
|
1027
1027
|
};
|
|
1028
1028
|
});
|
|
1029
|
-
})(
|
|
1030
|
-
var
|
|
1031
|
-
const
|
|
1032
|
-
S.extend(
|
|
1033
|
-
S.extend(
|
|
1029
|
+
})(Ge);
|
|
1030
|
+
var Un = Ge.exports;
|
|
1031
|
+
const qn = /* @__PURE__ */ We(Un);
|
|
1032
|
+
S.extend(Bn);
|
|
1033
|
+
S.extend(qn);
|
|
1034
1034
|
S.locale("zh-cn", {
|
|
1035
1035
|
weekStart: 1
|
|
1036
1036
|
});
|
|
1037
|
-
function
|
|
1038
|
-
function n
|
|
1039
|
-
return e != null && e.disabledDate ? e.disabledDate(
|
|
1037
|
+
function Wn(e) {
|
|
1038
|
+
function r(n, t) {
|
|
1039
|
+
return e != null && e.disabledDate ? e.disabledDate(n, t) : !1;
|
|
1040
1040
|
}
|
|
1041
|
-
return (
|
|
1041
|
+
return (n, t) => {
|
|
1042
1042
|
function a() {
|
|
1043
|
-
const l =
|
|
1043
|
+
const l = n[t.key];
|
|
1044
1044
|
switch (e == null ? void 0 : e.type) {
|
|
1045
1045
|
case "week":
|
|
1046
|
-
return
|
|
1046
|
+
return f("span", null, [`${S(l).format("YYYY年")}${S(l).week()}周`]);
|
|
1047
1047
|
case "month":
|
|
1048
|
-
return
|
|
1048
|
+
return f("span", null, [S(l).format("YYYY年MM月")]);
|
|
1049
1049
|
case "quarter":
|
|
1050
|
-
return
|
|
1050
|
+
return f("span", null, [`${S(l).format("YYYY年")}${S(l).quarter()}季度`]);
|
|
1051
1051
|
case "year":
|
|
1052
|
-
return
|
|
1052
|
+
return f("span", null, [S(l).format("YYYY年")]);
|
|
1053
1053
|
case "date":
|
|
1054
1054
|
default:
|
|
1055
|
-
return
|
|
1055
|
+
return f("span", null, [S(l).format("YYYY年MM月DD日")]);
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
function u() {
|
|
1059
1059
|
switch (e == null ? void 0 : e.type) {
|
|
1060
1060
|
case "week":
|
|
1061
|
-
return
|
|
1061
|
+
return f(wt, {
|
|
1062
1062
|
"day-start-of-week": 1,
|
|
1063
|
-
modelValue:
|
|
1064
|
-
"onUpdate:modelValue": (l) =>
|
|
1065
|
-
"disabled-date":
|
|
1063
|
+
modelValue: n[t.key],
|
|
1064
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1065
|
+
"disabled-date": r,
|
|
1066
1066
|
format: e == null ? void 0 : e.labelFormat,
|
|
1067
1067
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1068
1068
|
}, null);
|
|
1069
1069
|
case "month":
|
|
1070
|
-
return
|
|
1071
|
-
modelValue:
|
|
1072
|
-
"onUpdate:modelValue": (l) =>
|
|
1073
|
-
"disabled-date":
|
|
1070
|
+
return f(kt, {
|
|
1071
|
+
modelValue: n[t.key],
|
|
1072
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1073
|
+
"disabled-date": r,
|
|
1074
1074
|
format: e == null ? void 0 : e.labelFormat,
|
|
1075
1075
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1076
1076
|
}, null);
|
|
1077
1077
|
case "quarter":
|
|
1078
|
-
return
|
|
1079
|
-
modelValue:
|
|
1080
|
-
"onUpdate:modelValue": (l) =>
|
|
1081
|
-
"disabled-date":
|
|
1078
|
+
return f(bt, {
|
|
1079
|
+
modelValue: n[t.key],
|
|
1080
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1081
|
+
"disabled-date": r,
|
|
1082
1082
|
format: e == null ? void 0 : e.labelFormat,
|
|
1083
1083
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1084
1084
|
}, null);
|
|
1085
1085
|
case "year":
|
|
1086
|
-
return
|
|
1087
|
-
modelValue:
|
|
1088
|
-
"onUpdate:modelValue": (l) =>
|
|
1089
|
-
"disabled-date":
|
|
1086
|
+
return f(gt, {
|
|
1087
|
+
modelValue: n[t.key],
|
|
1088
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1089
|
+
"disabled-date": r,
|
|
1090
1090
|
format: e == null ? void 0 : e.labelFormat,
|
|
1091
1091
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1092
1092
|
}, null);
|
|
1093
1093
|
case "date":
|
|
1094
1094
|
default:
|
|
1095
|
-
return
|
|
1095
|
+
return f(yt, ge({
|
|
1096
1096
|
"disabled-input": !0,
|
|
1097
|
-
modelValue:
|
|
1098
|
-
"onUpdate:modelValue": (l) =>
|
|
1099
|
-
"disabled-date":
|
|
1097
|
+
modelValue: n[t.key],
|
|
1098
|
+
"onUpdate:modelValue": (l) => n[t.key] = l,
|
|
1099
|
+
"disabled-date": r,
|
|
1100
1100
|
format: e == null ? void 0 : e.labelFormat,
|
|
1101
1101
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1102
1102
|
}, {
|
|
@@ -1113,68 +1113,124 @@ function Vr(e) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
};
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return (
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1116
|
+
function Pe(e) {
|
|
1117
|
+
return typeof e == "function" ? e() : ze(e);
|
|
1118
|
+
}
|
|
1119
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1120
|
+
const je = () => {
|
|
1121
|
+
};
|
|
1122
|
+
function Hn(e, r) {
|
|
1123
|
+
function n(...t) {
|
|
1124
|
+
return new Promise((a, u) => {
|
|
1125
|
+
Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(a).catch(u);
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
return n;
|
|
1129
|
+
}
|
|
1130
|
+
function Gn(e, r = {}) {
|
|
1131
|
+
let n, t, a = je;
|
|
1132
|
+
const u = (i) => {
|
|
1133
|
+
clearTimeout(i), a(), a = je;
|
|
1134
|
+
};
|
|
1135
|
+
return (i) => {
|
|
1136
|
+
const h = Pe(e), c = Pe(r.maxWait);
|
|
1137
|
+
return n && u(n), h <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(i())) : new Promise((o, s) => {
|
|
1138
|
+
a = r.rejectOnCancel ? s : o, c && !t && (t = setTimeout(() => {
|
|
1139
|
+
n && u(n), t = null, o(i());
|
|
1140
|
+
}, c)), n = setTimeout(() => {
|
|
1141
|
+
t && u(t), t = null, o(i());
|
|
1142
|
+
}, h);
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
function Kn(e, r = 200, n = {}) {
|
|
1147
|
+
return Hn(
|
|
1148
|
+
Gn(r, n),
|
|
1149
|
+
e
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
function _e(e, r, n) {
|
|
1153
|
+
const t = Z(e, (...a) => (Re(() => t()), r(...a)), n);
|
|
1154
|
+
return t;
|
|
1155
|
+
}
|
|
1156
|
+
const Xn = Kn((e) => {
|
|
1157
|
+
e && e.dispatchEvent(new Event("submit"));
|
|
1158
|
+
}, 1e3);
|
|
1159
|
+
function Jn(e) {
|
|
1160
|
+
let r;
|
|
1161
|
+
return (n, t) => {
|
|
1121
1162
|
function a() {
|
|
1163
|
+
return f("span", null, [n[t.key]]);
|
|
1164
|
+
}
|
|
1165
|
+
function u() {
|
|
1166
|
+
if (!(e != null && e.autoSubmit))
|
|
1167
|
+
return;
|
|
1168
|
+
let i = r;
|
|
1169
|
+
for (; i && i.$el.tagName !== "FORM"; )
|
|
1170
|
+
i = i.$parent;
|
|
1171
|
+
if (i && i.$el) {
|
|
1172
|
+
const h = i.$el;
|
|
1173
|
+
Xn(h);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
function l() {
|
|
1122
1177
|
switch (e == null ? void 0 : e.type) {
|
|
1123
1178
|
case "number":
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1126
|
-
|
|
1179
|
+
return f(Ve, {
|
|
1180
|
+
ref: (i) => r = i,
|
|
1181
|
+
modelValue: n[t.key],
|
|
1182
|
+
"onUpdate:modelValue": (i) => n[t.key] = i,
|
|
1127
1183
|
hideButton: !0,
|
|
1128
1184
|
"read-only": e == null ? void 0 : e.readonly,
|
|
1129
1185
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1186
|
+
onInput: u,
|
|
1187
|
+
onClear: () => u(),
|
|
1130
1188
|
allowClear: e == null ? void 0 : e.clearable
|
|
1131
1189
|
}, null);
|
|
1132
1190
|
case "string":
|
|
1133
1191
|
default:
|
|
1134
|
-
return
|
|
1135
|
-
|
|
1136
|
-
|
|
1192
|
+
return f(xt, {
|
|
1193
|
+
ref: (i) => r = i,
|
|
1194
|
+
modelValue: n[t.key],
|
|
1195
|
+
"onUpdate:modelValue": (i) => n[t.key] = i,
|
|
1137
1196
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1138
1197
|
readonly: e == null ? void 0 : e.readonly,
|
|
1198
|
+
onInput: u,
|
|
1199
|
+
onClear: () => u(),
|
|
1139
1200
|
allowClear: e == null ? void 0 : e.clearable
|
|
1140
1201
|
}, null);
|
|
1141
1202
|
}
|
|
1142
1203
|
}
|
|
1143
|
-
switch (
|
|
1204
|
+
switch (t.mode) {
|
|
1144
1205
|
case "text":
|
|
1145
|
-
return
|
|
1206
|
+
return a();
|
|
1146
1207
|
case "component":
|
|
1147
1208
|
default:
|
|
1148
|
-
return
|
|
1209
|
+
return l();
|
|
1149
1210
|
}
|
|
1150
1211
|
};
|
|
1151
1212
|
}
|
|
1152
|
-
|
|
1153
|
-
function _e(e, n, r) {
|
|
1154
|
-
const t = Z(e, (...a) => (Ie(() => t()), n(...a)), r);
|
|
1155
|
-
return t;
|
|
1156
|
-
}
|
|
1157
|
-
function qr(e) {
|
|
1213
|
+
function Qn(e) {
|
|
1158
1214
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1159
1215
|
}
|
|
1160
1216
|
const K = /* @__PURE__ */ new WeakMap();
|
|
1161
|
-
function
|
|
1217
|
+
function Zn() {
|
|
1162
1218
|
const e = _(/* @__PURE__ */ new Map());
|
|
1163
|
-
return [e, (
|
|
1219
|
+
return [e, (n) => e.value = n];
|
|
1164
1220
|
}
|
|
1165
|
-
function
|
|
1166
|
-
let
|
|
1167
|
-
const [t, a] =
|
|
1168
|
-
if (e.onChange && e.onChange(c), !e.
|
|
1221
|
+
function er(e) {
|
|
1222
|
+
let r, n = !1;
|
|
1223
|
+
const [t, a] = Zn(), u = (c) => {
|
|
1224
|
+
if (e.onChange && e.onChange(c), !e.autoSubmit || !r)
|
|
1169
1225
|
return;
|
|
1170
|
-
let o =
|
|
1226
|
+
let o = r;
|
|
1171
1227
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1172
1228
|
o = o.$parent;
|
|
1173
1229
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1174
1230
|
}, l = (c, o) => {
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
},
|
|
1231
|
+
const s = c();
|
|
1232
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1233
|
+
}, i = async () => {
|
|
1178
1234
|
const c = K.get(e.options);
|
|
1179
1235
|
switch (typeof c) {
|
|
1180
1236
|
case "function":
|
|
@@ -1185,17 +1241,17 @@ function Hr(e) {
|
|
|
1185
1241
|
return;
|
|
1186
1242
|
}
|
|
1187
1243
|
K.set(e.options, a), l(e.options, (o) => {
|
|
1188
|
-
const
|
|
1189
|
-
K.set(e.options, o),
|
|
1244
|
+
const s = K.get(e.options);
|
|
1245
|
+
K.set(e.options, o), s(o);
|
|
1190
1246
|
});
|
|
1191
|
-
},
|
|
1247
|
+
}, h = () => {
|
|
1192
1248
|
l(e.options, (c) => {
|
|
1193
1249
|
a(c);
|
|
1194
1250
|
});
|
|
1195
1251
|
};
|
|
1196
1252
|
switch (!0) {
|
|
1197
1253
|
case e.options instanceof Function: {
|
|
1198
|
-
e.cache !== !1 ?
|
|
1254
|
+
e.cache !== !1 ? i() : h();
|
|
1199
1255
|
break;
|
|
1200
1256
|
}
|
|
1201
1257
|
case ae(e.options): {
|
|
@@ -1210,47 +1266,47 @@ function Hr(e) {
|
|
|
1210
1266
|
t.value = e.options;
|
|
1211
1267
|
}
|
|
1212
1268
|
return (c, o) => {
|
|
1213
|
-
e.default && !
|
|
1214
|
-
function i() {
|
|
1215
|
-
const f = c[o.key];
|
|
1216
|
-
return e.multiple ? d("span", null, [f.map((m) => t.value.get(m)).join(" ,")]) : d("span", null, [t.value.get(f)]);
|
|
1217
|
-
}
|
|
1269
|
+
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1218
1270
|
function s() {
|
|
1219
|
-
|
|
1220
|
-
return
|
|
1221
|
-
|
|
1271
|
+
const m = c[o.key];
|
|
1272
|
+
return e.multiple ? f("span", null, [m.map((v) => t.value.get(v)).join(" ,")]) : f("span", null, [t.value.get(m)]);
|
|
1273
|
+
}
|
|
1274
|
+
function d() {
|
|
1275
|
+
let m;
|
|
1276
|
+
return f(Ct, {
|
|
1277
|
+
ref: (v) => r = v,
|
|
1222
1278
|
multiple: e.multiple,
|
|
1223
1279
|
modelValue: c[o.key],
|
|
1224
|
-
"onUpdate:modelValue": (
|
|
1280
|
+
"onUpdate:modelValue": (v) => c[o.key] = v,
|
|
1225
1281
|
placeholder: e.placeholder,
|
|
1226
1282
|
allowClear: e.clearable,
|
|
1227
1283
|
allowSearch: e.searchable,
|
|
1228
1284
|
"allow-create": e.createable,
|
|
1229
1285
|
maxTagCount: e.maxTagCount ?? 2,
|
|
1230
1286
|
onChange: u
|
|
1231
|
-
},
|
|
1232
|
-
key:
|
|
1233
|
-
value:
|
|
1287
|
+
}, Qn(m = Array.from(t.value.entries()).map(([v, k]) => f(St, {
|
|
1288
|
+
key: v,
|
|
1289
|
+
value: v,
|
|
1234
1290
|
label: k
|
|
1235
|
-
}, null))) ?
|
|
1236
|
-
default: () => [
|
|
1291
|
+
}, null))) ? m : {
|
|
1292
|
+
default: () => [m]
|
|
1237
1293
|
});
|
|
1238
1294
|
}
|
|
1239
1295
|
switch (o.mode) {
|
|
1240
1296
|
case "text":
|
|
1241
|
-
return
|
|
1297
|
+
return s();
|
|
1242
1298
|
case "component":
|
|
1243
1299
|
default:
|
|
1244
|
-
return
|
|
1300
|
+
return d();
|
|
1245
1301
|
}
|
|
1246
1302
|
};
|
|
1247
1303
|
}
|
|
1248
|
-
function
|
|
1249
|
-
let
|
|
1250
|
-
function
|
|
1251
|
-
if (!(e != null && e.
|
|
1304
|
+
function tr(e) {
|
|
1305
|
+
let r;
|
|
1306
|
+
function n() {
|
|
1307
|
+
if (!(e != null && e.autoSubmit) || !r)
|
|
1252
1308
|
return;
|
|
1253
|
-
let t =
|
|
1309
|
+
let t = r;
|
|
1254
1310
|
for (; t && t.$el.tagName !== "FORM"; )
|
|
1255
1311
|
t = t.$parent;
|
|
1256
1312
|
t && t.$el && t.$el.dispatchEvent(new Event("submit"));
|
|
@@ -1258,19 +1314,19 @@ function Gr(e) {
|
|
|
1258
1314
|
return (t, a) => {
|
|
1259
1315
|
e != null && e.default && (t[a.key] = e.default);
|
|
1260
1316
|
function u() {
|
|
1261
|
-
const
|
|
1262
|
-
return
|
|
1317
|
+
const i = t[a.key];
|
|
1318
|
+
return f("span", null, [i ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
|
|
1263
1319
|
}
|
|
1264
1320
|
function l() {
|
|
1265
|
-
return
|
|
1266
|
-
ref: (
|
|
1321
|
+
return f(_t, {
|
|
1322
|
+
ref: (i) => r = i,
|
|
1267
1323
|
modelValue: t[a.key],
|
|
1268
|
-
"onUpdate:modelValue": (
|
|
1324
|
+
"onUpdate:modelValue": (i) => t[a.key] = i,
|
|
1269
1325
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
1270
1326
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
1271
1327
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
1272
1328
|
uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
|
|
1273
|
-
onChange:
|
|
1329
|
+
onChange: n
|
|
1274
1330
|
}, null);
|
|
1275
1331
|
}
|
|
1276
1332
|
switch (a.mode) {
|
|
@@ -1282,47 +1338,47 @@ function Gr(e) {
|
|
|
1282
1338
|
}
|
|
1283
1339
|
};
|
|
1284
1340
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return (
|
|
1341
|
+
function nr(e) {
|
|
1342
|
+
return (r, n) => {
|
|
1287
1343
|
let t = [];
|
|
1288
1344
|
function a(c) {
|
|
1289
1345
|
t = c;
|
|
1290
1346
|
}
|
|
1291
1347
|
function u(c) {
|
|
1292
1348
|
if (c && c.length === 2) {
|
|
1293
|
-
const [o,
|
|
1294
|
-
n
|
|
1349
|
+
const [o, s] = c.sort(), d = S(o).startOf("days"), m = S(s).endOf("days");
|
|
1350
|
+
r[n.key] = [d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), m.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
1295
1351
|
}
|
|
1296
1352
|
}
|
|
1297
1353
|
function l(c) {
|
|
1298
1354
|
return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
|
|
1299
1355
|
}
|
|
1300
|
-
function
|
|
1301
|
-
const c = n
|
|
1356
|
+
function i() {
|
|
1357
|
+
const c = r[n.key], [o, s] = c, d = (m) => {
|
|
1302
1358
|
switch (e == null ? void 0 : e.type) {
|
|
1303
1359
|
case "week":
|
|
1304
|
-
return
|
|
1360
|
+
return f("span", null, [`${S(m).format("YYYY年")}${S(m).week()}周`]);
|
|
1305
1361
|
case "month":
|
|
1306
|
-
return
|
|
1362
|
+
return f("span", null, [S(m).format("YYYY年MM月")]);
|
|
1307
1363
|
case "quarter":
|
|
1308
|
-
return
|
|
1364
|
+
return f("span", null, [`${S(m).format("YYYY年")}${S(m).quarter()}季度`]);
|
|
1309
1365
|
case "year":
|
|
1310
|
-
return
|
|
1366
|
+
return f("span", null, [S(m).format("YYYY年")]);
|
|
1311
1367
|
case "date":
|
|
1312
1368
|
default:
|
|
1313
|
-
return
|
|
1369
|
+
return f("span", null, [S(m).format("YYYY年MM月DD日")]);
|
|
1314
1370
|
}
|
|
1315
1371
|
};
|
|
1316
|
-
return
|
|
1372
|
+
return f("span", null, [d(o), I(" - "), d(s)]);
|
|
1317
1373
|
}
|
|
1318
|
-
function
|
|
1319
|
-
return
|
|
1374
|
+
function h() {
|
|
1375
|
+
return f("div", null, [f($t, {
|
|
1320
1376
|
"disabled-input": !0,
|
|
1321
1377
|
style: {
|
|
1322
1378
|
width: "300px"
|
|
1323
1379
|
},
|
|
1324
|
-
modelValue: n
|
|
1325
|
-
"onUpdate:modelValue": (c) => n
|
|
1380
|
+
modelValue: r[n.key],
|
|
1381
|
+
"onUpdate:modelValue": (c) => r[n.key] = c,
|
|
1326
1382
|
onSelect: a,
|
|
1327
1383
|
onChange: u,
|
|
1328
1384
|
mode: e == null ? void 0 : e.type,
|
|
@@ -1333,30 +1389,30 @@ function Kr(e) {
|
|
|
1333
1389
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
1334
1390
|
}, null)]);
|
|
1335
1391
|
}
|
|
1336
|
-
switch (
|
|
1392
|
+
switch (n.mode) {
|
|
1337
1393
|
case "text":
|
|
1338
|
-
return
|
|
1394
|
+
return i();
|
|
1339
1395
|
case "component":
|
|
1340
1396
|
default:
|
|
1341
|
-
return
|
|
1397
|
+
return h();
|
|
1342
1398
|
}
|
|
1343
1399
|
};
|
|
1344
1400
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return (
|
|
1401
|
+
function rr(e) {
|
|
1402
|
+
return (r, n) => {
|
|
1347
1403
|
function t() {
|
|
1348
|
-
return
|
|
1404
|
+
return f("span", null, [r[n.key]]);
|
|
1349
1405
|
}
|
|
1350
1406
|
function a() {
|
|
1351
|
-
return
|
|
1352
|
-
modelValue: n
|
|
1353
|
-
"onUpdate:modelValue": (u) => n
|
|
1407
|
+
return f(Ft, {
|
|
1408
|
+
modelValue: r[n.key],
|
|
1409
|
+
"onUpdate:modelValue": (u) => r[n.key] = u,
|
|
1354
1410
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
1355
1411
|
autoSize: e == null ? void 0 : e.autosize,
|
|
1356
1412
|
maxLength: e == null ? void 0 : e.maxLength
|
|
1357
1413
|
}, null);
|
|
1358
1414
|
}
|
|
1359
|
-
switch (
|
|
1415
|
+
switch (n.mode) {
|
|
1360
1416
|
case "text":
|
|
1361
1417
|
return t();
|
|
1362
1418
|
case "component":
|
|
@@ -1365,47 +1421,47 @@ function Xr(e) {
|
|
|
1365
1421
|
}
|
|
1366
1422
|
};
|
|
1367
1423
|
}
|
|
1368
|
-
function
|
|
1369
|
-
let
|
|
1370
|
-
const
|
|
1424
|
+
function Ke(e) {
|
|
1425
|
+
let r = !1;
|
|
1426
|
+
const n = [], t = (a) => {
|
|
1371
1427
|
var u;
|
|
1372
|
-
if (!
|
|
1373
|
-
if (
|
|
1374
|
-
|
|
1428
|
+
if (!r) {
|
|
1429
|
+
if (n.push(a), a[e.valueProp] === e.key) {
|
|
1430
|
+
r = !0;
|
|
1375
1431
|
return;
|
|
1376
1432
|
}
|
|
1377
|
-
(u = a.children) != null && u.length && a.children.forEach(t),
|
|
1433
|
+
(u = a.children) != null && u.length && a.children.forEach(t), r || n.pop();
|
|
1378
1434
|
}
|
|
1379
1435
|
};
|
|
1380
|
-
return e.data.forEach(t),
|
|
1436
|
+
return e.data.forEach(t), n;
|
|
1381
1437
|
}
|
|
1382
|
-
function
|
|
1383
|
-
let
|
|
1384
|
-
const
|
|
1438
|
+
function lr(e) {
|
|
1439
|
+
let r = e.data;
|
|
1440
|
+
const n = [];
|
|
1385
1441
|
return e.path.forEach((t) => {
|
|
1386
1442
|
var u;
|
|
1387
|
-
const a =
|
|
1388
|
-
a &&
|
|
1389
|
-
}),
|
|
1443
|
+
const a = r.find((l) => l[e.valueProp] === t);
|
|
1444
|
+
a && n.push(a), a && ((u = a.children) != null && u.length) && (r = a.children);
|
|
1445
|
+
}), n;
|
|
1390
1446
|
}
|
|
1391
1447
|
const X = /* @__PURE__ */ new WeakMap();
|
|
1392
|
-
function
|
|
1448
|
+
function ar() {
|
|
1393
1449
|
const e = _([]);
|
|
1394
|
-
return [e, (
|
|
1450
|
+
return [e, (n) => e.value = n];
|
|
1395
1451
|
}
|
|
1396
|
-
function
|
|
1397
|
-
let
|
|
1398
|
-
const [t, a] =
|
|
1399
|
-
if (!e.
|
|
1452
|
+
function ur(e) {
|
|
1453
|
+
let r, n = !1;
|
|
1454
|
+
const [t, a] = ar(), u = () => {
|
|
1455
|
+
if (!e.autoSubmit || !r)
|
|
1400
1456
|
return;
|
|
1401
|
-
let o =
|
|
1457
|
+
let o = r;
|
|
1402
1458
|
for (; o && o.$el.tagName !== "FORM"; )
|
|
1403
1459
|
o = o.$parent;
|
|
1404
1460
|
o && o.$el && o.$el.dispatchEvent(new Event("submit"));
|
|
1405
|
-
}, l = (o,
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1461
|
+
}, l = (o, s) => {
|
|
1462
|
+
const d = o();
|
|
1463
|
+
d instanceof Promise ? d.then(s) : s(d);
|
|
1464
|
+
}, i = async () => {
|
|
1409
1465
|
const o = X.get(e.options);
|
|
1410
1466
|
switch (typeof o) {
|
|
1411
1467
|
case "function":
|
|
@@ -1415,18 +1471,18 @@ function Zr(e) {
|
|
|
1415
1471
|
a(o);
|
|
1416
1472
|
return;
|
|
1417
1473
|
}
|
|
1418
|
-
X.set(e.options, a), l(e.options, (
|
|
1419
|
-
const
|
|
1420
|
-
X.set(e.options,
|
|
1474
|
+
X.set(e.options, a), l(e.options, (s) => {
|
|
1475
|
+
const d = X.get(e.options);
|
|
1476
|
+
X.set(e.options, s), d(s);
|
|
1421
1477
|
});
|
|
1422
|
-
},
|
|
1478
|
+
}, h = () => {
|
|
1423
1479
|
l(e.options, (o) => {
|
|
1424
1480
|
a(o);
|
|
1425
1481
|
});
|
|
1426
1482
|
};
|
|
1427
1483
|
switch (!0) {
|
|
1428
1484
|
case e.options instanceof Function: {
|
|
1429
|
-
e.cache !== !1 ?
|
|
1485
|
+
e.cache !== !1 ? i() : h();
|
|
1430
1486
|
break;
|
|
1431
1487
|
}
|
|
1432
1488
|
case ae(e.options): {
|
|
@@ -1440,16 +1496,16 @@ function Zr(e) {
|
|
|
1440
1496
|
default:
|
|
1441
1497
|
t.value = e.options;
|
|
1442
1498
|
}
|
|
1443
|
-
function c(o,
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1499
|
+
function c(o, s) {
|
|
1500
|
+
var v;
|
|
1501
|
+
const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m = s[d];
|
|
1502
|
+
return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
|
|
1447
1503
|
}
|
|
1448
|
-
return (o,
|
|
1449
|
-
e.default && !
|
|
1450
|
-
function
|
|
1451
|
-
const
|
|
1452
|
-
const [C] =
|
|
1504
|
+
return (o, s) => {
|
|
1505
|
+
e.default && !n && (o[s.key] = e.default, n = !0);
|
|
1506
|
+
function d() {
|
|
1507
|
+
const v = o[s.key], k = (y) => {
|
|
1508
|
+
const [C] = Ke({
|
|
1453
1509
|
data: t.value,
|
|
1454
1510
|
labelProp: "title",
|
|
1455
1511
|
valueProp: "key",
|
|
@@ -1458,19 +1514,19 @@ function Zr(e) {
|
|
|
1458
1514
|
return C == null ? void 0 : C.title;
|
|
1459
1515
|
};
|
|
1460
1516
|
if (e.multiple) {
|
|
1461
|
-
const y =
|
|
1462
|
-
return
|
|
1517
|
+
const y = v.map((C) => k(C));
|
|
1518
|
+
return f("span", null, [y.join(", ")]);
|
|
1463
1519
|
} else {
|
|
1464
|
-
const y = k(
|
|
1465
|
-
return
|
|
1520
|
+
const y = k(v);
|
|
1521
|
+
return f("span", null, [y]);
|
|
1466
1522
|
}
|
|
1467
1523
|
}
|
|
1468
|
-
function
|
|
1469
|
-
return
|
|
1470
|
-
ref: (
|
|
1524
|
+
function m() {
|
|
1525
|
+
return f(Ot, {
|
|
1526
|
+
ref: (v) => r = v,
|
|
1471
1527
|
multiple: e.multiple,
|
|
1472
|
-
modelValue: o[
|
|
1473
|
-
"onUpdate:modelValue": (
|
|
1528
|
+
modelValue: o[s.key],
|
|
1529
|
+
"onUpdate:modelValue": (v) => o[s.key] = v,
|
|
1474
1530
|
placeholder: e.placeholder,
|
|
1475
1531
|
allowClear: e.clearable,
|
|
1476
1532
|
allowSearch: e.searchable,
|
|
@@ -1484,33 +1540,33 @@ function Zr(e) {
|
|
|
1484
1540
|
...e.slots
|
|
1485
1541
|
});
|
|
1486
1542
|
}
|
|
1487
|
-
switch (
|
|
1543
|
+
switch (s.mode) {
|
|
1488
1544
|
case "text":
|
|
1489
|
-
return
|
|
1545
|
+
return d();
|
|
1490
1546
|
case "component":
|
|
1491
1547
|
default:
|
|
1492
|
-
return
|
|
1548
|
+
return m();
|
|
1493
1549
|
}
|
|
1494
1550
|
};
|
|
1495
1551
|
}
|
|
1496
1552
|
const J = /* @__PURE__ */ new WeakMap();
|
|
1497
|
-
function
|
|
1553
|
+
function or() {
|
|
1498
1554
|
const e = _([]);
|
|
1499
|
-
return [e, (
|
|
1555
|
+
return [e, (n) => e.value = n];
|
|
1500
1556
|
}
|
|
1501
|
-
function
|
|
1502
|
-
let
|
|
1503
|
-
const [t, a] =
|
|
1504
|
-
if (!e.
|
|
1557
|
+
function cr(e) {
|
|
1558
|
+
let r, n = !1;
|
|
1559
|
+
const [t, a] = or(), u = () => {
|
|
1560
|
+
if (!e.autoSubmit || !r)
|
|
1505
1561
|
return;
|
|
1506
|
-
let c =
|
|
1562
|
+
let c = r;
|
|
1507
1563
|
for (; c && c.$el.tagName !== "FORM"; )
|
|
1508
1564
|
c = c.$parent;
|
|
1509
1565
|
c && c.$el && c.$el.dispatchEvent(new Event("submit"));
|
|
1510
1566
|
}, l = (c, o) => {
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
},
|
|
1567
|
+
const s = c();
|
|
1568
|
+
s instanceof Promise ? s.then(o) : o(s);
|
|
1569
|
+
}, i = async () => {
|
|
1514
1570
|
const c = J.get(e.options);
|
|
1515
1571
|
switch (typeof c) {
|
|
1516
1572
|
case "function":
|
|
@@ -1521,17 +1577,17 @@ function tn(e) {
|
|
|
1521
1577
|
return;
|
|
1522
1578
|
}
|
|
1523
1579
|
J.set(e.options, a), l(e.options, (o) => {
|
|
1524
|
-
const
|
|
1525
|
-
J.set(e.options, o),
|
|
1580
|
+
const s = J.get(e.options);
|
|
1581
|
+
J.set(e.options, o), s(o);
|
|
1526
1582
|
});
|
|
1527
|
-
},
|
|
1583
|
+
}, h = () => {
|
|
1528
1584
|
l(e.options, (c) => {
|
|
1529
1585
|
a(c);
|
|
1530
1586
|
});
|
|
1531
1587
|
};
|
|
1532
1588
|
switch (!0) {
|
|
1533
1589
|
case e.options instanceof Function: {
|
|
1534
|
-
e.cache !== !1 ?
|
|
1590
|
+
e.cache !== !1 ? i() : h();
|
|
1535
1591
|
break;
|
|
1536
1592
|
}
|
|
1537
1593
|
case ae(e.options): {
|
|
@@ -1546,14 +1602,14 @@ function tn(e) {
|
|
|
1546
1602
|
t.value = e.options;
|
|
1547
1603
|
}
|
|
1548
1604
|
return (c, o) => {
|
|
1549
|
-
e.default && !
|
|
1550
|
-
function
|
|
1551
|
-
const
|
|
1605
|
+
e.default && !n && (c[o.key] = e.default, n = !0);
|
|
1606
|
+
function s() {
|
|
1607
|
+
const m = c[o.key], v = (y) => Ke({
|
|
1552
1608
|
data: t.value,
|
|
1553
1609
|
labelProp: "label",
|
|
1554
1610
|
valueProp: "value",
|
|
1555
1611
|
key: y
|
|
1556
|
-
}).map((j) => j.label).join("/"), k = (y) =>
|
|
1612
|
+
}).map((j) => j.label).join("/"), k = (y) => lr({
|
|
1557
1613
|
data: t.value,
|
|
1558
1614
|
labelProp: "label",
|
|
1559
1615
|
valueProp: "value",
|
|
@@ -1561,32 +1617,32 @@ function tn(e) {
|
|
|
1561
1617
|
}).map((j) => j.label).join("/");
|
|
1562
1618
|
switch (!0) {
|
|
1563
1619
|
case (!e.pathMode && !e.multiple): {
|
|
1564
|
-
const y = m
|
|
1565
|
-
return
|
|
1620
|
+
const y = v(m);
|
|
1621
|
+
return f("span", null, [y]);
|
|
1566
1622
|
}
|
|
1567
1623
|
case (!e.pathMode && e.multiple): {
|
|
1568
|
-
const y =
|
|
1569
|
-
return
|
|
1624
|
+
const y = m.map((C) => v(C));
|
|
1625
|
+
return f("span", null, [y.join(", ")]);
|
|
1570
1626
|
}
|
|
1571
1627
|
case (e.pathMode && !e.multiple): {
|
|
1572
|
-
const y = k(
|
|
1573
|
-
return
|
|
1628
|
+
const y = k(m);
|
|
1629
|
+
return f("span", null, [y]);
|
|
1574
1630
|
}
|
|
1575
1631
|
case (e.pathMode && e.multiple): {
|
|
1576
|
-
const y =
|
|
1577
|
-
return
|
|
1632
|
+
const y = m.map((C) => k(C));
|
|
1633
|
+
return f("span", null, [y.join(", ")]);
|
|
1578
1634
|
}
|
|
1579
1635
|
default:
|
|
1580
|
-
return
|
|
1636
|
+
return f("span", null, null);
|
|
1581
1637
|
}
|
|
1582
1638
|
}
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1639
|
+
function d() {
|
|
1640
|
+
return f(Yt, {
|
|
1585
1641
|
pathMode: e.pathMode,
|
|
1586
|
-
ref: (
|
|
1642
|
+
ref: (m) => r = m,
|
|
1587
1643
|
multiple: e.multiple,
|
|
1588
1644
|
modelValue: c[o.key],
|
|
1589
|
-
"onUpdate:modelValue": (
|
|
1645
|
+
"onUpdate:modelValue": (m) => c[o.key] = m,
|
|
1590
1646
|
placeholder: e.placeholder,
|
|
1591
1647
|
allowClear: e.clearable,
|
|
1592
1648
|
allowSearch: e.searchable,
|
|
@@ -1597,17 +1653,17 @@ function tn(e) {
|
|
|
1597
1653
|
}
|
|
1598
1654
|
switch (o.mode) {
|
|
1599
1655
|
case "text":
|
|
1600
|
-
return
|
|
1656
|
+
return s();
|
|
1601
1657
|
case "component":
|
|
1602
1658
|
default:
|
|
1603
|
-
return
|
|
1659
|
+
return d();
|
|
1604
1660
|
}
|
|
1605
1661
|
};
|
|
1606
1662
|
}
|
|
1607
|
-
function
|
|
1608
|
-
return (
|
|
1663
|
+
function ir(e) {
|
|
1664
|
+
return (r, n) => e(r, n);
|
|
1609
1665
|
}
|
|
1610
|
-
const
|
|
1666
|
+
const sr = {
|
|
1611
1667
|
thousands: !0,
|
|
1612
1668
|
inputUnit: "元",
|
|
1613
1669
|
outputUnit: "元"
|
|
@@ -1616,45 +1672,45 @@ const nn = {
|
|
|
1616
1672
|
元: 10 ** 2,
|
|
1617
1673
|
万: 10 ** 4
|
|
1618
1674
|
};
|
|
1619
|
-
function
|
|
1675
|
+
function dr(e) {
|
|
1620
1676
|
e = {
|
|
1621
|
-
...
|
|
1677
|
+
...sr,
|
|
1622
1678
|
...e || {}
|
|
1623
1679
|
};
|
|
1624
|
-
const
|
|
1680
|
+
const r = (l) => {
|
|
1625
1681
|
if (l == null)
|
|
1626
1682
|
return;
|
|
1627
1683
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1628
1684
|
return l;
|
|
1629
|
-
const
|
|
1630
|
-
return parseFloat((l *
|
|
1631
|
-
},
|
|
1685
|
+
const i = te[e.outputUnit] / te[e.inputUnit];
|
|
1686
|
+
return parseFloat((l * i).toFixed(10));
|
|
1687
|
+
}, n = (l) => {
|
|
1632
1688
|
if (l == null)
|
|
1633
1689
|
return;
|
|
1634
1690
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
1635
1691
|
return l;
|
|
1636
|
-
const
|
|
1637
|
-
return parseFloat((l *
|
|
1692
|
+
const i = te[e.inputUnit] / te[e.outputUnit];
|
|
1693
|
+
return parseFloat((l * i).toFixed(10));
|
|
1638
1694
|
}, t = (l) => {
|
|
1639
|
-
const
|
|
1640
|
-
return
|
|
1695
|
+
const i = l.split(".");
|
|
1696
|
+
return i[0] = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), i.join(".");
|
|
1641
1697
|
}, a = (l) => {
|
|
1642
|
-
const
|
|
1643
|
-
return e != null && e.thousands ? t(
|
|
1698
|
+
const i = l;
|
|
1699
|
+
return e != null && e.thousands ? t(i) : i;
|
|
1644
1700
|
}, u = (l) => l.replace(/,/g, "");
|
|
1645
|
-
return (l,
|
|
1646
|
-
const
|
|
1647
|
-
Z(
|
|
1648
|
-
l[
|
|
1701
|
+
return (l, i) => {
|
|
1702
|
+
const h = _(r(l[i.key]));
|
|
1703
|
+
Z(h, (m) => {
|
|
1704
|
+
l[i.key] = n(m);
|
|
1649
1705
|
});
|
|
1650
|
-
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ?
|
|
1651
|
-
function i() {
|
|
1652
|
-
return d("span", null, [a(v.value.toString()), o()]);
|
|
1653
|
-
}
|
|
1706
|
+
const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
|
|
1654
1707
|
function s() {
|
|
1655
|
-
return
|
|
1656
|
-
|
|
1657
|
-
|
|
1708
|
+
return f("span", null, [a(h.value.toString()), o()]);
|
|
1709
|
+
}
|
|
1710
|
+
function d() {
|
|
1711
|
+
return f(Ve, {
|
|
1712
|
+
modelValue: h.value,
|
|
1713
|
+
"onUpdate:modelValue": (m) => h.value = m,
|
|
1658
1714
|
formatter: a,
|
|
1659
1715
|
parser: u,
|
|
1660
1716
|
precision: e == null ? void 0 : e.precision,
|
|
@@ -1667,57 +1723,57 @@ function ln(e) {
|
|
|
1667
1723
|
suffix: o
|
|
1668
1724
|
});
|
|
1669
1725
|
}
|
|
1670
|
-
switch (
|
|
1726
|
+
switch (i.mode) {
|
|
1671
1727
|
case "text":
|
|
1672
|
-
return
|
|
1728
|
+
return s();
|
|
1673
1729
|
case "component":
|
|
1674
1730
|
default:
|
|
1675
|
-
return
|
|
1731
|
+
return d();
|
|
1676
1732
|
}
|
|
1677
1733
|
};
|
|
1678
1734
|
}
|
|
1679
|
-
function
|
|
1735
|
+
function fr() {
|
|
1680
1736
|
return {
|
|
1681
|
-
input:
|
|
1682
|
-
textarea:
|
|
1683
|
-
select:
|
|
1684
|
-
treeSelect:
|
|
1685
|
-
date:
|
|
1686
|
-
switch:
|
|
1687
|
-
dateRange:
|
|
1688
|
-
render:
|
|
1689
|
-
cascader:
|
|
1690
|
-
currency:
|
|
1737
|
+
input: Jn,
|
|
1738
|
+
textarea: rr,
|
|
1739
|
+
select: er,
|
|
1740
|
+
treeSelect: ur,
|
|
1741
|
+
date: Wn,
|
|
1742
|
+
switch: tr,
|
|
1743
|
+
dateRange: nr,
|
|
1744
|
+
render: ir,
|
|
1745
|
+
cascader: cr,
|
|
1746
|
+
currency: dr
|
|
1691
1747
|
};
|
|
1692
1748
|
}
|
|
1693
|
-
function Le(e,
|
|
1694
|
-
|
|
1695
|
-
const
|
|
1696
|
-
...
|
|
1749
|
+
function Le(e, r) {
|
|
1750
|
+
r.render || (r.render = (t) => t.input());
|
|
1751
|
+
const n = r.render({
|
|
1752
|
+
...fr()
|
|
1697
1753
|
});
|
|
1698
1754
|
return {
|
|
1699
|
-
default: () =>
|
|
1755
|
+
default: () => n(e, r)
|
|
1700
1756
|
};
|
|
1701
1757
|
}
|
|
1702
|
-
function
|
|
1703
|
-
switch (
|
|
1758
|
+
function Ie(e, r) {
|
|
1759
|
+
switch (r.mode) {
|
|
1704
1760
|
case "text":
|
|
1705
|
-
return Oe(Le(e,
|
|
1761
|
+
return Oe(Le(e, r).default);
|
|
1706
1762
|
case "component":
|
|
1707
1763
|
default:
|
|
1708
1764
|
return Oe(ve, {
|
|
1709
|
-
field:
|
|
1710
|
-
label:
|
|
1711
|
-
hideLabel:
|
|
1712
|
-
labelColStyle:
|
|
1713
|
-
wrapperColStyle:
|
|
1714
|
-
}, Le(e,
|
|
1765
|
+
field: r.key,
|
|
1766
|
+
label: r.title,
|
|
1767
|
+
hideLabel: r.hideLabel,
|
|
1768
|
+
labelColStyle: r.labelStyle,
|
|
1769
|
+
wrapperColStyle: r.contentStyle
|
|
1770
|
+
}, Le(e, r));
|
|
1715
1771
|
}
|
|
1716
1772
|
}
|
|
1717
|
-
function
|
|
1773
|
+
function mr(e) {
|
|
1718
1774
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1719
1775
|
}
|
|
1720
|
-
const
|
|
1776
|
+
const hr = /* @__PURE__ */ E({
|
|
1721
1777
|
props: {
|
|
1722
1778
|
form: {
|
|
1723
1779
|
type: Object,
|
|
@@ -1728,98 +1784,98 @@ const on = /* @__PURE__ */ z({
|
|
|
1728
1784
|
}
|
|
1729
1785
|
},
|
|
1730
1786
|
setup(e) {
|
|
1731
|
-
const
|
|
1732
|
-
...
|
|
1787
|
+
const r = qe(), n = e.form.map((h) => ({
|
|
1788
|
+
...h,
|
|
1733
1789
|
collapsed: !1
|
|
1734
|
-
})), t = Array.from(new Set(
|
|
1735
|
-
let
|
|
1736
|
-
|
|
1790
|
+
})), t = Array.from(new Set(n.map((h) => h.group).flat().filter(Boolean))), a = n.reduce((h, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
|
|
1791
|
+
let s = h.find((d) => d.group === o);
|
|
1792
|
+
s || (s = {
|
|
1737
1793
|
group: o,
|
|
1738
1794
|
instance: void 0,
|
|
1739
1795
|
form: []
|
|
1740
|
-
},
|
|
1741
|
-
}),
|
|
1796
|
+
}, h.push(s)), s.form.push(c);
|
|
1797
|
+
}), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), u = _("默认");
|
|
1742
1798
|
return {
|
|
1743
|
-
formItems:
|
|
1799
|
+
formItems: n,
|
|
1744
1800
|
groups: t,
|
|
1745
1801
|
groupForms: a,
|
|
1746
1802
|
activeTab: u,
|
|
1747
1803
|
onSubmit: () => {
|
|
1748
|
-
const
|
|
1749
|
-
if (
|
|
1750
|
-
const c =
|
|
1751
|
-
|
|
1752
|
-
o ||
|
|
1804
|
+
const h = a.find((c) => c.group === u.value);
|
|
1805
|
+
if (h && h.instance) {
|
|
1806
|
+
const c = h.instance.formSource;
|
|
1807
|
+
h.instance.validate().then((o) => {
|
|
1808
|
+
o || r.close(c);
|
|
1753
1809
|
});
|
|
1754
1810
|
}
|
|
1755
1811
|
},
|
|
1756
1812
|
onReset: () => {
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1813
|
+
const h = a.find((c) => c.group === u.value);
|
|
1814
|
+
h && h.instance && h.instance.reset();
|
|
1759
1815
|
}
|
|
1760
1816
|
};
|
|
1761
1817
|
},
|
|
1762
1818
|
render() {
|
|
1763
|
-
const e = this.groupForms.find((
|
|
1819
|
+
const e = this.groupForms.find((r) => r.group === this.activeTab);
|
|
1764
1820
|
if (this.groups.length) {
|
|
1765
|
-
let
|
|
1766
|
-
return
|
|
1821
|
+
let r;
|
|
1822
|
+
return f(Mt, {
|
|
1767
1823
|
"active-key": this.activeTab,
|
|
1768
|
-
"onUpdate:active-key": (
|
|
1769
|
-
},
|
|
1770
|
-
title:
|
|
1771
|
-
key:
|
|
1824
|
+
"onUpdate:active-key": (n) => this.activeTab = n
|
|
1825
|
+
}, mr(r = this.groupForms.map((n) => f(Tt, {
|
|
1826
|
+
title: n.group,
|
|
1827
|
+
key: n.group
|
|
1772
1828
|
}, {
|
|
1773
|
-
default: () => [
|
|
1774
|
-
form:
|
|
1829
|
+
default: () => [f(pe, {
|
|
1830
|
+
form: n.form,
|
|
1775
1831
|
value: this.value,
|
|
1776
|
-
ref: (t) =>
|
|
1777
|
-
}, null),
|
|
1832
|
+
ref: (t) => n.instance = t
|
|
1833
|
+
}, null), f(Ye, null, null), f("div", {
|
|
1778
1834
|
class: "flex items-center justify-between space-x-2"
|
|
1779
|
-
}, [
|
|
1835
|
+
}, [f(D, {
|
|
1780
1836
|
type: "secondary",
|
|
1781
1837
|
size: "large",
|
|
1782
1838
|
onClick: this.onReset
|
|
1783
1839
|
}, {
|
|
1784
|
-
default: () => [
|
|
1785
|
-
}),
|
|
1840
|
+
default: () => [I("重置")]
|
|
1841
|
+
}), f(D, {
|
|
1786
1842
|
class: "w-100px",
|
|
1787
1843
|
type: "primary",
|
|
1788
1844
|
size: "large",
|
|
1789
1845
|
onClick: this.onSubmit
|
|
1790
1846
|
}, {
|
|
1791
|
-
default: () => [
|
|
1847
|
+
default: () => [I("搜索")]
|
|
1792
1848
|
})])]
|
|
1793
|
-
}))) ?
|
|
1794
|
-
default: () => [
|
|
1849
|
+
}))) ? r : {
|
|
1850
|
+
default: () => [r]
|
|
1795
1851
|
});
|
|
1796
1852
|
} else
|
|
1797
|
-
return
|
|
1853
|
+
return f(ne, null, [f(pe, {
|
|
1798
1854
|
form: this.formItems,
|
|
1799
1855
|
value: this.value,
|
|
1800
|
-
ref: (
|
|
1801
|
-
}, null),
|
|
1856
|
+
ref: (r) => e.instance = r
|
|
1857
|
+
}, null), f(Ye, null, null), f("div", {
|
|
1802
1858
|
class: "flex items-center justify-between space-x-2"
|
|
1803
|
-
}, [
|
|
1859
|
+
}, [f(D, {
|
|
1804
1860
|
type: "secondary",
|
|
1805
1861
|
size: "large",
|
|
1806
1862
|
onClick: this.onReset
|
|
1807
1863
|
}, {
|
|
1808
|
-
default: () => [
|
|
1809
|
-
}),
|
|
1864
|
+
default: () => [I("重置")]
|
|
1865
|
+
}), f(D, {
|
|
1810
1866
|
class: "w-100px",
|
|
1811
1867
|
type: "primary",
|
|
1812
1868
|
size: "large",
|
|
1813
1869
|
onClick: this.onSubmit
|
|
1814
1870
|
}, {
|
|
1815
|
-
default: () => [
|
|
1871
|
+
default: () => [I("搜索")]
|
|
1816
1872
|
})])]);
|
|
1817
1873
|
}
|
|
1818
1874
|
});
|
|
1819
|
-
function
|
|
1875
|
+
function De(e) {
|
|
1820
1876
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
1821
1877
|
}
|
|
1822
|
-
const pe = /* @__PURE__ */
|
|
1878
|
+
const pe = /* @__PURE__ */ E({
|
|
1823
1879
|
props: {
|
|
1824
1880
|
form: {
|
|
1825
1881
|
type: Object,
|
|
@@ -1884,13 +1940,13 @@ const pe = /* @__PURE__ */ z({
|
|
|
1884
1940
|
emits: ["submit", "cancel", "update:model-value"],
|
|
1885
1941
|
expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
|
|
1886
1942
|
setup(e, {
|
|
1887
|
-
emit:
|
|
1943
|
+
emit: r
|
|
1888
1944
|
}) {
|
|
1889
|
-
const
|
|
1945
|
+
const n = _(), [t, a] = An(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), i = _(), h = () => l.value = !l.value, c = _(""), o = _("");
|
|
1890
1946
|
he(Te.id, c), he(Te.source, t);
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1893
|
-
},
|
|
1947
|
+
const s = () => {
|
|
1948
|
+
r("submit", t.value), r("update:model-value", t.value);
|
|
1949
|
+
}, d = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
|
|
1894
1950
|
switch (!0) {
|
|
1895
1951
|
case typeof g.visiable == "boolean":
|
|
1896
1952
|
return g.visiable;
|
|
@@ -1899,33 +1955,33 @@ const pe = /* @__PURE__ */ z({
|
|
|
1899
1955
|
default:
|
|
1900
1956
|
return !0;
|
|
1901
1957
|
}
|
|
1902
|
-
})),
|
|
1958
|
+
})), m = F(() => {
|
|
1903
1959
|
if (!u.value)
|
|
1904
1960
|
return 1;
|
|
1905
|
-
const g =
|
|
1961
|
+
const g = d.value.reduce((b, O) => b + ((O == null ? void 0 : O.span) || 1), 0);
|
|
1906
1962
|
return u.value - g % u.value;
|
|
1907
|
-
}),
|
|
1963
|
+
}), v = (g) => g != null && g.validator ? {
|
|
1908
1964
|
...g,
|
|
1909
1965
|
validator: (b, O) => {
|
|
1910
1966
|
const Y = g.validator(b, O);
|
|
1911
1967
|
if (typeof Y == "function")
|
|
1912
1968
|
return Y(t.value);
|
|
1913
1969
|
}
|
|
1914
|
-
} : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(
|
|
1970
|
+
} : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(v) : g[b.key] = v(b.rule)), g), {}));
|
|
1915
1971
|
function y() {
|
|
1916
1972
|
var b;
|
|
1917
1973
|
if (e.columns)
|
|
1918
1974
|
return;
|
|
1919
|
-
const g = (b =
|
|
1975
|
+
const g = (b = n.value) == null ? void 0 : b.$el;
|
|
1920
1976
|
g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
|
|
1921
1977
|
}
|
|
1922
1978
|
function C() {
|
|
1923
1979
|
var b;
|
|
1924
|
-
const g = (b =
|
|
1980
|
+
const g = (b = n.value) == null ? void 0 : b.$el;
|
|
1925
1981
|
g && (g.id = c.value);
|
|
1926
1982
|
}
|
|
1927
1983
|
function j() {
|
|
1928
|
-
|
|
1984
|
+
i.value.open(hr, {
|
|
1929
1985
|
form: e.form,
|
|
1930
1986
|
value: t.value
|
|
1931
1987
|
}, {
|
|
@@ -1933,62 +1989,62 @@ const pe = /* @__PURE__ */ z({
|
|
|
1933
1989
|
footer: !1,
|
|
1934
1990
|
submitText: "搜索"
|
|
1935
1991
|
}).then((g) => {
|
|
1936
|
-
g && (
|
|
1992
|
+
g && (P(g), s());
|
|
1937
1993
|
});
|
|
1938
1994
|
}
|
|
1939
1995
|
W(() => {
|
|
1940
1996
|
const g = Math.random().toString(32).slice(2);
|
|
1941
1997
|
c.value = e.id ?? g, o.value = e.name ?? g, y(), C(), window && window.addEventListener("resize", y);
|
|
1942
1998
|
});
|
|
1943
|
-
function
|
|
1999
|
+
function P(g) {
|
|
1944
2000
|
a({
|
|
1945
2001
|
...t.value,
|
|
1946
2002
|
...g || {}
|
|
1947
2003
|
});
|
|
1948
2004
|
}
|
|
1949
|
-
function
|
|
1950
|
-
t.value[g] = b,
|
|
2005
|
+
function z(g, b) {
|
|
2006
|
+
t.value[g] = b, P({
|
|
1951
2007
|
...t.value
|
|
1952
2008
|
});
|
|
1953
2009
|
}
|
|
1954
2010
|
function H(g) {
|
|
1955
2011
|
const b = e.form.find((Y) => Y.key === g), O = (typeof b.default == "function" ? b.default() : b.default) || null;
|
|
1956
|
-
|
|
2012
|
+
z(g, O);
|
|
1957
2013
|
}
|
|
1958
|
-
function
|
|
2014
|
+
function B() {
|
|
1959
2015
|
var g;
|
|
1960
|
-
(g =
|
|
2016
|
+
(g = n.value) == null || g.resetFields();
|
|
1961
2017
|
}
|
|
1962
2018
|
function w() {
|
|
1963
2019
|
var g;
|
|
1964
|
-
return (g =
|
|
2020
|
+
return (g = n.value) == null ? void 0 : g.validate();
|
|
1965
2021
|
}
|
|
1966
2022
|
return {
|
|
1967
2023
|
formId: c,
|
|
1968
2024
|
formName: o,
|
|
1969
2025
|
formSource: t,
|
|
1970
|
-
formInstance:
|
|
2026
|
+
formInstance: n,
|
|
1971
2027
|
formColumns: u,
|
|
1972
2028
|
formRules: k,
|
|
1973
2029
|
formCollspased: l,
|
|
1974
|
-
formActiosSpan:
|
|
1975
|
-
formItems:
|
|
1976
|
-
toggleFormCollapsed:
|
|
1977
|
-
updateFormField:
|
|
2030
|
+
formActiosSpan: m,
|
|
2031
|
+
formItems: d,
|
|
2032
|
+
toggleFormCollapsed: h,
|
|
2033
|
+
updateFormField: z,
|
|
1978
2034
|
resetFormField: H,
|
|
1979
|
-
updateFormSource:
|
|
1980
|
-
reset:
|
|
2035
|
+
updateFormSource: P,
|
|
2036
|
+
reset: B,
|
|
1981
2037
|
validate: w,
|
|
1982
|
-
onSubmitSuccess:
|
|
2038
|
+
onSubmitSuccess: s,
|
|
1983
2039
|
openCollapsedDialog: j,
|
|
1984
|
-
modalInstance:
|
|
2040
|
+
modalInstance: i
|
|
1985
2041
|
};
|
|
1986
2042
|
},
|
|
1987
2043
|
render() {
|
|
1988
2044
|
const e = () => {
|
|
1989
2045
|
if (!this.showFormResult)
|
|
1990
2046
|
return;
|
|
1991
|
-
const
|
|
2047
|
+
const n = this.form.filter((a) => {
|
|
1992
2048
|
const u = this.formSource[a.key];
|
|
1993
2049
|
switch (!0) {
|
|
1994
2050
|
case typeof u == "string":
|
|
@@ -2000,99 +2056,99 @@ const pe = /* @__PURE__ */ z({
|
|
|
2000
2056
|
}
|
|
2001
2057
|
}), t = (a) => {
|
|
2002
2058
|
var l;
|
|
2003
|
-
const u = this.formItems.find((
|
|
2059
|
+
const u = this.formItems.find((i) => i.key === a);
|
|
2004
2060
|
u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
|
|
2005
2061
|
};
|
|
2006
|
-
return
|
|
2062
|
+
return f(ce, {
|
|
2007
2063
|
span: this.formColumns
|
|
2008
2064
|
}, {
|
|
2009
|
-
default: () => [
|
|
2065
|
+
default: () => [f(ve, {
|
|
2010
2066
|
label: "搜索条件"
|
|
2011
2067
|
}, {
|
|
2012
|
-
default: () => [
|
|
2068
|
+
default: () => [f("div", {
|
|
2013
2069
|
class: "w-full mt-5px text-left"
|
|
2014
|
-
}, [
|
|
2070
|
+
}, [f(Me, {
|
|
2015
2071
|
wrap: !0,
|
|
2016
2072
|
align: "center"
|
|
2017
2073
|
}, {
|
|
2018
|
-
default: () => [
|
|
2074
|
+
default: () => [n.length > 0 ? n.map((a) => f(Lt, {
|
|
2019
2075
|
key: a.key,
|
|
2020
2076
|
closable: !0,
|
|
2021
2077
|
onClose: () => t(a.key)
|
|
2022
2078
|
}, {
|
|
2023
|
-
default: () => [
|
|
2079
|
+
default: () => [f("div", {
|
|
2024
2080
|
class: "flex space-x-2"
|
|
2025
|
-
}, [
|
|
2081
|
+
}, [f("div", {
|
|
2026
2082
|
class: "text-#999"
|
|
2027
|
-
}, [a.title,
|
|
2083
|
+
}, [a.title, I(":")]), f("div", {
|
|
2028
2084
|
class: "text-#333"
|
|
2029
|
-
}, [
|
|
2085
|
+
}, [Ie(this.formSource, {
|
|
2030
2086
|
...a,
|
|
2031
2087
|
key: a.key,
|
|
2032
2088
|
mode: "text"
|
|
2033
2089
|
})])])]
|
|
2034
|
-
})) :
|
|
2090
|
+
})) : f("div", {
|
|
2035
2091
|
class: "text-#999"
|
|
2036
|
-
}, [
|
|
2092
|
+
}, [I("暂无搜索条件")])]
|
|
2037
2093
|
})])]
|
|
2038
2094
|
})]
|
|
2039
2095
|
});
|
|
2040
|
-
},
|
|
2041
|
-
const
|
|
2096
|
+
}, r = () => {
|
|
2097
|
+
const n = [], t = this.footer ? {
|
|
2042
2098
|
span: this.formColumns
|
|
2043
2099
|
} : {
|
|
2044
2100
|
span: this.formActiosSpan
|
|
2045
2101
|
};
|
|
2046
|
-
if (this.searchable && (
|
|
2102
|
+
if (this.searchable && (n.push(f(D, {
|
|
2047
2103
|
type: "primary",
|
|
2048
2104
|
htmlType: "submit"
|
|
2049
2105
|
}, {
|
|
2050
|
-
default: () => [
|
|
2051
|
-
})),
|
|
2106
|
+
default: () => [I("搜索")]
|
|
2107
|
+
})), n.push(f(D, {
|
|
2052
2108
|
type: "secondary",
|
|
2053
2109
|
onClick: () => {
|
|
2054
2110
|
var a;
|
|
2055
2111
|
return (a = this.formInstance) == null ? void 0 : a.resetFields();
|
|
2056
2112
|
}
|
|
2057
2113
|
}, {
|
|
2058
|
-
default: () => [
|
|
2059
|
-
}))), this.submitable && (
|
|
2114
|
+
default: () => [I("重置")]
|
|
2115
|
+
}))), this.submitable && (n.push(f(D, {
|
|
2060
2116
|
type: "primary",
|
|
2061
2117
|
htmlType: "submit"
|
|
2062
2118
|
}, {
|
|
2063
|
-
default: () => [
|
|
2064
|
-
})),
|
|
2119
|
+
default: () => [I("提交")]
|
|
2120
|
+
})), n.push(f(D, {
|
|
2065
2121
|
type: "secondary",
|
|
2066
2122
|
onClick: () => this.$emit("cancel")
|
|
2067
2123
|
}, {
|
|
2068
|
-
default: () => [
|
|
2069
|
-
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" &&
|
|
2124
|
+
default: () => [I("取消")]
|
|
2125
|
+
}))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && n.push(f(D, {
|
|
2070
2126
|
onClick: this.toggleFormCollapsed
|
|
2071
2127
|
}, {
|
|
2072
2128
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
2073
|
-
icon: () => this.formCollspased ?
|
|
2074
|
-
})), this.collapsedMode === "dialog" &&
|
|
2129
|
+
icon: () => this.formCollspased ? f(Ut, null, null) : f(Xt, null, null)
|
|
2130
|
+
})), this.collapsedMode === "dialog" && n.push(f(D, {
|
|
2075
2131
|
onClick: this.openCollapsedDialog
|
|
2076
2132
|
}, {
|
|
2077
2133
|
default: () => "高级搜索",
|
|
2078
|
-
icon: () =>
|
|
2079
|
-
}))), this.$slots.actions &&
|
|
2080
|
-
return
|
|
2081
|
-
default: () => [
|
|
2134
|
+
icon: () => f(nn, null, null)
|
|
2135
|
+
}))), this.$slots.actions && n.push(...this.$slots.actions()), n.length)
|
|
2136
|
+
return f(ce, t, {
|
|
2137
|
+
default: () => [f(ve, {
|
|
2082
2138
|
contentClass: this.footer ? "form-footer" : ""
|
|
2083
2139
|
}, {
|
|
2084
|
-
default: () => [
|
|
2085
|
-
default: () => [
|
|
2140
|
+
default: () => [f(Me, null, De(n) ? n : {
|
|
2141
|
+
default: () => [n]
|
|
2086
2142
|
})]
|
|
2087
2143
|
})]
|
|
2088
2144
|
});
|
|
2089
2145
|
};
|
|
2090
|
-
return
|
|
2146
|
+
return f("div", {
|
|
2091
2147
|
class: "form-render"
|
|
2092
|
-
}, [
|
|
2093
|
-
ref: (
|
|
2148
|
+
}, [f(Rn, {
|
|
2149
|
+
ref: (n) => this.modalInstance = n
|
|
2094
2150
|
}, {
|
|
2095
|
-
default: () => [
|
|
2151
|
+
default: () => [f(Pt, ge({
|
|
2096
2152
|
name: this.formName
|
|
2097
2153
|
}, {
|
|
2098
2154
|
labelAlign: "right",
|
|
@@ -2100,48 +2156,48 @@ const pe = /* @__PURE__ */ z({
|
|
|
2100
2156
|
rules: this.formRules,
|
|
2101
2157
|
onSubmitSuccess: this.onSubmitSuccess,
|
|
2102
2158
|
"auto-label-width": !0,
|
|
2103
|
-
ref: (
|
|
2159
|
+
ref: (n) => this.formInstance = n,
|
|
2104
2160
|
model: this.formSource
|
|
2105
2161
|
}), {
|
|
2106
|
-
default: () => [
|
|
2162
|
+
default: () => [f(jt, {
|
|
2107
2163
|
cols: this.formColumns,
|
|
2108
2164
|
"col-gap": 24,
|
|
2109
2165
|
"rol-gap": 10
|
|
2110
2166
|
}, {
|
|
2111
|
-
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((
|
|
2167
|
+
default: () => [this.formItems.filter(() => this.formColumns !== 0).map((n) => {
|
|
2112
2168
|
let t;
|
|
2113
|
-
return
|
|
2114
|
-
span:
|
|
2115
|
-
},
|
|
2169
|
+
return f(ce, {
|
|
2170
|
+
span: n.span
|
|
2171
|
+
}, De(t = Ie(this.formSource, n)) ? t : {
|
|
2116
2172
|
default: () => [t]
|
|
2117
2173
|
});
|
|
2118
|
-
}),
|
|
2174
|
+
}), r(), e()]
|
|
2119
2175
|
})]
|
|
2120
2176
|
})]
|
|
2121
2177
|
})]);
|
|
2122
2178
|
}
|
|
2123
2179
|
});
|
|
2124
|
-
function
|
|
2180
|
+
function gr(e) {
|
|
2125
2181
|
return e;
|
|
2126
2182
|
}
|
|
2127
|
-
function
|
|
2128
|
-
const
|
|
2183
|
+
function br(e) {
|
|
2184
|
+
const r = q(), n = _();
|
|
2129
2185
|
function t() {
|
|
2130
2186
|
var u, l;
|
|
2131
|
-
const a = (l = (u =
|
|
2132
|
-
a && (
|
|
2187
|
+
const a = (l = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
|
|
2188
|
+
a && (n.value = a);
|
|
2133
2189
|
}
|
|
2134
|
-
return W(t),
|
|
2190
|
+
return W(t), pt(t), n;
|
|
2135
2191
|
}
|
|
2136
|
-
const
|
|
2137
|
-
install(e,
|
|
2192
|
+
const kr = {
|
|
2193
|
+
install(e, r) {
|
|
2138
2194
|
e.component("FormRender", pe);
|
|
2139
2195
|
}
|
|
2140
2196
|
};
|
|
2141
2197
|
export {
|
|
2142
2198
|
pe as FormRender,
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2199
|
+
Cr as FormRenderResolver,
|
|
2200
|
+
kr as default,
|
|
2201
|
+
gr as defineForm,
|
|
2202
|
+
br as useForm
|
|
2147
2203
|
};
|