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