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