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